forked from windy/wblog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
226 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
.row.admin-posts-field | ||
.small-12.columns | ||
h3.blog-title 评论管理 | ||
h3.blog-title #{t('admin.comments')} | ||
h4.blog-title | ||
= link_to @post.title, blog_path(@post), target: '_blank' | ||
table width="100%" | ||
thead | ||
tr | ||
th 名字 | ||
th 邮箱 | ||
th 内容 | ||
th 时间 | ||
th 操作 | ||
th #{t('admin.comments_head.name')} | ||
th #{t('admin.comments_head.email')} | ||
th #{t('admin.comments_head.content')} | ||
th #{t('admin.comments_head.created_at')} | ||
th #{t('admin.comments_head.operation')} | ||
tbody | ||
- @comments.each do |comment| | ||
tr | ||
td #{comment.name} | ||
td | ||
td | ||
= mail_to comment.email | ||
td | ||
td | ||
p.pre #{comment.content} | ||
td | ||
= format_time(comment.created_at) | ||
|
||
td | ||
= link_to '回复', blog_path(@post), target: '_blank', class: 'edit-post-link' | ||
= link_to '删除', admin_post_comment_path(@post, comment), method: 'DELETE', 'data-confirm'=> '确认删除?' | ||
= link_to t('admin.comments_head.reply'), blog_path(@post), target: '_blank', class: 'edit-post-link' | ||
= link_to t('admin.comments_head.destroy'), admin_post_comment_path(@post, comment), method: 'DELETE', 'data-confirm'=> '确认删除?' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
.row | ||
.small-12.columns | ||
h2.dash-title 统计信息 | ||
h2.dash-title #{t('admin.dashboard.head')} | ||
hr | ||
table width="100%" | ||
thead | ||
tr | ||
th 条目 | ||
th 数据 | ||
th #{t('admin.dashboard.info')} | ||
th #{t('admin.dashboard.data')} | ||
tbody | ||
tr | ||
td 总博客数 | ||
td #{t('admin.dashboard.posts_count')} | ||
td #{@posts_count} | ||
tr | ||
td 总评论数 | ||
td #{t('admin.dashboard.comments_count')} | ||
td #{@comments_count} | ||
tr | ||
td 总浏览量 | ||
td #{t('admin.dashboard.visited_count')} | ||
td #{@visited_count} | ||
tr | ||
td 总订阅量 | ||
td #{t('admin.dashboard.subscribes_count')} | ||
td #{@subscribes_count} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
.row | ||
.small-12.columns | ||
.admin-posts-field ng-controller="AdminPostsController" | ||
h3.blog-title 新建博客 | ||
h3.blog-title #{t('admin.new_post')} | ||
= render 'form' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.qrcode-image | ||
= image_tag( qrcodes_path(str: str) ) | ||
p 使用手机继续阅读 or 帮我分享至微信朋友圈 | ||
p #{t('qrcodetips')} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,46 @@ | ||
- if ENV['INTRODUCE'].present? | ||
- if ENV['INTRODUCE'].present? | ||
- content_for(:meta) do | ||
meta name="description" content="#{ENV['INTRODUCE'].dup.force_encoding('UTF-8')}" | ||
- content_for(:title) do | ||
| 首页 | ||
| #{t('title.home')} | ||
.row | ||
.small-12.large-8.columns | ||
- unless @newest | ||
h2.blog-title 这里还没有博客 | ||
p | ||
| 这里还没有博客, 请访问 | ||
= link_to '管理页面', new_admin_post_path | ||
| 来创建第一篇博客 | ||
= render 'common/no_blog_here' | ||
- else | ||
= render partial: 'post_head', locals: { post: @newest } | ||
.content.markdown | ||
== @newest.sub_content | ||
|
||
= link_to "阅读全文 >>", blog_path(@newest), class: 'read-more' | ||
p.published-at 发表于 #{format_date(@newest.created_at)} | ||
= link_to t('home.read'), blog_path(@newest), class: 'read-more' | ||
p.published-at #{t('home.created_at')} #{format_date(@newest.created_at)} | ||
|
||
h4.recent-title RECENT | ||
ul.recent-content | ||
- @recent.each do |re| | ||
li = link_to "#{re.title}",blog_path(re) | ||
|
||
.large-3.columns.large-offset-1.self-introduce.self-introduce-index ng-controller='AboutController' | ||
/*请到 common 调整个人设置*/ | ||
.large-3.columns.large-offset-1.self-introduce.self-introduce-index | ||
/*Adjust it in common/welcome*/ | ||
= render 'common/welcome' | ||
h4 SUBSCRIBE | ||
.row.ng-cloak | ||
h4 #{t('subscribes.title')} | ||
.row.ng-cloak ng-controller='AboutController' | ||
.small-12.medium-6.large-12.columns | ||
ul.subscribe-ul | ||
- if ENV['MAIL_SERVER'].present? | ||
li | ||
= link_to '邮件订阅 ', '', "ng-click"=>"click('email')" | ||
= link_to t('subscribes.email'), '', "ng-click"=>"click('email')" | ||
.email-subscribe ng-show="type == 'email'" | ||
= text_field_tag 'email', nil, placeholder: '[email protected]', 'ng-model'=>'email' | ||
button.small ng-click="subscribe()" ng-disabled="! email_validate()" 订阅 | ||
span.subscribe-success ng-show="subscribe_success" 订阅成功 | ||
button.small ng-click="subscribe()" ng-disabled="! email_validate()" #{t('subscribes.submit')} | ||
span.subscribe-success ng-show="subscribe_success" #{t('subscribes.submit_success')} | ||
span.subscribe-fail ng-show="subscribe_success == false" {{subscribe_fail_msg}} | ||
li | ||
= link_to '微信扫一扫', '', "ng-click"=>"click('weixin')" | ||
= link_to t('subscribes.wechat'), '', "ng-click"=>"click('weixin')" | ||
.weixin-subscribe ng-show="type == 'weixin'" | ||
= render partial: "qrcode", locals: { str: root_url } | ||
li | ||
= link_to 'RSS订阅', '', "ng-click"=>"click('rss')" | ||
= link_to t('subscribes.rss'), '', "ng-click"=>"click('rss')" | ||
.rss-subscribe ng-show="type == 'rss'" | ||
= link_to rss_blogs_path do | ||
- image_tag('rss.png') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
h2.blog-title #{t('home.no_blog_here')} | ||
p | ||
| No post here, please visit | ||
= link_to ' Manage Post ', new_admin_post_path | ||
| to create the first post. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
h2.blog-title #{t('home.no_blog_here')} | ||
p | ||
| 这里还没有博客, 请访问 | ||
= link_to '管理页面', new_admin_post_path | ||
| 来创建第一篇博客 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* adjust stylesheet: .self-introduce-index */ | ||
h4 WELCOME | ||
p I'm Li Yafei, WinDy is my English name. | ||
|
||
h4 ABOUT | ||
ul.aboutme-index | ||
li | ||
span Industry: | ||
span Web Development, Startups, Life | ||
li | ||
span Location: | ||
span Nan Shan District, ShenZhen, China | ||
li | ||
span More: | ||
span | ||
= link_to 'About Me', about_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.