about summary refs log tree commit diff stats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/main/entries.scss15
-rw-r--r--app/models/blog.rb4
-rw-r--r--app/views/blogs/_blog.html.haml6
3 files changed, 23 insertions, 2 deletions
diff --git a/app/assets/stylesheets/main/entries.scss b/app/assets/stylesheets/main/entries.scss index 1b2d1c6..b511333 100644 --- a/app/assets/stylesheets/main/entries.scss +++ b/app/assets/stylesheets/main/entries.scss
@@ -5,7 +5,7 @@
5#blog-post { 5#blog-post {
6 font-size: 16px; 6 font-size: 16px;
7 line-height: 24px; 7 line-height: 24px;
8 margin: 0 1em; 8 margin: 0 1em 1em;
9 9
10 .blog-title { 10 .blog-title {
11 h2 { 11 h2 {
@@ -16,6 +16,19 @@
16 color: #59770e; 16 color: #59770e;
17 border-bottom: 1px dotted #CCCCCC; 17 border-bottom: 1px dotted #CCCCCC;
18 padding-bottom: 3px; 18 padding-bottom: 3px;
19
20 a {
21 text-decoration: none;
22 color: #59770e;
23
24 &:visited {
25 color: #59770e;
26 }
27
28 &:hover {
29 text-decoration: underline;
30 }
31 }
19 } 32 }
20 } 33 }
21 34
diff --git a/app/models/blog.rb b/app/models/blog.rb index c12d0dc..415167c 100644 --- a/app/models/blog.rb +++ b/app/models/blog.rb
@@ -26,6 +26,10 @@ class Blog < ApplicationRecord
26 body[0..(body.index("<!--MORE-->")-1)] 26 body[0..(body.index("<!--MORE-->")-1)]
27 end 27 end
28 28
29 def to_param
30 slug
31 end
32
29 private 33 private
30 def set_draft_title 34 def set_draft_title
31 if self.title.blank? and not self.published 35 if self.title.blank? and not self.published
diff --git a/app/views/blogs/_blog.html.haml b/app/views/blogs/_blog.html.haml index 389f961..26657e7 100644 --- a/app/views/blogs/_blog.html.haml +++ b/app/views/blogs/_blog.html.haml
@@ -4,7 +4,7 @@
4 %span.post-month= blog.published_at.strftime("%^b") 4 %span.post-month= blog.published_at.strftime("%^b")
5 %span.post-day= blog.published_at.day 5 %span.post-day= blog.published_at.day
6 .blog-title 6 .blog-title
7 %h2= blog.title 7 %h2= link_to_unless_current blog.title, blog
8 .post-author Hatkirby 8 .post-author Hatkirby
9 %blockquote#blog-content.entry-content.bubble.rounded.bottom 9 %blockquote#blog-content.entry-content.bubble.rounded.bottom
10 - if short and blog.has_read_more 10 - if short and blog.has_read_more
@@ -12,3 +12,7 @@
12 = link_to "Read more...", blog 12 = link_to "Read more...", blog
13 - else 13 - else
14 = markdown(blog.body) 14 = markdown(blog.body)
15 %cite.bubble
16 %strong Hatkirby
17 on
18 = blog.published_at.strftime("%m-%d-%Y")