From 5f6e8e846a92b8d490793d5d86fc320006232548 Mon Sep 17 00:00:00 2001 From: yafeilee Date: Mon, 26 May 2014 22:00:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=A4=A7=E4=B8=80=E7=82=B9=E7=82=B9?= =?UTF-8?q?=E5=AD=97=E4=BD=93,=20=E4=BC=98=E5=8C=96=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E9=87=8D=E7=82=B9,=20=E9=98=85=E8=AF=BB=E5=85=A8=E6=96=87?= =?UTF-8?q?=E7=8E=B0=E5=9C=A8=E6=9B=B4=E6=98=8E=E6=98=BE=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/blogs.css.scss | 15 ++++++++++++--- .../stylesheets/foundation_and_overrides.scss | 2 +- app/assets/stylesheets/markdown.css.scss | 2 ++ app/views/blogs/_post.html.slim | 5 ++++- app/views/blogs/index.html.slim | 2 +- app/views/common/_copyright.html.slim | 2 ++ 6 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 app/views/common/_copyright.html.slim diff --git a/app/assets/stylesheets/blogs.css.scss b/app/assets/stylesheets/blogs.css.scss index 63da46e..92f4bf8 100644 --- a/app/assets/stylesheets/blogs.css.scss +++ b/app/assets/stylesheets/blogs.css.scss @@ -6,6 +6,8 @@ .ptag { text-align: right; margin-bottom: 0.5rem; + color: #666; + font-size: 95%; span { margin-left: 0.5rem; } @@ -19,13 +21,20 @@ } .read-more { - border-bottom: 1px solid #dddddd; - padding-bottom: 0.5rem; - margin-bottom: 0.275rem; + margin-top: 1rem; + display: inline-block; + padding: 1rem; + border: 1px solid #ccc; + color: #333; + &:hover { + color: #333; + border-color: #aaa; + } } .published-at { text-align: right; + color: #999; } .blog-over { diff --git a/app/assets/stylesheets/foundation_and_overrides.scss b/app/assets/stylesheets/foundation_and_overrides.scss index b8562b8..a9a4c21 100644 --- a/app/assets/stylesheets/foundation_and_overrides.scss +++ b/app/assets/stylesheets/foundation_and_overrides.scss @@ -16,7 +16,7 @@ // Since the typical default browser font-size is 16px, that makes the calculation for grid size. // If you want your base font-size to be different and not have it affect the grid breakpoints, // set $rem-base to $base-font-size and make sure $base-font-size is a px value. -// $base-font-size: 100%; +$base-font-size: 110%; // The $base-line-height is 100% while $base-font-size is 150% // $base-line-height: 150%; diff --git a/app/assets/stylesheets/markdown.css.scss b/app/assets/stylesheets/markdown.css.scss index 62c7158..9b9da26 100644 --- a/app/assets/stylesheets/markdown.css.scss +++ b/app/assets/stylesheets/markdown.css.scss @@ -1,5 +1,7 @@ .markdown { + //color: rgba(0,0,0,1); + word-wrap: break-word; overflow: hidden; diff --git a/app/views/blogs/_post.html.slim b/app/views/blogs/_post.html.slim index c755a84..4d98a30 100644 --- a/app/views/blogs/_post.html.slim +++ b/app/views/blogs/_post.html.slim @@ -3,9 +3,12 @@ .content.markdown == post.content_html -p.ptag +p.ptag.published-at | 发表于: span #{format_date(post.created_at)} + += render 'common/copyright' + hr.blog-over p ng-controller="LikesController" ng-cloak="" button.like-button ng-show="! is_liked " ng-click="submit()" diff --git a/app/views/blogs/index.html.slim b/app/views/blogs/index.html.slim index a680499..c55ee8a 100644 --- a/app/views/blogs/index.html.slim +++ b/app/views/blogs/index.html.slim @@ -16,7 +16,7 @@ .content.markdown == @newest.sub_content - = link_to "阅读全文 >>", blog_path(@newest) + = link_to "阅读全文 >>", blog_path(@newest), class: 'read-more' p.published-at 发表于 #{format_date(@newest.created_at)} h4.recent-title RECENT diff --git a/app/views/common/_copyright.html.slim b/app/views/common/_copyright.html.slim new file mode 100644 index 0000000..11a817c --- /dev/null +++ b/app/views/common/_copyright.html.slim @@ -0,0 +1,2 @@ +p.copyright.published-at.ptag + | © 自由转载 - 非商用 - 非衍生 - 保持署名