init
This commit is contained in:
34
themes/godocs-4/layouts/partials/essentials/footer.html
Normal file
34
themes/godocs-4/layouts/partials/essentials/footer.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row align-items-center border-bottom py-5">
|
||||
<div class="col-lg-4">
|
||||
<ul class="list-inline footer-menu text-center text-lg-start">
|
||||
{{ range site.Menus.footer }}
|
||||
<li class="list-inline-item"><a href="{{ .URL | absLangURL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-lg-4 text-center mb-4 mb-lg-0">
|
||||
<a href="{{ site.BaseURL | relLangURL }}">
|
||||
<!-- {{ partial "logo.html" }} -->
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<ul class="list-inline social-icons text-lg-end text-center">
|
||||
{{ range site.Params.social }}
|
||||
<li class="list-inline-item"><a href="{{ .link | safeURL }}"><i class="{{ .icon }}"></i></a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="py-4 text-center">
|
||||
<small class="text-light">
|
||||
{{ site.Params.copyright | markdownify }}<br>
|
||||
{{ if site.Params.theme_copyright }}
|
||||
Made with 💙 by
|
||||
<a target="_blank" rel="noopener noreferrer" href="https://start-it.nl">StartIT</a>
|
||||
{{ end }}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
55
themes/godocs-4/layouts/partials/essentials/head.html
Normal file
55
themes/godocs-4/layouts/partials/essentials/head.html
Normal file
@@ -0,0 +1,55 @@
|
||||
<meta charset="utf-8" />
|
||||
<title>{{ .Title | default site.Title }}</title>
|
||||
|
||||
<!-- responsive meta -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5" />
|
||||
|
||||
<!-- theme meta -->
|
||||
<meta name="theme-name" content="godocs-hugo" />
|
||||
|
||||
<!-- favicon -->
|
||||
{{ partialCached "favicon" . }}
|
||||
|
||||
|
||||
<!-- manifest -->
|
||||
{{ partialCached "manifest" . }}
|
||||
|
||||
|
||||
<!-- site verifications -->
|
||||
{{ partialCached "site-verifications.html" . }}
|
||||
|
||||
|
||||
<!-- opengraph and twitter card -->
|
||||
{{ partial "basic-seo.html" . }}
|
||||
|
||||
|
||||
<!-- custom script -->
|
||||
{{ partialCached "custom-script.html" . }}
|
||||
|
||||
|
||||
<!-- google analytics -->
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
|
||||
|
||||
<!-- google tag manager -->
|
||||
{{ partialCached "gtm.html" . }}
|
||||
|
||||
|
||||
<!-- matomo analytics -->
|
||||
{{ partialCached "matomo-analytics.html" . }}
|
||||
|
||||
|
||||
<!-- Baidu analytics -->
|
||||
{{ partialCached "baidu-analytics.html" . }}
|
||||
|
||||
|
||||
<!-- Plausible Analytics -->
|
||||
<!-- {{ partialCached "plausible-analytics.html" . }} -->
|
||||
<script defer data-domain="kennisbank.start-it.nl" src="https://stats.start-it.nl/js/script.file-downloads.outbound-links.js"></script>
|
||||
|
||||
<!-- Counter Analytics -->
|
||||
{{ partialCached "counter-analytics.html" . }}
|
||||
|
||||
|
||||
<!-- Crisp Chat -->
|
||||
{{ partialCached "crisp-chat.html" . }}
|
||||
58
themes/godocs-4/layouts/partials/essentials/header.html
Normal file
58
themes/godocs-4/layouts/partials/essentials/header.html
Normal file
@@ -0,0 +1,58 @@
|
||||
{{ "<!-- navigation -->" | safeHTML }}
|
||||
<header class="sticky-top navigation {{if .IsHome}}home-nav{{end}}">
|
||||
<div class="container">
|
||||
<!-- navbar -->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-transparent justify-content-between">
|
||||
<div class="logo-wrapper order-1 mobile-view">
|
||||
{{ if site.Params.site_logo }}
|
||||
<a class="site-logo" target="_blank" href="{{site.Params.main_site_link | safeURL}}?ref=docs">
|
||||
{{ partial "logo.html" }}
|
||||
</a>
|
||||
{{ end }}
|
||||
<span class="logo-devider"></span>
|
||||
<a class="docs-logo" href="{{ .Site.BaseURL | relLangURL }}">
|
||||
{{ partial "image.html" (dict "Src" site.Params.docs_logo "Alt" (.Site.Title)) }}</a>
|
||||
</div>
|
||||
|
||||
<form class="form-inline search-wrapper order-3 order-lg-2 {{if not .IsHome}}d-block mt-3{{end}}" data-bs-toggle="modal"
|
||||
data-bs-target="#searchModal">
|
||||
<i class="search-icon fas fa-search"></i>
|
||||
<input class="form-control form-control-sm" placeholder="{{ i18n `search`}}" readonly>
|
||||
<button type="button" class="search-button" style="font-size:12px" data-search-toggler>{{ i18n "search"
|
||||
}}</button>
|
||||
</form>
|
||||
|
||||
<div class="d-flex order-2 order-lg-3 mobile-view">
|
||||
<!-- Language List -->
|
||||
{{ if .IsTranslated }}
|
||||
<select class="language-selector bg-transparent" onchange="location = this.value;">
|
||||
{{ $siteLanguages := .Site.Languages}}
|
||||
{{ $pageLang := .Page.Lang}}
|
||||
{{ range .Page.AllTranslations }}
|
||||
{{ $translation := .}}
|
||||
{{ range $siteLanguages }}
|
||||
{{ if eq $translation.Lang .Lang }}
|
||||
{{ $selected := false }}
|
||||
{{ if eq $pageLang .Lang}}
|
||||
<option value="{{ $translation.Permalink }}" selected>{{ .LanguageName }}</option>
|
||||
{{ else }}
|
||||
<option value="{{ $translation.Permalink }}">{{ .LanguageName }}</option>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</select>
|
||||
{{ end }}
|
||||
<!-- nav buttons -->
|
||||
{{ range $i, $e:= site.Params.nav_button }}
|
||||
<a href="{{ .link | absLangURL }}"
|
||||
class="btn btn-sm {{if eq .style `outline`}}btn-outline-primary{{else}}btn-primary{{end}} {{if and $i (gt $i 0)}}ms-3{{end}}">{{
|
||||
.label }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
{{ "<!-- /navigation -->" | safeHTML }}
|
||||
|
||||
{{ partial "components/search-modal" . }}
|
||||
59
themes/godocs-4/layouts/partials/essentials/script.html
Normal file
59
themes/godocs-4/layouts/partials/essentials/script.html
Normal file
@@ -0,0 +1,59 @@
|
||||
<!-- Bootstrap scripts -->
|
||||
{{ $bootstrap := resources.Get "js/bootstrap.js" }}
|
||||
{{ $params := dict }}
|
||||
{{ $sourceMap := cond hugo.IsProduction "" "inline" }}
|
||||
{{ $opts := dict "sourceMap" $sourceMap "target" "es2018" "params" $params }}
|
||||
{{ $bootstrap = $bootstrap | js.Build $opts }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $bootstrap = $bootstrap | fingerprint "sha512" }}
|
||||
{{ end }}
|
||||
<script crossorigin="anonymous" defer {{ if hugo.IsProduction }}integrity="{{ $bootstrap.Data.Integrity }}"{{end}} type="application/javascript">{{$bootstrap.Content | safeJS}}</script>
|
||||
|
||||
<!-- JS Plugins + Main script -->
|
||||
{{ $scripts := slice }}
|
||||
{{ range site.Params.plugins.js }}
|
||||
{{ if findRE "^http" .link }}
|
||||
<script
|
||||
src="{{ .link | relURL }}"
|
||||
type="application/javascript"
|
||||
{{ .attributes | safeHTMLAttr }}></script>
|
||||
{{ else }}
|
||||
{{ $scripts = $scripts | append (resources.Get .link) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<!-- main script -->
|
||||
{{ $scripts = $scripts | append (resources.Get "js/script.js") }}
|
||||
{{ $scripts = $scripts | resources.Concat "js/scripts.js" }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $scripts = $scripts | fingerprint "sha512" }}
|
||||
{{ end }}
|
||||
<script crossorigin="anonymous" defer {{ if hugo.IsProduction }}integrity="{{ $scripts.Data.Integrity }}"{{end}} type="application/javascript">{{$scripts.Content | safeJS}}</script>
|
||||
|
||||
<!-- font family -->
|
||||
{{ $pf:= site.Params.variables.font_primary }}
|
||||
{{ $sf:= site.Params.variables.font_secondary }}
|
||||
<script type="application/javascript">
|
||||
WebFont.load({
|
||||
google: {
|
||||
api: 'https://fonts.googleapis.com/css2',
|
||||
families: ['{{$pf | default `Lato:wght@400`}}{{if not $sf}}&display=swap{{end}}'{{with $sf}},'{{. | default `Lato:wght@400`}}&display=swap'{{end}}],
|
||||
version: 2
|
||||
},
|
||||
active: () => {sessionStorage.fontsLoaded = true}
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- progressive web app -->
|
||||
{{ partialCached "pwa.html" . }}
|
||||
|
||||
|
||||
<!-- cookie consent -->
|
||||
{{ partialCached "cookie-consent.html" . }}
|
||||
|
||||
|
||||
<!-- google adsense -->
|
||||
{{ partialCached "adsense-script.html" . }}
|
||||
|
||||
{{ $tooltips := resources.Get "js/tooltips.js" | minify }}
|
||||
<script src="{{ $tooltips.RelPermalink }}" defer></script>
|
||||
42
themes/godocs-4/layouts/partials/essentials/style.html
Normal file
42
themes/godocs-4/layouts/partials/essentials/style.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!-- DNS preconnect -->
|
||||
<meta http-equiv="x-dns-prefetch-control" content="on" />
|
||||
<link rel="preconnect" href="//ajax.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous" />
|
||||
<link rel="preconnect" href="https://use.fontawesome.com" crossorigin />
|
||||
<link rel="preconnect" href="//cdnjs.cloudflare.com" />
|
||||
<link rel="preconnect" href="//www.googletagmanager.com" />
|
||||
<link rel="preconnect" href="//www.google-analytics.com" />
|
||||
<link rel="dns-prefetch" href="https://fonts.gstatic.com" />
|
||||
<link rel="dns-prefetch" href="https://use.fontawesome.com" />
|
||||
<link rel="dns-prefetch" href="//ajax.googleapis.com" />
|
||||
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com" />
|
||||
<link rel="dns-prefetch" href="//www.googletagmanager.com" />
|
||||
<link rel="dns-prefetch" href="//www.google-analytics.com" />
|
||||
<link rel="dns-prefetch" href="//fonts.googleapis.com" />
|
||||
<link rel="dns-prefetch" href="//connect.facebook.net" />
|
||||
<link rel="dns-prefetch" href="//platform.linkedin.com" />
|
||||
<link rel="dns-prefetch" href="//platform.twitter.com" />
|
||||
|
||||
<!-- plugins + stylesheet -->
|
||||
{{ $styles := slice }}
|
||||
{{ range site.Params.plugins.css }}
|
||||
{{ if findRE "^http" .link }}
|
||||
<link crossorigin="anonymous" media="all" rel="stylesheet" href="{{ .link | relURL }}" {{ .attributes | safeHTMLAttr }} />
|
||||
{{ else }}
|
||||
{{ $styles = $styles | append (resources.Get .link) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $styles := $styles | append (resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "style.scss" . | toCSS) }}
|
||||
{{ $styles := $styles | resources.Concat "/css/style.css" }}
|
||||
|
||||
|
||||
<!-- Purge CSS in Production -->
|
||||
{{ if and hugo.IsProduction site.Params.purge_css }}
|
||||
{{ $styles = $styles | css.PostCSS | fingerprint "sha256" }}
|
||||
{{ $styles = $styles | resources.PostProcess }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<!-- <link rel="stylesheet" href="{{ $styles.RelPermalink }}" /> -->
|
||||
|
||||
<style type="text/css">{{$styles.Content | safeCSS}}</style>
|
||||
Reference in New Issue
Block a user