mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 21:34:06 -06:00
parent
956d1c45f2
commit
ada0c74160
@ -1,18 +1,31 @@
|
|||||||
const userPref = window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark'
|
const userPref = window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark'
|
||||||
const currentTheme = localStorage.getItem('theme') ?? userPref
|
const currentTheme = localStorage.getItem('theme') ?? userPref
|
||||||
|
const syntaxTheme = document.querySelector("#theme-link");
|
||||||
|
|
||||||
|
|
||||||
|
{{ $darkSyntax := resources.Get "styles/_dark_syntax.scss" | resources.ToCSS (dict "outputStyle" "compressed") | resources.Fingerprint "md5" | resources.Minify }}
|
||||||
|
{{ $lightSyntax := resources.Get "styles/_light_syntax.scss" | resources.ToCSS (dict "outputStyle" "compressed") | resources.Fingerprint "md5" | resources.Minify }}
|
||||||
|
|
||||||
if (currentTheme) {
|
if (currentTheme) {
|
||||||
document.documentElement.setAttribute('saved-theme', currentTheme);
|
document.documentElement.setAttribute('saved-theme', currentTheme);
|
||||||
|
if (currentTheme === 'dark') {
|
||||||
|
syntaxTheme.href = '{{ $darkSyntax.Permalink }}';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
syntaxTheme.href = '{{ $lightSyntax.Permalink }}';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const switchTheme = (e) => {
|
const switchTheme = (e) => {
|
||||||
if (e.target.checked) {
|
if (e.target.checked) {
|
||||||
document.documentElement.setAttribute('saved-theme', 'dark')
|
document.documentElement.setAttribute('saved-theme', 'dark');
|
||||||
localStorage.setItem('theme', 'dark')
|
localStorage.setItem('theme', 'dark');
|
||||||
|
syntaxTheme.href = '{{ $darkSyntax.Permalink }}';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
document.documentElement.setAttribute('saved-theme', 'light')
|
document.documentElement.setAttribute('saved-theme', 'light')
|
||||||
localStorage.setItem('theme', 'light')
|
localStorage.setItem('theme', 'light')
|
||||||
|
syntaxTheme.href = '{{ $lightSyntax.Permalink }}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
85
assets/styles/_dark_syntax.scss
Normal file
85
assets/styles/_dark_syntax.scss
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
/* Background */ .bg { color: #f8f8f2; background-color: #282a36; }
|
||||||
|
/* PreWrapper */ .chroma { color: #f8f8f2; background-color: #282a36; }
|
||||||
|
/* Other */ .chroma .x { }
|
||||||
|
/* Error */ .chroma .err { }
|
||||||
|
/* CodeLine */ .chroma .cl { }
|
||||||
|
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
|
||||||
|
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
|
||||||
|
/* LineHighlight */ .chroma .hl { background-color: #ffffcc }
|
||||||
|
/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
||||||
|
/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
||||||
|
/* Line */ .chroma .line { display: flex; }
|
||||||
|
/* Keyword */ .chroma .k { color: #ff79c6 }
|
||||||
|
/* KeywordConstant */ .chroma .kc { color: #ff79c6 }
|
||||||
|
/* KeywordDeclaration */ .chroma .kd { color: #8be9fd; font-style: italic }
|
||||||
|
/* KeywordNamespace */ .chroma .kn { color: #ff79c6 }
|
||||||
|
/* KeywordPseudo */ .chroma .kp { color: #ff79c6 }
|
||||||
|
/* KeywordReserved */ .chroma .kr { color: #ff79c6 }
|
||||||
|
/* KeywordType */ .chroma .kt { color: #8be9fd }
|
||||||
|
/* Name */ .chroma .n { }
|
||||||
|
/* NameAttribute */ .chroma .na { color: #50fa7b }
|
||||||
|
/* NameBuiltin */ .chroma .nb { color: #8be9fd; font-style: italic }
|
||||||
|
/* NameBuiltinPseudo */ .chroma .bp { }
|
||||||
|
/* NameClass */ .chroma .nc { color: #50fa7b }
|
||||||
|
/* NameConstant */ .chroma .no { }
|
||||||
|
/* NameDecorator */ .chroma .nd { }
|
||||||
|
/* NameEntity */ .chroma .ni { }
|
||||||
|
/* NameException */ .chroma .ne { }
|
||||||
|
/* NameFunction */ .chroma .nf { color: #50fa7b }
|
||||||
|
/* NameFunctionMagic */ .chroma .fm { }
|
||||||
|
/* NameLabel */ .chroma .nl { color: #8be9fd; font-style: italic }
|
||||||
|
/* NameNamespace */ .chroma .nn { }
|
||||||
|
/* NameOther */ .chroma .nx { }
|
||||||
|
/* NameProperty */ .chroma .py { }
|
||||||
|
/* NameTag */ .chroma .nt { color: #ff79c6 }
|
||||||
|
/* NameVariable */ .chroma .nv { color: #8be9fd; font-style: italic }
|
||||||
|
/* NameVariableClass */ .chroma .vc { color: #8be9fd; font-style: italic }
|
||||||
|
/* NameVariableGlobal */ .chroma .vg { color: #8be9fd; font-style: italic }
|
||||||
|
/* NameVariableInstance */ .chroma .vi { color: #8be9fd; font-style: italic }
|
||||||
|
/* NameVariableMagic */ .chroma .vm { }
|
||||||
|
/* Literal */ .chroma .l { }
|
||||||
|
/* LiteralDate */ .chroma .ld { }
|
||||||
|
/* LiteralString */ .chroma .s { color: #f1fa8c }
|
||||||
|
/* LiteralStringAffix */ .chroma .sa { color: #f1fa8c }
|
||||||
|
/* LiteralStringBacktick */ .chroma .sb { color: #f1fa8c }
|
||||||
|
/* LiteralStringChar */ .chroma .sc { color: #f1fa8c }
|
||||||
|
/* LiteralStringDelimiter */ .chroma .dl { color: #f1fa8c }
|
||||||
|
/* LiteralStringDoc */ .chroma .sd { color: #f1fa8c }
|
||||||
|
/* LiteralStringDouble */ .chroma .s2 { color: #f1fa8c }
|
||||||
|
/* LiteralStringEscape */ .chroma .se { color: #f1fa8c }
|
||||||
|
/* LiteralStringHeredoc */ .chroma .sh { color: #f1fa8c }
|
||||||
|
/* LiteralStringInterpol */ .chroma .si { color: #f1fa8c }
|
||||||
|
/* LiteralStringOther */ .chroma .sx { color: #f1fa8c }
|
||||||
|
/* LiteralStringRegex */ .chroma .sr { color: #f1fa8c }
|
||||||
|
/* LiteralStringSingle */ .chroma .s1 { color: #f1fa8c }
|
||||||
|
/* LiteralStringSymbol */ .chroma .ss { color: #f1fa8c }
|
||||||
|
/* LiteralNumber */ .chroma .m { color: #bd93f9 }
|
||||||
|
/* LiteralNumberBin */ .chroma .mb { color: #bd93f9 }
|
||||||
|
/* LiteralNumberFloat */ .chroma .mf { color: #bd93f9 }
|
||||||
|
/* LiteralNumberHex */ .chroma .mh { color: #bd93f9 }
|
||||||
|
/* LiteralNumberInteger */ .chroma .mi { color: #bd93f9 }
|
||||||
|
/* LiteralNumberIntegerLong */ .chroma .il { color: #bd93f9 }
|
||||||
|
/* LiteralNumberOct */ .chroma .mo { color: #bd93f9 }
|
||||||
|
/* Operator */ .chroma .o { color: #ff79c6 }
|
||||||
|
/* OperatorWord */ .chroma .ow { color: #ff79c6 }
|
||||||
|
/* Punctuation */ .chroma .p { }
|
||||||
|
/* Comment */ .chroma .c { color: #6272a4 }
|
||||||
|
/* CommentHashbang */ .chroma .ch { color: #6272a4 }
|
||||||
|
/* CommentMultiline */ .chroma .cm { color: #6272a4 }
|
||||||
|
/* CommentSingle */ .chroma .c1 { color: #6272a4 }
|
||||||
|
/* CommentSpecial */ .chroma .cs { color: #6272a4 }
|
||||||
|
/* CommentPreproc */ .chroma .cp { color: #ff79c6 }
|
||||||
|
/* CommentPreprocFile */ .chroma .cpf { color: #ff79c6 }
|
||||||
|
/* Generic */ .chroma .g { }
|
||||||
|
/* GenericDeleted */ .chroma .gd { color: #ff5555 }
|
||||||
|
/* GenericEmph */ .chroma .ge { text-decoration: underline }
|
||||||
|
/* GenericError */ .chroma .gr { }
|
||||||
|
/* GenericHeading */ .chroma .gh { font-weight: bold }
|
||||||
|
/* GenericInserted */ .chroma .gi { color: #50fa7b; font-weight: bold }
|
||||||
|
/* GenericOutput */ .chroma .go { color: #44475a }
|
||||||
|
/* GenericPrompt */ .chroma .gp { }
|
||||||
|
/* GenericStrong */ .chroma .gs { }
|
||||||
|
/* GenericSubheading */ .chroma .gu { font-weight: bold }
|
||||||
|
/* GenericTraceback */ .chroma .gt { }
|
||||||
|
/* GenericUnderline */ .chroma .gl { text-decoration: underline }
|
||||||
|
/* TextWhitespace */ .chroma .w { }
|
||||||
85
assets/styles/_light_syntax.scss
Normal file
85
assets/styles/_light_syntax.scss
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
/* Background */ .bg { color: #272822; background-color: #fafafa; }
|
||||||
|
/* PreWrapper */ .chroma { color: #272822; background-color: #fafafa; }
|
||||||
|
/* Other */ .chroma .x { }
|
||||||
|
/* Error */ .chroma .err { color: #960050; background-color: #1e0010 }
|
||||||
|
/* CodeLine */ .chroma .cl { }
|
||||||
|
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
|
||||||
|
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
|
||||||
|
/* LineHighlight */ .chroma .hl { background-color: #ffffcc }
|
||||||
|
/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
||||||
|
/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
||||||
|
/* Line */ .chroma .line { display: flex; }
|
||||||
|
/* Keyword */ .chroma .k { color: #00a8c8 }
|
||||||
|
/* KeywordConstant */ .chroma .kc { color: #00a8c8 }
|
||||||
|
/* KeywordDeclaration */ .chroma .kd { color: #00a8c8 }
|
||||||
|
/* KeywordNamespace */ .chroma .kn { color: #f92672 }
|
||||||
|
/* KeywordPseudo */ .chroma .kp { color: #00a8c8 }
|
||||||
|
/* KeywordReserved */ .chroma .kr { color: #00a8c8 }
|
||||||
|
/* KeywordType */ .chroma .kt { color: #00a8c8 }
|
||||||
|
/* Name */ .chroma .n { color: #111111 }
|
||||||
|
/* NameAttribute */ .chroma .na { color: #75af00 }
|
||||||
|
/* NameBuiltin */ .chroma .nb { color: #111111 }
|
||||||
|
/* NameBuiltinPseudo */ .chroma .bp { color: #111111 }
|
||||||
|
/* NameClass */ .chroma .nc { color: #75af00 }
|
||||||
|
/* NameConstant */ .chroma .no { color: #00a8c8 }
|
||||||
|
/* NameDecorator */ .chroma .nd { color: #75af00 }
|
||||||
|
/* NameEntity */ .chroma .ni { color: #111111 }
|
||||||
|
/* NameException */ .chroma .ne { color: #75af00 }
|
||||||
|
/* NameFunction */ .chroma .nf { color: #75af00 }
|
||||||
|
/* NameFunctionMagic */ .chroma .fm { color: #111111 }
|
||||||
|
/* NameLabel */ .chroma .nl { color: #111111 }
|
||||||
|
/* NameNamespace */ .chroma .nn { color: #111111 }
|
||||||
|
/* NameOther */ .chroma .nx { color: #75af00 }
|
||||||
|
/* NameProperty */ .chroma .py { color: #111111 }
|
||||||
|
/* NameTag */ .chroma .nt { color: #f92672 }
|
||||||
|
/* NameVariable */ .chroma .nv { color: #111111 }
|
||||||
|
/* NameVariableClass */ .chroma .vc { color: #111111 }
|
||||||
|
/* NameVariableGlobal */ .chroma .vg { color: #111111 }
|
||||||
|
/* NameVariableInstance */ .chroma .vi { color: #111111 }
|
||||||
|
/* NameVariableMagic */ .chroma .vm { color: #111111 }
|
||||||
|
/* Literal */ .chroma .l { color: #ae81ff }
|
||||||
|
/* LiteralDate */ .chroma .ld { color: #d88200 }
|
||||||
|
/* LiteralString */ .chroma .s { color: #d88200 }
|
||||||
|
/* LiteralStringAffix */ .chroma .sa { color: #d88200 }
|
||||||
|
/* LiteralStringBacktick */ .chroma .sb { color: #d88200 }
|
||||||
|
/* LiteralStringChar */ .chroma .sc { color: #d88200 }
|
||||||
|
/* LiteralStringDelimiter */ .chroma .dl { color: #d88200 }
|
||||||
|
/* LiteralStringDoc */ .chroma .sd { color: #d88200 }
|
||||||
|
/* LiteralStringDouble */ .chroma .s2 { color: #d88200 }
|
||||||
|
/* LiteralStringEscape */ .chroma .se { color: #8045ff }
|
||||||
|
/* LiteralStringHeredoc */ .chroma .sh { color: #d88200 }
|
||||||
|
/* LiteralStringInterpol */ .chroma .si { color: #d88200 }
|
||||||
|
/* LiteralStringOther */ .chroma .sx { color: #d88200 }
|
||||||
|
/* LiteralStringRegex */ .chroma .sr { color: #d88200 }
|
||||||
|
/* LiteralStringSingle */ .chroma .s1 { color: #d88200 }
|
||||||
|
/* LiteralStringSymbol */ .chroma .ss { color: #d88200 }
|
||||||
|
/* LiteralNumber */ .chroma .m { color: #ae81ff }
|
||||||
|
/* LiteralNumberBin */ .chroma .mb { color: #ae81ff }
|
||||||
|
/* LiteralNumberFloat */ .chroma .mf { color: #ae81ff }
|
||||||
|
/* LiteralNumberHex */ .chroma .mh { color: #ae81ff }
|
||||||
|
/* LiteralNumberInteger */ .chroma .mi { color: #ae81ff }
|
||||||
|
/* LiteralNumberIntegerLong */ .chroma .il { color: #ae81ff }
|
||||||
|
/* LiteralNumberOct */ .chroma .mo { color: #ae81ff }
|
||||||
|
/* Operator */ .chroma .o { color: #f92672 }
|
||||||
|
/* OperatorWord */ .chroma .ow { color: #f92672 }
|
||||||
|
/* Punctuation */ .chroma .p { color: #111111 }
|
||||||
|
/* Comment */ .chroma .c { color: #75715e }
|
||||||
|
/* CommentHashbang */ .chroma .ch { color: #75715e }
|
||||||
|
/* CommentMultiline */ .chroma .cm { color: #75715e }
|
||||||
|
/* CommentSingle */ .chroma .c1 { color: #75715e }
|
||||||
|
/* CommentSpecial */ .chroma .cs { color: #75715e }
|
||||||
|
/* CommentPreproc */ .chroma .cp { color: #75715e }
|
||||||
|
/* CommentPreprocFile */ .chroma .cpf { color: #75715e }
|
||||||
|
/* Generic */ .chroma .g { }
|
||||||
|
/* GenericDeleted */ .chroma .gd { }
|
||||||
|
/* GenericEmph */ .chroma .ge { font-style: italic }
|
||||||
|
/* GenericError */ .chroma .gr { }
|
||||||
|
/* GenericHeading */ .chroma .gh { }
|
||||||
|
/* GenericInserted */ .chroma .gi { }
|
||||||
|
/* GenericOutput */ .chroma .go { }
|
||||||
|
/* GenericPrompt */ .chroma .gp { }
|
||||||
|
/* GenericStrong */ .chroma .gs { font-weight: bold }
|
||||||
|
/* GenericSubheading */ .chroma .gu { }
|
||||||
|
/* GenericTraceback */ .chroma .gt { }
|
||||||
|
/* GenericUnderline */ .chroma .gl { }
|
||||||
|
/* TextWhitespace */ .chroma .w { }
|
||||||
@ -1,99 +1,58 @@
|
|||||||
/* Background */ .chroma { color: #f8f8f2; background-color: #282a36; overflow: hidden }
|
// Overrides
|
||||||
/* Other */ .chroma .x { }
|
/* Background */
|
||||||
/* Error */ .chroma .err { }
|
.chroma {
|
||||||
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
|
overflow: hidden !important;
|
||||||
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
|
background-color: var(--lightgray) !important;
|
||||||
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc }
|
}
|
||||||
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
|
||||||
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
/* LineTable */
|
||||||
/* Keyword */ .chroma .k { color: #ff79c6 }
|
.chroma .lntable {
|
||||||
/* KeywordConstant */ .chroma .kc { color: #ff79c6 }
|
width: auto !important;
|
||||||
/* KeywordDeclaration */ .chroma .kd { color: #8be9fd; font-style: italic }
|
overflow: auto !important;
|
||||||
/* KeywordNamespace */ .chroma .kn { color: #ff79c6 }
|
display: block !important;
|
||||||
/* KeywordPseudo */ .chroma .kp { color: #ff79c6 }
|
}
|
||||||
/* KeywordReserved */ .chroma .kr { color: #ff79c6 }
|
|
||||||
/* KeywordType */ .chroma .kt { color: #8be9fd }
|
/* LineHighlight */
|
||||||
/* Name */ .chroma .n { }
|
.chroma .hl {
|
||||||
/* NameAttribute */ .chroma .na { color: #50fa7b }
|
display: block !important;
|
||||||
/* NameBuiltin */ .chroma .nb { color: #8be9fd; font-style: italic }
|
width: 100% !important;
|
||||||
/* NameBuiltinPseudo */ .chroma .bp { }
|
}
|
||||||
/* NameClass */ .chroma .nc { color: #50fa7b }
|
|
||||||
/* NameConstant */ .chroma .no { }
|
/* LineNumbersTable */
|
||||||
/* NameDecorator */ .chroma .nd { }
|
.chroma .lnt {
|
||||||
/* NameEntity */ .chroma .ni { }
|
margin-right: 0.0em !important;
|
||||||
/* NameException */ .chroma .ne { }
|
padding: 0 0.0em 0 0.0em !important;
|
||||||
/* NameFunction */ .chroma .nf { color: #50fa7b }
|
}
|
||||||
/* NameFunctionMagic */ .chroma .fm { }
|
|
||||||
/* NameLabel */ .chroma .nl { color: #8be9fd; font-style: italic }
|
/* LineNumbers */
|
||||||
/* NameNamespace */ .chroma .nn { }
|
.chroma .ln {
|
||||||
/* NameOther */ .chroma .nx { }
|
margin-right: 0.0em !important;
|
||||||
/* NameProperty */ .chroma .py { }
|
padding: 0 0.0em 0 0.0em !important;
|
||||||
/* NameTag */ .chroma .nt { color: #ff79c6 }
|
}
|
||||||
/* NameVariable */ .chroma .nv { color: #8be9fd; font-style: italic }
|
|
||||||
/* NameVariableClass */ .chroma .vc { color: #8be9fd; font-style: italic }
|
/* GenericDeleted */
|
||||||
/* NameVariableGlobal */ .chroma .vg { color: #8be9fd; font-style: italic }
|
.chroma .gd {
|
||||||
/* NameVariableInstance */ .chroma .vi { color: #8be9fd; font-style: italic }
|
color: #8b080b !important;
|
||||||
/* NameVariableMagic */ .chroma .vm { }
|
}
|
||||||
/* Literal */ .chroma .l { }
|
|
||||||
/* LiteralDate */ .chroma .ld { }
|
/* GenericInserted */
|
||||||
/* LiteralString */ .chroma .s { color: #f1fa8c }
|
.chroma .gi {
|
||||||
/* LiteralStringAffix */ .chroma .sa { color: #f1fa8c }
|
font-weight: bold !important;
|
||||||
/* LiteralStringBacktick */ .chroma .sb { color: #f1fa8c }
|
}
|
||||||
/* LiteralStringChar */ .chroma .sc { color: #f1fa8c }
|
|
||||||
/* LiteralStringDelimiter */ .chroma .dl { color: #f1fa8c }
|
|
||||||
/* LiteralStringDoc */ .chroma .sd { color: #f1fa8c }
|
|
||||||
/* LiteralStringDouble */ .chroma .s2 { color: #f1fa8c }
|
|
||||||
/* LiteralStringEscape */ .chroma .se { color: #f1fa8c }
|
|
||||||
/* LiteralStringHeredoc */ .chroma .sh { color: #f1fa8c }
|
|
||||||
/* LiteralStringInterpol */ .chroma .si { color: #f1fa8c }
|
|
||||||
/* LiteralStringOther */ .chroma .sx { color: #f1fa8c }
|
|
||||||
/* LiteralStringRegex */ .chroma .sr { color: #f1fa8c }
|
|
||||||
/* LiteralStringSingle */ .chroma .s1 { color: #f1fa8c }
|
|
||||||
/* LiteralStringSymbol */ .chroma .ss { color: #f1fa8c }
|
|
||||||
/* LiteralNumber */ .chroma .m { color: #bd93f9 }
|
|
||||||
/* LiteralNumberBin */ .chroma .mb { color: #bd93f9 }
|
|
||||||
/* LiteralNumberFloat */ .chroma .mf { color: #bd93f9 }
|
|
||||||
/* LiteralNumberHex */ .chroma .mh { color: #bd93f9 }
|
|
||||||
/* LiteralNumberInteger */ .chroma .mi { color: #bd93f9 }
|
|
||||||
/* LiteralNumberIntegerLong */ .chroma .il { color: #bd93f9 }
|
|
||||||
/* LiteralNumberOct */ .chroma .mo { color: #bd93f9 }
|
|
||||||
/* Operator */ .chroma .o { color: #ff79c6 }
|
|
||||||
/* OperatorWord */ .chroma .ow { color: #ff79c6 }
|
|
||||||
/* Punctuation */ .chroma .p { }
|
|
||||||
/* Comment */ .chroma .c { color: #6272a4 }
|
|
||||||
/* CommentHashbang */ .chroma .ch { color: #6272a4 }
|
|
||||||
/* CommentMultiline */ .chroma .cm { color: #6272a4 }
|
|
||||||
/* CommentSingle */ .chroma .c1 { color: #6272a4 }
|
|
||||||
/* CommentSpecial */ .chroma .cs { color: #6272a4 }
|
|
||||||
/* CommentPreproc */ .chroma .cp { color: #ff79c6 }
|
|
||||||
/* CommentPreprocFile */ .chroma .cpf { color: #ff79c6 }
|
|
||||||
/* Generic */ .chroma .g { }
|
|
||||||
/* GenericDeleted */ .chroma .gd { color: #8b080b }
|
|
||||||
/* GenericEmph */ .chroma .ge { text-decoration: underline }
|
|
||||||
/* GenericError */ .chroma .gr { }
|
|
||||||
/* GenericHeading */ .chroma .gh { font-weight: bold }
|
|
||||||
/* GenericInserted */ .chroma .gi { font-weight: bold }
|
|
||||||
/* GenericOutput */ .chroma .go { color: #44475a }
|
|
||||||
/* GenericPrompt */ .chroma .gp { }
|
|
||||||
/* GenericStrong */ .chroma .gs { }
|
|
||||||
/* GenericSubheading */ .chroma .gu { font-weight: bold }
|
|
||||||
/* GenericTraceback */ .chroma .gt { }
|
|
||||||
/* GenericUnderline */ .chroma .gl { text-decoration: underline }
|
|
||||||
/* TextWhitespace */ .chroma .w { }
|
|
||||||
|
|
||||||
.lntd:first-of-type > .chroma {
|
.lntd:first-of-type > .chroma {
|
||||||
padding-right: 0;
|
padding-right: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chroma code {
|
.chroma code {
|
||||||
font-family: 'Fira Code' !important;
|
font-family: 'Fira Code' !important;
|
||||||
font-size: 0.85em;
|
font-size: 0.85em !important;
|
||||||
line-height: 1em;
|
line-height: 2em !important;
|
||||||
background: none;
|
background: none !important;
|
||||||
padding: 0;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chroma {
|
.chroma {
|
||||||
border-radius: 3px;
|
border-radius: 3px !important;
|
||||||
margin: 0;
|
margin: 0 !important;
|
||||||
}
|
}
|
||||||
@ -36,8 +36,12 @@
|
|||||||
{{$finalCss := $css | resources.Concat "styles.css" | resources.Fingerprint "md5" | resources.Minify }}
|
{{$finalCss := $css | resources.Concat "styles.css" | resources.Fingerprint "md5" | resources.Minify }}
|
||||||
<link href="{{$finalCss.Permalink}}" rel="stylesheet" />
|
<link href="{{$finalCss.Permalink}}" rel="stylesheet" />
|
||||||
|
|
||||||
|
{{$lightSyntax := resources.Get "styles/_light_syntax.scss" | resources.ToCSS (dict "outputStyle" "compressed")}}
|
||||||
|
{{$darkSyntax := resources.Get "styles/_dark_syntax.scss" }}
|
||||||
|
<link href="{{$lightSyntax.Permalink}}" rel="stylesheet" id="theme-link">
|
||||||
|
|
||||||
<!-- Base scripts -->
|
<!-- Base scripts -->
|
||||||
{{ $darkMode := resources.Get "js/darkmode.js" | resources.Fingerprint "md5" | resources.Minify }}
|
{{ $darkMode := resources.Get "js/darkmode.js" | resources.ExecuteAsTemplate "js/darkmode.js" . | resources.Fingerprint "md5" | resources.Minify }}
|
||||||
<script src="{{$darkMode.Permalink}}"></script>
|
<script src="{{$darkMode.Permalink}}"></script>
|
||||||
{{partial "katex.html" .}}
|
{{partial "katex.html" .}}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user