mirror of
https://github.com/treffynnon/sqlstyle.guide.git
synced 2025-03-09 12:49:51 -05:00
Use highlight.js for syntax highlighting
This commit is contained in:
parent
fb5c8e7d8e
commit
6e2b85c8e4
6 changed files with 174 additions and 77 deletions
164
_includes/highlight.hybrid.css
Normal file
164
_includes/highlight.hybrid.css
Normal file
|
@ -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
_includes/highlight.pack.js
Normal file
1
_includes/highlight.pack.js
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,75 +0,0 @@
|
|||
/*
|
||||
|
||||
Syntax highlighting style from https://raw.githubusercontent.com/mdo/code-guide/gh-pages/_includes/syntax.css
|
||||
|
||||
Where @mdo releases it under MIT
|
||||
|
||||
*/
|
||||
|
||||
|
||||
.hll { background-color: #ffffcc }
|
||||
/*{ background: #f0f3f3; }*/
|
||||
.c { color: #999; } /* Comment */
|
||||
.err { color: #AA0000; background-color: #FFAAAA } /* Error */
|
||||
.k { color: #006699; } /* Keyword */
|
||||
.o { color: #555555 } /* Operator */
|
||||
.cm { color: #999; } /* Comment.Multiline */ /* Edited to remove italics and make into comment */
|
||||
.cp { color: #009999 } /* Comment.Preproc */
|
||||
.c1 { color: #999; } /* Comment.Single */
|
||||
.cs { color: #999; } /* Comment.Special */
|
||||
.gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */
|
||||
.ge { font-style: italic } /* Generic.Emph */
|
||||
.gr { color: #FF0000 } /* Generic.Error */
|
||||
.gh { color: #003300; } /* Generic.Heading */
|
||||
.gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */
|
||||
.go { color: #AAAAAA } /* Generic.Output */
|
||||
.gp { color: #000099; } /* Generic.Prompt */
|
||||
.gs { } /* Generic.Strong */
|
||||
.gu { color: #003300; } /* Generic.Subheading */
|
||||
.gt { color: #99CC66 } /* Generic.Traceback */
|
||||
.kc { color: #006699; } /* Keyword.Constant */
|
||||
.kd { color: #006699; } /* Keyword.Declaration */
|
||||
.kn { color: #006699; } /* Keyword.Namespace */
|
||||
.kp { color: #006699 } /* Keyword.Pseudo */
|
||||
.kr { color: #006699; } /* Keyword.Reserved */
|
||||
.kt { color: #007788; } /* Keyword.Type */
|
||||
.m { color: #FF6600 } /* Literal.Number */
|
||||
.s { color: #d44950 } /* Literal.String */
|
||||
.na { color: #4f9fcf } /* Name.Attribute */
|
||||
.nb { color: #336666 } /* Name.Builtin */
|
||||
.nc { color: #00AA88; } /* Name.Class */
|
||||
.no { color: #336600 } /* Name.Constant */
|
||||
.nd { color: #9999FF } /* Name.Decorator */
|
||||
.ni { color: #999999; } /* Name.Entity */
|
||||
.ne { color: #CC0000; } /* Name.Exception */
|
||||
.nf { color: #CC00FF } /* Name.Function */
|
||||
.nl { color: #9999FF } /* Name.Label */
|
||||
.nn { color: #00CCFF; } /* Name.Namespace */
|
||||
.nt { color: #2f6f9f; } /* Name.Tag */
|
||||
.nv { color: #003333 } /* Name.Variable */
|
||||
.ow { color: #000000; } /* Operator.Word */
|
||||
.w { color: #bbbbbb } /* Text.Whitespace */
|
||||
.mf { color: #FF6600 } /* Literal.Number.Float */
|
||||
.mh { color: #FF6600 } /* Literal.Number.Hex */
|
||||
.mi { color: #FF6600 } /* Literal.Number.Integer */
|
||||
.mo { color: #FF6600 } /* Literal.Number.Oct */
|
||||
.sb { color: #CC3300 } /* Literal.String.Backtick */
|
||||
.sc { color: #CC3300 } /* Literal.String.Char */
|
||||
.sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */
|
||||
.s2 { color: #CC3300 } /* Literal.String.Double */
|
||||
.se { color: #CC3300; } /* Literal.String.Escape */
|
||||
.sh { color: #CC3300 } /* Literal.String.Heredoc */
|
||||
.si { color: #AA0000 } /* Literal.String.Interpol */
|
||||
.sx { color: #CC3300 } /* Literal.String.Other */
|
||||
.sr { color: #33AAAA } /* Literal.String.Regex */
|
||||
.s1 { color: #CC3300 } /* Literal.String.Single */
|
||||
.ss { color: #FFCC33 } /* Literal.String.Symbol */
|
||||
.bp { color: #336666 } /* Name.Builtin.Pseudo */
|
||||
.vc { color: #003333 } /* Name.Variable.Class */
|
||||
.vg { color: #003333 } /* Name.Variable.Global */
|
||||
.vi { color: #003333 } /* Name.Variable.Instance */
|
||||
.il { color: #FF6600 } /* Literal.Number.Integer.Long */
|
||||
|
||||
.css .o,
|
||||
.css .o + .nt,
|
||||
.css .nt + .nt { color: #999; }
|
|
@ -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
scripts.js
Normal file
6
scripts.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: nil
|
||||
---
|
||||
|
||||
{% include highlight.pack.js %}
|
||||
hljs.initHighlightingOnLoad();
|
|
@ -70,4 +70,4 @@ End styles from codeguide.co by @mdo
|
|||
|
||||
*/
|
||||
|
||||
{% include syntax.css %}
|
||||
{% include highlight.hybrid.css %}
|
||||
|
|
Loading…
Reference in a new issue