diff options
| author | Federico Angelilli <code@fedang.net> | 2024-12-15 16:26:08 +0100 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-12-15 16:26:08 +0100 |
| commit | f45405e2762709346a71866f17834a9d0a63a7d3 (patch) | |
| tree | 5d75c3237009a828badfa7812903e3d9edfb1297 /syntax.sh | |
| parent | f33540a70844775c14404739fcb92b0dcb3009f5 (diff) | |
Add syntax styles
Diffstat (limited to 'syntax.sh')
| -rwxr-xr-x | syntax.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/syntax.sh b/syntax.sh new file mode 100755 index 0000000..1951084 --- /dev/null +++ b/syntax.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +LIGHT=monokailight +DARK=onedark +CSS=assets/css/syntax.css + +cat << EOF > $CSS +.cmd-user .line ::before { + color: #669900; + font-weight: bold; + user-select: none; + content: "user $" + margin-right: 1em; +} +.cmd-root .line ::before { + color: #ff3333; + font-weight: bold; + user-select: none; + content: "root #" + margin-right: 1em; +} +EOF + +printf "\n/* Chroma style: %s */\n" $LIGHT >> $CSS +hugo gen chromastyles --style=$LIGHT >> $CSS +printf "\n\n/* Chroma style: %s */\n" $DARK >> $CSS +printf "@media (prefers-color-scheme: dark) {\n" >> $CSS +hugo gen chromastyles --style=$DARK >> $CSS +printf "}\n" >> $CSS |
