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.haml20
-rw-r--r--app/views/layouts/application.html.haml102
-rw-r--r--app/views/layouts/quotes.html.haml41
-rw-r--r--app/views/layouts/userdata.html.haml2
4 files changed, 145 insertions, 20 deletions
diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml index cb48c50..e3fc92f 100644 --- a/app/views/layouts/admin.html.haml +++ b/app/views/layouts/admin.html.haml
@@ -1,13 +1,13 @@
1!!! 5 1!!! 5
2%html 2%html
3 %head 3 %head
4 %title Thoughts - Admin 4 %title= content_for?(:title) ? "Four Island - Admin - #{yield(:title)}" : "Four Island - Admin"
5 = csrf_meta_tags 5 = csrf_meta_tags
6 = stylesheet_link_tag 'admin', media: 'all', 'data-turbolinks-track': 'reload' 6 = stylesheet_link_tag 'admin', 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
9 #banner 9 #banner
10 = link_to "Thoughts", root_url 10 = link_to "Four Island", root_url
11 - if flash[:alert] 11 - if flash[:alert]
12 #flash.flash-alert 12 #flash.flash-alert
13 %span.flash-tag ERROR: 13 %span.flash-tag ERROR:
@@ -29,5 +29,21 @@
29 = link_to "Streams", admin_streams_url, class: "major-link" 29 = link_to "Streams", admin_streams_url, class: "major-link"
30 %ul.minors 30 %ul.minors
31 %li.minor= link_to "New stream", new_admin_stream_url 31 %li.minor= link_to "New stream", new_admin_stream_url
32 %li{major_sidebar_attrs("links")}
33 = link_to "Links", admin_links_url, class: "major-link"
34 %ul.minors
35 %li.minor= link_to "New link", new_admin_link_url
36 %li{major_sidebar_attrs("games")}
37 = link_to "Games", admin_games_url, class: "major-link"
38 %ul.minors
39 %li.minor= link_to "New game", new_admin_game_url
40 %li{major_sidebar_attrs("comments")}
41 = link_to "Comments", admin_comments_url, class: "major-link"
42 %ul.minors
43 %li.minor= link_to "Pending", pending_admin_comments_url
44 %li{major_sidebar_attrs("quotes")}
45 = link_to "Quotes", admin_quotes_url, class: "major-link"
46 %ul.minors
47 %li.minor= link_to "Pending", pending_admin_quotes_url
32 #main 48 #main
33 = yield 49 = yield
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 2d264a7..6bc7041 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml
@@ -1,29 +1,97 @@
1!!! 5 1!!! 5
2%html 2%html
3 %head 3 %head
4 %title Thoughts 4 %title= content_for?(:title) ? "Four Island - #{yield(:title)}" : "Four Island"
5 = csrf_meta_tags 5 = csrf_meta_tags
6 = stylesheet_link_tag 'main', media: 'all', 'data-turbolinks-track': 'reload' 6 = stylesheet_link_tag 'main', 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 = display_meta_tags og: { site_name: "Four Island" }
9 %link{rel: "me", href: "mailto:fefferburbia+thoughts@gmail.com"}
10 %link{rel: "webmention", href: webmentions_url}
11 %link{rel: "alternate", type: "application/atom+xml", href: blogs_url(format: :atom)}
12 %meta{name: "viewport", content: "width=device-width, initial-scale=1.0"}
8 %body#main-body 13 %body#main-body
9 - if flash[:alert] 14 - if flash[:alert]
10 %div#flash.flash-alert= flash[:alert] 15 %div#flash.flash-alert= flash[:alert]
11 - if flash[:notice] 16 - if flash[:notice]
12 %div#flash.flash-notice= flash[:notice] 17 %div#flash.flash-notice= flash[:notice]
13 #container 18 #container
14 #sidebar 19 %header#banner
15 .sidebar-module 20 %h1 Four Island
16 %h2 I'm Fef. 21 = link_to image_tag("fourisland_header.png"), root_url
17 %p Coding is what I do. I make a lot of things, including Twitter bots. I really like Pokémon, and I write about it a lot. 22 #page-body
18 %p B.S. in CS, Carnegie Mellon 2017 23 #sidebar
19 .sidebar-module 24 .sidebar-module
20 %h2 Meta 25 %blockquote.pimped.bubble.rounded.bottom
21 %ul 26 %h2 I'm Hatkirby.
22 - if not user_signed_in? 27 %p Coding is what I do. I make a lot of things, including Twitter bots. I really like Pokémon, and I write about it a lot.
23 %li= link_to "Log in", new_user_session_path 28 %p B.S. in CS, Carnegie Mellon 2017
24 - if user_signed_in? 29 %cite.bubble
25 %li= link_to "Admin", admin_url 30 <strong>Hatkirby</strong> on Four Island
26 %li= link_to "Log out", destroy_user_session_path, method: :delete 31 .sidebar-module.fun-links
27 #main 32 .bubble.rounded
28 %header#banner= link_to "feffernoo.se", root_url 33 %h2 Me, elsewhere
29 #content= yield 34 %ul
35 %li
36 = image_tag "user_comment.png"
37 = link_to "Mastodon", "https://beppo.online/@starlight", rel: "me"
38 %li
39 = image_tag "rainbow.png"
40 = link_to "Archive of Our Own", "https://archiveofourown.org/users/StarlightSystem"
41 %li
42 = image_tag "bricks.png"
43 = link_to "itch.io", "https://hatkirby.itch.io"
44 %li
45 = image_tag "controller.png"
46 = link_to "Speedrun.com", "https://www.speedrun.com/users/hatkirby"
47 .sidebar-module.fun-links
48 .bubble.rounded
49 %h2 Projects
50 %ul
51 - links_sidebar().each do |link|
52 %li
53 = image_tag "tag_#{cycle("blue", "green", "orange", "pink", "purple", "red", "yellow")}.png"
54 = link_to link[:title], link[:url], link.include?(:extra) ? link[:extra] : {}
55 .sidebar-module.fun-links
56 .bubble.rounded
57 %h2 Friends
58 %ul
59 - friends_sidebar().each do |link|
60 %li
61 = image_tag "tag_#{cycle("blue", "green", "orange", "pink", "purple", "red", "yellow")}.png"
62 = link_to link[:title], link[:url], link.include?(:extra) ? link[:extra] : {}
63 .sidebar-module.fun-links
64 .bubble.rounded
65 %h2 Blog links
66 %ul
67 %li
68 = image_tag "book_open.png"
69 = link_to "Archive", blogs_url
70 %li
71 = image_tag "tag_blue.png"
72 = link_to "Tag cloud", tags_url
73 %li
74 = image_tag "feed.png"
75 = link_to "Atom feed", blogs_url(format: :atom)
76 - unless @random_song.nil?
77 .sidebar-module#scrobble-box
78 .bubble.rounded
79 %h2 Listening to
80 = image_tag @random_song.image, width: "174px"
81 %p
82 %strong= @random_song.title
83 by
84 = @random_song.artist
85 %p= @random_song.album
86 .sidebar-module
87 .bubble.rounded
88 %h2 Meta
89 %ul
90 - if not user_signed_in?
91 %li= link_to "Log in", new_user_session_path
92 - if user_signed_in?
93 = yield :meta_sidebar_content
94 %li= link_to "Admin", admin_url
95 %li= link_to "Log out", destroy_user_session_path, method: :delete
96 #main
97 #content= yield
diff --git a/app/views/layouts/quotes.html.haml b/app/views/layouts/quotes.html.haml new file mode 100644 index 0000000..040fdfe --- /dev/null +++ b/app/views/layouts/quotes.html.haml
@@ -0,0 +1,41 @@
1!!! 5
2%html
3 %head
4 %title The Four Island Quotes DB
5 %meta{ :charset => "utf-8" }
6 = stylesheet_link_tag "quotes"
7 = javascript_include_tag "application"
8 = csrf_meta_tag
9 = auto_discovery_link_tag :atom, latest_quotes_url(:atom)
10 = display_meta_tags og: { site_name: "Four Island" }
11 %link{rel: "alternate", type: "application/atom+xml", href: latest_quotes_url(:atom)}
12 %meta{name: "viewport", content: "width=device-width, initial-scale=1.0"}
13 %body
14 #wrap
15 %header#banner
16 %h1#banner-title= link_to "The Four Island Quotes DB", quotes_url
17 #banner-abbr FIQDB
18 .cleardiv
19 %nav#top-bar
20 %ul
21 %li= link_to_unless_current "Home", quotes_url
22 %li= link_to_unless_current "Latest", latest_quotes_url
23 %li= link_to_unless_current "Top", top_quotes_url
24 %li{"data-turbolinks" => "false"}= link_to "Random", random_quotes_url
25 - if user_signed_in?
26 %li= link_to_unless_current "Submit", new_quote_url
27 %li= link_to_unless_current "Tags", tags_quotes_url
28 %li= link_to_unless_current "Search", search_form_quotes_url
29 %li{"data-turbolinks" => "false"}= link_to_unless_current "Stats", stats_quotes_url
30 %li= link_to_unless_current "Feed", latest_quotes_url(:atom)
31 - if user_signed_in?
32 %li= link_to_unless_current "Admin", admin_url
33 .cleardiv
34 #page-body
35 - if flash[:notice]
36 #flash= flash[:notice]
37 = yield
38 %footer
39 #footer-left= raw "The Four Island Quotes DB is a #{link_to "Four Island", root_url} project and is &copy;&nbsp;hatkirby&nbsp;2008-#{Time.now.year}"
40 #footer-right #{Quote.published.count} approved quotes; #{Quote.pending.count} pending quotes
41 .cleardiv
diff --git a/app/views/layouts/userdata.html.haml b/app/views/layouts/userdata.html.haml index 29e47b2..0caaa4d 100644 --- a/app/views/layouts/userdata.html.haml +++ b/app/views/layouts/userdata.html.haml
@@ -1,7 +1,7 @@
1!!! 5 1!!! 5
2%html 2%html
3 %head 3 %head
4 %title Thoughts 4 %title Four Island
5 = csrf_meta_tags 5 = csrf_meta_tags
6 = stylesheet_link_tag 'userdata', media: 'all', 'data-turbolinks-track': 'reload' 6 = stylesheet_link_tag 'userdata', media: 'all', 'data-turbolinks-track': 'reload'
7 = javascript_include_tag 'application', 'data-turbolinks-track': 'reload' 7 = javascript_include_tag 'application', 'data-turbolinks-track': 'reload'