summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfr33domlover <fr33domlover@riseup.net>2019-07-02 15:03:36 +0300
committerfr33domlover <fr33domlover@riseup.net>2019-07-02 15:03:36 +0300
commit3f0476736e85b4507fd955d69cc7801ec7254be2 (patch)
tree9d1802336882c283cd305de8780a692bb2ea3871
parentfdb4076f365c15645ae847e4124149d474320abe (diff)
Add syntax highlighting style CSS
I generated the file using the `styleToCss` function in the Haskell library Skylighting (which is what Pandoc uses). There are other color schemes available, and of course we could make our own if we want. I just picked something reasonable to get started (the zenburn theme).
-rwxr-xr-xbuild.sh1
-rw-r--r--html/template.html1
-rw-r--r--html/zenburn.css60
3 files changed, 61 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index b94cdb1..2bf5a40 100755
--- a/build.sh
+++ b/build.sh
@@ -17,7 +17,6 @@ render () {
$toc \
--number-sections \
--output html/$file.html
- # --highlight-style=STYLE \
}
render html index "false"
diff --git a/html/template.html b/html/template.html
index 064f227..80b6990 100644
--- a/html/template.html
+++ b/html/template.html
@@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>$title$</title>
<link rel="stylesheet" type="text/css" href="spec.css" />
+ <link rel="stylesheet" type="text/css" href="zenburn.css" />
</head>
<body class="body">
<header class="header">
diff --git a/html/zenburn.css b/html/zenburn.css
new file mode 100644
index 0000000..9632339
--- /dev/null
+++ b/html/zenburn.css
@@ -0,0 +1,60 @@
+a.sourceLine { display: inline-block; line-height: 1.25; }
+a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; }
+a.sourceLine:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode { white-space: pre; position: relative; }
+div.sourceCode { margin: 1em 0; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+code.sourceCode { white-space: pre-wrap; }
+a.sourceLine { text-indent: -1em; padding-left: 1em; }
+}
+pre.numberSource a.sourceLine
+ { position: relative; left: -4em; }
+pre.numberSource a.sourceLine::before
+ { content: attr(title);
+ position: relative; left: -1em; text-align: right; vertical-align: baseline;
+ border: none; pointer-events: all; display: inline-block;
+ -webkit-touch-callout: none; -webkit-user-select: none;
+ -khtml-user-select: none; -moz-user-select: none;
+ -ms-user-select: none; user-select: none;
+ padding: 0 4px; width: 4em;
+ }
+pre.numberSource { margin-left: 3em; padding-left: 4px; }
+div.sourceCode
+ { color: #cccccc; background-color: #303030; }
+@media screen {
+a.sourceLine::before { text-decoration: underline; }
+}
+code span.al { color: #ffcfaf; } /* Alert */
+code span.an { color: #7f9f7f; font-weight: bold; } /* Annotation */
+code span.at { } /* Attribute */
+code span.bn { color: #dca3a3; } /* BaseN */
+code span.bu { } /* BuiltIn */
+code span.cf { color: #f0dfaf; } /* ControlFlow */
+code span.ch { color: #dca3a3; } /* Char */
+code span.cn { color: #dca3a3; font-weight: bold; } /* Constant */
+code span.co { color: #7f9f7f; } /* Comment */
+code span.cv { color: #7f9f7f; font-weight: bold; } /* CommentVar */
+code span.do { color: #7f9f7f; } /* Documentation */
+code span.dt { color: #dfdfbf; } /* DataType */
+code span.dv { color: #dcdccc; } /* DecVal */
+code span.er { color: #c3bf9f; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #c0bed1; } /* Float */
+code span.fu { color: #efef8f; } /* Function */
+code span.im { } /* Import */
+code span.in { color: #7f9f7f; font-weight: bold; } /* Information */
+code span.kw { color: #f0dfaf; } /* Keyword */
+code span.op { color: #f0efd0; } /* Operator */
+code span.ot { color: #efef8f; } /* Other */
+code span.pp { color: #ffcfaf; font-weight: bold; } /* Preprocessor */
+code span.sc { color: #dca3a3; } /* SpecialChar */
+code span.ss { color: #cc9393; } /* SpecialString */
+code span.st { color: #cc9393; } /* String */
+code span.va { } /* Variable */
+code span.vs { color: #cc9393; } /* VerbatimString */
+code span.wa { color: #7f9f7f; font-weight: bold; } /* Warning */