Compare commits
9 Commits
6b178bebcb
...
b1b5408301
| Author | SHA1 | Date | |
|---|---|---|---|
| b1b5408301 | |||
| d206ed9f3e | |||
| 3da5952b87 | |||
| 28e3b5e1cf | |||
| 0d1e2e80eb | |||
| 19550ef1b2 | |||
| 2032e1cdc2 | |||
| 20217e0b97 | |||
| 0fa8fb35ec |
174
assets/scss/bergamot.scss
Normal file
174
assets/scss/bergamot.scss
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
@import "variables.scss";
|
||||||
|
@import "mixins.scss";
|
||||||
|
|
||||||
|
.bergamot-exercise {
|
||||||
|
counter-increment: bergamot-exercise;
|
||||||
|
|
||||||
|
.bergamot-root {
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
margin-top: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.bergamot-exercise-label {
|
||||||
|
.bergamot-exercise-number::after {
|
||||||
|
content: "Exercise " counter(bergamot-exercise);
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-button {
|
||||||
|
@include bordered-block;
|
||||||
|
padding: 0.25em;
|
||||||
|
padding-left: 1em;
|
||||||
|
padding-right: 1em;
|
||||||
|
background-color: inherit;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
transition: 0.25s;
|
||||||
|
font-family: $font-body;
|
||||||
|
@include var(color, text-color);
|
||||||
|
|
||||||
|
&.bergamot-hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feather {
|
||||||
|
margin-right: 0.5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-play {
|
||||||
|
.feather { color: $primary-color; }
|
||||||
|
&:hover, &:focus {
|
||||||
|
.feather { color: lighten($primary-color, 20%); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-reset {
|
||||||
|
.feather { color: #0099CC; }
|
||||||
|
&:hover, &:focus {
|
||||||
|
.feather { color: lighten(#0099CC, 20%); }
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
fill: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-close {
|
||||||
|
.feather { color: tomato; }
|
||||||
|
&:hover, &:focus {
|
||||||
|
.feather { color: lighten(tomato, 20%); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-button-group {
|
||||||
|
margin-top: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-root {
|
||||||
|
@include bordered-block;
|
||||||
|
padding: 1em;
|
||||||
|
|
||||||
|
.bergamot-section-heading {
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
font-family: $font-body;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-section {
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 10em;
|
||||||
|
resize: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"] {
|
||||||
|
width: 100%;
|
||||||
|
@include textual-input;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-rule-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-rule-list katex-expression {
|
||||||
|
margin-left: .5em;
|
||||||
|
margin-right: .5em;
|
||||||
|
flex-grow: 1;
|
||||||
|
flex-basis: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-rule-section {
|
||||||
|
.bergamot-rule-section-name {
|
||||||
|
text-align: center;
|
||||||
|
margin: 0.25em;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-proof-tree {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-error {
|
||||||
|
@include bordered-block;
|
||||||
|
padding: 0.5rem;
|
||||||
|
border-color: tomato;
|
||||||
|
background-color: rgba(tomato, 0.25);
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-selector {
|
||||||
|
button {
|
||||||
|
@include var(background-color, background-color);
|
||||||
|
@include var(color, text-color);
|
||||||
|
@include bordered-block;
|
||||||
|
padding: 0.5rem;
|
||||||
|
font-family: $font-body;
|
||||||
|
border-style: dotted;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
border-color: $primary-color;
|
||||||
|
border-style: solid;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(:first-child) {
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(:last-child) {
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-right-width: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
button.active + button {
|
||||||
|
border-left-color: $primary-color;
|
||||||
|
border-left-style: solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-no-proofs {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
47
assets/scss/writing.scss
Normal file
47
assets/scss/writing.scss
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
@import "variables.scss";
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #1c1e26;
|
||||||
|
--text-color: white;
|
||||||
|
font-family: $font-code;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
text-align: left;
|
||||||
|
font-family: $font-code;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1::after {
|
||||||
|
content: "(writing)";
|
||||||
|
font-size: 1rem;
|
||||||
|
margin-left: 0.5em;
|
||||||
|
position: relative;
|
||||||
|
bottom: -0.5em;
|
||||||
|
color: $primary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav .container {
|
||||||
|
justify-content: flex-start;
|
||||||
|
|
||||||
|
a {
|
||||||
|
padding-left: 0;
|
||||||
|
margin-right: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-divider {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
height: auto;
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: "* * *";
|
||||||
|
color: $primary-color;
|
||||||
|
font-size: 2rem;
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
16
banner.svg
16
banner.svg
@@ -26,9 +26,9 @@
|
|||||||
inkscape:pagecheckerboard="0"
|
inkscape:pagecheckerboard="0"
|
||||||
inkscape:deskcolor="#d1d1d1"
|
inkscape:deskcolor="#d1d1d1"
|
||||||
inkscape:document-units="mm"
|
inkscape:document-units="mm"
|
||||||
inkscape:zoom="0.75557496"
|
inkscape:zoom="1.7079029"
|
||||||
inkscape:cx="451.97368"
|
inkscape:cx="501.78498"
|
||||||
inkscape:cy="438.73873"
|
inkscape:cy="465.77591"
|
||||||
inkscape:window-width="1728"
|
inkscape:window-width="1728"
|
||||||
inkscape:window-height="996"
|
inkscape:window-height="996"
|
||||||
inkscape:window-x="0"
|
inkscape:window-x="0"
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
r="36.96402" />
|
r="36.96402" />
|
||||||
<path
|
<path
|
||||||
id="path3-3-6"
|
id="path3-3-6"
|
||||||
style="fill:#ffffff;stroke:#36e281;stroke-width:4.33532;stroke-dasharray:none;stroke-opacity:1"
|
style="fill:#ffffff;stroke:#36e281;stroke-width:4.33532;stroke-dasharray:none;stroke-opacity:1;stroke-linecap:round"
|
||||||
d="m 148.49869,128.57807 c -13.20597,0 -25.40879,-7.0453 -32.01177,-18.48201 -6.60299,-11.436707 -6.60299,-25.527312 0,-36.964017 6.60298,-11.436705 18.8058,-18.482007 32.01177,-18.482007"
|
d="m 148.49869,128.57807 c -13.20597,0 -25.40879,-7.0453 -32.01177,-18.48201 -6.60299,-11.436707 -6.60299,-25.527312 0,-36.964017 6.60298,-11.436705 18.8058,-18.482007 32.01177,-18.482007"
|
||||||
sodipodi:nodetypes="cssc" />
|
sodipodi:nodetypes="cssc" />
|
||||||
<text
|
<text
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:253.455px;font-family:Helvetica;-inkscape-font-specification:'Helvetica Bold';text-align:start;writing-mode:lr-tb;direction:ltr;white-space:pre;shape-inside:url(#rect4-6);display:inline;fill:#36e281;fill-opacity:1;stroke:#36e281;stroke-width:1.37953;stroke-opacity:1"><tspan
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:253.455px;font-family:Helvetica;-inkscape-font-specification:'Helvetica Bold';text-align:start;writing-mode:lr-tb;direction:ltr;white-space:pre;shape-inside:url(#rect4-6);display:inline;fill:#36e281;fill-opacity:1;stroke:#36e281;stroke-width:1.37953;stroke-opacity:1"><tspan
|
||||||
x="244.20312"
|
x="244.20312"
|
||||||
y="584.4805"
|
y="584.4805"
|
||||||
id="tspan1">D</tspan></text>
|
id="tspan5">D</tspan></text>
|
||||||
<text
|
<text
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
transform="matrix(0.15711337,0,0,0.19685436,107.21917,-5.5129228)"
|
transform="matrix(0.15711337,0,0,0.19685436,107.21917,-5.5129228)"
|
||||||
@@ -100,9 +100,9 @@
|
|||||||
style="font-size:253.455px;text-align:start;writing-mode:lr-tb;direction:ltr;white-space:pre;shape-inside:url(#rect4-6-1);display:inline;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.37953;stroke-opacity:1"><tspan
|
style="font-size:253.455px;text-align:start;writing-mode:lr-tb;direction:ltr;white-space:pre;shape-inside:url(#rect4-6-1);display:inline;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.37953;stroke-opacity:1"><tspan
|
||||||
x="244.20312"
|
x="244.20312"
|
||||||
y="584.4805"
|
y="584.4805"
|
||||||
id="tspan3"><tspan
|
id="tspan7"><tspan
|
||||||
style="font-weight:bold;font-family:Helvetica;-inkscape-font-specification:'Helvetica Bold'"
|
style="font-weight:bold;font-family:Helvetica;-inkscape-font-specification:'Helvetica Bold'"
|
||||||
id="tspan2">F</tspan></tspan></text>
|
id="tspan6">F</tspan></tspan></text>
|
||||||
<text
|
<text
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
transform="matrix(0.19664896,0,0,0.19664896,73.930049,102.60811)"
|
transform="matrix(0.19664896,0,0,0.19664896,73.930049,102.60811)"
|
||||||
@@ -110,6 +110,6 @@
|
|||||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:106.667px;font-family:Lora;-inkscape-font-specification:'Lora Bold';text-align:start;writing-mode:lr-tb;direction:ltr;white-space:pre;shape-inside:url(#rect8);display:inline;fill:#1a1a1a;fill-opacity:1;stroke:none;stroke-width:22.046"><tspan
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:106.667px;font-family:Lora;-inkscape-font-specification:'Lora Bold';text-align:start;writing-mode:lr-tb;direction:ltr;white-space:pre;shape-inside:url(#rect8);display:inline;fill:#1a1a1a;fill-opacity:1;stroke:none;stroke-width:22.046"><tspan
|
||||||
x="49.548828"
|
x="49.548828"
|
||||||
y="250.31931"
|
y="250.31931"
|
||||||
id="tspan4">Daniel's Blog</tspan></text>
|
id="tspan8">Daniel's Blog</tspan></text>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.3 KiB |
27
i18n/en.toml
27
i18n/en.toml
@@ -77,3 +77,30 @@
|
|||||||
|
|
||||||
[ongoingSeries]
|
[ongoingSeries]
|
||||||
other = "Ongoing"
|
other = "Ongoing"
|
||||||
|
|
||||||
|
[nextInSeries]
|
||||||
|
other = "Next in Series"
|
||||||
|
|
||||||
|
[previousInSeries]
|
||||||
|
other = "Previous in Series"
|
||||||
|
|
||||||
|
[comingSoon]
|
||||||
|
other = "Coming soon!"
|
||||||
|
|
||||||
|
[startBergamot]
|
||||||
|
other = "Start Bergamot"
|
||||||
|
|
||||||
|
[closeBergamot]
|
||||||
|
other = "Close Bergamot"
|
||||||
|
|
||||||
|
[lineX]
|
||||||
|
other = ", line {{ . }}"
|
||||||
|
|
||||||
|
[aroundLineX]
|
||||||
|
other = ", around line {{ . }}"
|
||||||
|
|
||||||
|
[linesXThroughY]
|
||||||
|
other = ", lines {{ .from }} through {{ .to }}"
|
||||||
|
|
||||||
|
[entireFile]
|
||||||
|
other = ", entire file"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{{- .Page.Scratch.SetInMap "definedSections" (printf "#%s" .Anchor) true -}}
|
{{- .Page.Store.SetInMap "definedSections" (printf "#%s" .Anchor) true -}}
|
||||||
<a href="#{{ .Anchor }}">
|
<a href="#{{ .Anchor }}">
|
||||||
<h{{ .Level }} id="{{ .Anchor }}">
|
<h{{ .Level }} id="{{ .Anchor }}">
|
||||||
{{- .Text | safeHTML -}}
|
{{- .Text | safeHTML -}}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
{{- if $isSamePage -}}
|
{{- if $isSamePage -}}
|
||||||
{{- $class = "same-page-link" -}}
|
{{- $class = "same-page-link" -}}
|
||||||
{{- if index (.Page.Scratch.Get "definedSections") .Destination -}}
|
{{- if index (.Page.Store.Get "definedSections") .Destination -}}
|
||||||
{{- $icon = "arrow-up" -}}
|
{{- $icon = "arrow-up" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- /* Do not render "down" links because don't know how to distinguish unseen titles from paragraph links. */ -}}
|
{{- /* Do not render "down" links because don't know how to distinguish unseen titles from paragraph links. */ -}}
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
"Languge Term": { "custom": "Bergamot Object Language" },
|
"Language Term": { "custom": "Bergamot Object Language" },
|
||||||
"Query": "query",
|
"Query": "query",
|
||||||
{{ end }}
|
{{ end }}
|
||||||
}
|
}
|
||||||
2
layouts/_partials/defercss.html
Normal file
2
layouts/_partials/defercss.html
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
<link rel="preload" href="{{ .url }}" as="style" onload="this.onload=null;this.rel='stylesheet'"{{ with .integrity }} integrity="{{ . }}"{{ end }}{{ with .extra }} {{ . | safeHTMLAttr }}{{ end }}>
|
||||||
|
<noscript><link rel="stylesheet" href="{{ .url }}"{{ with .integrity }} integrity="{{ . }}"{{ end }}></noscript>
|
||||||
26
layouts/_partials/geturl.html
Normal file
26
layouts/_partials/geturl.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{{- $siteSourceUrl := site.Params.siteSourceUrl -}}
|
||||||
|
{{- $submoduleLinks := hugo.Data.submodules -}}
|
||||||
|
{{- $hostData := hugo.Data.hosts -}}
|
||||||
|
{{- $lines := .lines -}}
|
||||||
|
{{- $bestLength := -1 -}}
|
||||||
|
{{- $bestUrl := printf "%s/code/%s" $siteSourceUrl .path -}}
|
||||||
|
{{- $bestPath := "" -}}
|
||||||
|
{{- $filePath := .path -}}
|
||||||
|
{{- range $path, $url := $submoduleLinks -}}
|
||||||
|
{{- if and (le $bestLength (len $path)) (hasPrefix $filePath $path) -}}
|
||||||
|
{{- $bestLength = len $path -}}
|
||||||
|
{{- $bestPath = $path -}}
|
||||||
|
{{- $bestUrl = printf "%s%s" $url (strings.TrimPrefix $path $filePath) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .lines -}}
|
||||||
|
{{- /* If the user provided a line range, see if we can tack it on to the end of the link. */ -}}
|
||||||
|
{{- range $host, $data := $hostData -}}
|
||||||
|
{{- if hasPrefix $bestUrl $host -}}
|
||||||
|
{{- with $data.linesSuffix -}}
|
||||||
|
{{- $bestUrl = add $bestUrl (printf . (index $lines 0) (index $lines 1)) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- return (dict "url" $bestUrl "basePath" $bestPath) -}}
|
||||||
@@ -14,8 +14,8 @@
|
|||||||
|
|
||||||
<!-- Fonts -->
|
<!-- Fonts -->
|
||||||
{{ if not (.Site.Params.noCss) }}
|
{{ if not (.Site.Params.noCss) }}
|
||||||
{{ $fonts := resources.Get "scss/fonts.scss" | css.Sass | resources.Minify }}
|
{{ $fonts := resources.Get "scss/fonts.scss" | css.Sass | resources.Minify | resources.Fingerprint }}
|
||||||
<link rel="stylesheet" href="{{ $fonts.Permalink }}" media="screen">
|
<link rel="stylesheet" href="{{ $fonts.Permalink }}" integrity="{{ $fonts.Data.Integrity }}" media="screen">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<!-- External CSS (normalize and KaTeX -->
|
<!-- External CSS (normalize and KaTeX -->
|
||||||
@@ -30,22 +30,25 @@
|
|||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
<!-- In-house CSS -->
|
<!-- In-house CSS -->
|
||||||
{{ $style := resources.Get "scss/style.scss" | css.Sass | resources.Minify }}
|
{{ $style := resources.Get "scss/style.scss" | css.Sass | resources.Minify | resources.Fingerprint }}
|
||||||
{{ $sidenotes := resources.Get "scss/sidenotes.scss" | css.Sass | resources.Minify }}
|
{{ $sidenotes := resources.Get "scss/sidenotes.scss" | css.Sass | resources.Minify | resources.Fingerprint }}
|
||||||
{{ $code := resources.Get "scss/code.scss" | css.Sass | resources.Minify }}
|
{{ $code := resources.Get "scss/code.scss" | css.Sass | resources.Minify | resources.Fingerprint }}
|
||||||
{{ $icon := resources.Get "img/favicon.png" }}
|
{{ $icon := resources.Get "img/favicon.png" | resources.Fingerprint }}
|
||||||
<style>.feather { display: inline !important; width: 10px; height: 10px; }</style>
|
<style>.feather { display: inline !important; width: 10px; height: 10px; }</style>
|
||||||
<style>img { max-width: 70%; }</style>
|
<style>img { max-width: 70%; }</style>
|
||||||
{{ if not (.Site.Params.noCss) }}
|
{{ if not (.Site.Params.noCss) }}
|
||||||
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
|
||||||
{{ partial "defercss.html" (dict "url" $sidenotes.Permalink "extra" "") }}
|
{{ partial "defercss.html" (dict "url" $sidenotes.Permalink "integrity" $sidenotes.Data.Integrity "extra" "") }}
|
||||||
{{ partial "defercss.html" (dict "url" $code.Permalink "extra" "") }}
|
{{ partial "defercss.html" (dict "url" $code.Permalink "integrity" $code.Data.Integrity "extra" "") }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<link rel="icon" type="image/png" href="{{ $icon.Permalink }}">
|
<link rel="icon" type="image/png" href="{{ $icon.Permalink }}" integrity="{{ $icon.Data.Integrity }}">
|
||||||
|
|
||||||
{{ if .Params.custom_js }}
|
{{ if .Params.custom_js }}
|
||||||
{{ range $customJs := .Params.custom_js }}
|
{{ range $customJs := .Params.custom_js }}
|
||||||
<script src="{{ page.Resources.Get $customJs }}"></script>
|
{{ with page.Resources.Get $customJs }}
|
||||||
|
{{ $customJsResource := . | resources.Fingerprint }}
|
||||||
|
<script src="{{ $customJsResource.Permalink }}" integrity="{{ $customJsResource.Data.Integrity }}"></script>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
@@ -66,14 +69,14 @@
|
|||||||
<meta name="needs-latex">
|
<meta name="needs-latex">
|
||||||
<!-- Code to support the Bergamot JS widget -->
|
<!-- Code to support the Bergamot JS widget -->
|
||||||
<script defer src="{{ .Site.Params.katexJsUrl }}" crossorigin="anonymous"></script>
|
<script defer src="{{ .Site.Params.katexJsUrl }}" crossorigin="anonymous"></script>
|
||||||
{{ $katexComponentJs := resources.Get "js/katex-component.js" | resources.Minify }}
|
{{ $katexComponentJs := resources.Get "js/katex-component.js" | resources.Minify | resources.Fingerprint }}
|
||||||
<script defer src="{{ $katexComponentJs.Permalink }}"></script>
|
<script defer src="{{ $katexComponentJs.Permalink }}" integrity="{{ $katexComponentJs.Data.Integrity }}"></script>
|
||||||
<script defer src="{{ .Site.Params.bergamotJsUrl }}"></script>
|
<script defer src="{{ .Site.Params.bergamotJsUrl }}"></script>
|
||||||
<script defer src="{{ .Site.Params.bergamotObjectLanguageJsUrl }}"></script>
|
<script defer src="{{ .Site.Params.bergamotObjectLanguageJsUrl }}"></script>
|
||||||
{{ $bergamotHelpers := resources.Get "js/bergamot-helpers.js" | resources.Minify }}
|
{{ $bergamotHelpers := resources.Get "js/bergamot-helpers.js" | resources.Minify | resources.Fingerprint }}
|
||||||
<script defer src="{{ $bergamotHelpers.Permalink }}"></script>
|
<script defer src="{{ $bergamotHelpers.Permalink }}" integrity="{{ $bergamotHelpers.Data.Integrity }}"></script>
|
||||||
{{ $bergamotStyle := resources.Get "scss/bergamot.scss" | css.Sass | resources.Minify }}
|
{{ $bergamotStyle := resources.Get "scss/bergamot.scss" | css.Sass | resources.Minify | resources.Fingerprint }}
|
||||||
{{ partial "defercss.html" (dict "url" $bergamotStyle.Permalink "extra" "") }}
|
{{ partial "defercss.html" (dict "url" $bergamotStyle.Permalink "integrity" $bergamotStyle.Data.Integrity "extra" "") }}
|
||||||
{{ if .Params.bergamot.render_presets }}
|
{{ if .Params.bergamot.render_presets }}
|
||||||
{{ range $name, $rulefile := .Params.bergamot.render_presets }}
|
{{ range $name, $rulefile := .Params.bergamot.render_presets }}
|
||||||
{{ $file := default (resources.Get $rulefile) (page.Resources.Get $rulefile) }}
|
{{ $file := default (resources.Get $rulefile) (page.Resources.Get $rulefile) }}
|
||||||
|
Before Width: | Height: | Size: 164 B After Width: | Height: | Size: 164 B |
9
layouts/_partials/linerangestr.html
Normal file
9
layouts/_partials/linerangestr.html
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{{- $comment := "" -}}
|
||||||
|
{{- if eq .from .to -}}
|
||||||
|
{{- $comment = i18n "lineX" .to -}}
|
||||||
|
{{- else if eq .from 0 -}}
|
||||||
|
{{- $comment = i18n "aroundLineX" .to -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $comment = i18n "linesXThroughY" . -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- return $comment -}}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
{{- $term := index (.page.GetTerms "series") 0 -}}
|
{{- $term := index (.page.GetTerms "series") 0 -}}
|
||||||
{{- $divider := $term.Params.divider -}}
|
{{- $divider := $term.Params.divider -}}
|
||||||
|
{{- $name := .page.Title -}}
|
||||||
{{- if (and $divider (strings.Contains .page.Title $divider)) -}}
|
{{- if (and $divider (strings.Contains .page.Title $divider)) -}}
|
||||||
{{- $rest := after 1 (split .page.Title $divider) -}}
|
{{- $rest := after 1 (split .page.Title $divider) -}}
|
||||||
{{- .scratch.Set "name" (delimit $rest $divider) -}}
|
{{- $name = delimit $rest $divider -}}
|
||||||
{{- else -}}
|
|
||||||
{{- .scratch.Set "name" .page.Title -}}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- return $name -}}
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
<li>
|
<li>
|
||||||
{{- $scratch := newScratch -}}
|
{{- $name := .page.Title -}}
|
||||||
{{- if .seriesName -}}
|
{{- if .seriesName -}}
|
||||||
{{- partial "nameinseries" (dict "page" .page "scratch" $scratch) -}}
|
{{- $name = partial "nameinseries" (dict "page" .page) -}}
|
||||||
{{- else -}}
|
|
||||||
{{- $scratch.Set "name" (.page.Title) -}}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<a href="{{ .page.Permalink }}" class="post-title">{{ if .page.Params.favorite }}{{ partial "icon.html" "star" }}{{ end }} {{ $scratch.Get "name" }}</a>
|
<a href="{{ .page.Permalink }}" class="post-title">{{ if .page.Params.favorite }}{{ partial "icon.html" "star" }}{{ end }} {{ $name }}</a>
|
||||||
{{ if (not (eq .page.WordCount 0)) }}
|
{{ if (not (eq .page.WordCount 0)) }}
|
||||||
<p class="post-wordcount">{{ i18n "nWords" .page.WordCount }}, {{ i18n "nMinutesToRead" .page.ReadingTime }}.</p>
|
<p class="post-wordcount">{{ i18n "nWords" .page.WordCount }}, {{ i18n "nMinutesToRead" .page.ReadingTime }}.</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -2,10 +2,8 @@
|
|||||||
<a href="{{ .page.RelPermalink }}">
|
<a href="{{ .page.RelPermalink }}">
|
||||||
{{ if eq .direction "previous" }}{{ partial "icon.html" "chevrons-left" }}{{ end }}
|
{{ if eq .direction "previous" }}{{ partial "icon.html" "chevrons-left" }}{{ end }}
|
||||||
<div class="title-subtitle">
|
<div class="title-subtitle">
|
||||||
{{ title .direction }} in Series
|
{{ i18n (printf "%sInSeries" .direction) }}
|
||||||
{{ $scratch := newScratch -}}
|
<div class="title">{{ partial "nameinseries.html" (dict "page" .page) }}</div>
|
||||||
{{- partial "nameinseries.html" (dict "page" .page "scratch" $scratch) -}}
|
|
||||||
<div class="title">{{ $scratch.Get "name" }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{ if eq .direction "next" }}{{ partial "icon.html" "chevrons-right" }}{{ end }}
|
{{ if eq .direction "next" }}{{ partial "icon.html" "chevrons-right" }}{{ end }}
|
||||||
</a>
|
</a>
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
<div class="ongoing-placeholder">
|
<div class="ongoing-placeholder">
|
||||||
{{ if eq .direction "previous" }}{{ partial "icon.html" "chevrons-left" }}{{ end }}
|
{{ if eq .direction "previous" }}{{ partial "icon.html" "chevrons-left" }}{{ end }}
|
||||||
<div class="title-subtitle">
|
<div class="title-subtitle">
|
||||||
{{ title .direction }} in Series
|
{{ i18n (printf "%sInSeries" .direction) }}
|
||||||
<div class="title">Coming soon!</div>
|
<div class="title">{{ i18n "comingSoon" }}</div>
|
||||||
</div>
|
</div>
|
||||||
{{ if eq .direction "next" }}{{ partial "icon.html" "chevrons-right" }}{{ end }}
|
{{ if eq .direction "next" }}{{ partial "icon.html" "chevrons-right" }}{{ end }}
|
||||||
</div>
|
</div>
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
{{- $scratch := .scratch -}}
|
{{- $pages := slice -}}
|
||||||
{{- $scratch.Set "pages" slice -}}
|
|
||||||
{{- $tmpScratch := newScratch -}}
|
{{- $tmpScratch := newScratch -}}
|
||||||
{{- range $post := (where (where site.Pages.ByDate.Reverse "Section" "blog") ".Kind" "!=" "section") -}}
|
{{- range $post := (where (where site.Pages.ByDate.Reverse "Section" "blog") ".Kind" "!=" "section") -}}
|
||||||
{{- $term := index ($post.GetTerms "series") 0 -}}
|
{{- $term := index ($post.GetTerms "series") 0 -}}
|
||||||
{{- if (and $term (not ($term.Param "donotunique"))) -}}
|
{{- if (and $term (not ($term.Param "donotunique"))) -}}
|
||||||
{{- if not ($tmpScratch.Get $term.Permalink) -}}
|
{{- if not ($tmpScratch.Get $term.Permalink) -}}
|
||||||
{{- $tmpScratch.Set $term.Permalink true -}}
|
{{- $tmpScratch.Set $term.Permalink true -}}
|
||||||
{{- $scratch.Add "pages" $post -}}
|
{{- $pages = $pages | append $post -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $scratch.Add "pages" $post -}}
|
{{- $pages = $pages | append $post -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- return $pages -}}
|
||||||
@@ -11,8 +11,8 @@
|
|||||||
<div class="bergamot-button-group">
|
<div class="bergamot-button-group">
|
||||||
{{ if or (eq (.Get "preset") "") (eq (.Get "preset") nil) }}
|
{{ if or (eq (.Get "preset") "") (eq (.Get "preset") nil) }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<button class="bergamot-button bergamot-play" onclick='window.Bergamot.runPreset(this.parentElement, "bergamot-widget-container-{{ .Get "id" }}", "{{ .Get "preset" }}")'>{{ partial "icon.html" "play" }}Start Bergamot</button>
|
<button class="bergamot-button bergamot-play" onclick='window.Bergamot.runPreset(this.parentElement, "bergamot-widget-container-{{ .Get "id" }}", "{{ .Get "preset" }}")'>{{ partial "icon.html" "play" }}{{ i18n "startBergamot" }}</button>
|
||||||
<button class="bergamot-button bergamot-close bergamot-hidden" onclick='window.Bergamot.close(this.parentElement, "bergamot-widget-container-{{ .Get "id" }}")'>{{ partial "icon.html" "x" }}Close Bergamot</button>
|
<button class="bergamot-button bergamot-close bergamot-hidden" onclick='window.Bergamot.close(this.parentElement, "bergamot-widget-container-{{ .Get "id" }}")'>{{ partial "icon.html" "x" }}{{ i18n "closeBergamot" }}</button>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
11
layouts/_shortcodes/codeblock.html
Normal file
11
layouts/_shortcodes/codeblock.html
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{{- $url := partial "geturl.html" (dict "path" (.Get 1)) -}}
|
||||||
|
{{- $groupconfig := dict
|
||||||
|
"url" $url.url
|
||||||
|
"basePath" $url.basePath
|
||||||
|
"path" (.Get 1)
|
||||||
|
"comment" (i18n "entireFile")
|
||||||
|
"code" (readFile (printf "code/%s" (.Get 1)))
|
||||||
|
"language" (.Get 0)
|
||||||
|
"opts" "linenos=table"
|
||||||
|
-}}
|
||||||
|
{{- partial "highlightgroup.html" $groupconfig -}}
|
||||||
@@ -35,17 +35,17 @@
|
|||||||
{{- $joinedLines = delimit $lines "\n" -}}
|
{{- $joinedLines = delimit $lines "\n" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- partial "geturl.html" (dict "scratch" $scratch "path" (.Get 1) "lines" (slice (.Get 2) (.Get 3))) -}}
|
{{- $url := partial "geturl.html" (dict "path" (.Get 1) "lines" (slice (.Get 2) (.Get 3))) -}}
|
||||||
{{- partial "linerangestr.html" (dict "scratch" $scratch "from" (.Get 2) "to" (.Get 3)) -}}
|
{{- $comment := partial "linerangestr.html" (dict "from" (.Get 2) "to" (.Get 3)) -}}
|
||||||
|
|
||||||
{{- with ($scratch.Get "hidden") -}}
|
{{- with ($scratch.Get "hidden") -}}
|
||||||
<details><summary>{{- . | markdownify -}}</summary>
|
<details><summary>{{- . | markdownify -}}</summary>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $groupconfig := dict
|
{{- $groupconfig := dict
|
||||||
"url" ($scratch.Get "bestUrl")
|
"url" $url.url
|
||||||
"basePath" ($scratch.Get "bestPath")
|
"basePath" $url.basePath
|
||||||
"path" (.Get 1)
|
"path" (.Get 1)
|
||||||
"comment" ($scratch.Get "comment")
|
"comment" $comment
|
||||||
"code" $joinedLines
|
"code" $joinedLines
|
||||||
"firstLine" (int (.Get 2))
|
"firstLine" (int (.Get 2))
|
||||||
"lastLine" (int (.Get 3))
|
"lastLine" (int (.Get 3))
|
||||||
2
layouts/_shortcodes/codeurl.html
Normal file
2
layouts/_shortcodes/codeurl.html
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
{{- $url := partial "geturl.html" (dict "path" (.Get 0)) -}}
|
||||||
|
{{- $url.url -}}
|
||||||
@@ -5,7 +5,6 @@
|
|||||||
{{- $line := .Get 4 -}}
|
{{- $line := .Get 4 -}}
|
||||||
{{- $lines := split (trim .Inner "\n") "\n" -}}
|
{{- $lines := split (trim .Inner "\n") "\n" -}}
|
||||||
|
|
||||||
{{- $scratch := newScratch -}}
|
|
||||||
{{- $url := printf "https://github.com/%s/blob/%s/%s#L%d" $repo $commit $file $line -}}
|
{{- $url := printf "https://github.com/%s/blob/%s/%s#L%d" $repo $commit $file $line -}}
|
||||||
{{- partial "linerangestr.html" (dict "scratch" $scratch "from" 0 "to" $line) -}}
|
{{- $comment := partial "linerangestr.html" (dict "from" 0 "to" $line) -}}
|
||||||
{{- partial "highlightgroup.html" (dict "url" $url "path" $file "comment" ($scratch.Get "comment") "code" (trim .Inner "\n") "language" $lang) -}}
|
{{- partial "highlightgroup.html" (dict "url" $url "path" $file "comment" $comment "code" (trim .Inner "\n") "language" $lang) -}}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
{{- $name := .Get 0 -}}
|
{{- $name := .Get 0 -}}
|
||||||
{{- $number := 1 -}}
|
{{- $number := 1 -}}
|
||||||
{{- with .Page.Scratch.Get "internal-ref-counter" -}}
|
{{- with .Page.Store.Get "internal-ref-counter" -}}
|
||||||
{{- $number = add . 1 }}
|
{{- $number = add . 1 }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- .Page.Scratch.Set "internal-ref-counter" $number -}}
|
{{- .Page.Store.Set "internal-ref-counter" $number -}}
|
||||||
{{- .Page.Scratch.SetInMap "internal-ref" $name $number -}}
|
{{- .Page.Store.SetInMap "internal-ref" $name $number -}}
|
||||||
|
|
||||||
<span class="internal-ref" id="internal-ref-{{ $name }}">
|
<span class="internal-ref" id="internal-ref-{{ $name }}">
|
||||||
{{ .Inner }}
|
{{ .Inner }}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{{- $name := .Get 0 -}}
|
{{- $name := .Get 0 -}}
|
||||||
{{- $number := index (.Page.Scratch.Get "internal-ref") $name -}}
|
{{- $number := index (.Page.Store.Get "internal-ref") $name -}}
|
||||||
|
|
||||||
<a href="#internal-ref-{{ $name }}">
|
<a href="#internal-ref-{{ $name }}">
|
||||||
{{ .Inner }}
|
{{ .Inner }}
|
||||||
9
layouts/_shortcodes/rawblock.html
Normal file
9
layouts/_shortcodes/rawblock.html
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{{- $url := partial "geturl.html" (dict "path" (.Get 0)) -}}
|
||||||
|
{{- $groupconfig := dict
|
||||||
|
"url" $url.url
|
||||||
|
"basePath" $url.basePath
|
||||||
|
"path" (.Get 0)
|
||||||
|
"comment" (i18n "entireFile")
|
||||||
|
"content" (safeHTML (printf "<pre><code>%s</code></pre>" (htmlEscape (readFile (printf "code/%s" (.Get 0))))))
|
||||||
|
-}}
|
||||||
|
{{- partial "group.html" $groupconfig -}}
|
||||||
@@ -2,9 +2,9 @@
|
|||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
||||||
{{ i18n "recentPosts" }}:
|
{{ i18n "recentPosts" }}:
|
||||||
{{ partial "uniquebyseries.html" (dict "scratch" .Scratch) }}
|
{{ $pages := partial "uniquebyseries.html" . }}
|
||||||
<ul class="post-list">
|
<ul class="post-list">
|
||||||
{{ range first 10 (.Scratch.Get "pages") }}
|
{{ range first 10 $pages }}
|
||||||
{{ partial "post.html" (dict "page" . "linkSeries" true) }}
|
{{ partial "post.html" (dict "page" . "linkSeries" true) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<link rel="preload" href="{{ .url }}" as="style" onload="this.onload=null;this.rel='stylesheet'" {{ .extra | safeHTMLAttr }}>
|
|
||||||
<noscript><link rel="stylesheet" href="{{ .url }}"></noscript>
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
{{- $siteSourceUrl := site.Params.siteSourceUrl -}}
|
|
||||||
{{- $submoduleLinks := site.Data.submodules -}}
|
|
||||||
{{- $hostData := site.Data.hosts -}}
|
|
||||||
{{- $scratch := .scratch -}}
|
|
||||||
{{- $lines := .lines -}}
|
|
||||||
{{- $scratch.Set "bestLength" -1 -}}
|
|
||||||
{{- $scratch.Set "bestUrl" (printf "%s/code/%s" $siteSourceUrl .path) -}}
|
|
||||||
{{- $scratch.Set "bestPath" "" -}}
|
|
||||||
{{- $filePath := .path -}}
|
|
||||||
{{- range $path, $url := $submoduleLinks -}}
|
|
||||||
{{- $bestLength := $scratch.Get "bestLength" -}}
|
|
||||||
{{- if and (le $bestLength (len $path)) (hasPrefix $filePath $path) -}}
|
|
||||||
{{- $scratch.Set "bestLength" (len $path) -}}
|
|
||||||
{{- $scratch.Set "bestPath" $path -}}
|
|
||||||
{{- $scratch.Set "bestUrl" (printf "%s%s" $url (strings.TrimPrefix $path $filePath)) -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- if .lines -}}
|
|
||||||
{{- /* If the user provided a line range, see if we can tack it on to the end of the link. */ -}}
|
|
||||||
{{- range $host, $data := $hostData -}}
|
|
||||||
{{- if hasPrefix ($scratch.Get "bestUrl") $host -}}
|
|
||||||
{{- with $data.linesSuffix -}}
|
|
||||||
{{- $scratch.Add "bestUrl" (printf . (index $lines 0) (index $lines 1)) -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{{ if eq .from .to }}
|
|
||||||
{{ .scratch.Set "comment" (printf ", line %d" .from) }}
|
|
||||||
{{ else }}
|
|
||||||
{{ if eq .from 0 }}
|
|
||||||
{{ .scratch.Set "comment" (printf ", around line %d" .to) }}
|
|
||||||
{{ else }}
|
|
||||||
{{ .scratch.Set "comment" (printf ", lines %d through %d" .from .to) }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
<h2>{{ .Title }} </h2>
|
<h2>{{ .Title }} </h2>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
||||||
{{ $search := resources.Get "scss/search.scss" | css.Sass | resources.Minify }}
|
{{ $search := resources.Get "scss/search.scss" | css.Sass | resources.Minify | resources.Fingerprint }}
|
||||||
<link rel="stylesheet" href="{{ $search.Permalink }}" media="screen">
|
<link rel="stylesheet" href="{{ $search.Permalink }}" integrity="{{ $search.Data.Integrity }}" media="screen">
|
||||||
|
|
||||||
<div class="stork-wrapper">
|
<div class="stork-wrapper">
|
||||||
<div class="stork-input-wrapper">
|
<div class="stork-input-wrapper">
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
{{- $scratch := newScratch -}}
|
|
||||||
{{- partial "geturl.html" (dict "scratch" $scratch "path" (.Get 1)) -}}
|
|
||||||
{{- $groupconfig := dict
|
|
||||||
"url" ($scratch.Get "bestUrl")
|
|
||||||
"basePath" ($scratch.Get "bestPath")
|
|
||||||
"path" (.Get 1)
|
|
||||||
"comment" ", entire file"
|
|
||||||
"code" (readFile (printf "code/%s" (.Get 1)))
|
|
||||||
"language" (.Get 0)
|
|
||||||
"opts" "linenos=table"
|
|
||||||
-}}
|
|
||||||
{{- partial "highlightgroup.html" $groupconfig -}}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{{- $scratch := newScratch -}}
|
|
||||||
{{- partial "geturl.html" (dict "scratch" $scratch "path" (.Get 0)) -}}
|
|
||||||
{{- $scratch.Get "bestUrl" -}}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{{- $scratch := newScratch -}}
|
|
||||||
{{- partial "geturl.html" (dict "scratch" $scratch "path" (.Get 0) "siteSourceUrl" .Site.Params.siteSourceUrl "submoduleLinks" hugo.Data.submodules) -}}
|
|
||||||
{{- $groupconfig := dict
|
|
||||||
"url" ($scratch.Get "bestUrl")
|
|
||||||
"basePath" ($scratch.Get "bestPath")
|
|
||||||
"path" (.Get 0)
|
|
||||||
"comment" ", entire file"
|
|
||||||
"content" (safeHTML (printf "<pre><code>%s</code></pre>" (htmlEscape (readFile (printf "code/%s" (.Get 0))))))
|
|
||||||
-}}
|
|
||||||
{{- partial "group.html" $groupconfig -}}
|
|
||||||
@@ -4,13 +4,13 @@
|
|||||||
<head>
|
<head>
|
||||||
{{- partial "head.html" . -}}
|
{{- partial "head.html" . -}}
|
||||||
|
|
||||||
{{ $writingcss := resources.Get "scss/writing.scss" | css.Sass | resources.Minify }}
|
{{ $writingcss := resources.Get "scss/writing.scss" | css.Sass | resources.Minify | resources.Fingerprint }}
|
||||||
<link rel="stylesheet" href="{{ $writingcss.Permalink }}">
|
<link rel="stylesheet" href="{{ $writingcss.Permalink }}" integrity="{{ $writingcss.Data.Integrity }}">
|
||||||
|
|
||||||
{{ if .Params.custom_css }}
|
{{ if .Params.custom_css }}
|
||||||
{{ range $customCss := .Params.custom_css }}
|
{{ range $customCss := .Params.custom_css }}
|
||||||
{{ $renderedCustomCss := page.Resources.Get $customCss | css.Sass (dict "includePaths" (slice "themes/vanilla/assets/scss")) | resources.Minify }}
|
{{ $renderedCustomCss := page.Resources.Get $customCss | css.Sass (dict "includePaths" (slice "themes/vanilla/assets/scss")) | resources.Minify | resources.Fingerprint }}
|
||||||
<link rel="stylesheet" href="{{ $renderedCustomCss.Permalink }}">
|
<link rel="stylesheet" href="{{ $renderedCustomCss.Permalink }}" integrity="{{ $renderedCustomCss.Data.Integrity }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ license = "MIT"
|
|||||||
# homepage = "http://example.com/"
|
# homepage = "http://example.com/"
|
||||||
# tags = []
|
# tags = []
|
||||||
# features = []
|
# features = []
|
||||||
min_version = "0.41"
|
min_version = "0.160.1"
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "Danila Fedorin"
|
name = "Danila Fedorin"
|
||||||
|
|||||||
Reference in New Issue
Block a user