mirror of
https://github.com/loikein/hugo-tufte.git
synced 2024-12-23 22:09:44 +01:00
move the syntax highlighting theme choice to the scss file (#30)
* move the syntax highlighting theme choice to the scss file Fixes #25 * move the syntax highlighting theme choice to the scss file Fixes #25
This commit is contained in:
parent
c8bc5f6172
commit
4432cb953b
4 changed files with 9 additions and 16 deletions
|
@ -15,3 +15,9 @@
|
|||
@import "components/header";
|
||||
@import "components/meta";
|
||||
|
||||
// Look at this https://gohugo.io/hugo-pipes/resource-from-template/#readout
|
||||
{{ if and (isset .Site.Params "codeblocksdark") .Site.Params.codeBlocksDark }}
|
||||
@import "syntax/highlight-dark.scss"
|
||||
{{ else }}
|
||||
@import "syntax/highlight-light.scss"
|
||||
{{ end }}
|
|
@ -1,6 +1,6 @@
|
|||
$ht-code-bgcolor: #282a36;
|
||||
|
||||
@import "syntax/syntax-dark.scss";
|
||||
@import "syntax-dark.scss";
|
||||
|
||||
.highlight {
|
||||
&::-webkit-scrollbar {
|
|
@ -1,6 +1,6 @@
|
|||
$ht-code-bgcolor: #dde2ff;
|
||||
|
||||
@import "syntax/syntax-light.scss";
|
||||
@import "syntax-light.scss";
|
||||
|
||||
.highlight {
|
||||
&::-webkit-scrollbar {
|
|
@ -17,21 +17,8 @@
|
|||
|
||||
<script defer src="{{ "/js/main.js" | relURL }}"></script>
|
||||
|
||||
<!-- Main CSS file based on Pure blog layout -->
|
||||
{{ if and (isset .Site.Params "codeblocksdark") .Site.Params.codeBlocksDark }}
|
||||
{{ $codeoptions := (dict "targetPath" "/css/highlight-dark.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
|
||||
{{ $style := resources.Get "scss/highlight-dark.scss" | resources.ToCSS $codeoptions }}
|
||||
|
||||
<link rel="stylesheet" href="{{ $style.Permalink | relURL }}">
|
||||
{{ else }}
|
||||
{{ $codeoptions := (dict "targetPath" "/css/highlight-light.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
|
||||
{{ $codestyle := resources.Get "scss/highlight-light.scss" | resources.ToCSS $codeoptions }}
|
||||
|
||||
<link rel="stylesheet" href="{{ $codestyle.Permalink | relURL }}">
|
||||
{{ end }}
|
||||
|
||||
{{ $htoptions := (dict "targetPath" "/css/hugo-tufte.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
|
||||
{{ $htstyle := resources.Get "scss/hugo-tufte.scss" | resources.ToCSS $htoptions }}
|
||||
{{ $htstyle := resources.Get "scss/hugo-tufte.scss"| resources.ExecuteAsTemplate "main.scss" . | resources.ToCSS $htoptions }}
|
||||
<link rel="stylesheet" href="{{ $htstyle.Permalink | relURL }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ "/css/hugo-tufte-override.css" | relURL }}">
|
||||
|
|
Loading…
Reference in a new issue