Compare commits
18 Commits
b56ac908f6
...
667440d2e3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
667440d2e3 | ||
|
|
2a0f0cad49 | ||
|
|
fb7910c0a2 | ||
| b5e2821918 | |||
| 869f9d12c8 | |||
| c5a28bf7ef | |||
| 5869d99db1 | |||
| 3858441c89 | |||
| 1ee75d9431 | |||
| c48995310b | |||
| 5484e084a4 | |||
| 620c269d91 | |||
| 77ea2900bc | |||
| 8f3b0b967b | |||
| c9044bd3c3 | |||
| f4d4f4e5d7 | |||
| 9b0c70ac05 | |||
| fadf72c180 |
@@ -77,7 +77,7 @@ input.stork-input {
|
||||
}
|
||||
}
|
||||
|
||||
.stork-title, .stork-excerpt {
|
||||
.stork-title p, .stork-excerpt p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,11 @@ h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
|
||||
&:target {
|
||||
background-color: lighten(yellow, 30%);
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
a {
|
||||
border-bottom: none;
|
||||
|
||||
@@ -144,10 +149,12 @@ table {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
tr {
|
||||
@include below-container-width {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.fold-table + table {
|
||||
tr {
|
||||
@include below-container-width {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +162,11 @@ td {
|
||||
@include below-container-width {
|
||||
overflow-x: auto;
|
||||
}
|
||||
}
|
||||
|
||||
td, th {
|
||||
padding: 0.5rem;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
div.highlight tr {
|
||||
@@ -229,6 +240,10 @@ figure {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&.fullwide img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
&.tiny img {
|
||||
max-height: 15rem;
|
||||
}
|
||||
@@ -262,3 +277,44 @@ figure {
|
||||
stroke-linejoin: round;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
.katex * {
|
||||
font-family: unset;
|
||||
}
|
||||
|
||||
.block {
|
||||
@include bordered-block;
|
||||
margin: auto;
|
||||
padding: 0.5rem;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.dialog {
|
||||
.message {
|
||||
max-width: 0.8*$container-width;
|
||||
margin-top: 0.5rem;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.message-sender {
|
||||
width: 4rem;
|
||||
margin: 0.75rem;
|
||||
|
||||
.feather {
|
||||
width: 2rem;
|
||||
height: 1.6rem;
|
||||
}
|
||||
}
|
||||
|
||||
.message-text {
|
||||
@include bordered-block;
|
||||
display: block;
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
&.side-answer {
|
||||
margin-left: auto;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{{ define "main" }}
|
||||
<h2>{{ .Title }}</h2>
|
||||
{{ .Content }}
|
||||
|
||||
<ul class="post-list">
|
||||
{{ range .Pages.ByDate.Reverse }}
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&family=Raleway&family=Lora&display=block" media="screen">
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css" media="screen">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.2/dist/katex.min.css" integrity="sha384-bYdxxUwYipFNohQlHt0bjN/LCpueqWz13HufFEV1SUatKs1cm4L6fFgCi1jT643X" crossorigin="anonymous">
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type | html }}" href="{{ .Permalink | safeURL }}">
|
||||
{{ end -}}
|
||||
{{ $style := resources.Get "scss/style.scss" | resources.ToCSS | resources.Minify }}
|
||||
{{ $sidenotes := resources.Get "scss/sidenotes.scss" | resources.ToCSS | resources.Minify }}
|
||||
{{ $code := resources.Get "scss/code.scss" | resources.ToCSS | resources.Minify }}
|
||||
@@ -17,8 +21,15 @@
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}" media="screen">
|
||||
<link rel="stylesheet" href="{{ $sidenotes.Permalink }}" media="screen">
|
||||
<link rel="stylesheet" href="{{ $code.Permalink }}" media="screen">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous" media="screen">
|
||||
<link rel="icon" type="image/png" href="{{ $icon.Permalink }}">
|
||||
|
||||
{{ if .Site.IsServer }}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css" integrity="sha384-Xi8rHCmBmhbuyyhbI88391ZKP2dmfnOl4rT9ZfRI7mLTdk1wblIUnrIq35nqwEvC" crossorigin="anonymous">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js" integrity="sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja" crossorigin="anonymous"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous"
|
||||
onload="renderMathInElement(document.body);"></script>
|
||||
{{ end }}
|
||||
|
||||
|
||||
<title>{{ .Title }}</title>
|
||||
</head>
|
||||
|
||||
3
layouts/shortcodes/block.html
Normal file
3
layouts/shortcodes/block.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="block">
|
||||
{{ .Inner }}
|
||||
</div>
|
||||
3
layouts/shortcodes/dialog.html
Normal file
3
layouts/shortcodes/dialog.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<p class="dialog">
|
||||
{{ .Inner }}
|
||||
</p>
|
||||
1
layouts/shortcodes/foldtable.html
Normal file
1
layouts/shortcodes/foldtable.html
Normal file
@@ -0,0 +1 @@
|
||||
<span class="fold-table"></span>
|
||||
@@ -1,3 +1,3 @@
|
||||
$$
|
||||
{{ .Inner }}
|
||||
{{ htmlEscape .Inner }}
|
||||
$$
|
||||
|
||||
10
layouts/shortcodes/message.html
Normal file
10
layouts/shortcodes/message.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<span class="message side-{{ .Get 0 }}">
|
||||
<span class="message-sender">
|
||||
{{ if (eq (.Get 1) "reader") }}
|
||||
{{ partial "icon.html" "moon" }}
|
||||
{{ else }}
|
||||
{{ partial "icon.html" "sun" }}
|
||||
{{ end }}
|
||||
</span>
|
||||
<span class="message-text">{{ .Inner }}</span>
|
||||
</span>
|
||||
@@ -1,11 +0,0 @@
|
||||
{{ .Page.Scratch.Add "numbernote-id" 1 }}
|
||||
{{ $id := .Page.Scratch.Get "numbernote-id" }}
|
||||
<span class="sidenote">
|
||||
<label class="sidenote-label" for="numbernote-{{ $id }}">({{ $id }})</label>
|
||||
<input class="sidenote-checkbox" type="checkbox" id="numbernote-{{ $id }}"></input>
|
||||
<span class="sidenote-content sidenote-{{ .Get 0 }}">
|
||||
<span class="sidenote-delimiter">[note:</span>
|
||||
{{ .Inner }}
|
||||
<span class="sidenote-delimiter">]</span>
|
||||
</span>
|
||||
</span>
|
||||
@@ -1,2 +1,2 @@
|
||||
{{ partial "geturl.html" (dict "scratch" .Scratch "path" (.Get 0) "submoduleLinks" .Site.Params.submoduleLinks) }}
|
||||
{{ partial "group.html" (dict "url" (.Scratch.Get "bestUrl") "path" (.Get 0) "comment" ", entire file" "content" (safeHTML (printf "<pre><code>%s</code></pre>" (readFile (printf "code/%s" (.Get 0)))))) }}
|
||||
{{ partial "group.html" (dict "url" (.Scratch.Get "bestUrl") "path" (.Get 0) "comment" ", entire file" "content" (safeHTML (printf "<pre><code>%s</code></pre>" (htmlEscape (readFile (printf "code/%s" (.Get 0))))))) }}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
<span class="sidenote">
|
||||
<label class="sidenote-label" for="{{ .Get 1 }}">{{ .Get 2 }}</label>
|
||||
<input class="sidenote-checkbox" type="checkbox" id="{{ .Get 1 }}"></input>
|
||||
{{ if $offset := .Get 3 }}
|
||||
<span class="sidenote-content sidenote-{{ .Get 0 }}" style="margin-top: {{ $offset }}rem">
|
||||
{{ else }}
|
||||
<span class="sidenote-content sidenote-{{ .Get 0 }}">
|
||||
{{ end }}
|
||||
<span class="sidenote-delimiter">[note:</span>
|
||||
{{ .Inner }}
|
||||
<span class="sidenote-delimiter">]</span>
|
||||
|
||||
Reference in New Issue
Block a user