Skip to content
This repository has been archived by the owner on Jul 26, 2020. It is now read-only.

Commit

Permalink
added highlight.js
Browse files Browse the repository at this point in the history
  • Loading branch information
epistrephein committed Oct 13, 2014
1 parent fba411f commit 6647cff
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 4 deletions.
127 changes: 127 additions & 0 deletions assets/css/github.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
/*
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
*/

.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #596364;
background: #f7f7f7;
-webkit-text-size-adjust: none;
}

.hljs-comment,
.hljs-template_comment,
.diff .hljs-header,
.hljs-javadoc {
color: #998;
font-style: italic;
}

.hljs-keyword,
.css .rule .hljs-keyword,
.hljs-winutils,
.javascript .hljs-title,
.nginx .hljs-title,
.hljs-subst,
.hljs-request,
.hljs-status {
color: #596364;
font-weight: bold;
}

.hljs-number,
.hljs-hexcolor,
.ruby .hljs-constant {
color: #008080;
}

.hljs-string,
.hljs-tag .hljs-value,
.hljs-phpdoc,
.hljs-dartdoc,
.tex .hljs-formula {
color: #d14;
}

.hljs-title,
.hljs-id,
.scss .hljs-preprocessor {
color: #900;
font-weight: bold;
}

.javascript .hljs-title,
.hljs-list .hljs-keyword,
.hljs-subst {
font-weight: normal;
}

.hljs-class .hljs-title,
.hljs-type,
.vhdl .hljs-literal,
.tex .hljs-command {
color: #458;
font-weight: bold;
}

.hljs-tag,
.hljs-tag .hljs-title,
.hljs-rules .hljs-property,
.django .hljs-tag .hljs-keyword {
color: #000080;
font-weight: normal;
}

.hljs-attribute,
.hljs-variable,
.lisp .hljs-body {
color: #008080;
}

.hljs-regexp {
color: #009926;
}

.hljs-symbol,
.ruby .hljs-symbol .hljs-string,
.lisp .hljs-keyword,
.clojure .hljs-keyword,
.scheme .hljs-keyword,
.tex .hljs-special,
.hljs-prompt {
color: #990073;
}

.hljs-built_in {
color: #0086b3;
}

.hljs-preprocessor,
.hljs-pragma,
.hljs-pi,
.hljs-doctype,
.hljs-shebang,
.hljs-cdata {
color: #999;
font-weight: bold;
}

.hljs-deletion {
background: #fdd;
}

.hljs-addition {
background: #dfd;
}

.diff .hljs-change {
background: #0086b3;
}

.hljs-chunk {
color: #aaa;
}
13 changes: 9 additions & 4 deletions default.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
<meta name="MobileOptimized" content="320" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />

<link rel="stylesheet" type="text/css" href="{{asset "css/normalize.min.css"}}" />
<link rel="stylesheet" type="text/css" href="{{asset "css/screen.css"}}" />
<link rel="stylesheet" href="{{asset "css/normalize.min.css"}}" />
<link rel="stylesheet" href="{{asset "css/screen.css"}}" />

<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/styles/default.min.css">
<link rel="stylesheet" href="{{asset "css/github.css"}}" />

{{#if pagination.next}}<link href="{{page_url pagination.next}}" rel="prefetch" />{{/if}}

Expand Down Expand Up @@ -46,8 +49,9 @@

{{ghost_foot}}

<script type="text/javascript" src="{{asset "js/index.js"}}"></script>
<script type="text/javascript" src="{{asset "js/smooth-scroll.min.js"}}"></script>
<script src="{{asset "js/index.js"}}"></script>
<script src="{{asset "js/smooth-scroll.min.js"}}"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/highlight.min.js"></script>

<script>
smoothScroll.init({
Expand All @@ -57,6 +61,7 @@
offset: 125,
});
</script>
<script>hljs.initHighlightingOnLoad();</script>

</body>
</html>

0 comments on commit 6647cff

Please sign in to comment.