Commit dac64099 by tady Committed by tady

編集画面のstyle修正

parent 2bade347
......@@ -7,3 +7,7 @@ $ ->
.on 'blur', ->
$(this).parents('#app-search-form').animate({width: '200px'})
prettyPrint()
......@@ -63,6 +63,7 @@ if window.location.pathname.match /edit|new/
})
.done (data) ->
$('#post_preview').html(data)
prettyPrint()
$('#post_body').on('keyup mouseup', load_preview)
......
......@@ -14,6 +14,7 @@ if window.location.pathname.match /^\/$/
$.get('/posts/show_fragment', { id: id })
.done (data) ->
$('#list_post').html(data)
prettyPrint()
# 初期に詳細を表示
# open post when `id` parameter set.
......@@ -27,4 +28,5 @@ if window.location.pathname.match /^\/$/
})
.done (data) ->
$('#list_post').html(data)
prettyPrint()
......@@ -9,6 +9,7 @@
* compiled file, but it's generally better to create a new file per style scope.
*
*= require normalize
*= require_tree ./lib
*= require_tree .
*= require_self
*/
......
......@@ -27,7 +27,7 @@
margin: 0 0 0 33px; /* IE indents via margin-left */
}
ol.linenums li {
padding-left: 12px;
/* padding-left: 12px;*/
color: #bebec5;
line-height: 20px;
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
# @param {ActiveRecord::Relation} node
def h_display_tree(node)
_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|
_html << h_display_tree(_child)
end
......
......@@ -40,7 +40,5 @@
<%= javascript_include_tag "application" %>
<%= yield :footer_js %>
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
</body>
</html>
......@@ -54,7 +54,7 @@
<div class="col-xs-12 col-sm-6 col-md-6">
<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 %>
</div>
</div>
......
......@@ -21,4 +21,3 @@
<%= h_application_format_markdown(@post.body) %>
</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