initial commit
This commit is contained in:
commit
b710cfda80
98 changed files with 9669 additions and 0 deletions
35
layouts/404.html
Normal file
35
layouts/404.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Language.Lang }}">
|
||||
|
||||
<head>
|
||||
{{ partial "head" . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ partial "svg-icon-symbols" . }}
|
||||
|
||||
<div class="wrapper">
|
||||
{{ partial "site-header" . }}
|
||||
|
||||
<main class="gdoc-error flex-even">
|
||||
<div class="flex align-center justify-center">
|
||||
<div class="gdoc-error__icon">
|
||||
<svg class="icon telescope"><use xlink:href="#telescope"></use></svg>
|
||||
</div>
|
||||
<div class="gdoc-error__message">
|
||||
<div class="gdoc-error__line gdoc-error__title">Lost?</div>
|
||||
<div class="gdoc-error__line gdoc-error__code">Error 404</div>
|
||||
<div class="gdoc-error__line gdoc-error__help">
|
||||
Looks like what you are looking for can't be found. Don't worry we can
|
||||
bring you back to the <a class="gdoc-error__link" href="{{ .Site.BaseURL }}">homepage</a>.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{{ partial "site-footer" . }}
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
30
layouts/_default/baseof.html
Normal file
30
layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Language.Lang }}">
|
||||
|
||||
<head>
|
||||
{{ partial "head" . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ partial "svg-icon-symbols" . }}
|
||||
|
||||
<div class="wrapper">
|
||||
<input type="checkbox" class="hidden" id="menu-control" />
|
||||
{{ partial "site-header" . }}
|
||||
|
||||
<main class="container flex flex-even">
|
||||
<aside class="gdoc-nav">
|
||||
{{ partial "menu" . }}
|
||||
</aside>
|
||||
|
||||
<div class="gdoc-page">
|
||||
{{ template "main" . }}
|
||||
{{ partial "page-footer" . }}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{{ partial "site-footer" . }}
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
7
layouts/_default/list.html
Normal file
7
layouts/_default/list.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "page-header" . }}
|
||||
<article class="gdoc-markdown">
|
||||
<h1>{{ .Page.Title }}</h1>
|
||||
{{ .Content }}
|
||||
</article>
|
||||
{{ end }}
|
8
layouts/_default/single.html
Normal file
8
layouts/_default/single.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "page-header" . }}
|
||||
|
||||
<article class="gdoc-markdown">
|
||||
<h1>{{ partial "title" . }}</h1>
|
||||
{{ .Content | replaceRE `<nav id="TableOfContents">\s*<ul>\s*<li>\s*<ul>` `<nav id="TableOfContents"><ul>` | replaceRE `</ul>\s*</li>\s*</ul>\s*</nav>` `</ul></nav>` | safeHTML }}
|
||||
</article>
|
||||
{{ end }}
|
28
layouts/partials/head.html
Normal file
28
layouts/partials/head.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="{{ partial "title" . }}">
|
||||
|
||||
<title>{{ partial "title" . }} | {{ .Site.Title -}}</title>
|
||||
<link rel="icon" href="{{ "favicon/favicon-32x32.png" | relURL }}" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="{{ "main.min.css" | relURL }}">
|
||||
<!-- Theme stylesheet, you can customize css by creating static/custom.css` in your website -->
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}/custom.css">
|
||||
|
||||
{{ if default true .Site.Params.GeekdocSearch }}
|
||||
{{ .Scratch.Set "geekdocSearchConfig" .Site.Params.GeekdocSearchConfig }}
|
||||
<!-- Remove after https://github.com/gohugoio/hugo/issues/6331 -->
|
||||
{{ $searchJSFile := printf "js/%s.search.js" .Language.Lang }}
|
||||
{{ $searchJS := resources.Get "js/search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify }}
|
||||
<script defer src="{{ $searchJS.RelPermalink }}"></script>
|
||||
{{ end }}
|
||||
|
||||
<!-- RSS -->
|
||||
{{ with .OutputFormats.Get "rss" -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
|
||||
{{ "<!--" | safeHTML }}
|
||||
Made with Geekdoc theme
|
||||
https://github.com/xoxys/hugo-geekdoc
|
||||
{{ "-->" | safeHTML }}
|
42
layouts/partials/menu-bundle.html
Normal file
42
layouts/partials/menu-bundle.html
Normal file
|
@ -0,0 +1,42 @@
|
|||
{{ $current := .current }}
|
||||
{{ template "menu-file" dict "sect" .source "current" $current "site" $current.Site }}
|
||||
|
||||
{{ define "menu-file" }}
|
||||
{{ $current := .current }}
|
||||
{{ $site := .site }}
|
||||
|
||||
<ul class="gdoc-nav__list">
|
||||
{{ range sort (default (seq 0) .sect) "weight" "desc" }}
|
||||
{{ $current.Scratch.Set "current" $current }}
|
||||
{{ $current.Scratch.Set "site" $site }}
|
||||
|
||||
<li>
|
||||
{{ $ref := default false .ref }}
|
||||
{{ if $ref}}
|
||||
{{ $site := $current.Scratch.Get "site" }}
|
||||
{{ $this := $site.GetPage .ref }}
|
||||
{{ $current := $current.Scratch.Get "current" }}
|
||||
{{ $icon := default false .icon }}
|
||||
|
||||
<span class="flex">
|
||||
{{ if $icon }}<svg class="icon {{ .icon }}"><use xlink:href="#{{ .icon }}"></use></svg>{{ end }}
|
||||
<a href="{{ if .external }}{{ .ref }}{{ else }}{{ relref $current .ref }}{{ end }}"
|
||||
class="gdoc-nav__entry {{ if not .external }}{{ if eq $current $this }}is-active{{ end }}{{ end }}">
|
||||
{{ .name }}
|
||||
</a>
|
||||
</span>
|
||||
{{ else }}
|
||||
<span class="flex">
|
||||
{{ .name }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ $sub := default false .sub }}
|
||||
{{ if $sub }}
|
||||
{{ template "menu-file" dict "sect" $sub "current" ($current.Scratch.Get "current") "site" ($current.Scratch.Get "site") }}
|
||||
{{ end }}
|
||||
</li>
|
||||
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
32
layouts/partials/menu-filetree.html
Normal file
32
layouts/partials/menu-filetree.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
{{ $current := . }}
|
||||
{{ template "tree-nav" dict "sect" .Site.Home.Sections "current" $current }}
|
||||
|
||||
<!-- templates -->
|
||||
{{ define "tree-nav" }}
|
||||
{{ $current := .current }}
|
||||
|
||||
<ul class="gdoc-nav__list">
|
||||
{{ range .sect.GroupBy "Weight" "desc" }}
|
||||
{{ range .ByTitle }}
|
||||
|
||||
<li>
|
||||
{{ if or .Content .Params.ListOnly }}
|
||||
<span class="flex">
|
||||
<a href="{{ .RelPermalink }}" class="gdoc-nav__entry {{ if eq $current . }}is-active{{ end }}">
|
||||
{{ partial "title" . }}
|
||||
</a>
|
||||
</span>
|
||||
{{ else }}
|
||||
<span class="flex">{{ partial "title" . }}</span>
|
||||
{{ end }}
|
||||
|
||||
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
||||
{{ if and (ne $numberOfPages 0) (not .Params.ListOnly) }}
|
||||
{{ template "tree-nav" dict "sect" .Pages "current" $current}}
|
||||
{{ end }}
|
||||
</li>
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
19
layouts/partials/menu.html
Normal file
19
layouts/partials/menu.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<nav>
|
||||
{{ partial "search" . }}
|
||||
|
||||
<section class="gdoc-nav--main">
|
||||
<h2>Navigation</h2>
|
||||
{{ if .Site.Params.GeekdocMenuBundle }}
|
||||
{{ partial "menu-bundle" (dict "current" . "source" .Site.Data.menu.main.main) }}
|
||||
{{ else }}
|
||||
{{ partial "menu-filetree" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
<section class="gdoc-nav--more">
|
||||
{{ if .Site.Data.menu.more.more }}
|
||||
<h2>More</h2>
|
||||
{{ partial "menu-bundle" (dict "current" . "source" .Site.Data.menu.more.more) }}
|
||||
{{ end }}
|
||||
</section>
|
||||
</nav>
|
60
layouts/partials/page-footer.html
Normal file
60
layouts/partials/page-footer.html
Normal file
|
@ -0,0 +1,60 @@
|
|||
{{ $current := . }}
|
||||
{{ $site := .Site }}
|
||||
{{ $current.Scratch.Set "prev" false }}
|
||||
{{ $current.Scratch.Set "getNext" false }}
|
||||
|
||||
{{ $current.Scratch.Set "nextPage" false }}
|
||||
{{ $current.Scratch.Set "prevPage" false }}
|
||||
|
||||
{{ template "menu_nextprev" dict "sect" $.Site.Data.menu.main.main "current" $current "site" $site }}
|
||||
|
||||
{{ define "menu_nextprev" }}
|
||||
{{ $current := .current }}
|
||||
{{ $site := .site }}
|
||||
|
||||
{{ range sort (default (seq 0) .sect) "weight" "desc" }}
|
||||
{{ $current.Scratch.Set "current" $current }}
|
||||
{{ $current.Scratch.Set "site" $site }}
|
||||
|
||||
{{ $ref := default false .ref }}
|
||||
{{ if $ref}}
|
||||
{{ $site := $current.Scratch.Get "site" }}
|
||||
{{ $this := $site.GetPage .ref }}
|
||||
{{ $current := $current.Scratch.Get "current" }}
|
||||
|
||||
{{ if $current.Scratch.Get "getNext" }}
|
||||
{{ $current.Scratch.Set "nextPage" $this }}
|
||||
{{ $current.Scratch.Set "getNext" false }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $current $this }}
|
||||
{{ $current.Scratch.Set "prevPage" ($current.Scratch.Get "prev") }}
|
||||
{{ $current.Scratch.Set "getNext" true }}
|
||||
{{ end }}
|
||||
|
||||
{{ $current.Scratch.Set "prev" $this }}
|
||||
{{ end }}
|
||||
|
||||
{{ $sub := default false .sub }}
|
||||
{{ if $sub }}
|
||||
{{ template "menu_nextprev" dict "sect" $sub "current" ($current.Scratch.Get "current") "site" ($current.Scratch.Get "site") }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="gdoc-page__footer flex justify-between">
|
||||
{{ $showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev) .Site.Params.GeekdocMenuBundle) }}
|
||||
{{ if $showPrevNext }}
|
||||
<span>
|
||||
{{ with ($current.Scratch.Get "prevPage") }}
|
||||
<a class="gdoc-page__nav--prev" href="{{.RelPermalink}}" title="{{.Title}}"> {{ .Name }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span>
|
||||
{{ with ($current.Scratch.Get "nextPage") }}
|
||||
<a class="gdoc-page__nav-next" href="{{.RelPermalink}}" title="{{.Title}}">{{ .Name }} </a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
38
layouts/partials/page-header.html
Normal file
38
layouts/partials/page-header.html
Normal file
|
@ -0,0 +1,38 @@
|
|||
{{ $geekdocRepo := default (default false .Site.Params.GeekdocRepo) .Page.Params.GeekdocRepo }}
|
||||
{{ $geekdocEditPath := default (default false .Site.Params.GeekdocEditPath) .Page.Params.GeekdocEditPath }}
|
||||
{{ if .File }}
|
||||
{{ $.Scratch.Set "geekdocFilePath" (default .File.Path .Page.Params.geekdocFilePath) }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "geekdocFilePath" false }}
|
||||
{{ end }}
|
||||
|
||||
{{define "breadcrumb"}}
|
||||
{{$parent := .page.Parent }}
|
||||
{{ if $parent }}
|
||||
{{ $value := (printf "<a href='%s'>%s</a> / %s" $parent.RelPermalink $parent.Title .value) }}
|
||||
{{ template "breadcrumb" dict "page" $parent "value" $value }}
|
||||
{{else}}
|
||||
{{.value|safeHTML}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
<div class="gdoc-page__header flex justify-between" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
|
||||
{{$showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb))}}
|
||||
<span>
|
||||
{{if $showBreadcrumb}}
|
||||
<span class="breadcrumb">
|
||||
<svg class="icon path"><use xlink:href="#path"></use></svg>
|
||||
{{ $name := (partial "title" .) }}
|
||||
{{ template "breadcrumb" dict "page" . "value" $name }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span>
|
||||
{{ if and ($.Scratch.Get "geekdocFilePath") $geekdocRepo $geekdocEditPath }}
|
||||
<svg class="icon code"><use xlink:href="#code"></use></svg>
|
||||
<a href="{{ $geekdocRepo }}/{{ $geekdocEditPath }}/{{ $.Scratch.Get "geekdocFilePath" }}">
|
||||
Edit this page
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
</div>
|
9
layouts/partials/search.html
Normal file
9
layouts/partials/search.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{ if default true .Site.Params.GeekdocSearch }}
|
||||
<div class="gdoc-search">
|
||||
<svg class="icon search"><use xlink:href="#search"></use></svg>
|
||||
<input type="text" id="gdoc-search-input" class="gdoc-search__input" placeholder="Search..."
|
||||
aria-label="Search" maxlength="64" />
|
||||
<div class="gdoc-search__spinner spinner hidden"></div>
|
||||
<ul id="gdoc-search-results" class="gdoc-search__list"></ul>
|
||||
</div>
|
||||
{{ end }}
|
8
layouts/partials/site-footer.html
Normal file
8
layouts/partials/site-footer.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<footer class="gdoc-footer">
|
||||
<div class="container">
|
||||
<div>
|
||||
Build with <a href="https://gohugo.io/" class="gdoc-footer__link">Hugo</a> and
|
||||
<svg class="icon heart"><use xlink:href="#heart"></use></svg>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
14
layouts/partials/site-header.html
Normal file
14
layouts/partials/site-header.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<header class="gdoc-header">
|
||||
<div class="container flex align-center justify-between">
|
||||
<label for="menu-control" class="gdoc-nav__control">
|
||||
<svg class="icon menu"><use xlink:href="#menu"></use></svg>
|
||||
<svg class="icon arrow-back"><use xlink:href="#arrow_back"></use></svg>
|
||||
</label>
|
||||
<a class="gdoc-header__link" href="{{ .Site.BaseURL }}">
|
||||
<span class="gdoc-brand flex align-center">
|
||||
<img class="gdoc-brand__img" src="{{ "brand.svg" | relURL }}" alt="Branding" width=48 height=48>
|
||||
{{ .Site.Title }}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
1
layouts/partials/svg-icon-symbols.html
Normal file
1
layouts/partials/svg-icon-symbols.html
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 7.5 KiB |
12
layouts/partials/title.html
Normal file
12
layouts/partials/title.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{{ $title := "" }}
|
||||
|
||||
{{ if .Title }}
|
||||
{{ $title = .Title }}
|
||||
{{ else if and .IsSection .File }}
|
||||
{{ $sections := split (trim .File.Dir "/") "/" }}
|
||||
{{ $title = index ($sections | last 1) 0 | humanize }}
|
||||
{{ else if and .IsPage .File }}
|
||||
{{ $title = .File.BaseFileName | humanize | title }}
|
||||
{{ end }}
|
||||
|
||||
{{ return $title }}
|
28
layouts/posts/list.html
Normal file
28
layouts/posts/list.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
{{ define "main" }}
|
||||
{{ $dateFormat := default "January 2, 2006" .Site.Params.GeekdocDateFormat }}
|
||||
{{ $paginator := .Paginate (where .Pages "Params.hidden" "ne" true) }}
|
||||
|
||||
{{ range sort .Paginator.Pages }}
|
||||
<article class="gdoc-markdown gdoc-post">
|
||||
<header>
|
||||
<h1 class="gdoc-post__title">
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</h1>
|
||||
</header>
|
||||
<h5>
|
||||
<strong>{{ .Date.Format $dateFormat }}</strong>
|
||||
</h5>
|
||||
<section>
|
||||
{{ .Summary }}
|
||||
{{ if .Truncated }}
|
||||
<a class="gdoc-post__readmore" title="Read full post" href="{{ .RelPermalink }}">
|
||||
Read more
|
||||
</a>
|
||||
{{ end }}
|
||||
</section>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
<!-- TODO: FIXME -->
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
{{ end }}
|
10
layouts/posts/single.html
Normal file
10
layouts/posts/single.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{ define "main" }}
|
||||
{{ $dateFormat := default "January 2, 2006" .Site.Params.GeekdocDateFormat }}
|
||||
<article class="gdoc-markdown">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<h5>
|
||||
<strong>{{ .Date.Format $dateFormat }}</strong>
|
||||
</h5>
|
||||
{{ .Content }}
|
||||
</article>
|
||||
{{ end }}
|
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 }}
|
0
layouts/taxonomy/list.html
Normal file
0
layouts/taxonomy/list.html
Normal file
0
layouts/taxonomy/taxonomy.html
Normal file
0
layouts/taxonomy/taxonomy.html
Normal file
Loading…
Add table
Add a link
Reference in a new issue