diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-06-25 12:30:31 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-06-25 12:30:31 -0400 |
commit | 7e2e42379cb40a500eb8a236c05788eb3e84d141 (patch) | |
tree | 784dfe04f81b034889b96b5c251923da7e6f3a1e /app/views/layouts | |
parent | 275218aeaf24d4f9d58589cf68ec6647f0a65050 (diff) | |
download | thoughts-7e2e42379cb40a500eb8a236c05788eb3e84d141.tar.gz thoughts-7e2e42379cb40a500eb8a236c05788eb3e84d141.tar.bz2 thoughts-7e2e42379cb40a500eb8a236c05788eb3e84d141.zip |
Added logging in and logging out
Diffstat (limited to 'app/views/layouts')
-rw-r--r-- | app/views/layouts/application.html.haml | 18 | ||||
-rw-r--r-- | app/views/layouts/userdata.html.haml | 18 |
2 files changed, 33 insertions, 3 deletions
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 55d7805..e9d8dfd 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml | |||
@@ -5,12 +5,24 @@ | |||
5 | = csrf_meta_tags | 5 | = csrf_meta_tags |
6 | = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' | 6 | = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' |
7 | = javascript_include_tag 'application', 'data-turbolinks-track': 'reload' | 7 | = javascript_include_tag 'application', 'data-turbolinks-track': 'reload' |
8 | %body | 8 | %body#main-body |
9 | - if flash[:alert] | ||
10 | %div#flash.flash-alert= flash[:alert] | ||
11 | - if flash[:notice] | ||
12 | %div#flash.flash-notice= flash[:notice] | ||
9 | #container | 13 | #container |
10 | #banner | 14 | #banner |
11 | %h1= link_to "Thoughts", root_url | 15 | %h1= link_to "Thoughts", root_url |
12 | #main | 16 | #main |
13 | #content= yield | 17 | #content= yield |
14 | #sidebar | 18 | #sidebar |
15 | %h2 I'm Fef. | 19 | .sidebar-module |
16 | %p I'm a computer science undergrad at Carnegie Mellon University. I make a lot of things, including Twitter bots. I really like Pokémon, and I write about it a lot. | 20 | %h2 I'm Fef. |
21 | %p I'm a computer science undergrad at Carnegie Mellon University. I make a lot of things, including Twitter bots. I really like Pokémon, and I write about it a lot. | ||
22 | .sidebar-module | ||
23 | %h2 Meta | ||
24 | %ul | ||
25 | - if not user_signed_in? | ||
26 | %li= link_to "Log in", new_user_session_path | ||
27 | - if user_signed_in? | ||
28 | %li= link_to "Log out", destroy_user_session_path, method: :delete | ||
diff --git a/app/views/layouts/userdata.html.haml b/app/views/layouts/userdata.html.haml new file mode 100644 index 0000000..f6e3b57 --- /dev/null +++ b/app/views/layouts/userdata.html.haml | |||
@@ -0,0 +1,18 @@ | |||
1 | !!! 5 | ||
2 | %html | ||
3 | %head | ||
4 | %title Thoughts | ||
5 | = csrf_meta_tags | ||
6 | = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' | ||
7 | = javascript_include_tag 'application', 'data-turbolinks-track': 'reload' | ||
8 | %body#userdata-body | ||
9 | #userdata-container | ||
10 | - if flash[:alert] | ||
11 | #userdata-flash.userdata-flash-alert | ||
12 | %span.userdata-flash-tag ERROR: | ||
13 | = flash.alert | ||
14 | - if flash[:notice] | ||
15 | #userdata-flash.userdata-flash-notice | ||
16 | %span.userdata-flash-tag NOTICE: | ||
17 | = flash.notice | ||
18 | = yield | ||