Skip to content

Commit

Permalink
adding support for highlightjs code highlighting
Browse files Browse the repository at this point in the history
- new `highlightjsTheme` parameter activates library
  • Loading branch information
dencold committed Mar 15, 2016
1 parent ecb6288 commit a8f2870
Show file tree
Hide file tree
Showing 77 changed files with 5,637 additions and 2 deletions.
6 changes: 6 additions & 0 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@
</script>
{{end}}

{{with .Site.Params.highlightjsTheme}}
<link rel="stylesheet" href="/css/highlightjs/{{.}}.css">
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
{{end}}

{{ if .Site.Params.customHeaderPartial }}
{{ partial .Site.Params.customHeaderPartial . }}
{{ end }}
Expand Down
108 changes: 108 additions & 0 deletions static/css/highlightjs/agate.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/*!
* Agate by Taufik Nurrohman <https://github.com/tovic>
* ----------------------------------------------------
*
* #ade5fc
* #a2fca2
* #c6b4f0
* #d36363
* #fcc28c
* #fc9b9b
* #ffa
* #fff
* #333
* #62c8f3
* #888
*
*/

.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #333;
color: white;
}

.hljs-name,
.hljs-strong {
font-weight: bold;
}

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

.hljs-tag {
color: #62c8f3;
}

.hljs-variable,
.hljs-template-variable,
.hljs-selector-id,
.hljs-selector-class {
color: #ade5fc;
}

.hljs-string,
.hljs-bullet {
color: #a2fca2;
}

.hljs-type,
.hljs-title,
.hljs-section,
.hljs-attribute,
.hljs-quote,
.hljs-built_in,
.hljs-builtin-name {
color: #ffa;
}

.hljs-number,
.hljs-symbol,
.hljs-bullet {
color: #d36363;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal {
color: #fcc28c;
}

.hljs-comment,
.hljs-deletion,
.hljs-code {
color: #888;
}

.hljs-regexp,
.hljs-link {
color: #c6b4f0;
}

.hljs-meta {
color: #fc9b9b;
}

.hljs-deletion {
background-color: #fc9b9b;
color: #333;
}

.hljs-addition {
background-color: #a2fca2;
color: #333;
}

.hljs a {
color: inherit;
}

.hljs a:focus,
.hljs a:hover {
color: inherit;
text-decoration: underline;
}
66 changes: 66 additions & 0 deletions static/css/highlightjs/androidstudio.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
Date: 24 Fev 2015
Author: Pedro Oliveira <kanytu@gmail . com>
*/

.hljs {
color: #a9b7c6;
background: #282b2e;
display: block;
overflow-x: auto;
padding: 0.5em;
}

.hljs-number,
.hljs-literal,
.hljs-symbol,
.hljs-bullet {
color: #6897BB;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-deletion {
color: #cc7832;
}

.hljs-variable,
.hljs-template-variable,
.hljs-link {
color: #629755;
}

.hljs-comment,
.hljs-quote {
color: #808080;
}

.hljs-meta {
color: #bbb529;
}

.hljs-string,
.hljs-attribute,
.hljs-addition {
color: #6A8759;
}

.hljs-section,
.hljs-title,
.hljs-type {
color: #ffc66d;
}

.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #e8bf6a;
}

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

.hljs-strong {
font-weight: bold;
}
88 changes: 88 additions & 0 deletions static/css/highlightjs/arduino-light.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
Arduino® Light Theme - Stefania Mellai <s.mellai@arduino.cc>
*/

.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #FFFFFF;
}

.hljs,
.hljs-subst {
color: #434f54;
}

.hljs-keyword,
.hljs-attribute,
.hljs-selector-tag,
.hljs-doctag,
.hljs-name {
color: #00979D;
}

.hljs-built_in,
.hljs-literal,
.hljs-bullet,
.hljs-code,
.hljs-addition {
color: #D35400;
}

.hljs-regexp,
.hljs-symbol,
.hljs-variable,
.hljs-template-variable,
.hljs-link,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #00979D;
}

.hljs-type,
.hljs-string,
.hljs-selector-id,
.hljs-selector-class,
.hljs-quote,
.hljs-template-tag,
.hljs-deletion {
color: #005C5F;
}

.hljs-title,
.hljs-section {
color: #880000;
font-weight: bold;
}

.hljs-comment {
color: rgba(149,165,166,.8);
}

.hljs-meta-keyword {
color: #728E00;
}

.hljs-meta {
color: #728E00;
color: #434f54;
}

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

.hljs-strong {
font-weight: bold;
}

.hljs-function {
color: #728E00;
}

.hljs-number {
color: #8A7B52;
}
73 changes: 73 additions & 0 deletions static/css/highlightjs/arta.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
Date: 17.V.2011
Author: pumbur <pumbur@pumbur.net>
*/

.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #222;
}

.hljs,
.hljs-subst {
color: #aaa;
}

.hljs-section {
color: #fff;
}

.hljs-comment,
.hljs-quote,
.hljs-meta {
color: #444;
}

.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-regexp {
color: #ffcc33;
}

.hljs-number,
.hljs-addition {
color: #00cc66;
}

.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-template-variable,
.hljs-attribute,
.hljs-link {
color: #32aaee;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #6644aa;
}

.hljs-title,
.hljs-variable,
.hljs-deletion,
.hljs-template-tag {
color: #bb1166;
}

.hljs-section,
.hljs-doctag,
.hljs-strong {
font-weight: bold;
}

.hljs-emphasis {
font-style: italic;
}
45 changes: 45 additions & 0 deletions static/css/highlightjs/ascetic.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
*/

.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: white;
color: black;
}

.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-symbol,
.hljs-bullet,
.hljs-section,
.hljs-addition,
.hljs-attribute,
.hljs-link {
color: #888;
}

.hljs-comment,
.hljs-quote,
.hljs-meta,
.hljs-deletion {
color: #ccc;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-section,
.hljs-name,
.hljs-type,
.hljs-strong {
font-weight: bold;
}

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

0 comments on commit a8f2870

Please sign in to comment.