Add sidenote delimiters to make the site not look bad with CSS off

This commit is contained in:
Danila Fedorin 2020-03-02 21:30:23 -08:00
parent 2d6aab6b71
commit 8f09b518ba
5 changed files with 14 additions and 0 deletions

View File

@ -68,6 +68,10 @@ $sidenote-highlight-border-width: .2rem;
text-align: left; text-align: left;
} }
.sidenote-delimiter {
display: none;
}
@mixin hidden-sidenote { @mixin hidden-sidenote {
position: static; position: static;
margin-top: 1rem; margin-top: 1rem;

View File

@ -8,6 +8,7 @@
{{ $style := resources.Get "scss/style.scss" | resources.ToCSS | resources.Minify }} {{ $style := resources.Get "scss/style.scss" | resources.ToCSS | resources.Minify }}
{{ $sidenotes := resources.Get "scss/sidenotes.scss" | resources.ToCSS | resources.Minify }} {{ $sidenotes := resources.Get "scss/sidenotes.scss" | resources.ToCSS | resources.Minify }}
{{ $icon := resources.Get "img/favicon.png" }} {{ $icon := resources.Get "img/favicon.png" }}
{{- partial "sidenotes.html" . -}}
<link rel="stylesheet" href="{{ $style.Permalink }}"> <link rel="stylesheet" href="{{ $style.Permalink }}">
<link rel="stylesheet" href="{{ $sidenotes.Permalink }}"> <link rel="stylesheet" href="{{ $sidenotes.Permalink }}">
<link rel="icon" type="image/png" href="{{ $icon.Permalink }}"> <link rel="icon" type="image/png" href="{{ $icon.Permalink }}">

View File

@ -0,0 +1,5 @@
<style>
.sidenote-checkbox {
display: none;
}
</style>

View File

@ -4,6 +4,8 @@
<label class="sidenote-label" for="numbernote-{{ $id }}">({{ $id }})</label> <label class="sidenote-label" for="numbernote-{{ $id }}">({{ $id }})</label>
<input class="sidenote-checkbox" type="checkbox" id="numbernote-{{ $id }}"></input> <input class="sidenote-checkbox" type="checkbox" id="numbernote-{{ $id }}"></input>
<span class="sidenote-content sidenote-{{ .Get 0 }}"> <span class="sidenote-content sidenote-{{ .Get 0 }}">
<span class="sidenote-delimiter">[note:</span>
{{ .Inner }} {{ .Inner }}
<span class="sidenote-delimiter">]</span>
</span> </span>
</span> </span>

View File

@ -2,6 +2,8 @@
<label class="sidenote-label" for="{{ .Get 1 }}">{{ .Get 2 }}</label> <label class="sidenote-label" for="{{ .Get 1 }}">{{ .Get 2 }}</label>
<input class="sidenote-checkbox" type="checkbox" id="{{ .Get 1 }}"></input> <input class="sidenote-checkbox" type="checkbox" id="{{ .Get 1 }}"></input>
<span class="sidenote-content sidenote-{{ .Get 0 }}"> <span class="sidenote-content sidenote-{{ .Get 0 }}">
<span class="sidenote-delimiter">[note:</span>
{{ .Inner }} {{ .Inner }}
<span class="sidenote-delimiter">]</span>
</span> </span>
</span> </span>