update required hugo min version to v0.65
This commit is contained in:
parent
e0f69f1cf7
commit
ea44ee3860
13 changed files with 73 additions and 76 deletions
|
@ -2,16 +2,16 @@
|
|||
{{ $target := "" }}
|
||||
|
||||
{{ with .Get "href" }}
|
||||
{{ $ref = . }}
|
||||
{{ $target = "_blank" }}
|
||||
{{ $ref = . }}
|
||||
{{ $target = "_blank" }}
|
||||
{{ end }}
|
||||
|
||||
{{ with .Get "relref" }}
|
||||
{{ $ref = relref $ . }}
|
||||
{{ $ref = relref $ . }}
|
||||
{{ end }}
|
||||
|
||||
<span class="gdoc-button{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" {{ end }} class="gdoc-button__link">
|
||||
{{ $.Inner }}
|
||||
{{ $.Inner }}
|
||||
</a>
|
||||
</span>
|
||||
|
|
|
@ -1,7 +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 }}
|
||||
{{ range split .Inner "<--->" }}
|
||||
<div class="gdoc-columns__content gdoc-markdown--nested flex-even">
|
||||
{{ . | markdownify }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
|
@ -1,12 +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>
|
||||
<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>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<blockquote class="gdoc-hint {{ .Get 0 }}">
|
||||
{{ .Inner | markdownify }}
|
||||
{{ .Inner | markdownify }}
|
||||
</blockquote>
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
{{ if not (.Page.Scratch.Get "mermaid") }}
|
||||
<!-- Include mermaid only first time -->
|
||||
<script src="{{ "js/mermaid.min.js" | relURL }}"></script>
|
||||
<script>
|
||||
mermaid.initialize({
|
||||
flowchart: { useMaxWidth: true }
|
||||
});
|
||||
</script>
|
||||
{{ .Page.Scratch.Set "mermaid" true }}
|
||||
{{ end }}
|
||||
|
||||
<p class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||
{{ .Inner }}
|
||||
{{- .Inner -}}
|
||||
</p>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{{ if .Parent }}
|
||||
{{ $name := .Get 0 }}
|
||||
{{ $group := printf "tabs-%s" (.Parent.Get 0) }}
|
||||
{{ $name := .Get 0 }}
|
||||
{{ $group := printf "tabs-%s" (.Parent.Get 0) }}
|
||||
|
||||
{{ if not (.Parent.Scratch.Get $group) }}
|
||||
{{ .Parent.Scratch.Set $group slice }}
|
||||
{{ end }}
|
||||
{{ if not (.Parent.Scratch.Get $group) }}
|
||||
{{ .Parent.Scratch.Set $group slice }}
|
||||
{{ end }}
|
||||
|
||||
{{ .Parent.Scratch.Add $group (dict "Name" $name "Content" .Inner) }}
|
||||
{{ .Parent.Scratch.Add $group (dict "Name" $name "Content" .Inner) }}
|
||||
{{ else }}
|
||||
{{ errorf "%q: 'tab' shortcode must be inside 'tabs' shortcode" .Page.Path }}
|
||||
{{ errorf "%q: 'tab' shortcode must be inside 'tabs' shortcode" .Page.Path }}
|
||||
{{ end}}
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
{{ $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 }}
|
||||
{{ 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>
|
||||
|
|
|
@ -1,35 +1,33 @@
|
|||
{{ $tocLevels := default (default 6 .Site.Params.GeekdocToC) .Page.Params.GeekdocToC }}
|
||||
|
||||
{{ if $tocLevels }}
|
||||
<div class="gdoc-toc gdoc-toc__level--{{$tocLevels}}">
|
||||
{{ template "toc-tree" dict "sect" .Page.Pages }}
|
||||
</div>
|
||||
<div class="gdoc-toc gdoc-toc__level--{{$tocLevels}}">
|
||||
{{ template "toc-tree" dict "sect" .Page.Pages }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<!-- templates -->
|
||||
{{ define "toc-tree" }}
|
||||
<ul>
|
||||
{{ range .sect.GroupBy "Weight" }}
|
||||
{{ range .ByTitle }}
|
||||
{{ if not .Params.geekdocHidden }}
|
||||
<li>
|
||||
{{ if or .Content .Params.geekdocFlatSection }}
|
||||
<span>
|
||||
<a href="{{ .RelPermalink }}" class="gdoc-toc__entry">
|
||||
{{ partial "title" . }}
|
||||
</a>
|
||||
</span>
|
||||
{{ else }}
|
||||
<span>{{ partial "title" . }}</span>
|
||||
{{ end }}
|
||||
<ul>
|
||||
{{ range .sect.GroupBy "Weight" }}
|
||||
{{ range .ByTitle }}
|
||||
{{ if not .Params.geekdocHidden }}
|
||||
<li>
|
||||
{{ if or .Content .Params.geekdocFlatSection }}
|
||||
<span>
|
||||
<a href="{{ .RelPermalink }}" class="gdoc-toc__entry">{{ partial "title" . }}</a>
|
||||
</span>
|
||||
{{ else }}
|
||||
<span>{{ partial "title" . }}</span>
|
||||
{{ end }}
|
||||
|
||||
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
||||
{{ if and (ne $numberOfPages 0) (not .Params.geekdocFlatSection) }}
|
||||
{{ template "toc-tree" dict "sect" .Pages }}
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
||||
{{ if and (ne $numberOfPages 0) (not .Params.geekdocFlatSection) }}
|
||||
{{ template "toc-tree" dict "sect" .Pages }}
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
{{ $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>
|
||||
<div class="gdoc-toc gdoc-toc__level--{{$tocLevels}}">{{ .Page.TableOfContents }}<hr></div>
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue