about summary refs log tree commit diff stats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/blogs/_form.html.haml23
-rw-r--r--app/views/admin/blogs/drafts.html.haml5
-rw-r--r--app/views/admin/blogs/edit.html.haml3
-rw-r--r--app/views/admin/blogs/index.html.haml5
-rw-r--r--app/views/admin/blogs/new.html.haml1
-rw-r--r--app/views/admin/blogs/show.html.haml3
-rw-r--r--app/views/admin/comments/index.html.haml25
-rw-r--r--app/views/admin/comments/pending.haml32
-rw-r--r--app/views/admin/dashboard/index.html.haml20
-rw-r--r--app/views/admin/games/_form.html.haml35
-rw-r--r--app/views/admin/games/edit.html.haml3
-rw-r--r--app/views/admin/games/index.html.haml13
-rw-r--r--app/views/admin/games/new.html.haml3
-rw-r--r--app/views/admin/links/_form.html.haml26
-rw-r--r--app/views/admin/links/edit.html.haml3
-rw-r--r--app/views/admin/links/index.html.haml14
-rw-r--r--app/views/admin/links/new.html.haml3
-rw-r--r--app/views/admin/quotes/_form.html.haml32
-rw-r--r--app/views/admin/quotes/edit.html.haml3
-rw-r--r--app/views/admin/quotes/index.html.haml21
-rw-r--r--app/views/admin/quotes/pending.html.haml21
-rw-r--r--app/views/admin/streams/_form.html.haml6
-rw-r--r--app/views/admin/streams/edit.html.haml3
-rw-r--r--app/views/admin/streams/index.html.haml5
-rw-r--r--app/views/admin/streams/new.html.haml1
-rw-r--r--app/views/admin/updates/_form.html.haml2
-rw-r--r--app/views/admin/updates/edit.html.haml3
-rw-r--r--app/views/admin/updates/new.html.haml1
-rw-r--r--app/views/blogs/_blog.html.haml31
-rw-r--r--app/views/blogs/_list.html.haml5
-rw-r--r--app/views/blogs/index.atom.builder15
-rw-r--r--app/views/blogs/index.html.haml9
-rw-r--r--app/views/blogs/show.html.haml16
-rw-r--r--app/views/blogs/summary.html.haml1
-rw-r--r--app/views/blogs/voted.js.erb12
-rw-r--r--app/views/comment_mailer/new_comment_email.html.haml21
-rw-r--r--app/views/comment_mailer/new_comment_email.text.erb17
-rw-r--r--app/views/comment_mailer/new_pending_comment_email.html.haml22
-rw-r--r--app/views/comment_mailer/new_pending_comment_email.text.erb19
-rw-r--r--app/views/comment_mailer/reply_comment_email.html.haml14
-rw-r--r--app/views/comment_mailer/reply_comment_email.text.erb19
-rw-r--r--app/views/comments/_comment.html.haml14
-rw-r--r--app/views/comments/_form.html.haml32
-rw-r--r--app/views/comments/_layout.html.haml6
-rw-r--r--app/views/devise/confirmations/new.html.erb2
-rw-r--r--app/views/devise/registrations/edit.html.erb2
-rw-r--r--app/views/devise/registrations/new.html.erb2
-rw-r--r--app/views/devise/unlocks/new.html.erb2
-rw-r--r--app/views/games/index.html.haml26
-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
-rw-r--r--app/views/quote_mailer/pending_quote_email.html.haml13
-rw-r--r--app/views/quote_mailer/pending_quote_email.text.erb17
-rw-r--r--app/views/quotes/_quote.html.haml22
-rw-r--r--app/views/quotes/index.html.haml8
-rw-r--r--app/views/quotes/latest.atom.builder11
-rw-r--r--app/views/quotes/list.html.haml4
-rw-r--r--app/views/quotes/new.html.haml24
-rw-r--r--app/views/quotes/search_form.html.haml6
-rw-r--r--app/views/quotes/show.html.haml1
-rw-r--r--app/views/quotes/stats.html.haml41
-rw-r--r--app/views/quotes/tags.html.haml4
-rw-r--r--app/views/quotes/voted.js.erb12
-rw-r--r--app/views/records/_record.html.haml7
-rw-r--r--app/views/records/index.html.haml8
-rw-r--r--app/views/streams/_stream.html.haml8
-rw-r--r--app/views/streams/index.html.haml19
-rw-r--r--app/views/streams/show.html.haml3
-rw-r--r--app/views/tags/index.html.haml4
-rw-r--r--app/views/tags/show.html.haml6
-rw-r--r--app/views/updates/_update.html.haml7
-rw-r--r--app/views/users/passwords/edit.html.haml1
-rw-r--r--app/views/users/passwords/new.html.haml1
-rw-r--r--app/views/users/sessions/new.html.haml1
-rw-r--r--app/views/vote_mailer/daily_report_email.html.haml8
-rw-r--r--app/views/vote_mailer/daily_report_email.text.erb5
-rw-r--r--app/views/webmentions/.keep0
79 files changed, 951 insertions, 57 deletions
diff --git a/app/views/admin/blogs/_form.html.haml b/app/views/admin/blogs/_form.html.haml index 12f7a82..323d499 100644 --- a/app/views/admin/blogs/_form.html.haml +++ b/app/views/admin/blogs/_form.html.haml
@@ -7,7 +7,7 @@
7 = f.text_field :slug, placeholder: "insert-slug-here" 7 = f.text_field :slug, placeholder: "insert-slug-here"
8 .body-field 8 .body-field
9 = f.label :body 9 = f.label :body
10 = f.cktext_area :body 10 = f.text_area :body
11%fieldset#details 11%fieldset#details
12 - if f.object.errors.any? 12 - if f.object.errors.any?
13 #errors.details-module 13 #errors.details-module
@@ -20,11 +20,18 @@
20 - if f.object.published 20 - if f.object.published
21 = link_to "View post", blog_url(f.object.slug_was), target: "entry-preview" 21 = link_to "View post", blog_url(f.object.slug_was), target: "entry-preview"
22 - else 22 - else
23 = link_to "Preview post", admin_blog_url(f.object), target: "entry-preview" 23 = link_to "Preview post", admin_blog_url(f.object.id), target: "entry-preview"
24 .details-module
25 .tags-field
26 = f.label :tag_list, "Tags"
27 = f.text_field :tag_list, type: :tags, value: f.object.tag_list.join(",")
24 .details-module 28 .details-module
25 .published-field 29 .published-field
26 = f.check_box :published 30 = f.check_box :published
27 = f.label :published 31 = f.label :published
32 .datetime-field
33 = f.label :published_at
34 = f.text_field :published_at
28 .details-module 35 .details-module
29 = f.fields_for :records, Record.new do |builder| 36 = f.fields_for :records, Record.new do |builder|
30 .should-create-record-field 37 .should-create-record-field
@@ -32,4 +39,16 @@
32 = builder.label :_destroy, "Create record?" 39 = builder.label :_destroy, "Create record?"
33 .record-description-field 40 .record-description-field
34 = builder.text_area :description, placeholder: "record text" 41 = builder.text_area :description, placeholder: "record text"
42 .details-module.image-uploads
43 %h4 Images
44 - f.object.images.each do |image|
45 - if image.representable?
46 = image_tag image.variant(:thumb)
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)
52 %hr
53 = f.file_field :images, multiple: true
35 .details-module= f.submit 54 .details-module= f.submit
diff --git a/app/views/admin/blogs/drafts.html.haml b/app/views/admin/blogs/drafts.html.haml index 8f2d369..9deb395 100644 --- a/app/views/admin/blogs/drafts.html.haml +++ b/app/views/admin/blogs/drafts.html.haml
@@ -1,3 +1,4 @@
1- title "Blog drafts"
1%table#entries 2%table#entries
2 %tr 3 %tr
3 %th Title 4 %th Title
@@ -9,5 +10,5 @@
9 %td= blog.updated_at.strftime("%B %d, %Y, %l:%M%P") 10 %td= blog.updated_at.strftime("%B %d, %Y, %l:%M%P")
10 %td 11 %td
11 %ul.admin-actions 12 %ul.admin-actions
12 %li= link_to "Preview", admin_blog_url(blog) 13 %li= link_to "Preview", admin_blog_url(blog.id)
13 %li= link_to "Edit", edit_admin_blog_url(blog) 14 %li= link_to "Edit", edit_admin_blog_url(blog.id)
diff --git a/app/views/admin/blogs/edit.html.haml b/app/views/admin/blogs/edit.html.haml index f356069..deb9714 100644 --- a/app/views/admin/blogs/edit.html.haml +++ b/app/views/admin/blogs/edit.html.haml
@@ -1,2 +1,3 @@
1= form_for @blog, url: admin_blog_url(@blog), html: { id: "entry-form" } do |f| 1- title "Editing #{@blog.title}"
2= form_for @blog, url: admin_blog_url(@blog.id), html: { id: "entry-form" } do |f|
2 = render partial: "form", locals: { f: f } 3 = render partial: "form", locals: { f: f }
diff --git a/app/views/admin/blogs/index.html.haml b/app/views/admin/blogs/index.html.haml index 427d922..ebe1b68 100644 --- a/app/views/admin/blogs/index.html.haml +++ b/app/views/admin/blogs/index.html.haml
@@ -1,3 +1,4 @@
1- title "Blogs"
1%table#entries 2%table#entries
2 %tr 3 %tr
3 %th Title 4 %th Title
@@ -9,5 +10,5 @@
9 %td= blog.published_at.strftime("%B %d, %Y, %l:%M%P") 10 %td= blog.published_at.strftime("%B %d, %Y, %l:%M%P")
10 %td 11 %td
11 %ul.admin-actions 12 %ul.admin-actions
12 %li= link_to "View", blog_url(blog.slug) 13 %li= link_to "View", blog
13 %li= link_to "Edit", edit_admin_blog_url(blog) 14 %li= link_to "Edit", edit_admin_blog_url(blog.id)
diff --git a/app/views/admin/blogs/new.html.haml b/app/views/admin/blogs/new.html.haml index 0005278..eff1f16 100644 --- a/app/views/admin/blogs/new.html.haml +++ b/app/views/admin/blogs/new.html.haml
@@ -1,2 +1,3 @@
1- title "New blog"
1= form_for @blog, url: admin_blogs_url, html: { id: "entry-form" } do |f| 2= form_for @blog, url: admin_blogs_url, html: { id: "entry-form" } do |f|
2 = render partial: "form", locals: { f: f } 3 = render partial: "form", locals: { f: f }
diff --git a/app/views/admin/blogs/show.html.haml b/app/views/admin/blogs/show.html.haml index 7875cab..f50f69d 100644 --- a/app/views/admin/blogs/show.html.haml +++ b/app/views/admin/blogs/show.html.haml
@@ -1,4 +1,5 @@
1= render partial: "blogs/blog", object: @blog 1- title "Previewing #{@blog.title}"
2= render "blogs/blog", blog: @blog, short: false
2%footer#blog-footer 3%footer#blog-footer
3 This draft was last updated on 4 This draft was last updated on
4 = succeed "." do 5 = succeed "." do
diff --git a/app/views/admin/comments/index.html.haml b/app/views/admin/comments/index.html.haml new file mode 100644 index 0000000..8cfa0bb --- /dev/null +++ b/app/views/admin/comments/index.html.haml
@@ -0,0 +1,25 @@
1- title "Comments"
2= will_paginate @comments
3%table#entries
4 %tr
5 %th Text
6 %th Author
7 %th Blog post
8 %th Date published
9 %th
10 - @comments.each do |comment|
11 %tr{ class: cycle("even", "odd") }
12 %td= comment.body
13 %td
14 %ul
15 %li= comment.username
16 %li= comment.email
17 - unless comment.website.empty?
18 %li= comment.website
19 %td= link_to comment.blog.title, comment.blog
20 %td= comment.published_at.strftime("%B %d, %Y, %l:%M%P")
21 %td
22 %ul.admin-actions
23 %li= link_to "View", blog_url(comment.blog, anchor: "comment-#{comment.id}")
24 %li= link_to "Delete", admin_comment_url(comment), method: :delete, data: { confirm: "Are you sure?" }
25= will_paginate @comments
diff --git a/app/views/admin/comments/pending.haml b/app/views/admin/comments/pending.haml new file mode 100644 index 0000000..5352b12 --- /dev/null +++ b/app/views/admin/comments/pending.haml
@@ -0,0 +1,32 @@
1- title "Pending Comments"
2= will_paginate @comments
3= form_tag mass_admin_comments_url, method: :post do
4 #action-box
5 = select_tag "mass_action", options_for_select(["Delete", "Mark Spam"]), include_blank: true
6 = submit_tag "Mass action", data: { confirm: "Are you sure you want to do this action?" }
7 %table#entries
8 %tr
9 %th= check_box_tag "check_all"
10 %th Text
11 %th Author
12 %th Blog post
13 %th Date updated
14 %th
15 - @comments.each do |comment|
16 %tr{ class: cycle("even", "odd") }
17 %td= check_box_tag "comment_ids[]", comment.id, class: "comment_ids"
18 %td= comment.body
19 %td
20 %ul
21 %li= comment.username
22 %li= comment.email
23 - unless comment.website.empty?
24 %li= comment.website
25 %td= link_to comment.blog.title, comment.blog
26 %td= comment.created_at.strftime("%B %d, %Y, %l:%M%P")
27 %td
28 %ul.admin-actions
29 %li= link_to "Accept", accept_admin_comment_url(comment), method: :post, data: { confirm: "Are you sure you want to accept this comment?" }
30 %li= link_to "Reject", reject_admin_comment_url(comment), method: :post, data: { confirm: "Are you sure you want to reject this comment?" }
31 %li= link_to "Mark Spam", mark_spam_admin_comment_url(comment), method: :post, data: { confirm: "Are you sure you want to mark this comment as spam?" }
32= will_paginate @comments
diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index eaac627..254107c 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml
@@ -1 +1,19 @@
1Welcome to the the ubiquitous administration panel! 1%p Welcome to the the ubiquitous administration panel!
2%p Stats:
3%ul
4 %li
5 %strong Blog posts:
6 = Blog.count
7 %li
8 %strong Approved comments:
9 = Comment.where(status: :published).count
10 %li
11 %strong Filtered comments:
12 = Global.get_filtered_comments
13 %li
14 %strong Quotes:
15 = Quote.count
16 %li
17 %strong Votes:
18 = Vote.count
19 (+#{Vote.where(upvote: true).count} / -#{Vote.where(upvote: false).count})
diff --git a/app/views/admin/games/_form.html.haml b/app/views/admin/games/_form.html.haml new file mode 100644 index 0000000..bc31c26 --- /dev/null +++ b/app/views/admin/games/_form.html.haml
@@ -0,0 +1,35 @@
1%fieldset#content
2 .title-field
3 = f.label :title
4 = f.text_field :title, placeholder: "Title"
5 .description-field
6 = f.label :description
7 = f.text_area :description
8%fieldset#details
9 - if f.object.errors.any?
10 #errors.details-module
11 %h3 Error!
12 %ul
13 - f.object.errors.full_messages.each do |error|
14 %li= error
15 .details-module
16 .progress-field
17 = f.label :progress
18 = f.text_area :progress
19 .details-module
20 .score-field
21 = f.label :score
22 = f.select :score, 1..10, include_blank: true
23 .details-module
24 .started-field
25 = f.label :started_on
26 = f.text_field :started_on, class: "datepicker"
27 .details-module
28 .finished-field
29 = f.label :finished_on
30 = f.text_field :finished_on, class: "datepicker"
31 .details-module
32 .status-field
33 = f.select :status, options_for_select(Game.status.values, f.object.status)
34 = f.label :status
35 .details-module= f.submit
diff --git a/app/views/admin/games/edit.html.haml b/app/views/admin/games/edit.html.haml new file mode 100644 index 0000000..d7a480b --- /dev/null +++ b/app/views/admin/games/edit.html.haml
@@ -0,0 +1,3 @@
1- title "Editing #{@game.title}"
2= form_for @game, url: admin_game_url(@game), html: { id: "entry-form" } do |f|
3 = render partial: "form", locals: { f: f }
diff --git a/app/views/admin/games/index.html.haml b/app/views/admin/games/index.html.haml new file mode 100644 index 0000000..96c69b8 --- /dev/null +++ b/app/views/admin/games/index.html.haml
@@ -0,0 +1,13 @@
1- title "Games"
2%table#entries
3 %tr
4 %th Title
5 %th Date published
6 %th
7 - @games.each do |game|
8 %tr{ class: cycle("even", "odd") }
9 %td= game.title
10 %td= game.created_at.strftime("%B %d, %Y, %l:%M%P")
11 %td
12 %ul.admin-actions
13 %li= link_to "Edit", edit_admin_game_url(game)
diff --git a/app/views/admin/games/new.html.haml b/app/views/admin/games/new.html.haml new file mode 100644 index 0000000..00dfb92 --- /dev/null +++ b/app/views/admin/games/new.html.haml
@@ -0,0 +1,3 @@
1- title "New game"
2= form_for @game, url: admin_games_url, html: { id: "entry-form" } do |f|
3 = render partial: "form", locals: { f: f }
diff --git a/app/views/admin/links/_form.html.haml b/app/views/admin/links/_form.html.haml new file mode 100644 index 0000000..c624a3d --- /dev/null +++ b/app/views/admin/links/_form.html.haml
@@ -0,0 +1,26 @@
1%fieldset#content
2 .title-field
3 = f.label :title
4 = f.text_field :title, placeholder: "Title"
5 .url-field
6 = f.label :url
7 = f.text_field :url, placeholder: "URL"
8%fieldset#details
9 - if f.object.errors.any?
10 #errors.details-module
11 %h3 Error!
12 %ul
13 - f.object.errors.full_messages.each do |error|
14 %li= error
15 .details-module
16 .tags-field
17 = f.label :tag_list, "Tags"
18 = f.text_field :tag_list, type: :tags, value: f.object.tag_list.join(",")
19 .details-module
20 = f.fields_for :records, Record.new do |builder|
21 .should-create-record-field
22 = builder.check_box :_destroy, {checked: false}, "0", "1"
23 = builder.label :_destroy, "Create record?"
24 .record-description-field
25 = builder.text_area :description, placeholder: "record text"
26 .details-module= f.submit
diff --git a/app/views/admin/links/edit.html.haml b/app/views/admin/links/edit.html.haml new file mode 100644 index 0000000..1c6c529 --- /dev/null +++ b/app/views/admin/links/edit.html.haml
@@ -0,0 +1,3 @@
1- title "Editing #{@link.title}"
2= form_for @link, url: admin_link_url(@link), html: { id: "entry-form" } do |f|
3 = render partial: "form", locals: { f: f }
diff --git a/app/views/admin/links/index.html.haml b/app/views/admin/links/index.html.haml new file mode 100644 index 0000000..e66d9b7 --- /dev/null +++ b/app/views/admin/links/index.html.haml
@@ -0,0 +1,14 @@
1- title "Links"
2%table#entries
3 %tr
4 %th Title
5 %th Date created
6 %th
7 - @links.each do |link|
8 %tr{ class: cycle("even", "odd") }
9 %td= link.title
10 %td= link.created_at.strftime("%B %d, %Y, %l:%M%P")
11 %td
12 %ul.admin-actions
13 %li= link_to "Edit", edit_admin_link_url(link)
14 %li= link_to "Show", link.url
diff --git a/app/views/admin/links/new.html.haml b/app/views/admin/links/new.html.haml new file mode 100644 index 0000000..accdfd9 --- /dev/null +++ b/app/views/admin/links/new.html.haml
@@ -0,0 +1,3 @@
1- title "New link"
2= form_for @link, url: admin_links_url, html: { id: "entry-form" } do |f|
3 = render partial: "form", locals: { f: f }
diff --git a/app/views/admin/quotes/_form.html.haml b/app/views/admin/quotes/_form.html.haml new file mode 100644 index 0000000..13948ca --- /dev/null +++ b/app/views/admin/quotes/_form.html.haml
@@ -0,0 +1,32 @@
1%fieldset#content
2 %h2 Quote ##{f.object.id}
3 .halfbody-field
4 = f.label :content
5 = f.text_area :content
6 %h3 Notes
7 .halfbody-field
8 = f.label :notes
9 = f.text_area :notes
10%fieldset#details
11 - if f.object.errors.any?
12 #errors.details-module
13 %h3 Error!
14 %ul
15 - f.object.errors.full_messages.each do |error|
16 %li= error
17 - unless f.object.new_record?
18 #entry-preview-link.details-module= link_to "View quote", quote_url(f.object.id), target: "entry-preview"
19 .details-module
20 .tags-field
21 = f.label :tag_list, "Tags"
22 = f.text_field :tag_list, type: :tags, value: f.object.tag_list.join(",")
23 .details-module
24 .published-field
25 = f.label :state
26 = f.select :state, Quote.state.options
27 .details-module.image-uploads
28 %h4 Audio
29 - if f.object.audio.attached?
30 = audio_tag(rails_blob_url(f.object.audio), controls: true)
31 = f.file_field :audio
32 .details-module= f.submit
diff --git a/app/views/admin/quotes/edit.html.haml b/app/views/admin/quotes/edit.html.haml new file mode 100644 index 0000000..47ff2d1 --- /dev/null +++ b/app/views/admin/quotes/edit.html.haml
@@ -0,0 +1,3 @@
1- title "Editing Quote \##{@quote.id}"
2= form_for @quote, url: admin_quote_url(@quote.id), html: { id: "entry-form" } do |f|
3 = render partial: "form", locals: { f: f }
diff --git a/app/views/admin/quotes/index.html.haml b/app/views/admin/quotes/index.html.haml new file mode 100644 index 0000000..c1a4866 --- /dev/null +++ b/app/views/admin/quotes/index.html.haml
@@ -0,0 +1,21 @@
1- title "Quotes"
2= will_paginate @quotes
3%table#entries
4 %tr
5 %th ID
6 %th Content
7 %th Submitter
8 %th Date submitted
9 %th
10 - @quotes.each do |quote|
11 %tr{ class: cycle("even", "odd") }
12 %td= quote.id
13 %td= quote_format(quote.content)
14 %td= quote.submitter
15 %td= quote.created_at.strftime("%B %d, %Y, %l:%M%P")
16 %td
17 %ul.admin-actions
18 %li= link_to "View", quote
19 %li= link_to "Edit", edit_admin_quote_url(quote)
20 %li= link_to "Delete", admin_quote_url(quote), method: :delete, data: { confirm: "Are you sure?" }
21= will_paginate @quotes
diff --git a/app/views/admin/quotes/pending.html.haml b/app/views/admin/quotes/pending.html.haml new file mode 100644 index 0000000..ef52099 --- /dev/null +++ b/app/views/admin/quotes/pending.html.haml
@@ -0,0 +1,21 @@
1- title "Pending Quotes"
2= will_paginate @quotes
3%table#entries
4 %tr
5 %th ID
6 %th Content
7 %th Submitter
8 %th Date submitted
9 %th
10 - @quotes.each do |quote|
11 %tr{ class: cycle("even", "odd") }
12 %td= quote.id
13 %td= quote_format(quote.content)
14 %td= quote.submitter
15 %td= quote.created_at.strftime("%B %d, %Y, %l:%M%P")
16 %td
17 %ul.admin-actions
18 %li= link_to "Edit", edit_admin_quote_url(quote)
19 %li= link_to "Accept", accept_admin_quote_url(quote), method: :post, data: { confirm: "Are you sure you want to accept this quote?" }
20 %li= link_to "Reject", admin_quote_url(quote), method: :delete, data: { confirm: "Are you sure you want to reject this quote?" }
21= will_paginate @quotes
diff --git a/app/views/admin/streams/_form.html.haml b/app/views/admin/streams/_form.html.haml index ce457cb..a4d8c46 100644 --- a/app/views/admin/streams/_form.html.haml +++ b/app/views/admin/streams/_form.html.haml
@@ -7,7 +7,7 @@
7 = f.text_field :slug, placeholder: "insert-slug-here" 7 = f.text_field :slug, placeholder: "insert-slug-here"
8 .body-field 8 .body-field
9 = f.label :body 9 = f.label :body
10 = f.cktext_area :body 10 = f.text_area :body
11%fieldset#details 11%fieldset#details
12 - if f.object.errors.any? 12 - if f.object.errors.any?
13 #errors.details-module 13 #errors.details-module
@@ -16,6 +16,10 @@
16 - f.object.errors.full_messages.each do |error| 16 - f.object.errors.full_messages.each do |error|
17 %li= error 17 %li= error
18 .details-module 18 .details-module
19 .tags-field
20 = f.label :tag_list, "Tags"
21 = f.text_field :tag_list, type: :tags, value: f.object.tag_list.join(",")
22 .details-module
19 = f.fields_for :records, Record.new do |builder| 23 = f.fields_for :records, Record.new do |builder|
20 .should-create-record-field 24 .should-create-record-field
21 = builder.check_box :_destroy, {checked: false}, "0", "1" 25 = builder.check_box :_destroy, {checked: false}, "0", "1"
diff --git a/app/views/admin/streams/edit.html.haml b/app/views/admin/streams/edit.html.haml index 1b58331..8c250e2 100644 --- a/app/views/admin/streams/edit.html.haml +++ b/app/views/admin/streams/edit.html.haml
@@ -1,2 +1,3 @@
1= form_for @stream, url: admin_stream_url(@stream), html: { id: "entry-form" } do |f| 1- title "Editing #{@stream.title}"
2= form_for @stream, url: admin_stream_url(@stream.id), html: { id: "entry-form" } do |f|
2 = 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 c69c6f9..a2a25d7 100644 --- a/app/views/admin/streams/index.html.haml +++ b/app/views/admin/streams/index.html.haml
@@ -1,3 +1,4 @@
1- title "Streams"
1%table#entries 2%table#entries
2 %tr 3 %tr
3 %th Title 4 %th Title
@@ -9,5 +10,5 @@
9 %td= stream.created_at.strftime("%B %d, %Y, %l:%M%P") 10 %td= stream.created_at.strftime("%B %d, %Y, %l:%M%P")
10 %td 11 %td
11 %ul.admin-actions 12 %ul.admin-actions
12 %li= link_to "Edit", edit_admin_stream_url(stream) 13 %li= link_to "Edit", edit_admin_stream_url(stream.id)
13 %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/streams/new.html.haml b/app/views/admin/streams/new.html.haml index 52febf5..875805a 100644 --- a/app/views/admin/streams/new.html.haml +++ b/app/views/admin/streams/new.html.haml
@@ -1,2 +1,3 @@
1- title "New stream"
1= form_for @stream, url: admin_streams_url, html: { id: "entry-form" } do |f| 2= form_for @stream, url: admin_streams_url, html: { id: "entry-form" } do |f|
2 = render partial: "form", locals: { f: f } 3 = render partial: "form", locals: { f: f }
diff --git a/app/views/admin/updates/_form.html.haml b/app/views/admin/updates/_form.html.haml index 9dd8741..f20e5a0 100644 --- a/app/views/admin/updates/_form.html.haml +++ b/app/views/admin/updates/_form.html.haml
@@ -4,7 +4,7 @@
4 = f.text_field :title, value: @stream.title, readonly: true 4 = f.text_field :title, value: @stream.title, readonly: true
5 .body-field 5 .body-field
6 = f.label :body 6 = f.label :body
7 = f.cktext_area :body 7 = f.text_area :body
8%fieldset#details 8%fieldset#details
9 - if f.object.errors.any? 9 - if f.object.errors.any?
10 #errors.details-module 10 #errors.details-module
diff --git a/app/views/admin/updates/edit.html.haml b/app/views/admin/updates/edit.html.haml index 5651d23..3cab0b6 100644 --- a/app/views/admin/updates/edit.html.haml +++ b/app/views/admin/updates/edit.html.haml
@@ -1,2 +1,3 @@
1= form_for @update, url: admin_stream_update_url(@stream, @update), html: { id: "entry-form" } do |f| 1- title "Editing stream update"
2= form_for @update, url: admin_stream_update_url(@stream.id, @update), html: { id: "entry-form" } do |f|
2 = render partial: "form", locals: { f: f } 3 = render partial: "form", locals: { f: f }
diff --git a/app/views/admin/updates/new.html.haml b/app/views/admin/updates/new.html.haml index 14c6d77..f6c1c20 100644 --- a/app/views/admin/updates/new.html.haml +++ b/app/views/admin/updates/new.html.haml
@@ -1,2 +1,3 @@
1- title "New stream update"
1= form_for @update, url: admin_stream_updates_url(@stream), html: { id: "entry-form" } do |f| 2= form_for @update, url: admin_stream_updates_url(@stream), html: { id: "entry-form" } do |f|
2 = render partial: "form", locals: { f: f } 3 = render partial: "form", locals: { f: f }
diff --git a/app/views/blogs/_blog.html.haml b/app/views/blogs/_blog.html.haml index 91b1d20..34b343f 100644 --- a/app/views/blogs/_blog.html.haml +++ b/app/views/blogs/_blog.html.haml
@@ -1,3 +1,28 @@
1%article#blog-post 1%article.blog-post.h-entry
2 %h2#blog-title= blog.title 2 %data.u-url{ value: url_for(blog) }
3 %section#blog-content.entry-content= blog.body.html_safe 3 %header
4 .post-calendar{ class: "post-date-#{(blog.visible_date.year - 2007) % 4 + 1}" }
5 %span.post-month= blog.visible_date.strftime("%^b")
6 %span.post-day= blog.visible_date.day
7 .blog-title
8 %h2.p-name= link_to_unless_current blog.title, blog
9 .post-author= blog.user.login.capitalize
10 %ul.post-tag-3
11 - blog.tags.each do |tag|
12 %li= link_to tag, tag_url(tag.name), class: "p-category"
13 %blockquote#blog-content.entry-content.bubble.rounded.bottom.e-content
14 - if short and blog.has_read_more
15 = markdown(blog.short_body)
16 = link_to "Read more...", blog
17 - else
18 = markdown(blog.body)
19 %cite.bubble.blog-cite
20 %span.p-author.h-card
21 %strong.p-name= blog.user.login.capitalize
22 %data.u-url{ value: root_url }
23 on
24 %time.dt-published{ datetime: blog.visible_date.strftime("%Y-%m-%dT%H:%M:%SZ%z") }= blog.visible_date.strftime("%B #{blog.visible_date.day.ordinalize}, %Y at %-I:%M:%S%P")
25 .post-vote{ id: "blog-vote-section-#{blog.id}" }
26 %span.vote-link{ id: "blog-upvote-link-#{blog.id}" }= link_to_unless (not blog.published or blog.already_upvoted?(request.remote_ip)), "👍", upvote_blog_path(blog), remote: true, rel: "nofollow", class: "blog-upvote-link", method: :post
27 %span.post-rating{ id: "blog-rating-#{blog.id}" }= blog.upvotes
28 %span.vote-link{ id: "blog-downvote-link-#{blog.id}" }= link_to_unless (not blog.published or blog.already_downvoted?(request.remote_ip)), "👎", downvote_blog_path(blog), remote: true, rel: "nofollow", class: "blog-downvote-link", method: :post
diff --git a/app/views/blogs/_list.html.haml b/app/views/blogs/_list.html.haml new file mode 100644 index 0000000..3618bdb --- /dev/null +++ b/app/views/blogs/_list.html.haml
@@ -0,0 +1,5 @@
1- if not @main_page
2 = will_paginate @blogs
3- @blogs.each do |blog|
4 = render blog, short: true
5= will_paginate @blogs
diff --git a/app/views/blogs/index.atom.builder b/app/views/blogs/index.atom.builder new file mode 100644 index 0000000..a05f29d --- /dev/null +++ b/app/views/blogs/index.atom.builder
@@ -0,0 +1,15 @@
1atom_feed do |feed|
2 feed.title("Four Island")
3 feed.updated(@blogs[0].published_at) if @blogs.length > 0
4
5 @blogs.limit(10).each do |blog|
6 feed.entry(blog, published: blog.published_at) do |entry|
7 entry.title(blog.title)
8 entry.content(markdown(blog.body), type: 'html')
9
10 entry.author do |author|
11 author.name("hatkirby")
12 end
13 end
14 end
15end
diff --git a/app/views/blogs/index.html.haml b/app/views/blogs/index.html.haml new file mode 100644 index 0000000..75bf92f --- /dev/null +++ b/app/views/blogs/index.html.haml
@@ -0,0 +1,9 @@
1#blog-archive
2 %h2 Blog Archive
3 .bubble.rounded
4 - @blogs.chunk {|blog| blog.published_at.strftime("%B %Y") }.each do |chunk|
5 %h3= chunk[0]
6 - chunk[1].each do |blog|
7 %p.archive-link
8 = link_to blog.title, blog
9 %small= blog.published_at.strftime("%-d %b %Y")
diff --git a/app/views/blogs/show.html.haml b/app/views/blogs/show.html.haml index 8ab4523..32d44bd 100644 --- a/app/views/blogs/show.html.haml +++ b/app/views/blogs/show.html.haml
@@ -1,6 +1,10 @@
1.breadcrumb= link_to "← Back to home page", root_path 1- title @blog.title
2= render @blog 2- unless @prev.nil?
3%footer#blog-footer 3 .back-post= link_to "← #{@prev.title}", @prev
4 This entry was posted on 4- unless @next.nil?
5 = succeed "." do 5 .next-post= link_to "#{@next.title} →", @next
6 %time= @blog.published_at.strftime("%B #{@blog.published_at.day.ordinalize}, %Y at %-I:%M:%S%P") 6.clear
7= render @blog, short: false
8= show_comments(@blog)
9- content_for :meta_sidebar_content do
10 = link_to "Edit this post", edit_admin_blog_url(@blog.id)
diff --git a/app/views/blogs/summary.html.haml b/app/views/blogs/summary.html.haml new file mode 100644 index 0000000..79811b1 --- /dev/null +++ b/app/views/blogs/summary.html.haml
@@ -0,0 +1 @@
= render "list"
diff --git a/app/views/blogs/voted.js.erb b/app/views/blogs/voted.js.erb new file mode 100644 index 0000000..951c740 --- /dev/null +++ b/app/views/blogs/voted.js.erb
@@ -0,0 +1,12 @@
1$("#blog-rating-<%= @blog.id %>").html('<%= escape_javascript("#{@blog.upvotes - @blog.downvotes}") %>');
2
3<% if @blog.already_upvoted? request.remote_ip %>
4 $("#blog-upvote-link-<%= @blog.id %>").html("👍");
5<% elsif @blog.already_downvoted? request.remote_ip %>
6 $("#blog-downvote-link-<%= @blog.id %>").html("👎");
7<% else %>
8 $("#blog-upvote-link-<%= @blog.id %>").html('<%= escape_javascript(link_to("👍", upvote_blog_path(@blog), remote: true, rel: "nofollow", class: "blog-upvote-link", method: :post)) %>');
9 $("#blog-downvote-link-<%= @blog.id %>").html('<%= escape_javascript(link_to("👎", downvote_blog_path(@blog), remote: true, rel: "nofollow", class: "blog-downvote-link", method: :post)) %>');
10<% end %>
11
12$("#blog-vote-section-<%= @blog.id %>").effect('highlight', {}, 2000);
diff --git a/app/views/comment_mailer/new_comment_email.html.haml b/app/views/comment_mailer/new_comment_email.html.haml new file mode 100644 index 0000000..d16a9ca --- /dev/null +++ b/app/views/comment_mailer/new_comment_email.html.haml
@@ -0,0 +1,21 @@
1%p
2 A comment has been posted on
3 = link_to @comment.blog.title, @comment.blog
4 by the following user:
5%ul
6 %li
7 Name:
8 = @comment.username
9 %li
10 Email:
11 = @comment.email
12 - unless @comment.website.empty?
13 %li
14 Website:
15 = @comment.website
16%p Here is the comment:
17%blockquote= @comment.body
18%p
19 Posted:
20 = @comment.published_at.strftime("%B #{@comment.published_at.day.ordinalize}, %Y at %-I:%M:%S%P")
21%p= link_to "See the comment on the web", blog_url(@comment.blog, anchor: "comment-#{@comment.id}")
diff --git a/app/views/comment_mailer/new_comment_email.text.erb b/app/views/comment_mailer/new_comment_email.text.erb new file mode 100644 index 0000000..334d087 --- /dev/null +++ b/app/views/comment_mailer/new_comment_email.text.erb
@@ -0,0 +1,17 @@
1A comment has been posted on <%= @comment.blog.title %> by the following user:
2
3* Name: <%= @comment.username %>
4* Email: <%= @comment.email %>
5<% unless @comment.website.empty? %>* Website: <%= @comment.website %>
6<% end %>
7Here is the comment:
8
9---
10
11<%= @comment.body %>
12
13---
14
15Posted: <%= @comment.published_at.strftime("%B #{@comment.published_at.day.ordinalize}, %Y at %-I:%M:%S%P") %>
16
17See the comment on the web: <%= blog_url(@comment.blog, anchor: "comment-#{@comment.id}") %>
diff --git a/app/views/comment_mailer/new_pending_comment_email.html.haml b/app/views/comment_mailer/new_pending_comment_email.html.haml new file mode 100644 index 0000000..d3f7dca --- /dev/null +++ b/app/views/comment_mailer/new_pending_comment_email.html.haml
@@ -0,0 +1,22 @@
1%p
2 A new comment has been posted on
3 = link_to @comment.blog.title, @comment.blog
4 that is pending moderation.
5%p The details of the user that posted it:
6%ul
7 %li
8 Name:
9 = @comment.username
10 %li
11 Email:
12 = @comment.email
13 - unless @comment.website.empty?
14 %li
15 Website:
16 = @comment.website
17%p Here is the comment:
18%blockquote= @comment.body
19%p
20 Posted:
21 = @comment.created_at.strftime("%B #{@comment.created_at.day.ordinalize}, %Y at %-I:%M:%S%P")
22%p= link_to "Go to the admin panel", pending_admin_comments_url
diff --git a/app/views/comment_mailer/new_pending_comment_email.text.erb b/app/views/comment_mailer/new_pending_comment_email.text.erb new file mode 100644 index 0000000..787d6b8 --- /dev/null +++ b/app/views/comment_mailer/new_pending_comment_email.text.erb
@@ -0,0 +1,19 @@
1A comment has been posted on <%= @comment.blog.title %> that is pending moderation.
2
3The details of the user that posted it:
4
5* Name: <%= @comment.username %>
6* Email: <%= @comment.email %>
7<% unless @comment.website.empty? %>* Website: <%= @comment.website %>
8<% end %>
9Here is the comment:
10
11---
12
13<%= @comment.body %>
14
15---
16
17Posted: <%= @comment.created_at.strftime("%B #{@comment.created_at.day.ordinalize}, %Y at %-I:%M:%S%P") %>
18
19Go to the admin panel: <%= pending_admin_comments_url %>
diff --git a/app/views/comment_mailer/reply_comment_email.html.haml b/app/views/comment_mailer/reply_comment_email.html.haml new file mode 100644 index 0000000..22009ee --- /dev/null +++ b/app/views/comment_mailer/reply_comment_email.html.haml
@@ -0,0 +1,14 @@
1%p
2 A reply has been posted to your comment on
3 = succeed "." do
4 = link_to @comment.blog.title, @comment.blog
5 The original comment:
6%blockquote= @comment.reply_to.body
7%p
8 = @comment.username
9 left the following response:
10%blockquote= @comment.body
11%p
12 Posted:
13 = @comment.published_at.strftime("%B #{@comment.published_at.day.ordinalize}, %Y at %-I:%M:%S%P")
14%p= link_to "See the comment on the web", blog_url(@comment.blog, anchor: "comment-#{@comment.id}")
diff --git a/app/views/comment_mailer/reply_comment_email.text.erb b/app/views/comment_mailer/reply_comment_email.text.erb new file mode 100644 index 0000000..bd60692 --- /dev/null +++ b/app/views/comment_mailer/reply_comment_email.text.erb
@@ -0,0 +1,19 @@
1A reply has been posted to your comment on <%= @comment.blog.title %>. The original comment:
2
3---
4
5<%= @comment.reply_to.body %>
6
7---
8
9<%= @comment.username %> posted the following response:
10
11---
12
13<%= @comment.body %>
14
15---
16
17Posted: <%= @comment.published_at.strftime("%B #{@comment.published_at.day.ordinalize}, %Y at %-I:%M:%S%P") %>
18
19See the comment on the web: <%= blog_url(@comment.blog, anchor: "comment-#{@comment.id}") %>
diff --git a/app/views/comments/_comment.html.haml b/app/views/comments/_comment.html.haml new file mode 100644 index 0000000..225b5d9 --- /dev/null +++ b/app/views/comments/_comment.html.haml
@@ -0,0 +1,14 @@
1.blog-comment{ id: "comment-#{comment.id}" }
2 %blockquote.bubble.rounded.bottom
3 = image_tag comment.gravatar_url, class: "comment-avatar"
4 = markdown(comment.body, { restricted: true })
5 .clear
6 %cite.bubble
7 %strong
8 - if comment.website.empty?
9 = comment.username
10 - else
11 = link_to comment.username, comment.website
12 on
13 = comment.published_at.strftime("%B #{comment.published_at.day.ordinalize}, %Y at %-I:%M:%S%P")
14 = link_to (image_tag "comment_add.png"), "#", class: "comment-reply-to", title: "Reply to comment", data: { comment_id: comment.id, comment_author: comment.username }
diff --git a/app/views/comments/_form.html.haml b/app/views/comments/_form.html.haml new file mode 100644 index 0000000..12692c2 --- /dev/null +++ b/app/views/comments/_form.html.haml
@@ -0,0 +1,32 @@
1= form_for @comment || blog.comments.new, html: { id: "comment-form" } do |f|
2 = f.hidden_field :reply_to_id
3 %fieldset#comment-body-field
4 %blockquote.bubble.rounded.bottom
5 #comment-reply-msg
6 = link_to (image_tag "cross.png"), "#", class: "comment-reply-cancel"
7 Replying to comment by
8 = succeed ":" do
9 %span.comment-reply-author
10 = f.label :body
11 = f.text_area :body
12 %cite.bubble Feel free to post a comment! You may use Markdown.
13 - if @comment and @comment.errors.any?
14 %ul#form-errors
15 - @comment.errors.full_messages.each do |msg|
16 %li= msg
17 %fieldset#comment-other-fields
18 .comment-name-field.comment-field
19 .comment-field-label= f.label :username
20 .comment-field-input= f.text_field :username
21 .comment-email-field.comment-field
22 .comment-field-label= f.label :email
23 .comment-field-input= f.text_field :email, type: :email
24 .comment-website-field.comment-field
25 .comment-field-label= f.label :website, "Website (Optional)"
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
30 .comment-submit-button.comment-field
31 .comment-field-label
32 .comment-field-input= f.submit "Post"
diff --git a/app/views/comments/_layout.html.haml b/app/views/comments/_layout.html.haml new file mode 100644 index 0000000..9acf6b0 --- /dev/null +++ b/app/views/comments/_layout.html.haml
@@ -0,0 +1,6 @@
1%a{ name: "comments" }
2#comments
3 %h2 Comments
4 - blog.comments.published_and_ordered.each do |comment|
5 = render comment
6 = render "comments/form", blog: blog
diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb index 2dc668f..8d6680a 100644 --- a/app/views/devise/confirmations/new.html.erb +++ b/app/views/devise/confirmations/new.html.erb
@@ -1,3 +1,5 @@
1<% title "Resend confirmation instructions" %>
2
1<h2>Resend confirmation instructions</h2> 3<h2>Resend confirmation instructions</h2>
2 4
3<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> 5<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index 1e66f3d..471580a 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb
@@ -1,3 +1,5 @@
1<% "Edit account" %>
2
1<h2>Edit <%= resource_name.to_s.humanize %></h2> 3<h2>Edit <%= resource_name.to_s.humanize %></h2>
2 4
3<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> 5<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index 5a238ce..ad0a77f 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb
@@ -1,3 +1,5 @@
1<% title "Sign up" %>
2
1<h2>Sign up</h2> 3<h2>Sign up</h2>
2 4
3<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> 5<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
diff --git a/app/views/devise/unlocks/new.html.erb b/app/views/devise/unlocks/new.html.erb index 16586bc..8a9097a 100644 --- a/app/views/devise/unlocks/new.html.erb +++ b/app/views/devise/unlocks/new.html.erb
@@ -1,3 +1,5 @@
1<% title "Resend unlock instructions" %>
2
1<h2>Resend unlock instructions</h2> 3<h2>Resend unlock instructions</h2>
2 4
3<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> 5<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
diff --git a/app/views/games/index.html.haml b/app/views/games/index.html.haml new file mode 100644 index 0000000..56c5a05 --- /dev/null +++ b/app/views/games/index.html.haml
@@ -0,0 +1,26 @@
1- title "Games"
2.breadcrumb= link_to "← Back to home page", root_path
3%h2#games-title Games
4%table#games-table
5 %thead
6 %tr
7 %th= sortable "title"
8 %th= sortable "status"
9 %th= sortable "score"
10 %th= sortable "progress"
11 %tbody
12 - @games.each do |game|
13 %tr{ class: cycle("even", "odd") }
14 %td
15 %span.game-title= game.title
16 - unless game.started_on.blank?
17 %span.game-started
18 Started on
19 %time= game.started_on
20 - unless game.finished_on.blank?
21 %span.game-finished
22 Finished on
23 %time= game.finished_on
24 %td= game.status
25 %td= game.score
26 %td.game-progress= simple_format game.progress
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'
diff --git a/app/views/quote_mailer/pending_quote_email.html.haml b/app/views/quote_mailer/pending_quote_email.html.haml new file mode 100644 index 0000000..df72594 --- /dev/null +++ b/app/views/quote_mailer/pending_quote_email.html.haml
@@ -0,0 +1,13 @@
1%p
2 A new quote has been submitted for moderation.
3- unless @quote.submitter.nil?
4 %p
5 It was submitted by:
6 = succeed "." do
7 = @quote.submitter
8%p The body of the quote:
9%pre= @quote.content
10%p
11 Submitted:
12 = @quote.created_at.strftime("%B #{@quote.created_at.day.ordinalize}, %Y at %-I:%M:%S%P")
13%p= link_to "Go to the admin panel", pending_admin_quotes_url
diff --git a/app/views/quote_mailer/pending_quote_email.text.erb b/app/views/quote_mailer/pending_quote_email.text.erb new file mode 100644 index 0000000..b9d71bb --- /dev/null +++ b/app/views/quote_mailer/pending_quote_email.text.erb
@@ -0,0 +1,17 @@
1A new quote has been submitted for moderation.
2
3<% unless @quote.submitter.nil? %>
4It was submitted by: <%= @quote.submitter %>.
5
6<% end %>
7Here is the quote:
8
9---
10
11<%= @quote.content %>
12
13---
14
15Posted: <%= @quote.created_at.strftime("%B #{@quote.created_at.day.ordinalize}, %Y at %-I:%M:%S%P") %>
16
17Go to the admin panel: <%= pending_admin_quotes_url %>
diff --git a/app/views/quotes/_quote.html.haml b/app/views/quotes/_quote.html.haml new file mode 100644 index 0000000..acbab10 --- /dev/null +++ b/app/views/quotes/_quote.html.haml
@@ -0,0 +1,22 @@
1%article.quote.h-entry{ :id => "quote-#{quote.id}" }
2 %data.p-name{ value: "\##{quote.id}" }
3 %data.u-url{ value: url_for(quote) }
4 %header.quote-header{ :id => "quote-header-#{quote.id}" }
5 = link_to_unless (quote.new_record? or current_page?(quote)), "\##{quote.id}", quote, :class => "quote-link"
6 %span.vote-link{ :id => "quote-upvote-link-#{quote.id}" }= link_to_unless (quote.new_record? or quote.already_upvoted?(request.remote_ip)), "Up", upvote_quote_path(quote.id), :remote => true, :rel => "nofollow", :class => "quote-upvote-link", method: :post
7 %span.quote-rating{ :id => "quote-rating-#{quote.id}" }= "+#{quote.upvotes}/-#{quote.downvotes}"
8 %span.vote-link{ :id => "quote-downvote-link-#{quote.id}" }= link_to_unless (quote.new_record? or quote.already_downvoted?(request.remote_ip)), "Down", downvote_quote_path(quote.id), :remote => true, :rel => "nofollow", :class => "quote-downvote-link", method: :post
9 %time.dt-published{ datetime: quote.created_at.strftime("%Y-%m-%dT%H:%M:%SZ%z") }= quote.published_date
10 - if user_signed_in? and !quote.new_record?
11 = link_to "Edit", edit_admin_quote_path(quote), :class => "quote-edit-link"
12 - if quote.audio.attached?
13 .audioplayer= audio_tag(rails_blob_url(quote.audio), controls: true)
14 %blockquote.quote-body.e-content= raw quote_format(h(quote.content))
15 - if !quote.new_record? and quote.has_extra?
16 .quote-footer
17 - if quote.has_notes?
18 .quote-notes= auto_link(quote.notes, :link => :urls)
19 - if quote.has_tags?
20 %ul.quote-tags
21 - quote.tags.each do |tag|
22 %li= link_to tag.name, tag_quotes_path(tag.name)
diff --git a/app/views/quotes/index.html.haml b/app/views/quotes/index.html.haml new file mode 100644 index 0000000..0c804d1 --- /dev/null +++ b/app/views/quotes/index.html.haml
@@ -0,0 +1,8 @@
1#about-left
2 #quotes= render @quote
3 %p.normal Welcome to the Four Island Quotes Database! Here you can find many strange and hopefully humorous Four Island quotes. There are currently #{@qnumber} quotes in the database, and there are #{@mnumber} quotes awaiting moderation.
4#about-right
5 %h3 About
6 %p.normal The Four Island Quotes DB is a repository for humorous and memorable quotes from #{link_to "FourNet", "http://irc.fourisland.com/"} channels, instant messaging sessions, real life situations, and more.
7 %p.normal The quotes database, in its first incarnation, was created on #{link_to "April 25th 2008", "http://www.fourisland.com/blog/quote-time/"} by hatkirby, who was inspired by #{link_to "bash.org", "http://bash.org/"} and his obsession with record-keeping to create a quotes database for Four Island. It ran on the now-defunct PHP quote management system, #{link_to "rash", "http://rqms.sourceforge.net/"}, on the subdomain "<code>quotes.fourisland.com</code>". It was rewritten by hand and integrated into Four Island (at the URL "<code>fourisland.com/quotes</code>") by hatkirby on #{link_to "June 13th 2008", "http://www.fourisland.com/blog/the-new-four-island/"} with the release of Four Island 2, dubbed The New Four Island. With the release of Four Island 3 on #{link_to "September 22nd, 2011", "http://www.fourisland.com/blog/four-island-3/"}, it was rewritten in Ruby on Rails, disassociated from Four Island and returned to its original URL.
8.cleardiv
diff --git a/app/views/quotes/latest.atom.builder b/app/views/quotes/latest.atom.builder new file mode 100644 index 0000000..d389a58 --- /dev/null +++ b/app/views/quotes/latest.atom.builder
@@ -0,0 +1,11 @@
1atom_feed do |feed|
2 feed.title("The Four Island Quotes DB")
3 feed.updated(@quotes.first.created_at)
4
5 @quotes.each do |quote|
6 feed.entry(quote) do |entry|
7 entry.title("##{quote.id}")
8 entry.content(quote_format(quote.content), :type => 'html')
9 end
10 end
11end
diff --git a/app/views/quotes/list.html.haml b/app/views/quotes/list.html.haml new file mode 100644 index 0000000..12c95c0 --- /dev/null +++ b/app/views/quotes/list.html.haml
@@ -0,0 +1,4 @@
1%section#quotes
2 .pagination= will_paginate @quotes
3 = render @quotes
4 .pagination= will_paginate @quotes
diff --git a/app/views/quotes/new.html.haml b/app/views/quotes/new.html.haml new file mode 100644 index 0000000..887ff2c --- /dev/null +++ b/app/views/quotes/new.html.haml
@@ -0,0 +1,24 @@
1%p.normal You're about to submit a quote to the Four Island Quotes DB! This is great, but first, there are a few rules/guidelines/things you should know before submitting:
2%ul
3 %li Quotes should come from a chat involving one or more Four Island regulars. This is not a strict guideline, as quotes are often submitted from video chats or real life situations possibly involving only one Four Island regular, but just make sure before submitting that the quote you're submitting would be appreciated by other Four Island regulars.
4 %li Make sure to remove timestamps, if present in your quote, before submitting.
5 %li If your quote is extremely offensive, it will probably not be approved. This is not referring to profanity--you can leave profanity uncensored in your quotes.
6 %li If you want to, you can enter your username in the box below the quote labelled "Your username" (this is completely optional). This is mostly for record-keeping and statistical purposes; submitting a quote of yourself being awesome and then signing your name under it won't decrease the chances of it being accepted.
7 %li You can enter any notes about the quote that may be important (such as context, or if it's a memorable quote, why it's memorable) in the box below your quote.
8 %li You can also enter a list of comma-separated tags in the provided box. This is, again, optional, but it's suggested that you do tag your quote, especially with #{link_to "tags that already exist", tags_quotes_path}, though creating new tags is not frowned upon.
9%h3 Your Quote
10= form_for @quote do |f|
11 - if @quote.errors.any?
12 #error-messages
13 %h4 Errors were found!
14 %ul
15 - @quote.errors.full_messages.each do |msg|
16 %li= msg
17 .form-field= f.text_area :content
18 .form-field Your username (optional): #{f.text_field :submitter}
19 .form-field Notes (optional):
20 .form-field= f.text_area :notes
21 .form-field
22 Tags (optional):
23 .tags-input= f.text_field :tag_list, type: :tags, value: f.object.tag_list.join(",")
24 .form-field= f.submit
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/quotes/show.html.haml b/app/views/quotes/show.html.haml new file mode 100644 index 0000000..b28c879 --- /dev/null +++ b/app/views/quotes/show.html.haml
@@ -0,0 +1 @@
%section#quotes= render @quote
diff --git a/app/views/quotes/stats.html.haml b/app/views/quotes/stats.html.haml new file mode 100644 index 0000000..d7a8140 --- /dev/null +++ b/app/views/quotes/stats.html.haml
@@ -0,0 +1,41 @@
1%script{ :type => "text/javascript", :src => "https://www.gstatic.com/charts/loader.js" }
2%script{ :type => "text/javascript" }
3 google.charts.load('visualization', '1.0', {'packages':['corechart']});
4 google.charts.setOnLoadCallback(drawChart);
5 function drawChart()
6 {
7 var data = new google.visualization.DataTable();
8 data.addColumn('string', 'Month');
9 data.addColumn('number', 'Quotes Submitted');
10 data.addRows([
11 - @months.each do |month|
12 ['#{month[:name]}', #{month[:number]}],
13 ]);
14 var options = {'title':'Quotes Submitted in the Last 12 Months', 'width':1000, 'height':500, 'legend':'none', 'hAxis.maxAlternation':1};
15 var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
16 chart.draw(data, options);
17 //var data2 = new google.visualization.DataTable();
18 //data2.addColumn('string', 'Month');
19 //data2.addColumn('number', 'Quotes');
20 //data2.addRows([
21 //- @months2.each do |month|
22 // ['\#{month[:name]}', \#{month[:number]}],
23 //]);
24 //var options2 = {'title':'Number of Quotes', 'width':1000, 'height':500, 'legend':'none', 'hAxis.maxAlternation':1};
25 //var chart2 = new google.visualization.AreaChart(document.getElementById('chart2_div'));
26 //chart2.draw(data2, options2);
27 var data3 = new google.visualization.DataTable();
28 data3.addColumn('string', 'Speaker');
29 data3.addColumn('number', 'Quotes');
30 data3.addRows([
31 - @by_speaker.each do |speaker|
32 ['#{speaker[0]}', #{speaker[1]}],
33 ]);
34 var options3 = {'title':'Number of Quotes per Speaker', 'width':1000, 'height':500};
35 var chart3 = new google.visualization.ColumnChart(document.getElementById('chart3_div'));
36 chart3.draw(data3, options3);
37 }
38%p.normal Because charts are fun, we've compiled a few charts here containing statistics about the Four Island Quotes DB.
39#chart2_div
40#chart_div
41#chart3_div
diff --git a/app/views/quotes/tags.html.haml b/app/views/quotes/tags.html.haml new file mode 100644 index 0000000..e15b386 --- /dev/null +++ b/app/views/quotes/tags.html.haml
@@ -0,0 +1,4 @@
1%h2 Tag Cloud
2%ul#tags-container
3 - tag_cloud(@tags, %w(css1 css1_5 css2 css2_5 css3 css3_5 css4 css4_5 css5 css5_5 css6)) do |tag, css_class|
4 %li= link_to tag.name, tag_quotes_path(tag.name), :class => css_class
diff --git a/app/views/quotes/voted.js.erb b/app/views/quotes/voted.js.erb new file mode 100644 index 0000000..c697c7d --- /dev/null +++ b/app/views/quotes/voted.js.erb
@@ -0,0 +1,12 @@
1$("#quote-rating-<%= @quote.id %>").html('<%= escape_javascript("+#{@quote.upvotes}/-#{@quote.downvotes}") %>');
2
3<% if @quote.already_upvoted? request.remote_ip %>
4 $("#quote-upvote-link-<%= @quote.id %>").html("Up");
5<% elsif @quote.already_downvoted? request.remote_ip %>
6 $("#quote-downvote-link-<%= @quote.id %>").html("Down");
7<% else %>
8 $("#quote-upvote-link-<%= @quote.id %>").html('<%= escape_javascript(link_to("Up", upvote_quote_path(@quote.id), :remote => true, :rel => "nofollow", :class => "quote-upvote-link", method: :post)) %>');
9 $("#quote-downvote-link-<%= @quote.id %>").html('<%= escape_javascript(link_to("Down", downvote_quote_path(@quote.id), :remote => true, :rel => "nofollow", :class => "quote-downvote-link", method: :post)) %>');
10<% end %>
11
12$("#quote-header-<%= @quote.id %>").effect('highlight', {}, 2000);
diff --git a/app/views/records/_record.html.haml b/app/views/records/_record.html.haml new file mode 100644 index 0000000..80a365c --- /dev/null +++ b/app/views/records/_record.html.haml
@@ -0,0 +1,7 @@
1%li
2 %span.description= link_to record.description, record.recordable.path
3 %ul.tags
4 %li.record-date= record.created_at.strftime("%m.%d.%y")
5 %li.entry-type{ class: "entry-type-#{record.recordable_type.downcase}" }= record.recordable_type
6 - record.recordable.taggable.tag_list.each do |tag|
7 %li.entry-tag= tag
diff --git a/app/views/records/index.html.haml b/app/views/records/index.html.haml index 200321e..4ceed2c 100644 --- a/app/views/records/index.html.haml +++ b/app/views/records/index.html.haml
@@ -1,7 +1 @@
1%ul#records %ul#records= render @records
2 - @records.each do |record|
3 %li
4 %span.description= link_to record.description, record.recordable.path
5 %ul.tags
6 %li.record-date= record.created_at.strftime("%m.%d.%y")
7 %li.entry-type{ class: "entry-type-#{record.recordable_type.downcase}" }= record.recordable_type
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 dcec0a2..8d58f62 100644 --- a/app/views/streams/show.html.haml +++ b/app/views/streams/show.html.haml
@@ -1,2 +1,3 @@
1.breadcrumb= link_to "← Back to home page", root_path 1- title @stream.title
2.breadcrumb= link_to "← Back to streams", streams_path
2= render @stream 3= render @stream
diff --git a/app/views/tags/index.html.haml b/app/views/tags/index.html.haml new file mode 100644 index 0000000..c9f1e85 --- /dev/null +++ b/app/views/tags/index.html.haml
@@ -0,0 +1,4 @@
1%h2.centered Tag cloud
2#tag-cloud
3 - tag_cloud @tags, %w[xs s m l xl] do |tag, css_class|
4 = link_to tag.name, tag_url(tag.name), class: css_class, title: tag.taggings_count
diff --git a/app/views/tags/show.html.haml b/app/views/tags/show.html.haml new file mode 100644 index 0000000..1d34b37 --- /dev/null +++ b/app/views/tags/show.html.haml
@@ -0,0 +1,6 @@
1- title "Tag #{@tag_name}"
2%h2.centered
3 Blog posts tagged
4 = surround "\"" do
5 = @tag_name
6= render "blogs/list"
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)
diff --git a/app/views/users/passwords/edit.html.haml b/app/views/users/passwords/edit.html.haml index 3d2d9ee..39db61e 100644 --- a/app/views/users/passwords/edit.html.haml +++ b/app/views/users/passwords/edit.html.haml
@@ -1,3 +1,4 @@
1- title "Change password"
1%h2 Change your password 2%h2 Change your password
2= devise_error_messages! 3= devise_error_messages!
3#principal 4#principal
diff --git a/app/views/users/passwords/new.html.haml b/app/views/users/passwords/new.html.haml index 03d3854..d5972f5 100644 --- a/app/views/users/passwords/new.html.haml +++ b/app/views/users/passwords/new.html.haml
@@ -1,3 +1,4 @@
1- title "Forgot password"
1%h2 Forgot your password? 2%h2 Forgot your password?
2= devise_error_messages! 3= devise_error_messages!
3#principal 4#principal
diff --git a/app/views/users/sessions/new.html.haml b/app/views/users/sessions/new.html.haml index f7c8de9..6b82038 100644 --- a/app/views/users/sessions/new.html.haml +++ b/app/views/users/sessions/new.html.haml
@@ -1,3 +1,4 @@
1- title "Sign in"
1#principal 2#principal
2 = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| 3 = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
3 .field 4 .field
diff --git a/app/views/vote_mailer/daily_report_email.html.haml b/app/views/vote_mailer/daily_report_email.html.haml new file mode 100644 index 0000000..33458f1 --- /dev/null +++ b/app/views/vote_mailer/daily_report_email.html.haml
@@ -0,0 +1,8 @@
1%p
2 Users have upvoted content on Four Island in the last day!
3%ul
4 - @entries.each do |entry|
5 %li
6 = voters_list(entry, html: true)
7 upvoted
8 = link_to entry.first.votable.title, entry.first.votable, style: "font-weight: bold; font-style: italic"
diff --git a/app/views/vote_mailer/daily_report_email.text.erb b/app/views/vote_mailer/daily_report_email.text.erb new file mode 100644 index 0000000..5fc0b31 --- /dev/null +++ b/app/views/vote_mailer/daily_report_email.text.erb
@@ -0,0 +1,5 @@
1Users have upvoted content on Four Island in the last day!
2
3<% @entries.each do |entry| %>
4- <%= voters_list(entry) %> upvoted <%= entry.first.votable.title %> (<%= url_for(entry.first.votable) %>)
5<% end %>
diff --git a/app/views/webmentions/.keep b/app/views/webmentions/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/views/webmentions/.keep