From b86c57143b749fe6ff19b5049c356a4b0536bba1 Mon Sep 17 00:00:00 2001 From: Iceskysl Date: Sat, 25 Aug 2012 10:41:07 +0800 Subject: [PATCH] add markdown help tips --- app/assets/javascripts/app.coffee | 6 ++-- app/assets/stylesheets/style.css | 4 ++- .../cpanel/posts/_editor_toolbar.html.erb | 28 ++++++++++++++- app/views/cpanel/posts/_form.html.erb | 2 ++ app/views/pages/show.html.erb | 18 +++++++++- app/views/posts/show.html.erb | 34 ++++++++++--------- config/locales/menu.zh-CN.yml | 1 + 7 files changed, 71 insertions(+), 22 deletions(-) diff --git a/app/assets/javascripts/app.coffee b/app/assets/javascripts/app.coffee index 388f346..1d0af9d 100644 --- a/app/assets/javascripts/app.coffee +++ b/app/assets/javascripts/app.coffee @@ -32,9 +32,9 @@ window.App = $(document).ready -> - $("abbr.timeago").timeago() - $(".alert").alert() - $('.dropdown-toggle').dropdown() + $("abbr.timeago").timeago() + $(".alert").alert() + $('.dropdown-toggle').dropdown() diff --git a/app/assets/stylesheets/style.css b/app/assets/stylesheets/style.css index 4a62f3f..54450b2 100644 --- a/app/assets/stylesheets/style.css +++ b/app/assets/stylesheets/style.css @@ -218,4 +218,6 @@ h1, h2, h3, h4 { font-family: Arial, Helvetica, sans-serif; } .p-con ul li { padding: 2px 0px 2px 6px; list-style-type: disc; background: url("images/p-con-li.png") no-repeat left 1px; color:#666; } .p-con blockquote { font: italic 14px/19px Georgia, "Times New Roman", Times, serif; padding: 10px 20px; margin: 10px 0px; background: #ecf6f8; } .p-con blockquote p { font: italic 14px/19px Georgia, "Times New Roman", Times, serif; } -.p-con blockquote li { padding: 2px 0px 2px 13px; list-style-type: none; font-size: 12px; line-height: 17px;} \ No newline at end of file +.p-con blockquote li { padding: 2px 0px 2px 13px; list-style-type: none; font-size: 12px; line-height: 17px;} + +.comments{margin-top: 10px; border-top: solid 1px #c5ded7; padding:10px 0px;} \ No newline at end of file diff --git a/app/views/cpanel/posts/_editor_toolbar.html.erb b/app/views/cpanel/posts/_editor_toolbar.html.erb index f4a148c..ad8e09f 100644 --- a/app/views/cpanel/posts/_editor_toolbar.html.erb +++ b/app/views/cpanel/posts/_editor_toolbar.html.erb @@ -8,5 +8,31 @@ - \ No newline at end of file + + + + + diff --git a/app/views/cpanel/posts/_form.html.erb b/app/views/cpanel/posts/_form.html.erb index 9cd435d..780b1e2 100644 --- a/app/views/cpanel/posts/_form.html.erb +++ b/app/views/cpanel/posts/_form.html.erb @@ -31,8 +31,10 @@
<%= f.label :body %>
+ <%= f.text_area :body, :class => "post_editor closewarning ", :style => "height:400px;width:99%" %>
+
diff --git a/app/views/pages/show.html.erb b/app/views/pages/show.html.erb index 77b5c98..bbee681 100644 --- a/app/views/pages/show.html.erb +++ b/app/views/pages/show.html.erb @@ -2,10 +2,26 @@
-

<%=@page.title %>

+

<%=@page.title %>

<%= raw @page.body %>
+ +
+ +
+ + +
\ No newline at end of file diff --git a/app/views/posts/show.html.erb b/app/views/posts/show.html.erb index c117261..dc52d23 100644 --- a/app/views/posts/show.html.erb +++ b/app/views/posts/show.html.erb @@ -16,23 +16,9 @@
作者: <%= raw SiteConfig.site_author %>
- 地址: <%=link_to @post.title,post_path(@post)%> + 原文地址: <%=link_to @post.title,post_path(@post)%>
- - -
- - - +
+
+ +
+ + +
+ \ No newline at end of file diff --git a/config/locales/menu.zh-CN.yml b/config/locales/menu.zh-CN.yml index b1b1f4c..ce13a45 100644 --- a/config/locales/menu.zh-CN.yml +++ b/config/locales/menu.zh-CN.yml @@ -57,6 +57,7 @@ access_denied: "访问被拒绝,你可能没有权限或未登录。" editor_toolbar_edit: "编辑" editor_toolbar_preview: "预览" + editor_toolbar_help: "帮助(按“M”键)" by: "由" at: "在" hot_topics: "热门讨论"