From 01ded5bca70feead00a2e5a4961383ce42d2a7b2 Mon Sep 17 00:00:00 2001 From: nodejh Date: Fri, 24 Mar 2017 19:43:01 +0800 Subject: [PATCH] update highlight systax --- static/css/highlight.css | 156 +++++++++++++++++++-------------------- static/css/style.css | 19 +---- 2 files changed, 79 insertions(+), 96 deletions(-) diff --git a/static/css/highlight.css b/static/css/highlight.css index 575a557..1081538 100644 --- a/static/css/highlight.css +++ b/static/css/highlight.css @@ -1,106 +1,100 @@ -/* - IR_Black style (c) Vasily Mikhailitchenko -*/ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ -.hljs { - display: block; - overflow-x: auto; - /*padding: 0.5em;*/ - background: #272b2d; - color: #d0d0d0; - -webkit-text-size-adjust: none; +code { + font-family: Menlo, Monaco, Courier; + background: #fff; + font-size: 11px; + font-weight: 100; + padding: 4px; + border: none; + box-shadow: inset 0 0 0 1px #E4EBF2; + border-radius: 4px; + overflow: scroll; + font-family: 'Menlo', 'Monaco', Courier, monospace; } -.hljs-shebang, -.hljs-comment { - color: #777279; +pre code { + font-size: 11px; + word-wrap: break-word; + -webkit-font-smoothing: subpixel-antialiased; + -moz-osx-font-smoothing: auto; + padding: 16px; + padding-bottom: 14px; + display: block; + color: #808080; + background: #fff; + border: none; + box-shadow: inset 0 0 0 1px #E4EBF2; + border-radius: 4px; + overflow: auto; } -.hljs-keyword, -.hljs-tag, -.tex .hljs-command, -.hljs-request, -.hljs-status, -.clojure .hljs-attribute { - color: #ebde68; +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #8e908c; } -.hljs-sub .hljs-keyword, -.method, -.hljs-list .hljs-title, -.nginx .hljs-title { - color: #ffffb6; -} - -.hljs-string, -.hljs-tag .hljs-value, -.hljs-cdata, -.hljs-filter .hljs-argument, -.hljs-attr_selector, -.apache .hljs-cbracket, -.hljs-date, -.coffeescript .hljs-attribute { - color: #c1ef65; -} - -.hljs-subst { - color: #daefa3; -} - -.hljs-regexp { - color: #e9c062; +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #c82829; } -.hljs-title, -.hljs-sub .hljs-identifier, -.hljs-pi, -.hljs-decorator, -.tex .hljs-special, +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, .hljs-type, -.hljs-constant, -.smalltalk .hljs-class, -.hljs-doctag, -.nginx .hljs-built_in { - color: #c1ef65; +.hljs-params, +.hljs-meta, +.hljs-link { + color: #f5871f; } -.hljs-symbol, -.ruby .hljs-symbol .hljs-string, -.hljs-number, -.hljs-variable, -.vbscript, -.hljs-literal, -.hljs-name { - color: #77bcd7; +/* Tomorrow Yellow */ +.hljs-attribute { + color: #eab700; } -.css .hljs-tag { - color: #96cbfe; +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #718c00; } -.css .hljs-rule .hljs-property, -.css .hljs-id { - color: #ffffb6; +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #4271ae; } -.css .hljs-class { - color: #fff; +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #8959a8; } -.hljs-hexcolor { - color: #c6c5fe; +code.hljs { + display: block; + white-space: pre; + overflow-x: auto; + word-wrap: normal; } -.hljs-number { - color:#77bcd7; +.hljs-emphasis { + font-style: italic; } -.coffeescript .javascript, -.javascript .xml, -.tex .hljs-formula, -.xml .javascript, -.xml .vbscript, -.xml .css, -.xml .hljs-cdata { - opacity: 0.7; +.hljs-strong { + font-weight: bold; } diff --git a/static/css/style.css b/static/css/style.css index f6a2867..bf4ab06 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -859,15 +859,6 @@ a.symbol:hover { color: #BCD4DA; } -code { - font-family: Menlo, Monaco, Courier; - background-color: #EEE; - font-size: 14px; - padding: 4px; - font-weight: 600; -} - - /** * Table of content */ @@ -875,10 +866,8 @@ code { line-height: 1em; font-size: .7em; word-wrap: break-word; - /*-webkit-font-smoothing: subpixel-antialiased;*/ - /*-moz-osx-font-smoothing: auto;*/ - padding: 16px; - padding-left: 21px; + padding: 8px; + padding-left: 16px; padding-bottom: 14px; margin: 0 0 25px 0; display: block; @@ -909,8 +898,8 @@ code { #TableOfContents a code{ font-family: Menlo, Monaco, Courier; background-color: #fff; - font-size: 14px; - padding: 4px; + font-size: 11px; + padding: 2px 3px; font-weight: 100; }