diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin/blogs/_form.html.haml | 10 | ||||
-rw-r--r-- | app/views/admin/streams/edit.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/streams/index.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/updates/edit.html.haml | 2 | ||||
-rw-r--r-- | app/views/comments/_form.html.haml | 3 | ||||
-rw-r--r-- | app/views/layouts/application.html.haml | 15 | ||||
-rw-r--r-- | app/views/layouts/quotes.html.haml | 1 | ||||
-rw-r--r-- | app/views/quotes/search_form.html.haml | 6 | ||||
-rw-r--r-- | app/views/streams/_stream.html.haml | 8 | ||||
-rw-r--r-- | app/views/streams/index.html.haml | 19 | ||||
-rw-r--r-- | app/views/streams/show.html.haml | 2 | ||||
-rw-r--r-- | app/views/updates/_update.html.haml | 7 |
12 files changed, 63 insertions, 16 deletions
diff --git a/app/views/admin/blogs/_form.html.haml b/app/views/admin/blogs/_form.html.haml index f64ebe5..323d499 100644 --- a/app/views/admin/blogs/_form.html.haml +++ b/app/views/admin/blogs/_form.html.haml | |||
@@ -42,9 +42,13 @@ | |||
42 | .details-module.image-uploads | 42 | .details-module.image-uploads |
43 | %h4 Images | 43 | %h4 Images |
44 | - f.object.images.each do |image| | 44 | - f.object.images.each do |image| |
45 | = image_tag image.variant(:thumb) | 45 | - if image.representable? |
46 | = f.hidden_field :images, multiple: true, value: image.signed_id | 46 | = image_tag image.variant(:thumb) |
47 | %pre= rails_blob_url(image) | 47 | - else |
48 | = image.filename.to_s | ||
49 | - unless image.new_record? | ||
50 | = f.hidden_field :images, multiple: true, value: image.signed_id | ||
51 | %pre= rails_blob_url(image) | ||
48 | %hr | 52 | %hr |
49 | = f.file_field :images, multiple: true | 53 | = f.file_field :images, multiple: true |
50 | .details-module= f.submit | 54 | .details-module= f.submit |
diff --git a/app/views/admin/streams/edit.html.haml b/app/views/admin/streams/edit.html.haml index 8d910fe..8c250e2 100644 --- a/app/views/admin/streams/edit.html.haml +++ b/app/views/admin/streams/edit.html.haml | |||
@@ -1,3 +1,3 @@ | |||
1 | - title "Editing #{@stream.title}" | 1 | - title "Editing #{@stream.title}" |
2 | = form_for @stream, url: admin_stream_url(@stream), html: { id: "entry-form" } do |f| | 2 | = form_for @stream, url: admin_stream_url(@stream.id), html: { id: "entry-form" } do |f| |
3 | = render partial: "form", locals: { f: f } | 3 | = render partial: "form", locals: { f: f } |
diff --git a/app/views/admin/streams/index.html.haml b/app/views/admin/streams/index.html.haml index 6903fd1..a2a25d7 100644 --- a/app/views/admin/streams/index.html.haml +++ b/app/views/admin/streams/index.html.haml | |||
@@ -10,5 +10,5 @@ | |||
10 | %td= stream.created_at.strftime("%B %d, %Y, %l:%M%P") | 10 | %td= stream.created_at.strftime("%B %d, %Y, %l:%M%P") |
11 | %td | 11 | %td |
12 | %ul.admin-actions | 12 | %ul.admin-actions |
13 | %li= link_to "Edit", edit_admin_stream_url(stream) | 13 | %li= link_to "Edit", edit_admin_stream_url(stream.id) |
14 | %li= link_to "Add Update", new_admin_stream_update_url(stream) | 14 | %li= link_to "Add Update", new_admin_stream_update_url(stream.id) |
diff --git a/app/views/admin/updates/edit.html.haml b/app/views/admin/updates/edit.html.haml index 75a9957..3cab0b6 100644 --- a/app/views/admin/updates/edit.html.haml +++ b/app/views/admin/updates/edit.html.haml | |||
@@ -1,3 +1,3 @@ | |||
1 | - title "Editing stream update" | 1 | - title "Editing stream update" |
2 | = form_for @update, url: admin_stream_update_url(@stream, @update), html: { id: "entry-form" } do |f| | 2 | = form_for @update, url: admin_stream_update_url(@stream.id, @update), html: { id: "entry-form" } do |f| |
3 | = render partial: "form", locals: { f: f } | 3 | = render partial: "form", locals: { f: f } |
diff --git a/app/views/comments/_form.html.haml b/app/views/comments/_form.html.haml index 13a0903..12692c2 100644 --- a/app/views/comments/_form.html.haml +++ b/app/views/comments/_form.html.haml | |||
@@ -24,6 +24,9 @@ | |||
24 | .comment-website-field.comment-field | 24 | .comment-website-field.comment-field |
25 | .comment-field-label= f.label :website, "Website (Optional)" | 25 | .comment-field-label= f.label :website, "Website (Optional)" |
26 | .comment-field-input= f.text_field :website, type: :url | 26 | .comment-field-input= f.text_field :website, type: :url |
27 | .comment-website-field.comment-field | ||
28 | .comment-field-label | ||
29 | .comment-field-input= recaptcha_tags | ||
27 | .comment-submit-button.comment-field | 30 | .comment-submit-button.comment-field |
28 | .comment-field-label | 31 | .comment-field-label |
29 | .comment-field-input= f.submit "Post" | 32 | .comment-field-input= f.submit "Post" |
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 90ea5e2..1d0bea3 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml | |||
@@ -9,15 +9,16 @@ | |||
9 | %link{rel: "me", href: "mailto:fefferburbia+thoughts@gmail.com"} | 9 | %link{rel: "me", href: "mailto:fefferburbia+thoughts@gmail.com"} |
10 | %link{rel: "webmention", href: webmentions_url} | 10 | %link{rel: "webmention", href: webmentions_url} |
11 | %link{rel: "alternate", type: "application/atom+xml", href: blogs_url(format: :atom)} | 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"} | ||
12 | %body#main-body | 13 | %body#main-body |
13 | - if flash[:alert] | 14 | - if flash[:alert] |
14 | %div#flash.flash-alert= flash[:alert] | 15 | %div#flash.flash-alert= flash[:alert] |
15 | - if flash[:notice] | 16 | - if flash[:notice] |
16 | %div#flash.flash-notice= flash[:notice] | 17 | %div#flash.flash-notice= flash[:notice] |
17 | #container | 18 | #container |
18 | #page-header | 19 | %header#banner |
19 | %header#banner | 20 | %h1 Four Island |
20 | %h1= link_to "Four Island", root_url | 21 | = link_to image_tag("fourisland_header.png"), root_url |
21 | #page-body | 22 | #page-body |
22 | #sidebar | 23 | #sidebar |
23 | .sidebar-module | 24 | .sidebar-module |
@@ -53,6 +54,14 @@ | |||
53 | = link_to link[:title], link[:url], link.include?(:extra) ? link[:extra] : {} | 54 | = link_to link[:title], link[:url], link.include?(:extra) ? link[:extra] : {} |
54 | .sidebar-module.fun-links | 55 | .sidebar-module.fun-links |
55 | .bubble.rounded | 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 | ||
56 | %h2 Blog links | 65 | %h2 Blog links |
57 | %ul | 66 | %ul |
58 | %li | 67 | %li |
diff --git a/app/views/layouts/quotes.html.haml b/app/views/layouts/quotes.html.haml index 4a7681e..4b21000 100644 --- a/app/views/layouts/quotes.html.haml +++ b/app/views/layouts/quotes.html.haml | |||
@@ -25,6 +25,7 @@ | |||
25 | - if user_signed_in? | 25 | - if user_signed_in? |
26 | %li= link_to_unless_current "Submit", new_quote_url | 26 | %li= link_to_unless_current "Submit", new_quote_url |
27 | %li= link_to_unless_current "Tags", tags_quotes_url | 27 | %li= link_to_unless_current "Tags", tags_quotes_url |
28 | %li= link_to_unless_current "Search", search_form_quotes_url | ||
28 | %li= link_to_unless_current "Stats", stats_quotes_url | 29 | %li= link_to_unless_current "Stats", stats_quotes_url |
29 | %li= link_to_unless_current "Feed", latest_quotes_url(:atom) | 30 | %li= link_to_unless_current "Feed", latest_quotes_url(:atom) |
30 | - if user_signed_in? | 31 | - if user_signed_in? |
diff --git a/app/views/quotes/search_form.html.haml b/app/views/quotes/search_form.html.haml new file mode 100644 index 0000000..74cdd20 --- /dev/null +++ b/app/views/quotes/search_form.html.haml | |||
@@ -0,0 +1,6 @@ | |||
1 | %h3 Search | ||
2 | = search_form_for @q, url: search_quotes_url do |f| | ||
3 | .form-field | ||
4 | = f.label :content_or_notes_cont, "Query:" | ||
5 | = f.search_field :content_or_notes_cont | ||
6 | .form-field= f.submit | ||
diff --git a/app/views/streams/_stream.html.haml b/app/views/streams/_stream.html.haml index 84a6478..97d4813 100644 --- a/app/views/streams/_stream.html.haml +++ b/app/views/streams/_stream.html.haml | |||
@@ -1,6 +1,8 @@ | |||
1 | %article#stream-post | 1 | %article#stream-post |
2 | %h2#stream-title= stream.title | 2 | %h2#stream-title= stream.title |
3 | - unless stream.body.blank? | 3 | - unless stream.body.blank? |
4 | %header#stream-intro.entry-content= stream.body.html_safe | 4 | %header#stream-intro.entry-content= markdown(stream.body) |
5 | - unless stream.updates.empty? | 5 | = will_paginate @updates |
6 | = render stream.updates | 6 | - unless @updates.empty? |
7 | = render @updates | ||
8 | = will_paginate @updates | ||
diff --git a/app/views/streams/index.html.haml b/app/views/streams/index.html.haml new file mode 100644 index 0000000..bf5073f --- /dev/null +++ b/app/views/streams/index.html.haml | |||
@@ -0,0 +1,19 @@ | |||
1 | %table#streams-index | ||
2 | %tr#streams-index-header-row | ||
3 | %th Stream Topic | ||
4 | %th Updates | ||
5 | %th Last Post | ||
6 | - @streams.each do |stream| | ||
7 | %tr | ||
8 | %td | ||
9 | = link_to stream.title, stream, class: "stream-link" | ||
10 | %br | ||
11 | %time= stream.created_at.strftime("%B #{stream.created_at.day.ordinalize}, %Y at %-I:%M:%S%P") | ||
12 | %td= stream.updates.size | ||
13 | %td | ||
14 | - unless stream.updates.empty? | ||
15 | - latest_post = stream.updates.order(created_at: :desc).first | ||
16 | = link_to (stripped_markdown(latest_post.body)[0, 30] + "..."), stream | ||
17 | %br | ||
18 | %time= latest_post.created_at.strftime("%B #{latest_post.created_at.day.ordinalize}, %Y at %-I:%M:%S%P") | ||
19 | = will_paginate @streams | ||
diff --git a/app/views/streams/show.html.haml b/app/views/streams/show.html.haml index 8365556..8d58f62 100644 --- a/app/views/streams/show.html.haml +++ b/app/views/streams/show.html.haml | |||
@@ -1,3 +1,3 @@ | |||
1 | - title @stream.title | 1 | - title @stream.title |
2 | .breadcrumb= link_to "← Back to home page", root_path | 2 | .breadcrumb= link_to "← Back to streams", streams_path |
3 | = render @stream | 3 | = render @stream |
diff --git a/app/views/updates/_update.html.haml b/app/views/updates/_update.html.haml index 57f4158..ceb7d8f 100644 --- a/app/views/updates/_update.html.haml +++ b/app/views/updates/_update.html.haml | |||
@@ -1,3 +1,6 @@ | |||
1 | %section.stream-update.entry-content{ id: "update-#{update.id}" } | 1 | %section.stream-update.entry-content{ id: "update-#{update.id}" } |
2 | %time.update-posted= update.created_at.strftime("%B #{update.created_at.day.ordinalize}, %Y at %-I:%M:%S%P") | 2 | %header.update-posted |
3 | = update.body.html_safe | 3 | %time= update.created_at.strftime("%B #{update.created_at.day.ordinalize}, %Y at %-I:%M:%S%P") |
4 | - if user_signed_in? and !update.new_record? | ||
5 | = link_to "Edit", edit_admin_stream_update_path(update.stream.id, update), :class => "update-edit-link" | ||
6 | = markdown(update.body) | ||