Compare commits

...

3 Commits

Author SHA1 Message Date
3adcf97ddc annotate 2020-01-13 15:39:07 +08:00
55929232e7 add some shortcode 2020-01-10 13:05:01 +08:00
0d85b6d003 remove footnote a border 2020-01-09 23:34:40 +08:00
7 changed files with 47 additions and 9 deletions

View File

@ -32,4 +32,17 @@
#header_logo {
font-family: "Virgil";
}
/* fix katex and tailwind base style confilt */
span.math span {
@apply border-black;
}
/* shortcode expand */
.book-expand .book-expand-content {
@apply hidden;
}
.book-expand input[type="checkbox"]:checked + .book-expand-content {
@apply block;
}

View File

@ -45,19 +45,14 @@
.markdown td {
@apply p-1;
}
.markdown thead,
.markdown tfoot,
.markdown tr:nth-child(even) {
@apply bg-gray-200;
}
.markdown pre {
@apply overflow-x-auto p-4 border border-solid border-gray-400 shadow-lg;
@apply overflow-x-auto p-4 border border-solid border-black my-4;
}
.markdown code {
@apply bg-gray-200 font-mono text-lg;
@apply border-dashed border-b border-black px-1 font-mono text-lg;
}
.markdown pre code {
@apply bg-transparent;
@apply px-0 border-none;
}
.markdown ul {
@apply pl-8 list-disc;
@ -75,3 +70,7 @@
.markdown a {
@apply border-b border-black;
}
.markdown a.footnote-backref, a.footnote-ref {
@apply border-none;
}

View File

@ -6,7 +6,7 @@
</div>
</footer>
{{- if (and .IsPage .Params.math) -}}
{{- if or ( eq .Params.math true ) ( .HasShortcode "math" ) -}}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous"

View File

@ -0,0 +1,6 @@
<span class="inline-block relative">
<sup>...</sup>
</span>
<span class="absolute w-64 border bg-blue-400 hidden inline-block">
{{ .Inner | $.Page.RenderString }}
</span>

View File

@ -0,0 +1,3 @@
<div class='text-center my-6'>
{{ .Inner | $.Page.RenderString }}
</div>

View File

@ -0,0 +1,12 @@
<div class="book-expand my-4 overflow-hidden border border-black">
<label>
<div class="book-expand-head flex justify-between py-1 px-2 border-black border-b border-dotted">
<span>{{ default "Expand" (.Get 0) }}</span>
<span>{{ default "↕" (.Get 1) }}</span>
</div>
<input type="checkbox" class="hidden" />
<div class="book-expand-content py-1 px-2">
{{ .Inner | markdownify }}
</div>
</label>
</div>

View File

@ -0,0 +1,5 @@
{{ if ( ( eq ( .Get 0 ) "inline")) }}
<span class="math inline">\({{- .Inner -}}\)</span>
{{ else }}
<span class="math display">\[{{- .Inner -}}\]</span>
{{ end }}