Add highlight.js to hightlight code

This commit is contained in:
James Mills 2023-04-01 11:54:41 +10:00
parent e7f61b7bb0
commit b089b17b93
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6
5 changed files with 1217 additions and 3 deletions

View File

@ -32,7 +32,10 @@
Last modified <time datetime="{{ date +%Y-%m-%dT%H:%M:%SZ%:z }}">{{ date }}</time> ·
Built with <a href="https://git.mills.io/prologic/zs">zs</a>
</footer>
{{ scripts }}
<script>
hljs.highlightAll();
</script>
</body>
{{ scripts }}
</html>

View File

@ -2,7 +2,7 @@
set -e
JS=""
JS="highlight"
# Load live.js for non-production builds for faster development
if [ -z "$ZS_PRODUCTION" ]; then

View File

@ -2,7 +2,7 @@
set -e
CSS="bahunya site"
CSS="bahunya highlight site"
ext="css"
if [ -n "$ZS_PRODUCTION" ]; then

9
assets/css/highlight.css Normal file
View File

@ -0,0 +1,9 @@
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
Theme: GitHub Dark Dimmed
Description: Dark dimmed theme as seen on github.com
Author: github.com
Maintainer: @Hirse
Updated: 2021-05-15
Colors taken from GitHub's CSS
*/.hljs{color:#adbac7;background:#22272e}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#f47067}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#dcbdfb}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#6cb6ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#96d0ff}.hljs-built_in,.hljs-symbol{color:#f69d50}.hljs-code,.hljs-comment,.hljs-formula{color:#768390}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#8ddb8c}.hljs-subst{color:#adbac7}.hljs-section{color:#316dca;font-weight:700}.hljs-bullet{color:#eac55f}.hljs-emphasis{color:#adbac7;font-style:italic}.hljs-strong{color:#adbac7;font-weight:700}.hljs-addition{color:#b4f1b4;background-color:#1b4721}.hljs-deletion{color:#ffd8d3;background-color:#78191b}

1202
assets/js/highlight.js Normal file

File diff suppressed because one or more lines are too long