initial commit
This commit is contained in:
commit
b710cfda80
98 changed files with 9669 additions and 0 deletions
15
layouts/shortcodes/button.html
Normal file
15
layouts/shortcodes/button.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{ $ref := "" }}
|
||||
{{ $target := "" }}
|
||||
|
||||
{{ with .Get "href" }}
|
||||
{{ $ref = . }}
|
||||
{{ $target = "_blank" }}
|
||||
{{ end }}
|
||||
|
||||
{{ with .Get "relref" }}
|
||||
{{ $ref = relref $ . }}
|
||||
{{ end }}
|
||||
|
||||
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" {{ end }} class="gdoc-btn{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||
{{ $.Inner }}
|
||||
</a>
|
7
layouts/shortcodes/columns.html
Normal file
7
layouts/shortcodes/columns.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<div class="gdoc-columns flex flex-wrap">
|
||||
{{ range split .Inner "<--->" }}
|
||||
<div class="gdoc-columns__content gdoc-markdown--nested flex-even">
|
||||
{{ . | markdownify }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
12
layouts/shortcodes/expand.html
Normal file
12
layouts/shortcodes/expand.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<div class="gdoc-expand">
|
||||
<label>
|
||||
<div class="gdoc-expand__head flex justify-between">
|
||||
<span>{{ default "Expand" (.Get 0) }}</span>
|
||||
<span>{{ default "↕" (.Get 1) }}</span>
|
||||
</div>
|
||||
<input type="checkbox" class="gdoc-expand__control hidden" />
|
||||
<div class="gdoc-markdown--nested gdoc-expand__content">
|
||||
{{ .Inner | markdownify }}
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
3
layouts/shortcodes/hint.html
Normal file
3
layouts/shortcodes/hint.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<blockquote class="gdoc-hint {{ .Get 0 }}">
|
||||
{{ .Inner | markdownify }}
|
||||
</blockquote>
|
9
layouts/shortcodes/mermaid.html
Normal file
9
layouts/shortcodes/mermaid.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{ if not (.Page.Scratch.Get "mermaid") }}
|
||||
<!-- Include mermaid only first time -->
|
||||
<script src="{{ "js/mermaid.min.js" | relURL }}"></script>
|
||||
{{ .Page.Scratch.Set "mermaid" true }}
|
||||
{{ end }}
|
||||
|
||||
<p class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||
{{ .Inner }}
|
||||
</p>
|
12
layouts/shortcodes/tab.html
Normal file
12
layouts/shortcodes/tab.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{{ if .Parent }}
|
||||
{{ $name := .Get 0 }}
|
||||
{{ $group := printf "tabs-%s" (.Parent.Get 0) }}
|
||||
|
||||
{{ if not (.Parent.Scratch.Get $group) }}
|
||||
{{ .Parent.Scratch.Set $group slice }}
|
||||
{{ end }}
|
||||
|
||||
{{ .Parent.Scratch.Add $group (dict "Name" $name "Content" .Inner) }}
|
||||
{{ else }}
|
||||
{{ errorf "%q: 'tab' shortcode must be inside 'tabs' shortcode" .Page.Path }}
|
||||
{{ end}}
|
16
layouts/shortcodes/tabs.html
Normal file
16
layouts/shortcodes/tabs.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{ if .Inner }}{{ end }}
|
||||
{{ $id := .Get 0 }}
|
||||
{{ $group := printf "tabs-%s" $id }}
|
||||
|
||||
<div class="gdoc-tabs">
|
||||
{{ range $index, $tab := .Scratch.Get $group }}
|
||||
<input type="radio" class="gdoc-tabs__control hidden" name="{{ $group }}" id="{{ printf "%s-%d" $group $index }}"
|
||||
{{ if not $index }}checked="checked" {{ end }} />
|
||||
<label for="{{ printf "%s-%d" $group $index }}" class="gdoc-tabs__label">
|
||||
{{ $tab.Name }}
|
||||
</label>
|
||||
<div class="gdoc-markdown--nested gdoc-tabs__content">
|
||||
{{ .Content | markdownify }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
8
layouts/shortcodes/toc.html
Normal file
8
layouts/shortcodes/toc.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
{{ $tocLevels := default (default 6 .Site.Params.GeekdocToC) .Page.Params.GeekdocToC }}
|
||||
|
||||
{{ if and $tocLevels .Page.TableOfContents }}
|
||||
<div class="gdoc-toc gdoc-toc__level--{{$tocLevels}}">
|
||||
{{ .Page.TableOfContents }}
|
||||
<hr>
|
||||
</div>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue