Skip to content

Commit 351f29f

Browse files
committed
prettified code blocks
1 parent add8a50 commit 351f29f

18 files changed

Lines changed: 419 additions & 194 deletions

‎Gemfile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ gem "logger"
1717
gem "ostruct"
1818
gem "webrick"
1919
gem "just-the-docs"
20+
gem "rouge"

‎_config.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ color_scheme: dark
77

88
aux_links:
99
Template Repository: https://github.com/Zendro-dev/Zendro-dev.github.io
10+
11+
sass:
12+
style: compressed

‎_includes/head_custom.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<link rel="stylesheet" type="text/css" href="/assets/css/main.css">

‎_sass/code_highlighting.scss‎

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
// Colors sourced from _sass/theme.json (a Sublime Text color scheme).
2+
// "variables" section:
3+
$black: hsl(0, 0%, 0%);
4+
$blue: hsl(210, 50%, 60%);
5+
$blue-vibrant: hsl(210, 60%, 60%);
6+
$blue2: hsla(210, 13%, 40%, 0.7);
7+
$blue3: hsl(210, 15%, 22%);
8+
$blue4: hsl(210, 13%, 45%);
9+
$blue5: hsl(180, 36%, 54%);
10+
$blue6: hsl(221, 12%, 69%);
11+
$green: hsl(114, 31%, 68%);
12+
$grey: hsl(0, 0%, 20%);
13+
$orange: hsl(32, 93%, 66%);
14+
$orange2: hsl(32, 85%, 55%);
15+
$orange3: hsl(40, 94%, 68%);
16+
$pink: hsl(300, 30%, 68%);
17+
$red: hsl(357, 79%, 65%);
18+
$red2: hsl(13, 93%, 66%);
19+
$white: hsl(0, 0%, 100%);
20+
$white2: hsl(0, 0%, 97%);
21+
$white3: hsl(219, 28%, 88%);
22+
23+
// "globals" section:
24+
$fg: $white3; // foreground
25+
$bg: $blue3; // background
26+
$line-highlight: $blue2; // line_highlight
27+
28+
.highlighter-rouge { background: $bg; }
29+
30+
.highlight, pre.highlight, pre {
31+
background: #272822
32+
}
33+
.language-json, .language-js {
34+
.highlight, pre.highlight, pre {
35+
background: $bg;
36+
}
37+
}
38+
39+
.highlight {
40+
color: $fg;
41+
42+
.hll { background-color: $line-highlight } /* line_highlight */
43+
.err { color: $white2; background-color: $red } /* Error -> "Invalid" */
44+
.c { color: $blue6 } /* Comment -> "Comment" */
45+
.g { color: $fg } /* Generic */
46+
.k { color: $pink } /* Keyword -> "Keyword" */
47+
.l { color: $fg } /* Literal */
48+
.n { color: $fg } /* Name */
49+
.o { color: $red2 } /* Operator -> "Operators" */
50+
.x { color: $fg } /* Other */
51+
.p { color: $blue6 } /* Punctuation -> "Punctuation" (separator/terminator) */
52+
.cm { color: $blue6 } /* Comment.Multiline -> "Comment" */
53+
.cp { color: $blue6 } /* Comment.Preproc -> "Comment" */
54+
.c1 { color: $blue6 } /* Comment.Single -> "Comment" */
55+
.cs { color: $blue6; font-weight: bold } /* Comment.Special -> "Comment" */
56+
.gd { color: $red; background-color: hsla(357, 45%, 60%, 0.15) } /* Generic.Deleted -> "diff.deleted" */
57+
.ge { color: $orange } /* Generic.Emph -> "diff.changed" */
58+
.gr { color: $white2; background-color: $red } /* Generic.Error -> "Invalid" */
59+
.gh { color: $pink; font-weight: bold } /* Generic.Heading -> "diff.header" */
60+
.gi { color: $green; background-color: hsla(180, 45%, 60%, 0.15) } /* Generic.Inserted -> "diff.inserted" */
61+
span.go { color: $blue; background-color: hsl(210, 15%, 16%) } /* Generic.Output -> "message.info"
62+
.gp { color: $blue6 } /* Generic.Prompt */
63+
.gs { color: $fg; font-weight: bold } /* Generic.Strong -> "markup bold" */
64+
.gu { color: $pink; font-weight: bold } /* Generic.Subheading -> "diff.header" */
65+
.gt { color: $white2; background-color: $orange2 } /* Generic.Traceback -> "Invalid deprecated" */
66+
.kc { color: $red; font-style: italic } /* Keyword.Constant -> "Built-in constant" */
67+
.kd { color: $red } /* Keyword.Declaration -> "Storage" */
68+
.kn { color: $pink } /* Keyword.Namespace -> "Keyword" */
69+
.kp { color: $pink } /* Keyword.Pseudo -> "Keyword" */
70+
.kr { color: $pink } /* Keyword.Reserved -> "Keyword" */
71+
.kt { color: $pink; font-style: italic } /* Keyword.Type -> "Storage type" */
72+
.ld { color: $green } /* Literal.Date -> "String" */
73+
.m { color: $orange } /* Literal.Number -> "Number" */
74+
.s { color: $green } /* Literal.String -> "String" */
75+
.na { color: $pink } /* Name.Attribute -> "Tag attribute" */
76+
.nb { color: $blue; font-style: italic } /* Name.Builtin -> "Library function" */
77+
.nc { color: $orange } /* Name.Class -> "Entity name" */
78+
.no { color: $pink; font-style: italic } /* Name.Constant -> "Library constant" */
79+
.nd { color: $orange } /* Name.Decorator -> "Entity name" */
80+
.ni { color: $orange } /* Name.Entity -> "Entity name" */
81+
.ne { color: $red } /* Name.Exception -> "Tag name" */
82+
.nf { color: $blue5 } /* Name.Function -> "Entity name" (entity.name.function) */
83+
.nl { color: $blue5 } /* Name.Label */
84+
.nn { color: $orange } /* Name.Namespace -> "Entity name" */
85+
.nx { color: $fg } /* Name.Other */
86+
.py { color: $red } /* Name.Property -> "Member Variable" */
87+
.nt { color: $red } /* Name.Tag -> "Tag name" */
88+
.nv { color: $fg } /* Name.Variable */
89+
.ow { color: $red2 } /* Operator.Word -> "Operators" */
90+
.w { color: $fg } /* Text.Whitespace */
91+
.mf { color: $orange } /* Literal.Number.Float -> "Number" */
92+
.mh { color: $orange } /* Literal.Number.Hex -> "Number" */
93+
.mi { color: $orange } /* Literal.Number.Integer -> "Number" */
94+
.mo { color: $orange } /* Literal.Number.Oct -> "Number" */
95+
.sb { color: $green } /* Literal.String.Backtick -> "String" */
96+
.sc { color: $green } /* Literal.String.Char -> "String" */
97+
.sd { color: $green } /* Literal.String.Doc -> "String" */
98+
.s2 { color: $green } /* Literal.String.Double -> "String" */
99+
.se { color: $pink } /* Literal.String.Escape -> "User-defined constant" */
100+
.sh { color: $green } /* Literal.String.Heredoc -> "String" */
101+
.si { color: $pink } /* Literal.String.Interpol -> "User-defined constant" */
102+
.sx { color: $green } /* Literal.String.Other -> "String" */
103+
.sr { color: $green } /* Literal.String.Regex -> "String" */
104+
.s1 { color: $green } /* Literal.String.Single -> "String" */
105+
.ss { color: $pink } /* Literal.String.Symbol -> "User-defined constant" */
106+
.bp { color: $red; font-style: italic } /* Name.Builtin.Pseudo -> "Language variable" */
107+
.vc { color: $fg } /* Name.Variable.Class */
108+
.vg { color: $fg } /* Name.Variable.Global */
109+
.vi { color: $red } /* Name.Variable.Instance -> "Member Variable" */
110+
.il { color: $orange } /* Literal.Number.Integer.Long -> "Number" */
111+
.bash .nv {
112+
user-select: none;
113+
}
114+
}
115+
116+
.language-liquid {
117+
.highlight {
118+
.p { color: $blue6 }
119+
.kr { color: $pink }
120+
.nf { color: $blue5 }
121+
.nt { color: $red }
122+
.nv { color: $fg }
123+
}
124+
}
125+
126+
.language-sh .highlight * { color: $fg }

0 commit comments

Comments
 (0)