Compare commits

...

2 Commits

Author SHA1 Message Date
c00867d46b Markdown-ify sidenote labels
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-07-06 17:36:38 -07:00
8c3d93bc2d Add a 'draft link' shortcode
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-07-06 17:25:02 -07:00
3 changed files with 11 additions and 1 deletions

View File

@ -160,6 +160,10 @@ a {
}
}
.draft-link {
border-bottom: .2rem solid $border-color;
}
img {
max-width: 100%;
background-color: white;

View File

@ -0,0 +1,6 @@
{{- $page := site.GetPage (.Get 1) -}}
{{- if $page -}}
<a href="{{ $page.RelPermalink }}">{{ .Get 0 }}</a>
{{- else -}}
<span class="draft-link">{{ .Get 0 }} (coming soon)</span>
{{- end -}}

View File

@ -1,5 +1,5 @@
<span class="sidenote">
<label class="sidenote-label" for="{{- .Get 1 -}}">{{- .Get 2 -}}</label>
<label class="sidenote-label" for="{{- .Get 1 -}}">{{- .Get 2 | markdownify -}}</label>
<input class="sidenote-checkbox" style="display: none;" type="checkbox" id="{{- .Get 1 -}}"></input>
{{- if $offset := .Get 3 -}}
<span class="sidenote-content sidenote-{{- .Get 0 -}}" style="margin-top: {{- $offset -}}rem">