oschina模式的代码插入
This commit is contained in:
parent
c75487fcf5
commit
138b24b34c
|
@ -19,7 +19,7 @@
|
|||
<%= yield :header_tags -%>
|
||||
<%= stylesheet_link_tag 'base','header', :media => 'all'%>
|
||||
</head>
|
||||
<body class="<%=h body_css_classes %>">
|
||||
<body class="<%=h body_css_classes %>" onload="prettyPrint();">
|
||||
|
||||
<div class="cl"></div>
|
||||
<div class="navContainer mb10">
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<%= yield :header_tags -%>
|
||||
</head>
|
||||
<!--add by huang-->
|
||||
<body>
|
||||
<body onload="prettyPrint();">
|
||||
<div class="navContainer mb10">
|
||||
<% if User.current.logged? %>
|
||||
<%= render :partial => 'layouts/logined_header' %>
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="<%= h body_css_classes %>">
|
||||
<body class="<%= h body_css_classes %>" onload="prettyPrint();">
|
||||
|
||||
<div class="cl"></div>
|
||||
<div class="navContainer mb10">
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
</head>
|
||||
<!--add by huang-->
|
||||
<body onload=" ">
|
||||
<body onload="prettyPrint();">
|
||||
<div class="navContainer mb10">
|
||||
<% if User.current.logged? %>
|
||||
<%= render :partial => 'layouts/logined_header' %>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<body onload="prettyPrint();">
|
||||
<div id="Container">
|
||||
<%= render :partial => 'layouts/base_header_new'%>
|
||||
<div id="TopBar">
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<%= yield :header_tags -%>
|
||||
</head>
|
||||
<!--add by huang-->
|
||||
<body>
|
||||
<body onload="prettyPrint();">
|
||||
|
||||
<div class="navContainer mb10">
|
||||
<% if User.current.logged? %>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<%= yield :header_tags -%>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body onload="prettyPrint();">
|
||||
<div class="navContainer">
|
||||
<% is_current_user = User.current.logged? && User.current == @user%>
|
||||
<% if User.current.logged? %>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<%= yield :header_tags -%>
|
||||
<%= stylesheet_link_tag 'base','header','new_user' ,:media => 'all'%>
|
||||
</head>
|
||||
<body>
|
||||
<body onload="prettyPrint();">
|
||||
<div class="cl"></div>
|
||||
<div class="navContainer mb10">
|
||||
<% if User.current.logged? %>
|
||||
|
|
|
@ -264,7 +264,7 @@ K.options = {
|
|||
minHeight : 100,
|
||||
minChangeSize : 50,
|
||||
zIndex : 811213,
|
||||
items : ['emoticons','fontname',
|
||||
items : ['code','emoticons','fontname',
|
||||
'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|',
|
||||
'formatblock', 'fontsize', '|','indent', 'outdent',
|
||||
'|','imagedirectupload','table', 'media', 'preview',"more"
|
||||
|
@ -4986,7 +4986,7 @@ KEditor.prototype = {
|
|||
htmlList.unshift('<div style="display:block" id="define"/>')
|
||||
htmlList.push('</div>')
|
||||
var htmlListFull = [];
|
||||
var fullItems = ['emoticons','fontname',
|
||||
var fullItems = ['code','emoticons','fontname',
|
||||
'forecolor', 'hilitecolor', 'bold','|', 'justifyleft', 'justifycenter', 'insertorderedlist', 'insertunorderedlist', '|',
|
||||
'formatblock', 'fontsize', '|', 'indent', 'outdent',
|
||||
'|','imagedirectupload','table', 'media', 'preview', "less",
|
||||
|
@ -5068,7 +5068,7 @@ KEditor.prototype = {
|
|||
}
|
||||
self.updateState();
|
||||
self.addBookmark();
|
||||
prettyPrint("",self.edit.doc.body);
|
||||
//prettyPrint("",self.edit.doc.body);
|
||||
if (self.options.afterChange) {
|
||||
self.options.afterChange.call(self);
|
||||
}
|
||||
|
|
|
@ -1,79 +1,47 @@
|
|||
/* Pretty printing styles. Used with prettify.js. */
|
||||
|
||||
/* SPAN elements with the classes below are added by prettyprint. */
|
||||
.pln { color: #000 } /* plain text */
|
||||
|
||||
@media screen {
|
||||
.str { color: #080 } /* string content */
|
||||
.kwd { color: #008 } /* a keyword */
|
||||
.com { color: #800 } /* a comment */
|
||||
.typ { color: #606 } /* a type name */
|
||||
.lit { color: #066 } /* a literal value */
|
||||
/* punctuation, lisp open bracket, lisp close bracket */
|
||||
.pun, .opn, .clo { color: #660 }
|
||||
.tag { color: #008 } /* a markup tag name */
|
||||
.atn { color: #606 } /* a markup attribute name */
|
||||
.atv { color: #080 } /* a markup attribute value */
|
||||
.dec, .var { color: #606 } /* a declaration; a variable name */
|
||||
.fun { color: red } /* a function name */
|
||||
.ke-content {
|
||||
font-size: 10pt;
|
||||
}
|
||||
.ke-content pre {
|
||||
font-size:9pt;
|
||||
font-family:Courier New,Arial;
|
||||
border:1px solid #ddd;
|
||||
border-left:5px solid #6CE26C;
|
||||
background:#f6f6f6;
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
/* Use higher contrast and text-weight for printable form. */
|
||||
@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 }
|
||||
.ke-content code {
|
||||
margin: 0 2px;
|
||||
padding: 0 5px;
|
||||
white-space: nowrap;
|
||||
border: 1px solid #DDD;
|
||||
background-color: #F6F6F6;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
/* Put a border around prettyprinted code snippets. */
|
||||
pre.prettyprint { padding: 2px;
|
||||
border-left:1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-right: 1px solid #ccc,
|
||||
border-top: 1px solid #ccc }
|
||||
|
||||
pre li,ol li {
|
||||
list-style-type: decimal;
|
||||
.ke-content pre>code {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
white-space: pre;
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
ul li{
|
||||
list-style-type: disc;
|
||||
}
|
||||
/* Specify class=linenums on a pre to get line numbering */
|
||||
ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
|
||||
li.L0,
|
||||
li.L1,
|
||||
li.L2,
|
||||
li.L3,
|
||||
li.L5,
|
||||
li.L6,
|
||||
li.L7,
|
||||
li.L8 { list-style-type: decimal }
|
||||
/* Alternate shading for lines */
|
||||
li.L1,
|
||||
li.L3,
|
||||
li.L5,
|
||||
li.L7,
|
||||
li.L9 { background: #eee }
|
||||
|
||||
.prettyprint *{font-family:'courier new',monospace;}
|
||||
/*.prettyprint .com { color: #93a1a1; }*/
|
||||
/*.prettyprint .lit { color: #AE81FF; }*/
|
||||
/*.prettyprint .pun,*/
|
||||
/*.prettyprint .opn,*/
|
||||
/*.prettyprint .clo { color: #F8F8F2; }*/
|
||||
/*.prettyprint .fun { color: #dc322f; }*/
|
||||
/*.prettyprint .str,*/
|
||||
/*.prettyprint .atv { color: #E6DB74; }*/
|
||||
/*.prettyprint .kwd,*/
|
||||
/*.prettyprint .tag { color: #F92659; }*/
|
||||
/*.prettyprint .typ,*/
|
||||
/*.prettyprint .atn,*/
|
||||
/*.prettyprint .dec,*/
|
||||
/*.prettyprint .var { color: #A6E22E; }*/
|
||||
/*.prettyprint .pln { color: #66D9EF; }*/
|
||||
.ke-content pre code {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.ke-content p {
|
||||
margin: 0 0 15px 0;
|
||||
margin-bottom:15pt;
|
||||
line-height:1.5;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.ke-content div.ref {border:1px solid #ddd;margin:0 0 10px 0;padding:2px;font-size:9pt;background:#ffe;}
|
||||
.ke-content div.ref h4 {margin:0;padding:1px 3px;background:#CC9966;color:#fff;font-size:9pt;font-weight:normal;}
|
||||
.ke-content div.ref .ref_body {margin:0;padding:2px;line-height:20px;color:#666;font-size:9pt;}
|
||||
|
||||
|
||||
.ke-content blockquote {margin:15px 10px;border:2px solid #eee;padding:5px 5px 5px 35px;background:#f4f5f7 url('../img/blockquote.gif') no-repeat left top;color:#060;font-size:9pt;}
|
Loading…
Reference in New Issue