Init
This commit is contained in:
25
themes/agico-hugo/layouts/partials/components/accordion.html
Executable file
25
themes/agico-hugo/layouts/partials/components/accordion.html
Executable file
@@ -0,0 +1,25 @@
|
||||
{{ $title:= .Title }}
|
||||
{{ $content:= .Content }}
|
||||
{{ $class:= .Class }}
|
||||
{{ $headerClass:= .HeaderClass }}
|
||||
{{ $bodyClass:= .BodyClass }}
|
||||
|
||||
|
||||
<div class="accordion {{ $class }}">
|
||||
<button class="accordion-header {{ $headerClass }}" data-accordion>
|
||||
{{ $title | markdownify }}
|
||||
<svg
|
||||
class="accordion-icon"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 512 512"
|
||||
xmlspace="preserve">
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M505.755,123.592c-8.341-8.341-21.824-8.341-30.165,0L256.005,343.176L36.421,123.592c-8.341-8.341-21.824-8.341-30.165,0 s-8.341,21.824,0,30.165l234.667,234.667c4.16,4.16,9.621,6.251,15.083,6.251c5.462,0,10.923-2.091,15.083-6.251l234.667-234.667 C514.096,145.416,514.096,131.933,505.755,123.592z"></path>
|
||||
</svg>
|
||||
</button>
|
||||
<div class="accordion-content {{ $bodyClass }}">
|
||||
<p>{{ $content | markdownify }}</p>
|
||||
</div>
|
||||
</div>
|
||||
33
themes/agico-hugo/layouts/partials/components/page-header.html
Executable file
33
themes/agico-hugo/layouts/partials/components/page-header.html
Executable file
@@ -0,0 +1,33 @@
|
||||
{{ "<!-- page-header -->" | safeHTML }}
|
||||
<section class="page-title page-title-overlay bg-cover" {{ partial `bg-image.html` (dict `Src` .Params.page_header_image
|
||||
) | safeHTMLAttr }}>
|
||||
<div>
|
||||
<div class="container">
|
||||
<div class="row" data-aos="fade-in" data-aos-delay="1">
|
||||
<div class="col-lg-7">
|
||||
<h1 class="text-white position-relative">{{ .Title }}<span class="watermark-sm">{{ .Params.Watermark
|
||||
}}</span>
|
||||
</h1>
|
||||
{{ with .Params.Description }}<p class="text-white pt-4">{{ . | markdownify }}</p>{{ end }}
|
||||
</div>
|
||||
<!-- <div class="col-lg-3 ms-auto align-self-end">
|
||||
<nav class="position-relative zindex-1" aria-label="breadcrumb">
|
||||
<ol class="breadcrumb justify-content-sm-end bg-transparent">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ .Site.BaseURL | relLangURL }}" class="text-white">{{ with .Site.Params.Home }} {{ . }} {{
|
||||
end
|
||||
}}</a>
|
||||
</li>
|
||||
{{ if or (eq .Section "post") (eq .Section "blog") (eq .Section "career") }}
|
||||
<li class="breadcrumb-item text-white" aria-current="page">{{ .Params.watermark }}</li>
|
||||
{{ else }}
|
||||
<li class="breadcrumb-item text-white" aria-current="page">{{ .Title }}</li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
</nav>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ "<!-- /page-header -->" | safeHTML }}
|
||||
33
themes/agico-hugo/layouts/partials/components/services.html
Executable file
33
themes/agico-hugo/layouts/partials/components/services.html
Executable file
@@ -0,0 +1,33 @@
|
||||
{{"<!-- service -->" | safeHTML }}
|
||||
{{ with .Params.service }}
|
||||
{{ if .enable }}
|
||||
<section class="section pb-0" id="services">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-10 mx-auto pe-md-4">
|
||||
<h2 class="section-title" data-aos="fade-up">{{ .title }}</h2>
|
||||
<p class="subtitle pb-4" data-aos="fade-up" data-aos-delay="200">{{ .subtitle | markdownify }}</p>
|
||||
</div>
|
||||
{{ range $index, $element:= .service_item }}
|
||||
{{ $delay := mul $index 100 }}
|
||||
<div class="col-xl-4 col-lg-6 col-md-6 mb-4" data-aos="fade-up" data-aos-delay="{{$delay}}">
|
||||
<div class="card border-0 shadow rounded-xs py-3 px-2 text-center hover-bg-primary">
|
||||
<div class="card-body">
|
||||
<i class="icon-lg icon-{{ .icon_color }} icon-bg-{{ .icon_color }} icon-bg-circle mb-3">
|
||||
<i class="{{ .icon }}"></i>
|
||||
</i>
|
||||
<h3 class="mt-4 mb-3">{{ .title }}</h3>
|
||||
<p>{{ .content | markdownify }}</p>
|
||||
{{ if .link }}
|
||||
<a class="btn btn-sm btn-outline-primary px-4" href="{{ .link }}"><i class="fas fa-sm fa-info-circle"></i>{{ i18n "more_info" }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{"<!-- service -->" | safeHTML }}
|
||||
53
themes/agico-hugo/layouts/partials/components/sidebar.html
Executable file
53
themes/agico-hugo/layouts/partials/components/sidebar.html
Executable file
@@ -0,0 +1,53 @@
|
||||
<div class="col-lg-4">
|
||||
<div class="rounded-sm shadow bg-white pb-4">
|
||||
<div class="widget">
|
||||
<form action="{{ `search`| relLangURL }}">
|
||||
<div class="position-relative">
|
||||
<input id="search-query" name="s" type="search" placeholder="{{ i18n "search" }}"
|
||||
class="border-bottom form-control rounded-0 px-0">
|
||||
<button class="search-btn" type="submit"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="widget">
|
||||
<h5>{{ i18n "category" }}</h5>
|
||||
{{- if isset .Site.Taxonomies "categories" }}
|
||||
{{- if not (eq (len .Site.Taxonomies.categories) 0) }}
|
||||
<ul class="list-styled list-bordered">
|
||||
{{- range $name, $items := .Site.Taxonomies.categories }}
|
||||
<li><a class="text-color d-inline-block py-2"
|
||||
href="{{ `categories/` | relLangURL }}{{ $name | urlize | lower }}">{{ $name | title | humanize }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
<div class="widget">
|
||||
<h5>{{ i18n "latest_article" }}</h5>
|
||||
<ul class="list-unstyled list-bordered">
|
||||
{{ range first 3 (where site.RegularPages "Section" "in" site.Params.mainSections ) }}
|
||||
<li class="article py-3">
|
||||
{{ partial "image.html" (dict "Src" .Params.Image "Alt" "post-thumb" "Class" `object-fit-cover rounded me-3` "Size" "200x") }}
|
||||
<div class="media-body d-inline-block">
|
||||
<h5 class="h6 mt-0"><a href="{{ .Permalink }}" class="text-dark">{{ .Title }}</a></h5>
|
||||
<p class="mb-0 text-color">{{ .PublishDate.Format "Jan 02, 2006" }}</p>
|
||||
</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="widget">
|
||||
<h5>{{ i18n "tags" }}</h5>
|
||||
{{- if isset .Site.Taxonomies "tags" }}
|
||||
{{- if not (eq (len .Site.Taxonomies.tags) 0) }}
|
||||
<ul class="list-inline tag-list mt-4">
|
||||
{{- range $name, $items := .Site.Taxonomies.tags }}
|
||||
<li class="list-inline-item mb-3"><a href="{{ `tags/` | relLangURL }}{{ $name | urlize | lower }}"
|
||||
class="text-color shadow-sm">{{ $name | humanize }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
27
themes/agico-hugo/layouts/partials/components/subscription.html
Executable file
27
themes/agico-hugo/layouts/partials/components/subscription.html
Executable file
@@ -0,0 +1,27 @@
|
||||
{{"<!-- subscription -->" | safeHTML }}
|
||||
{{ if .Site.Params.subscription.enable }}
|
||||
{{ with .Site.Params.subscription }}
|
||||
<section class="subscription">
|
||||
<div class="container my-4">
|
||||
<div class="subscription-wrapper col-lg-10 align-items-center mx-auto">
|
||||
<div class="d-flex position-relative mx-5 justify-content-between align-items-center flex-column flex-md-row text-md-left">
|
||||
<h4 class="text-white flex-fill">{{ i18n "subscribe_newsletter" | safeHTML }}</h4>
|
||||
<form action="{{ .mailchimp_form_action }}" method="post"
|
||||
name="mc-embedded-subscribe-form" target="_blank" novalidate class="row flex-fill">
|
||||
<div class="col-lg-7 my-md-2 my-2">
|
||||
<input type="email" class="form-control text-white px-4 border-0 w-100 text-center text-md-left" placeholder="{{ i18n "your_email" }}" name="EMAIL" required>
|
||||
</div>
|
||||
<div class="col-lg-5 my-md-2 my-2">
|
||||
<button type="submit" name="subscribe" class="btn btn-outline-white text-white border-0 w-100">{{ i18n "subscribe_now" | safeHTML }}</button>
|
||||
<div style="position: absolute; left: -5000px;" aria-hidden="true">
|
||||
<input type="text" name="{{ .mailchimp_form_name }}" tabindex="-1">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{"<!-- /subscription -->" | safeHTML }}
|
||||
60
themes/agico-hugo/layouts/partials/essential/footer.html
Executable file
60
themes/agico-hugo/layouts/partials/essential/footer.html
Executable file
@@ -0,0 +1,60 @@
|
||||
{{"<!-- footer part start -->" | safeHTML }}
|
||||
<footer class="bg-gradient-primary pt-5">
|
||||
<div class="section">
|
||||
<div class="container">
|
||||
<div class="row justify-content-between">
|
||||
<div class="col-md-5 mb-4 mb-md-0">
|
||||
<a href="{{ site.BaseURL | relLangURL }}" class="mb-4 d-inline-block">
|
||||
{{ partial "logo.html" (dict "Alt" site.Title)}}
|
||||
</a>
|
||||
<p class="text-white mb-2">{{ site.Params.footer_content | markdownify }}</p>
|
||||
<ul class="list-inline social-icons">
|
||||
{{ range site.Params.social }}
|
||||
<li class="list-inline-item"><a href="{{ .link | safeURL }}"><i class="{{ .icon }}"></i> <span class="screen-reader-text">{{.title}}</span></a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<h4 class="text-white mb-4">{{ i18n "quick_links" }}</h4>
|
||||
<ul class="list-unstyled list-hover-underline">
|
||||
{{ range site.Menus.footer }}
|
||||
<li class="mb-2 text-white"><a href="{{ .URL | relLangURL }}" class="text-white">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-4 col-sm-6">
|
||||
<h4 class="text-white mb-4">{{ i18n "contact_info"}}</h4>
|
||||
<ul class="list-unstyled">
|
||||
<li class="mb-2 text-white"><b>Tel:</b> <a href="tel:{{site.Params.contact_info.mobile}}">{{site.Params.contact_info.mobile | safeHTML }}</a></li>
|
||||
<li class="mb-2 text-white"><b>E-mail:</b> <a href="mailto:{{site.Params.contact_info.email}}">{{site.Params.contact_info.email | safeHTML }}</a></li>
|
||||
<li class="mb-2 text-white">{{site.Params.contact_info.address | safeHTML }}</li>
|
||||
<li class="mb-2 text-white"><b>KvK:</b> {{site.Params.contact_info.kvk | safeHTML }}</li>
|
||||
<li class="mb-2 text-white"><b>BTW:</b> {{site.Params.contact_info.btw | safeHTML }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{" <!-- footer part end -->" | safeHTML }}
|
||||
|
||||
{{" <!-- copyright part start -->" | safeHTML }}
|
||||
<div class="py-4">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 text-center">
|
||||
<p class="mb-0 text-white copyright">
|
||||
{{ site.Params.copyright | markdownify }}
|
||||
{{ if site.Params.theme_copyright }}
|
||||
{{ end }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{" <!-- copyright part end -->" | safeHTML }}
|
||||
</footer>
|
||||
|
||||
{{ "<!-- Google Map API -->" | safeHTML }}
|
||||
{{ with site.Params.map.gmap_api }}
|
||||
<script src="{{ . | safeURL }}"></script>
|
||||
{{ end }}
|
||||
57
themes/agico-hugo/layouts/partials/essential/head.html
Executable file
57
themes/agico-hugo/layouts/partials/essential/head.html
Executable file
@@ -0,0 +1,57 @@
|
||||
<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="StartIT" />
|
||||
|
||||
<!-- 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" . }} -->
|
||||
|
||||
|
||||
<!-- Counter Analytics -->
|
||||
<!-- {{ partialCached "counter-analytics.html" . }} -->
|
||||
|
||||
|
||||
<!-- Crisp Chat -->
|
||||
{{ partialCached "crisp-chat.html" . }}
|
||||
|
||||
<!-- Plausible -->
|
||||
<script defer data-domain="start-it.nl" src="https://stats.start-it.nl/js/script.file-downloads.outbound-links.tagged-events.js" preconnect></script>
|
||||
88
themes/agico-hugo/layouts/partials/essential/header.html
Executable file
88
themes/agico-hugo/layouts/partials/essential/header.html
Executable file
@@ -0,0 +1,88 @@
|
||||
{{"<!-- navigation -->" | safeHTML }}
|
||||
<div class="navigation fixed-top transition">
|
||||
<div class="container">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark p-0">
|
||||
<a class="navbar-brand p-0" href="{{ .Site.BaseURL | relLangURL }}">
|
||||
{{ partial "logo.html" (dict "Alt" .Site.Title)}}
|
||||
</a>
|
||||
<button class="navbar-toggler border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navigation"
|
||||
aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<i class="fa fa-bars"></i>
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navigation">
|
||||
<ul class="navbar-nav ml-auto m-2">
|
||||
<!-- <li class="nav-item">
|
||||
<a class="nav-link text-white text-capitalize" href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Params.Home
|
||||
}}</a>
|
||||
</li> -->
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if .HasChildren }}
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link text-white text-capitalize dropdown-toggle" href="#" role="button"
|
||||
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ .Name }}
|
||||
</a>
|
||||
<div class="dropdown-menu">
|
||||
{{ range .Children }}
|
||||
<a class="dropdown-item text-color" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-white text-capitalize" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
</ul>
|
||||
|
||||
{{ if .Site.Params.navigation_button.enable }}
|
||||
{{ "<!-- get start btn -->" | safeHTML }}
|
||||
<a href="{{ .Site.Params.navigation_button.link | absURL }}"
|
||||
class="btn btn-white btn-sm text-white small bg-white me-2">{{ .Site.Params.navigation_button.label }}</a>
|
||||
{{ end }}
|
||||
|
||||
<!-- Language List -->
|
||||
{{ if .IsTranslated }}
|
||||
<div class="dropdown">
|
||||
<a class="dropdown-toggle d-inline-flex align-items-center"
|
||||
type="button"
|
||||
id="langDropdown"
|
||||
data-bs-toggle="dropdown"
|
||||
aria-expanded="false"
|
||||
aria-label="">
|
||||
<i class="fa-solid fa-language me-2" aria-hidden="true"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-lang dropdown-menu-end" aria-labelledby="langDropdown">
|
||||
{{ $siteLanguages := .Site.Languages }}
|
||||
{{ $pageLang := .Page.Lang }}
|
||||
{{ range .Page.AllTranslations }}
|
||||
{{ $translation := . }}
|
||||
{{ range $siteLanguages }}
|
||||
{{ if eq $translation.Lang .Lang }}
|
||||
<li>
|
||||
<a class="dropdown-item {{ if eq $pageLang .Lang }}active{{ end }}"
|
||||
rel="alternate"
|
||||
hreflang="{{ .Lang }}"
|
||||
lang="{{ .Lang }}"
|
||||
href="{{ $translation.Permalink }}">
|
||||
{{ .LanguageName }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
{{"<!-- nav part end -->" | safeHTML }}
|
||||
49
themes/agico-hugo/layouts/partials/essential/script.html
Normal file
49
themes/agico-hugo/layouts/partials/essential/script.html
Normal file
@@ -0,0 +1,49 @@
|
||||
<!-- 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 }}
|
||||
|
||||
<!-- search script -->
|
||||
{{ if site.Params.search }}
|
||||
{{ $scripts = $scripts | append (resources.Get "plugins/search/fuse.min.js" ) }}
|
||||
{{ $scripts = $scripts | append (resources.Get "plugins/search/search.js" ) }}
|
||||
{{ 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>
|
||||
|
||||
|
||||
<!-- progressive web app -->
|
||||
{{ partialCached "pwa.html" . }}
|
||||
|
||||
|
||||
<!-- cookie consent -->
|
||||
{{ partialCached "cookie-consent.html" . }}
|
||||
|
||||
|
||||
<!-- google adsense -->
|
||||
<!-- {{ partialCached "adsense-script.html" . }} -->
|
||||
53
themes/agico-hugo/layouts/partials/essential/style.html
Normal file
53
themes/agico-hugo/layouts/partials/essential/style.html
Normal file
@@ -0,0 +1,53 @@
|
||||
<!-- DNS preconnect -->
|
||||
<meta http-equiv="x-dns-prefetch-control" content="on" />
|
||||
|
||||
<link rel="preconnect" href="https://use.fontawesome.com" crossorigin />
|
||||
<link rel="preconnect" href="//cdnjs.cloudflare.com" />
|
||||
<link rel="dns-prefetch" href="https://use.fontawesome.com" />
|
||||
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com" />
|
||||
<link rel="preload" href="/fonts/WorkSans-Regular.woff2" as="font" type="font/woff2" crossorigin>
|
||||
|
||||
|
||||
<!--
|
||||
<link rel="dns-prefetch" href="//www.googletagmanager.com" />
|
||||
<link rel="dns-prefetch" href="//www.google-analytics.com" />
|
||||
<link rel="preconnect" href="//ajax.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous" />
|
||||
<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="//ajax.googleapis.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>
|
||||
102
themes/agico-hugo/layouts/partials/page-transition.html
Normal file
102
themes/agico-hugo/layouts/partials/page-transition.html
Normal file
@@ -0,0 +1,102 @@
|
||||
<style>
|
||||
:root{
|
||||
--wipe-duration: .25s;
|
||||
--wipe-ease: cubic-bezier(.22,.61,.36,1);
|
||||
--wipe-color: #207495;
|
||||
}
|
||||
|
||||
.wipe-overlay{
|
||||
position: fixed; inset: 0;
|
||||
background: var(--wipe-color);
|
||||
z-index: 2147483647;
|
||||
pointer-events: none;
|
||||
transform: translateY(0);
|
||||
transition: transform var(--wipe-duration) ease-in-out;
|
||||
}
|
||||
|
||||
.wipe-overlay.no-trans{ transition: none; }
|
||||
.wipe-overlay.is-revealing{ transform: translateY(100%); }
|
||||
|
||||
.wipe-overlay.pre-enter{ transform: translateY(-100%); }
|
||||
.wipe-overlay.is-covering{ transform: translateY(0); }
|
||||
|
||||
.wipe-overlay{ box-shadow: 0 2px 0 rgba(0,0,0,.03); }
|
||||
|
||||
@media (prefers-reduced-motion: reduce){
|
||||
.wipe-overlay{ transition: none !important; transform: translateY(100%) !important; }
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="wipe-overlay no-trans" id="wipe"></div>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
var wipe = document.getElementById('wipe');
|
||||
if (!wipe) return;
|
||||
|
||||
function startReveal(){
|
||||
wipe.classList.remove('no-trans');
|
||||
requestAnimationFrame(function(){
|
||||
wipe.classList.add('is-revealing');
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener('pageshow', function () {
|
||||
wipe.classList.add('no-trans');
|
||||
wipe.classList.remove('pre-enter','is-covering','is-revealing');
|
||||
requestAnimationFrame(startReveal);
|
||||
});
|
||||
|
||||
function normPath(p){
|
||||
if (!p) return '/';
|
||||
p = p.replace(/\/index\.html?$/i, '/').replace(/\/+$/,'/');
|
||||
return p || '/';
|
||||
}
|
||||
|
||||
document.addEventListener('click', function (e) {
|
||||
if (e.defaultPrevented) return;
|
||||
|
||||
var a = e.target.closest && e.target.closest('a');
|
||||
if (!a) return;
|
||||
|
||||
var here = new URL(window.location.href);
|
||||
var url = new URL(a.href, here);
|
||||
|
||||
// Zelfde origin?
|
||||
if (url.origin !== here.origin) return;
|
||||
// Modifier keys -> laat browser z'n ding doen
|
||||
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
|
||||
// Nieuwe tab / download -> niet wipen
|
||||
if (a.target === '_blank' || a.hasAttribute('download')) return;
|
||||
|
||||
// >>> ENIGE VOORWAARDE OM TE WIPEN:
|
||||
// alleen als pad of query anders is (hash telt NIET mee)
|
||||
var samePath = normPath(url.pathname) === normPath(here.pathname);
|
||||
var sameSearch = url.search === here.search;
|
||||
|
||||
if (samePath && sameSearch) {
|
||||
// zelfde document (incl. http://localhost:1313/#) -> GEEN wipe
|
||||
return;
|
||||
}
|
||||
|
||||
// echte navigatie -> wipe + ga
|
||||
e.preventDefault();
|
||||
|
||||
wipe.classList.add('no-trans');
|
||||
wipe.classList.remove('is-revealing','is-covering');
|
||||
wipe.classList.add('pre-enter');
|
||||
void wipe.offsetHeight;
|
||||
|
||||
wipe.classList.remove('no-trans');
|
||||
wipe.classList.remove('pre-enter');
|
||||
wipe.classList.add('is-covering');
|
||||
|
||||
var go = function () {
|
||||
wipe.removeEventListener('transitionend', go);
|
||||
window.location.href = a.href;
|
||||
};
|
||||
wipe.addEventListener('transitionend', go);
|
||||
}, { capture: true });
|
||||
})();
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user