about summary refs log tree commit diff stats
path: root/app/views/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/layouts')
-rw-r--r--app/views/layouts/admin.html.haml27
-rw-r--r--app/views/layouts/application.html.haml1
2 files changed, 28 insertions, 0 deletions
diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml new file mode 100644 index 0000000..a2c2d95 --- /dev/null +++ b/app/views/layouts/admin.html.haml
@@ -0,0 +1,27 @@
1!!! 5
2%html
3 %head
4 %title Thoughts - Admin
5 = csrf_meta_tags
6 = stylesheet_link_tag 'admin', media: 'all', 'data-turbolinks-track': 'reload'
7 = javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
8 %body
9 #banner= link_to "Thoughts", root_url
10 #container
11 %ul#sidebar
12 %li{major_sidebar_attrs("dashboard")}
13 = link_to "Dashboard", admin_url, class: "major-link"
14 %li{major_sidebar_attrs("blogs")}
15 = link_to "Blogs", admin_blogs_url, class: "major-link"
16 %ul.minors
17 %li.minor= link_to "New blog", new_admin_blog_url
18 #main
19 - if flash[:alert]
20 #flash.flash-alert
21 %span.flash-tag ERROR:
22 = flash.alert
23 - if flash[:notice]
24 #flash.flash-notice
25 %span.flash-tag NOTICE:
26 = flash.notice
27 = yield
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 2a9e2eb..5148df4 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml
@@ -21,6 +21,7 @@
21 - if not user_signed_in? 21 - if not user_signed_in?
22 %li= link_to "Log in", new_user_session_path 22 %li= link_to "Log in", new_user_session_path
23 - if user_signed_in? 23 - if user_signed_in?
24 %li= link_to "Admin", admin_url
24 %li= link_to "Log out", destroy_user_session_path, method: :delete 25 %li= link_to "Log out", destroy_user_session_path, method: :delete
25 #main 26 #main
26 %header#banner= link_to "feffernoo.se", root_url 27 %header#banner= link_to "feffernoo.se", root_url