Skip to content

Commit

Permalink
Use highlight.js for syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
treffynnon committed Jul 6, 2015
1 parent fb5c8e7 commit 6e2b85c
Show file tree
Hide file tree
Showing 6 changed files with 174 additions and 77 deletions.
164 changes: 164 additions & 0 deletions _includes/highlight.hybrid.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
/*
vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid)
*/

/*background color*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #1d1f21;
-webkit-text-size-adjust: none;
}

/*selection color*/
.hljs::selection,
.hljs span::selection {
background: #373b41;
}

.hljs::-moz-selection,
.hljs span::-moz-selection {
background: #373b41;
}

/*foreground color*/
.hljs,
.hljs-setting .hljs-value,
.hljs-expression .hljs-variable,
.hljs-expression .hljs-begin-block,
.hljs-expression .hljs-end-block,
.hljs-class .hljs-params,
.hljs-function .hljs-params,
.hljs-at_rule .hljs-preprocessor {
color: #c5c8c6;
}

/*color: fg_yellow*/
.hljs-title,
.hljs-function .hljs-title,
.hljs-keyword .hljs-common,
.hljs-class .hljs-title,
.hljs-decorator,
.hljs-tag .hljs-title,
.hljs-header,
.hljs-sub,
.hljs-function {
color: #f0c674;
}

/*color: fg_comment*/
.hljs-comment,
.hljs-output .hljs-value,
.hljs-pi,
.hljs-shebang,
.hljs-doctype {
color: #707880;
}

/*color: fg_red*/
.hljs-number,
.hljs-symbol,
.hljs-literal,
.hljs-deletion,
.hljs-link_url,
.hljs-symbol .hljs-string,
.hljs-argument,
.hljs-hexcolor,
.hljs-input .hljs-prompt,
.hljs-char {
color: #cc6666
}

/*color: fg_green*/
.hljs-string,
.hljs-special,
.hljs-doctag,
.hljs-addition,
.hljs-important,
.hljs-tag .hljs-value,
.hljs-at.rule .hljs-keyword,
.hljs-regexp,
.hljs-attr_selector {
color: #b5bd68;
}

/*color: fg_purple*/
.hljs-variable,
.hljs-property,
.hljs-envar,
.hljs-code,
.hljs-expression,
.hljs-localvars,
.hljs-id,
.hljs-variable .hljs-filter,
.hljs-variable .hljs-filter .hljs-keyword,
.hljs-template_tag .hljs-filter .hljs-keyword,
.hljs-name {
color: #b294bb;
}

/*color: fg_blue*/
.hljs-statement,
.hljs-label,
.hljs-keyword,
.hljs-xmlDocTag,
.hljs-function .hljs-keyword,
.hljs-chunk,
.hljs-cdata,
.hljs-link_label,
.hljs-bullet,
.hljs-class .hljs-keyword,
.hljs-smartquote,
.hljs-method,
.hljs-list .hljs-title,
.hljs-tag {
color: #81a2be;
}

/*color: fg_aqua*/
.hljs-pseudo,
.hljs-exception,
.hljs-annotation,
.hljs-subst,
.hljs-change,
.hljs-cbracket,
.hljs-operator,
.hljs-horizontal_rule,
.hljs-preprocessor .hljs-keyword,
.hljs-typedef,
.hljs-template_tag,
.hljs-variable,
.hljs-variable .hljs-filter .hljs-argument,
.hljs-at_rule,
.hljs-at_rule .hljs-string,
.hljs-at_rule .hljs-keyword {
color: #8abeb7;
}

/*color: fg_orange*/
.hljs-type,
.hljs-typename,
.hljs-inheritance .hljs-parent,
.hljs-constant,
.hljs-built_in,
.hljs-setting,
.hljs-structure,
.hljs-link_reference,
.hljs-attribute,
.hljs-blockquote,
.hljs-quoted,
.hljs-class,
.hljs-header {
color: #de935f;
}

.hljs-emphasis {
font-style: italic;
}

.hljs-strong {
font-weight: bold;
}
1 change: 1 addition & 0 deletions _includes/highlight.pack.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 0 additions & 75 deletions _includes/syntax.css

This file was deleted.

3 changes: 2 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title>{{ site.name }}</title>

<link rel="stylesheet" href="style.css">
</head>
<body>
{% include head.html %}
{{ content }}
{% include foot.html %}
<script src="scripts.js"></script>
</body>
</html>
6 changes: 6 additions & 0 deletions scripts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
layout: nil
---

{% include highlight.pack.js %}
hljs.initHighlightingOnLoad();
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ End styles from codeguide.co by @mdo
*/

{% include syntax.css %}
{% include highlight.hybrid.css %}

0 comments on commit 6e2b85c

Please sign in to comment.