Convert docdock theme from submodule to native files and fix Hugo compatibility
This commit is contained in:
61
themes/docdock/layouts/partials/flex/body-aftercontent.html
Normal file
61
themes/docdock/layouts/partials/flex/body-aftercontent.html
Normal file
@@ -0,0 +1,61 @@
|
||||
<div class="chevrons">
|
||||
{{ partial "next-prev-page.html" . }}
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</article>
|
||||
|
||||
<footer>
|
||||
|
||||
<div class="footline">
|
||||
{{if .Params.tags }}
|
||||
<div class="tags">
|
||||
{{ range $index, $tag := .Params.tags }}
|
||||
<a class="label label-default" href="{{$.Site.BaseURL}}tags/{{ $tag | urlize }}">{{ $tag }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{with .Params.LastModifierDisplayName}}
|
||||
<div class="author">
|
||||
<i class='fa fa-user'></i> <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{ if not .Page.Lastmod.IsZero }}
|
||||
<div class="date">
|
||||
<i class='fa fa-calendar'></i> {{T "last-update-on"}} {{ .Page.Lastmod.Format "02/01/2006" }}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{ if .Site.Params.editURL }}
|
||||
<div class="github-link">
|
||||
<a href="{{ .Site.Params.editURL }}{{ replace .File.Dir "\\" "/" }}{{ .File.LogicalName }}" target="blank"><i class="fa fa-code-fork"></i>
|
||||
{{T "Edit-this-page"}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
{{ $footer := print "_footer." .Lang }}
|
||||
{{ range where .Site.Pages "File.BaseFileName" $footer }}
|
||||
{{ .Content }}
|
||||
{{else}}
|
||||
{{ if .Site.GetPage "page" "_footer.md" }}
|
||||
{{(.Site.GetPage "page" "_footer.md").Content}}
|
||||
{{else}}
|
||||
{{ T "create-footer-md" }}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{{ partial "flex/scripts.html" . }}
|
||||
|
||||
{{ $layoutsPartialsMenu := resources.Get "js/layouts/partials/menu.js" }}
|
||||
|
||||
{{ $concatjs := slice $layoutsPartialsMenu | resources.Concat "js/scripts.js" | resources.Minify }}
|
||||
<script src="{{ $concatjs.Permalink }}"></script>
|
||||
57
themes/docdock/layouts/partials/flex/body-beforecontent.html
Normal file
57
themes/docdock/layouts/partials/flex/body-beforecontent.html
Normal file
@@ -0,0 +1,57 @@
|
||||
<header>
|
||||
<div class="logo">
|
||||
{{ partial "header.html" . }}
|
||||
</div>
|
||||
<div class="burger"><a href="javascript:void(0);" style="font-size:15px;">☰</a></div>
|
||||
{{- with .Site.Menus.shortcuts}}
|
||||
<nav class="shortcuts">
|
||||
{{- range sort . "Weight"}}
|
||||
<li class="" role="">
|
||||
<a href="{{.URL}}" {{if eq $.Site.Params.menushortcutsnewtab true}}target="_blank"{{end}} rel="noopener">
|
||||
{{safeHTML .Name}}
|
||||
</a>
|
||||
</li>
|
||||
{{- end}}
|
||||
</nav>
|
||||
{{- end}}
|
||||
</header>
|
||||
<article>
|
||||
<aside>
|
||||
<ul class="menu">
|
||||
{{- if not .Site.Params.disableHomeIcon}}
|
||||
<li data-nav-id="{{"/" | relLangURL}}" class="dd-item">
|
||||
<a href="{{"/" | relLangURL}}">
|
||||
<i class="fa fa-fw fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
{{- end}}
|
||||
|
||||
{{- partialCached "menu.html" . }}
|
||||
|
||||
</ul>
|
||||
|
||||
{{- partial "language-selector.html" . }}
|
||||
<section>
|
||||
{{- partial "menu-footer.html" . }}
|
||||
</section>
|
||||
</aside>
|
||||
<section class="page">
|
||||
|
||||
<div class="nav-select">
|
||||
<center>Navigation :
|
||||
<select onchange="javascript:location.href = this.value;">
|
||||
{{partial "flex/selectnavigation.html" .}}
|
||||
</select>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
{{- if not .Site.Params.disableSearch}}
|
||||
<div>
|
||||
<div class="searchbox">
|
||||
<input data-search-input id="search-by" type="text" placeholder="{{T "Search-placeholder"}}">
|
||||
</div>
|
||||
</div>
|
||||
{{- end}}
|
||||
|
||||
|
||||
{{if not .IsHome}}<h1>{{.Title}}</h1>{{end}}
|
||||
15
themes/docdock/layouts/partials/flex/head.html
Normal file
15
themes/docdock/layouts/partials/flex/head.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<meta name="revised" content="{{ now.Format "2006-01-02T15:04:05 MST" }}">
|
||||
<title>{{ .Title }} :: {{ .Site.Title }}</title>
|
||||
<link rel="shortcut icon" href="{{"images/favicon.png" | relURL}}" type="image/x-icon" />
|
||||
<link href="{{"css/nucleus.css" | relURL}}" rel="stylesheet">
|
||||
<link href="{{"css/font-awesome.min.css" | relURL}}" rel="stylesheet">
|
||||
<link href="{{"css/featherlight.min.css" | relURL}}" rel="stylesheet">
|
||||
<link href="{{"css/auto-complete.css" | relURL}}" rel="stylesheet">
|
||||
<link href="{{(printf "theme-%s/style.css" (.Site.Params.themeStyle| default "flex") ) | relURL}}" rel="stylesheet">
|
||||
{{with .Site.Params.themeVariant}}
|
||||
<link href="{{(printf "theme-%s/variant-%s.css" ($.Site.Params.themeStyle| default "flex") .) | relURL}}" rel="stylesheet">
|
||||
{{end}}
|
||||
<link rel="stylesheet" href="{{"css/bootstrap.min.css" | relURL}}">
|
||||
{{ partial "custom-head.html" . }}
|
||||
18
themes/docdock/layouts/partials/flex/scripts.html
Normal file
18
themes/docdock/layouts/partials/flex/scripts.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<script src="{{"js/jquery-2.x.min.js" | relURL}}"></script>
|
||||
<script type="text/javascript">
|
||||
{{if .Site.IsMultiLingual}}
|
||||
var baseurl = "{{.Site.BaseURL}}{{.Site.LanguagePrefix}}";
|
||||
{{else}}
|
||||
var baseurl = "{{.Site.BaseURL}}";
|
||||
{{end}}
|
||||
</script>
|
||||
<script src="{{"js/clipboard.min.js" | relURL}}"></script>
|
||||
<script src="{{"js/featherlight.min.js" | relURL}}"></script>
|
||||
{{if eq .Site.Params.highlightClientSide true}}
|
||||
<script src="{{"js/highlight.pack.js" | relURL}}"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
{{end}}
|
||||
<script type="text/javascript" src="{{"js/lunr.min.js" | relURL}}"></script>
|
||||
<script type="text/javascript" src="{{"js/auto-complete.js" | relURL}}"></script>
|
||||
<script type="text/javascript" src="{{"js/search.js" | relURL}}"></script>
|
||||
<script src="{{(printf "theme-%s/script.js" (.Site.Params.themeStyle| default "flex")) | relURL}}"></script>
|
||||
58
themes/docdock/layouts/partials/flex/selectnavigation.html
Normal file
58
themes/docdock/layouts/partials/flex/selectnavigation.html
Normal file
@@ -0,0 +1,58 @@
|
||||
{{- $currentNode := . }}
|
||||
{{- if eq .Site.Params.ordersectionsby "title"}}
|
||||
{{- range .Site.Home.Sections.ByTitle}}
|
||||
{{- template "menu-nav" dict "sect" . "currentnode" $currentNode "level" 1}}
|
||||
{{- end}}
|
||||
{{- else}}
|
||||
{{- range .Site.Home.Sections.ByWeight}}
|
||||
{{- template "menu-nav" dict "sect" . "currentnode" $currentNode "level" 1}}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
|
||||
<!-- templates -->
|
||||
{{- define "menu-nav" }}
|
||||
{{- $currentNode := .currentnode }}
|
||||
{{- $level := .level }}
|
||||
{{- with .sect}}
|
||||
{{- if .IsSection}}
|
||||
<option value="{{ .RelPermalink}}" {{if eq .Permalink $currentNode.Permalink}} selected{{end}}>
|
||||
{{if gt $level 1 }}
|
||||
{{- range after 1 (seq $level)}}-{{ end }}
|
||||
{{end}} {{.Title}}</option>
|
||||
|
||||
{{- if or (.IsAncestor $currentNode) (.Params.alwaysopen) }} <!-- dig into sub levels only if active or menu is always ON-->
|
||||
|
||||
{{- $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
||||
{{- if ne $numberOfPages 0 }}
|
||||
{{- .Scratch.Set "pages" .Pages }}
|
||||
{{- if .Sections}}
|
||||
{{- .Scratch.Set "pages" (.Pages | union .Sections) }}
|
||||
{{- end}}
|
||||
{{- $pages := (.Scratch.Get "pages") }}
|
||||
|
||||
{{- if eq .Site.Params.ordersectionsby "title"}}
|
||||
{{- range $pages.ByTitle }}
|
||||
{{- if and .Params.hidden (not $.showhidden) }}
|
||||
{{- else}}
|
||||
{{- template "menu-nav" dict "sect" . "currentnode" $currentNode }}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
{{- else}}
|
||||
{{- range $pages.ByWeight }}
|
||||
{{- if and .Params.hidden (not $.showhidden) }}
|
||||
{{- else}}
|
||||
{{- template "menu-nav" dict "sect" . "currentnode" $currentNode "level" (add $level 1) }}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
|
||||
{{- end}}
|
||||
{{end}}
|
||||
{{- else}}
|
||||
{{- if not .Params.Hidden }}
|
||||
<option value="{{ .RelPermalink}}" {{if eq .Permalink $currentNode.Permalink}} selected{{end}}>
|
||||
{{- range after 1 (seq $level)}}-{{ end }} {{.Title}}</option>
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
Reference in New Issue
Block a user