Commit da490f50 authored by key-amb's avatar key-amb
Browse files

add highlight.js for syntax highlighting

parent 772607e9
...@@ -16,6 +16,7 @@ You can see Demo and documents of **Bootie Docs** at http://key-amb.github.io/bo ...@@ -16,6 +16,7 @@ You can see Demo and documents of **Bootie Docs** at http://key-amb.github.io/bo
* [Bootstrap](http://getbootstrap.com/) v3.3.4 ... Well-known CSS framework. * [Bootstrap](http://getbootstrap.com/) v3.3.4 ... Well-known CSS framework.
* [jQuery](https://jquery.com/) v1.11.2 ... Requried by _Bootstrap_. * [jQuery](https://jquery.com/) v1.11.2 ... Requried by _Bootstrap_.
* [highlight.js](https://highlightjs.org/) v8.5 ... For syntax highlighting.
## LICENSE ## LICENSE
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
<script src="{{ $baseUrl }}/js/jquery-1.11.2.min.js"></script> <script src="{{ $baseUrl }}/js/jquery-1.11.2.min.js"></script>
<script src="{{ $baseUrl }}/js/bootstrap.min.js"></script> <script src="{{ $baseUrl }}/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="{{ $baseUrl }}/js/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="{{ $baseUrl }}/js/ie10-viewport-bug-workaround.js"></script> <script src="{{ $baseUrl }}/js/ie10-viewport-bug-workaround.js"></script>
</body> </body>
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<link rel="icon" href="{{ $baseUrl }}/favicon.ico"> <link rel="icon" href="{{ $baseUrl }}/favicon.ico">
<title>{{ .Title }}{{ if eq $isHomePage false }} - {{ .Site.Title }}{{ end }}</title> <title>{{ .Title }}{{ if eq $isHomePage false }} - {{ .Site.Title }}{{ end }}</title>
<!--<link href="http://fonts.googleapis.com/css?family=PT+Sans:400,700" rel="stylesheet" type="text/css">--> <!--<link href="http://fonts.googleapis.com/css?family=PT+Sans:400,700" rel="stylesheet" type="text/css">-->
<link rel="stylesheet" href="{{ $baseUrl }}/css/highlight.js.min.css">
<link rel="stylesheet" href="{{ $baseUrl }}/css/bootstrap.min.css"> <link rel="stylesheet" href="{{ $baseUrl }}/css/bootstrap.min.css">
<link rel="stylesheet" href="{{ $baseUrl }}/css/bootstrap-theme.css"> <link rel="stylesheet" href="{{ $baseUrl }}/css/bootstrap-theme.css">
<link rel="stylesheet" href="{{ $baseUrl }}/css/theme.css"> <link rel="stylesheet" href="{{ $baseUrl }}/css/theme.css">
...@@ -37,6 +38,7 @@ ...@@ -37,6 +38,7 @@
<li><a href="{{ $baseUrl }}/{{ $item }}">{{ title $item}}</a></li> <li><a href="{{ $baseUrl }}/{{ $item }}">{{ title $item}}</a></li>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if isset .Site.Params "noCategoryLink" }}{{ else }}
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Categories<span class="caret"></span></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Categories<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
...@@ -44,7 +46,9 @@ ...@@ -44,7 +46,9 @@
<li><a href="{{ $baseUrl }}/categories/{{ $name | urlize }}">{{ title $name }}</a></li> <li><a href="{{ $baseUrl }}/categories/{{ $name | urlize }}">{{ title $name }}</a></li>
{{ end }} {{ end }}
</ul> </ul>
</li> </ul> </li>
{{ end }}
</ul>
</div><!--/.nav-collapse --> </div><!--/.nav-collapse -->
</div> </div>
</nav> </nav>
......
...@@ -14,13 +14,14 @@ h4, .h4, ...@@ -14,13 +14,14 @@ h4, .h4,
h5, .h5, h5, .h5,
h6, .h6 { h6, .h6 {
margin-top: 0; margin-top: 0;
padding-top: 10px;
padding-bottom: 10px;
font-weight: normal; font-weight: normal;
color: #333; color: #333;
} }
h1, .h1, h1, .h1,
h2, .h2 { h2, .h2 {
padding-bottom: 10px;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
...@@ -43,6 +44,10 @@ h2, .h2 { ...@@ -43,6 +44,10 @@ h2, .h2 {
line-height: 1.5; line-height: 1.5;
} }
.doc-main pre code {
font-size: 16px;
}
.doc-top-content { .doc-top-content {
font-size: 18px; font-size: 18px;
line-height: 1.5; line-height: 1.5;
......
.hljs{display:block;overflow-x:auto;padding:0.5em;background:#f0f0f0;-webkit-text-size-adjust:none}.hljs,.hljs-subst,.hljs-tag .hljs-title,.nginx .hljs-title{color:black}.hljs-string,.hljs-title,.hljs-constant,.hljs-parent,.hljs-tag .hljs-value,.hljs-rule .hljs-value,.hljs-preprocessor,.hljs-pragma,.hljs-name,.haml .hljs-symbol,.ruby .hljs-symbol,.ruby .hljs-symbol .hljs-string,.hljs-template_tag,.django .hljs-variable,.smalltalk .hljs-class,.hljs-addition,.hljs-flow,.hljs-stream,.bash .hljs-variable,.pf .hljs-variable,.apache .hljs-tag,.apache .hljs-cbracket,.tex .hljs-command,.tex .hljs-special,.erlang_repl .hljs-function_or_atom,.asciidoc .hljs-header,.markdown .hljs-header,.coffeescript .hljs-attribute{color:#800}.smartquote,.hljs-comment,.hljs-annotation,.diff .hljs-header,.hljs-chunk,.asciidoc .hljs-blockquote,.markdown .hljs-blockquote{color:#888}.hljs-number,.hljs-date,.hljs-regexp,.hljs-literal,.hljs-hexcolor,.smalltalk .hljs-symbol,.smalltalk .hljs-char,.go .hljs-constant,.hljs-change,.lasso .hljs-variable,.makefile .hljs-variable,.asciidoc .hljs-bullet,.markdown .hljs-bullet,.asciidoc .hljs-link_url,.markdown .hljs-link_url{color:#080}.hljs-label,.hljs-javadoc,.ruby .hljs-string,.hljs-decorator,.hljs-filter .hljs-argument,.hljs-localvars,.hljs-array,.hljs-attr_selector,.hljs-important,.hljs-pseudo,.hljs-pi,.haml .hljs-bullet,.hljs-doctype,.hljs-deletion,.hljs-envvar,.hljs-shebang,.apache .hljs-sqbracket,.nginx .hljs-built_in,.tex .hljs-formula,.erlang_repl .hljs-reserved,.hljs-prompt,.asciidoc .hljs-link_label,.markdown .hljs-link_label,.vhdl .hljs-attribute,.clojure .hljs-attribute,.asciidoc .hljs-attribute,.lasso .hljs-attribute,.coffeescript .hljs-property,.hljs-phony{color:#88f}.hljs-keyword,.hljs-id,.hljs-title,.hljs-built_in,.css .hljs-tag,.hljs-javadoctag,.hljs-phpdoc,.hljs-dartdoc,.hljs-yardoctag,.smalltalk .hljs-class,.hljs-winutils,.bash .hljs-variable,.pf .hljs-variable,.apache .hljs-tag,.hljs-type,.hljs-typename,.tex .hljs-command,.asciidoc .hljs-strong,.markdown .hljs-strong,.hljs-request,.hljs-status{font-weight:bold}.asciidoc .hljs-emphasis,.markdown .hljs-emphasis{font-style:italic}.nginx .hljs-built_in{font-weight:normal}.coffeescript .javascript,.javascript .xml,.lasso .markup,.tex .hljs-formula,.xml .javascript,.xml .vbscript,.xml .css,.xml .hljs-cdata{opacity:0.5}
\ No newline at end of file
This diff is collapsed.
Supports Markdown
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