Commit dac64099 by tady Committed by tady

編集画面のstyle修正

parent 2bade347
...@@ -7,3 +7,7 @@ $ -> ...@@ -7,3 +7,7 @@ $ ->
.on 'blur', -> .on 'blur', ->
$(this).parents('#app-search-form').animate({width: '200px'}) $(this).parents('#app-search-form').animate({width: '200px'})
prettyPrint()
...@@ -63,6 +63,7 @@ if window.location.pathname.match /edit|new/ ...@@ -63,6 +63,7 @@ if window.location.pathname.match /edit|new/
}) })
.done (data) -> .done (data) ->
$('#post_preview').html(data) $('#post_preview').html(data)
prettyPrint()
$('#post_body').on('keyup mouseup', load_preview) $('#post_body').on('keyup mouseup', load_preview)
......
...@@ -14,6 +14,7 @@ if window.location.pathname.match /^\/$/ ...@@ -14,6 +14,7 @@ if window.location.pathname.match /^\/$/
$.get('/posts/show_fragment', { id: id }) $.get('/posts/show_fragment', { id: id })
.done (data) -> .done (data) ->
$('#list_post').html(data) $('#list_post').html(data)
prettyPrint()
# 初期に詳細を表示 # 初期に詳細を表示
# open post when `id` parameter set. # open post when `id` parameter set.
...@@ -27,4 +28,5 @@ if window.location.pathname.match /^\/$/ ...@@ -27,4 +28,5 @@ if window.location.pathname.match /^\/$/
}) })
.done (data) -> .done (data) ->
$('#list_post').html(data) $('#list_post').html(data)
prettyPrint()
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
* compiled file, but it's generally better to create a new file per style scope. * compiled file, but it's generally better to create a new file per style scope.
* *
*= require normalize *= require normalize
*= require_tree ./lib
*= require_tree . *= require_tree .
*= require_self *= require_self
*/ */
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
margin: 0 0 0 33px; /* IE indents via margin-left */ margin: 0 0 0 33px; /* IE indents via margin-left */
} }
ol.linenums li { ol.linenums li {
padding-left: 12px; /* padding-left: 12px;*/
color: #bebec5; color: #bebec5;
line-height: 20px; line-height: 20px;
text-shadow: 0 1px 0 #fff; text-shadow: 0 1px 0 #fff;
......
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
\ No newline at end of file
...@@ -3,7 +3,7 @@ module PostsHelper ...@@ -3,7 +3,7 @@ module PostsHelper
# @param {ActiveRecord::Relation} node # @param {ActiveRecord::Relation} node
def h_display_tree(node) def h_display_tree(node)
_html = '<ul>' _html = '<ul>'
_html << %Q{<li><a href="#{ root_path(q: '#' + node.name) }">#{node.name}<a/></li>} _html << %Q{<li><a href="#{ root_path(q: '#' + node.name) }">#{node.name}</a></li>}
node.children.each do |_child| node.children.each do |_child|
_html << h_display_tree(_child) _html << h_display_tree(_child)
end end
......
...@@ -40,7 +40,5 @@ ...@@ -40,7 +40,5 @@
<%= javascript_include_tag "application" %> <%= javascript_include_tag "application" %>
<%= yield :footer_js %> <%= yield :footer_js %>
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
</body> </body>
</html> </html>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<div class="col-xs-12 col-sm-6 col-md-6"> <div class="col-xs-12 col-sm-6 col-md-6">
<div class="box-text"> <div class="box-text">
<div id="post_preview"> <div id="post_preview" class="text-box body viewer github">
<%#= h_application_format_markdown(sample_body).html_safe %> <%#= h_application_format_markdown(sample_body).html_safe %>
</div> </div>
</div> </div>
......
...@@ -21,4 +21,3 @@ ...@@ -21,4 +21,3 @@
<%= h_application_format_markdown(@post.body) %> <%= h_application_format_markdown(@post.body) %>
</div> </div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment