Quellcode durchsuchen

Merge pull request #765 from weseek/imprv/hljs-ln

add styles for hljs-ln
Yuki Takei vor 7 Jahren
Ursprung
Commit
65ae426e1e
2 geänderte Dateien mit 18 neuen und 2 gelöschten Zeilen
  1. 15 1
      src/client/styles/scss/_wiki.scss
  2. 3 1
      src/server/views/admin/customize.html

+ 15 - 1
src/client/styles/scss/_wiki.scss

@@ -122,7 +122,21 @@ div.body {
       font-weight: bold;
       font-weight: bold;
       opacity: 0.6;
       opacity: 0.6;
     }
     }
-  };
+  }
+
+  // styles for highlightjs-line-numbers
+  .hljs-ln td.hljs-ln-numbers {
+    user-select: none;
+
+    text-align: center;
+    color: #ccc;
+    border-right: 1px solid #CCC;
+    vertical-align: top;
+    padding-right: 5px;
+  }
+  .hljs-ln td.hljs-ln-code {
+    padding-left: 10px;
+  }
 
 
   p code {  // only inline code blocks
   p code {  // only inline code blocks
     font-family: $font-family-monospace-not-strictly;
     font-family: $font-family-monospace-not-strictly;

+ 3 - 1
src/server/views/admin/customize.html

@@ -346,7 +346,8 @@
 
 
           <p class="help-block">
           <p class="help-block">
             Examples:
             Examples:
-            <pre class="hljs {% if !settingForm['customize:highlightJsStyleBorder'] %}hljs-no-border{% endif %}"><code class="highlightjs-demo">function $initHighlight(block, cls) {
+            <div class="wiki">
+              <pre class="hljs {% if !settingForm['customize:highlightJsStyleBorder'] %}hljs-no-border{% endif %}"><code class="highlightjs-demo">function $initHighlight(block, cls) {
   try {
   try {
     if (cls.search(/\bno\-highlight\b/) != -1)
     if (cls.search(/\bno\-highlight\b/) != -1)
       return process(block, true, 0x0F) +
       return process(block, true, 0x0F) +
@@ -361,6 +362,7 @@
 }
 }
 
 
 export  $initHighlight;</code></pre>
 export  $initHighlight;</code></pre>
+            </div>
           </p>
           </p>
 
 
           <div class="form-group">
           <div class="form-group">