init
This commit is contained in:
commit
e3c43e06ff
120 changed files with 16894 additions and 0 deletions
23
themes/hugoplate/layouts/404.html
Executable file
23
themes/hugoplate/layouts/404.html
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
{{ define "main" }}
|
||||
<section class="section-sm text-center">
|
||||
<div class="container">
|
||||
<div class="row justify-center">
|
||||
<div class="sm:col-10 md:col-8 lg:col-6">
|
||||
<span class="text-[8rem] block font-bold text-dark "> 404 </span>
|
||||
<h1 class="h2 mb-4">Page not found</h1>
|
||||
<div class="content">
|
||||
<p>
|
||||
The page you are looking for might have been removed, had its name
|
||||
changed, or is temporarily unavailable.
|
||||
</p>
|
||||
</div>
|
||||
<a
|
||||
href="{{ site.BaseURL | relLangURL }}"
|
||||
class="btn btn-primary mt-8">
|
||||
Back to home
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
50
themes/hugoplate/layouts/_default/baseof.html
Executable file
50
themes/hugoplate/layouts/_default/baseof.html
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
<!doctype html>
|
||||
<html
|
||||
itemscope
|
||||
class="{{- if not site.Params.theme_switcher -}}
|
||||
{{- site.Params.theme_default -}}
|
||||
{{- end -}}"
|
||||
lang="{{ site.LanguageCode | default `en-US` }}"
|
||||
itemtype="http://schema.org/WebPage">
|
||||
<head>
|
||||
<!-- head (don't cache it) -->
|
||||
{{ partial "essentials/head.html" . }}
|
||||
|
||||
|
||||
<!-- style (always cache it) -->
|
||||
{{ partialCached "essentials/style.html" . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- cache partial only in production -->
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ partialCached "preloader.html" . }}
|
||||
{{ partialCached "gtm-noscript.html" . }}
|
||||
{{ else }}
|
||||
{{ partial "preloader.html" . }}
|
||||
|
||||
|
||||
<!-- tailwind size indicator -->
|
||||
{{ partial "components/tw-size-indicator.html" . }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<!-- header (don't cache it) -->
|
||||
{{ partial "essentials/header.html" . }}
|
||||
{{ partial "search-modal.html" (dict "Context" . ) }}
|
||||
|
||||
|
||||
<main>
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
|
||||
<!-- cache partial only in production -->
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ partialCached "essentials/footer.html" . }}
|
||||
{{ partialCached "essentials/script.html" . }}
|
||||
{{ else }}
|
||||
{{ partial "essentials/footer.html" . }}
|
||||
{{ partial "essentials/script.html" . }}
|
||||
{{ end }}
|
||||
</body>
|
||||
</html>
|
||||
18
themes/hugoplate/layouts/_default/list.html
Executable file
18
themes/hugoplate/layouts/_default/list.html
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "page-header" . }}
|
||||
|
||||
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<ul class="text-center">
|
||||
{{ range .RegularPages }}
|
||||
<li class="m-3">
|
||||
<a href="{{ .Permalink }}" class="text-dark block text-xl">
|
||||
{{ .Title }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
16
themes/hugoplate/layouts/_default/single.html
Executable file
16
themes/hugoplate/layouts/_default/single.html
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "page-header" . }}
|
||||
|
||||
|
||||
<section class="section-sm">
|
||||
<div class="container">
|
||||
<div class="row justify-center">
|
||||
<div class="lg:col-10">
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
21
themes/hugoplate/layouts/_default/taxonomy.html
Executable file
21
themes/hugoplate/layouts/_default/taxonomy.html
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "page-header" . }}
|
||||
|
||||
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<div class="row gx-5">
|
||||
<!-- blog posts -->
|
||||
<div class="lg:col-8">
|
||||
<div class="row">
|
||||
{{ range .Data.Pages }}
|
||||
<div class="md:col-6 mb-14">
|
||||
{{ partial "components/blog-card" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
41
themes/hugoplate/layouts/_default/terms.html
Executable file
41
themes/hugoplate/layouts/_default/terms.html
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "page-header" . }}
|
||||
|
||||
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<ul class="text-center">
|
||||
{{/* categories */}}
|
||||
{{ if eq .Permalink (`categories/` | absLangURL) }}
|
||||
{{ range site.Taxonomies.categories.ByCount }}
|
||||
<li class="m-3 inline-block">
|
||||
<a
|
||||
href="{{ .Page.Permalink }}"
|
||||
class="bg-theme-light text-dark block rounded px-4 py-2 text-xl">
|
||||
{{ .Page.Title }}
|
||||
<span class="bg-body ml-2 rounded px-2">
|
||||
{{ .Count }}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{/* tags */}}
|
||||
{{ if eq .Permalink (`tags/` | absLangURL) }}
|
||||
{{ range site.Taxonomies.tags.ByCount }}
|
||||
<li class="m-3 inline-block">
|
||||
<a
|
||||
href="{{ .Page.Permalink }}"
|
||||
class="bg-theme-light text-dark block rounded px-4 py-2 text-xl">
|
||||
{{ .Page.Title }}
|
||||
<span class="bg-body ml-2 rounded px-2">
|
||||
{{ .Count }}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
13
themes/hugoplate/layouts/about/list.html
Normal file
13
themes/hugoplate/layouts/about/list.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{{ define "main" }}
|
||||
<section class="section-sm">
|
||||
<div class="container">
|
||||
<div class="row justify-center">
|
||||
<div class="md:col-10 lg:col-7 text-center">
|
||||
{{ partial "image" (dict "Src" .Params.image "Alt" .Title "Class" "mx-auto mb-6" "Size" "200x200") }}
|
||||
<h2 class="h3 mb-6">{{ .Title }}</h2>
|
||||
<div class="content">{{ .Content }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
16
themes/hugoplate/layouts/authors/list.html
Normal file
16
themes/hugoplate/layouts/authors/list.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "page-header" . }}
|
||||
|
||||
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
{{ range .RegularPages }}
|
||||
<div class="md:col-6 lg:col-4 mb-14">
|
||||
{{ partial "components/author-card" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
47
themes/hugoplate/layouts/authors/single.html
Executable file
47
themes/hugoplate/layouts/authors/single.html
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
{{ define "main" }}
|
||||
<section class="section-sm pb-0">
|
||||
<div class="container">
|
||||
<div class="row border-border justify-center border-b pb-14">
|
||||
<div class="lg:col-4 text-center">
|
||||
{{ $image:= .Params.image }}
|
||||
{{ if $image }}
|
||||
{{ partial "image" (dict "Src" $image "Alt" .Title "Class" "mx-auto" "Size" "200x200") }}
|
||||
{{ else if .Params.Email }}
|
||||
<img
|
||||
class="mx-auto"
|
||||
alt="{{ .Title }}"
|
||||
height="200"
|
||||
width="200"
|
||||
src="https://www.gravatar.com/avatar/{{ md5 .Params.email }}?s=128&pg&d=identicon" />
|
||||
{{ end }}
|
||||
<h1 class="h3 mt-10">{{ .Title }}</h1>
|
||||
<div class="content mt-6">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<ul class="social-icons ml-4 mt-10 text-center">
|
||||
{{ range .Params.social }}
|
||||
<li>
|
||||
<a
|
||||
href="{{ .link | safeURL }}"
|
||||
target="_blank"
|
||||
rel="noopener nofollow">
|
||||
<span class="sr-only">{{ .title }}</span>
|
||||
<i class="{{ .icon }}"></i>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row pb-16 pt-14">
|
||||
{{ $filterByAuthor := where site.RegularPages "Params.author" "==" .Title }}
|
||||
{{ range $filterByAuthor }}
|
||||
<div class="md:col-6 lg:col-4 mb-12">
|
||||
{{ partial "components/blog-card" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
29
themes/hugoplate/layouts/blog/list.html
Normal file
29
themes/hugoplate/layouts/blog/list.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "page-header" . }}
|
||||
|
||||
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<div class="row gx-5">
|
||||
<!-- blog posts -->
|
||||
<div class="lg:col-8">
|
||||
<div class="row">
|
||||
{{ $paginator:= .Paginate .RegularPages }}
|
||||
{{ range $paginator.Pages }}
|
||||
<div class="md:col-6 mb-14">
|
||||
{{ partial "components/blog-card" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ partial "components/pagination.html" . }}
|
||||
</div>
|
||||
<!-- sidebar -->
|
||||
<div class="lg:col-4">
|
||||
<!-- widget -->
|
||||
{{ $widget:= site.Params.widgets.sidebar }}
|
||||
{{ partialCached "widgets/widget-wrapper" ( dict "Widgets" $widget "Scope" . ) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
94
themes/hugoplate/layouts/blog/single.html
Normal file
94
themes/hugoplate/layouts/blog/single.html
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
{{ define "main" }}
|
||||
<section class="section pt-7">
|
||||
<div class="container">
|
||||
<div class="row justify-center">
|
||||
<article class="lg:col-10">
|
||||
{{ $image:= .Params.image }}
|
||||
{{ if $image }}
|
||||
<div class="mb-10">
|
||||
{{ partial "image" (dict "Src" $image "Alt" .Title "Class" "w-full rounded") }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<h1 class="h2 mb-4">
|
||||
{{ .Title }}
|
||||
</h1>
|
||||
<ul class="mb-4">
|
||||
<li class="mr-4 inline-block">
|
||||
<a
|
||||
href="{{ `authors/` | relLangURL }}{{ .Params.Author | urlize }}/">
|
||||
<i class="fa-regular fa-circle-user mr-2"></i
|
||||
>{{ .Params.author }}
|
||||
</a>
|
||||
</li>
|
||||
{{ $categories:= .Params.categories }}
|
||||
{{ if $categories }}
|
||||
<li class="mr-4 inline-block">
|
||||
<i class="fa-regular fa-folder mr-2"></i>
|
||||
{{ range $i,$p:= $categories }}
|
||||
<a
|
||||
href="{{ `categories/` | relLangURL }}{{ . | urlize | lower }}/"
|
||||
class=""
|
||||
>{{ . | humanize }}{{ if ne $i (sub (len $categories) 1) }}
|
||||
{{ "," }}
|
||||
{{ end }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
<li class="mr-4 inline-block">
|
||||
<i class="fa-regular fa-clock mr-2"></i>
|
||||
{{ time.Format ":date_long" .PublishDate }}
|
||||
</li>
|
||||
</ul>
|
||||
<div class="content mb-10">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<div class="row items-start justify-between">
|
||||
{{ $tags:= .Params.tags }}
|
||||
{{ if $tags }}
|
||||
<div class="lg:col-5 mb-10 flex items-center lg:mb-0">
|
||||
<h5 class="mr-3">{{ i18n "tags" }} :</h5>
|
||||
<ul>
|
||||
{{ range $i,$p:= $tags }}
|
||||
<li class="inline-block">
|
||||
<a
|
||||
class="bg-theme-light hover:bg-primary m-1 block rounded px-3 py-1 hover:text-white"
|
||||
href="{{ `tags/` | relLangURL }}{{ . | urlize | lower }}/">
|
||||
{{ . | humanize }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="lg:col-4 flex items-center">
|
||||
{{ partial "social-share" (dict "Context" . "Class" "share-icons" "Title" (i18n "share") "Whatsapp" false "Telegram" false "Linkedin" false "Pinterest" false "Tumblr" false "Vk" false) }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- comments -->
|
||||
{{ if site.Config.Services.Disqus.Shortname }}
|
||||
<div class="mt-20">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<!-- Related posts -->
|
||||
{{ $related := (where site.RegularPages "Section" "in" site.Params.mainSections) | intersect (where site.RegularPages ".Title" "!=" .Title) | union (site.RegularPages.Related . ) }}
|
||||
{{ $related = $related | shuffle | first 3 }}
|
||||
{{ with $related }}
|
||||
<div class="section pb-0">
|
||||
<h2 class="h3 mb-12">{{ i18n "related_posts" }}</h2>
|
||||
<div class="row">
|
||||
{{ range . }}
|
||||
<div class="lg:col-4">
|
||||
{{ partial "components/blog-card" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
120
themes/hugoplate/layouts/contact/list.html
Executable file
120
themes/hugoplate/layouts/contact/list.html
Executable file
|
|
@ -0,0 +1,120 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "page-header" . }}
|
||||
|
||||
|
||||
<section class="section-sm">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="md:col-10 lg:col-6 mx-auto">
|
||||
<form action="{{ site.Params.contact_form_action }}" method="POST">
|
||||
<div class="mb-6">
|
||||
<label for="name" class="form-label">
|
||||
Full Name <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<input
|
||||
id="name"
|
||||
name="name"
|
||||
class="form-input"
|
||||
placeholder="John Doe"
|
||||
type="text" />
|
||||
</div>
|
||||
<div class="mb-6">
|
||||
<label for="email" class="form-label">
|
||||
Working Mail <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<input
|
||||
id="email"
|
||||
name="email"
|
||||
class="form-input"
|
||||
placeholder="john.doe@email.com"
|
||||
type="email" />
|
||||
</div>
|
||||
<div class="mb-6">
|
||||
<label for="message" class="form-label">
|
||||
Anything else? <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<textarea
|
||||
id="message"
|
||||
name="message"
|
||||
class="form-input"
|
||||
placeholder="Message goes here..."
|
||||
rows="8"></textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- google map -->
|
||||
{{ with site.Params.google_map }}
|
||||
{{ if .enable }}
|
||||
<div
|
||||
id="map"
|
||||
style="height: 400px;"
|
||||
data-latitude="{{ .map_latitude }}"
|
||||
data-longitude="{{ .map_longitude }}"
|
||||
data-marker="{{ .map_marker | relURL }}"
|
||||
data-marker-name="{{ site.Title }}"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with site.Params.subscription }}
|
||||
{{ if .enable }}
|
||||
<!-- subscription form -->
|
||||
<form
|
||||
action="{{ .mailchimp_form_action | safeURL }}"
|
||||
method="post"
|
||||
id="mc-embedded-subscribe-form"
|
||||
novalidate="novalidate">
|
||||
<div class="input-group w-75 mx-auto mb-3">
|
||||
<input
|
||||
type="email"
|
||||
name="EMAIL"
|
||||
placeholder="Email"
|
||||
class="form-control required email mce_inline_error"
|
||||
id="mce-EMAIL"
|
||||
aria-required="true"
|
||||
autocomplete="off"
|
||||
required />
|
||||
<button
|
||||
class="input-group-text"
|
||||
name="subscribe"
|
||||
id="mc-embedded-subscribe">
|
||||
{{ .button_label }}
|
||||
</button>
|
||||
</div>
|
||||
<input
|
||||
type="hidden"
|
||||
name="EMAILTYPE"
|
||||
id="mce-EMAILTYPE-0"
|
||||
value="html" />
|
||||
<div style="position:absolute;left:-5000px" aria-hidden="true">
|
||||
<input type="text" name="{{ .name }}" tabindex="-1" />
|
||||
</div>
|
||||
</form>
|
||||
<div id="mce-responses" class="clear">
|
||||
<div
|
||||
class="response text-white"
|
||||
id="mce-error-response"
|
||||
style="display:none"></div>
|
||||
<div
|
||||
class="response text-white"
|
||||
id="mce-success-response"
|
||||
style="display:none"></div>
|
||||
</div>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js"></script>
|
||||
<!-- /subscription form -->
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if site.Params.google_map.enable }}
|
||||
{{ $gmap:= resources.Get "plugins/maps/google-map.js" }}
|
||||
<script defer src="{{ $gmap.RelPermalink }}"></script>
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key={{ site.Params.google_map.map_api_key }}&libraries=places"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
143
themes/hugoplate/layouts/index.html
Executable file
143
themes/hugoplate/layouts/index.html
Executable file
|
|
@ -0,0 +1,143 @@
|
|||
{{ define "main" }}
|
||||
<!-- Banner -->
|
||||
{{ with .Params.banner }}
|
||||
<section class="section pt-14">
|
||||
<div class="container">
|
||||
<div class="row justify-center">
|
||||
<div class="lg:col-7 md:col-9 mb-8 text-center">
|
||||
<h1 class="mb-4 text-h3 lg:text-h1">
|
||||
{{ .title | markdownify }}
|
||||
</h1>
|
||||
<p class="mb-8">
|
||||
{{ .content | markdownify }}
|
||||
</p>
|
||||
{{ with .button }}
|
||||
{{ if .enable }}
|
||||
<a
|
||||
class="btn btn-primary"
|
||||
href="{{ .link | absURL }}"
|
||||
{{ if strings.HasPrefix .link `http` }}
|
||||
target="_blank" rel="noopener"
|
||||
{{ end }}>
|
||||
{{ .label }}
|
||||
<i class="fa fa-arrow-right pl-2"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="col-12">
|
||||
{{ partial "image" (dict "Src" .image "Alt" "Banner image" "Loading" "eager" "Class" "mx-auto lg:!max-w-[800px]" "DisplayXL" "800x" ) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
<!-- /Banner -->
|
||||
|
||||
<!-- Features -->
|
||||
{{ range $i, $e:= .Params.features }}
|
||||
<section class="section-sm {{ if (modBool $i 2) }}bg-gradient{{ end }}">
|
||||
<div class="container">
|
||||
<div class="row items-center justify-between">
|
||||
<div
|
||||
class="mb:md-0 {{ if not (modBool $i 2) }}
|
||||
md:order-2
|
||||
{{ end }} md:col-5 mb-6">
|
||||
{{ partial "image" (dict "Src" .image "Alt" "feature image" "DisplayXL" "520x" "DisplayLG" "425x" "DisplayMD" "360x") }}
|
||||
</div>
|
||||
<div
|
||||
class="{{ if not (modBool $i 2) }}
|
||||
md:order-1
|
||||
{{ end }} md:col-7 lg:col-6">
|
||||
<h2 class="mb-4">
|
||||
{{ .title | markdownify }}
|
||||
</h2>
|
||||
<p class="mb-8 text-lg">
|
||||
{{ .content | markdownify }}
|
||||
</p>
|
||||
<ul>
|
||||
{{ range .bulletpoints }}
|
||||
<li class="relative mb-4 pl-6">
|
||||
<i class="fa fa-check absolute left-0 top-1.5"></i>
|
||||
{{ . | markdownify }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ with .button }}
|
||||
{{ if .enable }}
|
||||
<a class="btn btn-primary mt-6" href="{{ .link | absURL }}">
|
||||
{{ .label }}
|
||||
<i class="fa fa-arrow-right pl-2"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
<!-- /Features -->
|
||||
|
||||
<!-- Testimonials -->
|
||||
{{ with site.GetPage "sections/testimonial" }}
|
||||
{{ if .Params.enable }}
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="md:col-10 lg:col-8 xl:col-6 mx-auto mb-12 text-center">
|
||||
<h2 class="mb-4">
|
||||
{{ .Title | markdownify }}
|
||||
</h2>
|
||||
<p>
|
||||
{{ .Params.description | markdownify }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="swiper testimonial-slider">
|
||||
<div class="swiper-wrapper">
|
||||
{{ range .Params.testimonials }}
|
||||
<div class="swiper-slide">
|
||||
<div class="bg-theme-light rounded-lg px-7 py-10">
|
||||
<div class="text-dark ">
|
||||
<svg
|
||||
width="33"
|
||||
height="20"
|
||||
viewBox="0 0 33 20"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M1.28375 19.41L0.79375 18.64C1.21375 17.0067 1.75042 15.07 2.40375 12.83C3.05708 10.5433 3.75708 8.28 4.50375 6.04C5.29708 3.75333 6.06708 1.77 6.81375 0.0899959H15.3538C14.9338 2.09666 14.4904 4.26667 14.0238 6.6C13.5571 8.88666 13.1371 11.15 12.7638 13.39C12.4371 15.5833 12.1571 17.59 11.9238 19.41H1.28375ZM31.69 0.0899959L32.18 0.859998C31.76 2.54 31.2233 4.5 30.57 6.74C29.9167 8.98 29.2167 11.2433 28.47 13.53C27.7233 15.77 26.9533 17.73 26.16 19.41H17.69C18.0167 17.9167 18.3433 16.33 18.67 14.65C18.9967 12.9233 19.3 11.22 19.58 9.54C19.9067 7.81333 20.1867 6.15667 20.42 4.57C20.7 2.93666 20.91 1.44333 21.05 0.0899959H31.69Z"
|
||||
fill="currentColor" />
|
||||
</svg>
|
||||
</div>
|
||||
<blockquote class="mt-8">
|
||||
{{ .content | markdownify }}
|
||||
</blockquote>
|
||||
<div class="mt-11 flex items-center">
|
||||
<div class="text-dark ">
|
||||
{{ partial "image" (dict "Src" .avatar "Size" "50x50" "Class" "rounded-full" "Alt" .name) }}
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<h3 class="h5 font-primary font-semibold">
|
||||
{{ .name }}
|
||||
</h3>
|
||||
<p class="text-dark ">
|
||||
{{ .designation | markdownify }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div
|
||||
class="testimonial-slider-pagination mt-9 flex items-center justify-center text-center"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<!-- /Testimonials -->
|
||||
{{ end }}
|
||||
32
themes/hugoplate/layouts/partials/call-to-action.html
Normal file
32
themes/hugoplate/layouts/partials/call-to-action.html
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<!-- Call to actions -->
|
||||
{{ with site.GetPage "sections/call-to-action" }}
|
||||
{{ if .Params.enable }}
|
||||
<section class="mb-28">
|
||||
<div class="container">
|
||||
<div class="bg-theme-light rounded-xl px-4 py-16 xl:p-20">
|
||||
<div class="row items-center justify-between">
|
||||
<div class="md:col-5 lg:col-4 mb-10 md:order-2 md:mb-0">
|
||||
{{ partial "image" (dict "Src" .image "Alt" "call to action" "Class" "w-full") }}
|
||||
</div>
|
||||
<div class="md:col-7 md:order-1">
|
||||
<h2 class="mb-2">
|
||||
{{ .Title | markdownify }}
|
||||
</h2>
|
||||
<p class="mb-6">
|
||||
{{ .Params.description | markdownify }}
|
||||
</p>
|
||||
{{ with .Params.button }}
|
||||
{{ if .enable }}
|
||||
<a class="btn btn-primary" href="{{ .link | absURL }}">
|
||||
{{ .label }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<!-- /Call to actions -->
|
||||
29
themes/hugoplate/layouts/partials/components/author-card.html
Executable file
29
themes/hugoplate/layouts/partials/components/author-card.html
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
<div class="bg-theme-light rounded p-8 text-center">
|
||||
{{ $image:= .Params.image }}
|
||||
{{ if $image }}
|
||||
{{ partial "image" (dict "Src" $image "Alt" .Title "Class" "mx-auto mb-6 rounded" "size" "120x120") }}
|
||||
{{ else if .Params.Email }}
|
||||
<img
|
||||
class="mx-auto mb-6 rounded"
|
||||
alt="{{ .Title }}"
|
||||
height="120"
|
||||
width="120"
|
||||
src="https://www.gravatar.com/avatar/{{ md5 .Params.email }}?s=128&pg&d=identicon" />
|
||||
{{ end }}
|
||||
<h4 class="mb-3">
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</h4>
|
||||
<p class="mb-4">
|
||||
{{ .Summary }}
|
||||
</p>
|
||||
<ul class="social-icons">
|
||||
{{ range .Params.social }}
|
||||
<li>
|
||||
<a href="{{ .link | safeURL }}" target="_blank" rel="noopener nofollow">
|
||||
<span class="sr-only">{{ .title }}</span>
|
||||
<i class="{{ .icon }}"></i>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
37
themes/hugoplate/layouts/partials/components/blog-card.html
Normal file
37
themes/hugoplate/layouts/partials/components/blog-card.html
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<div class="bg-body ">
|
||||
{{ $image:= .Params.image }}
|
||||
{{ if $image }}
|
||||
{{ partial "image" (dict "Src" $image "Alt" .Title "Class" "mb-6 w-full rounded") }}
|
||||
{{ end }}
|
||||
<h4 class="mb-3">
|
||||
<a href="{{ .RelPermalink }}">
|
||||
{{ .Title }}
|
||||
</a>
|
||||
</h4>
|
||||
{{ $categories:= .Params.categories }}
|
||||
{{ if $categories }}
|
||||
<ul class="mb-4">
|
||||
<li class="mr-4 inline-block">
|
||||
<a href="{{ `authors/` | relLangURL }}{{ .Params.Author | urlize }}/">
|
||||
<i class="fa-regular fa-circle-user mr-2"></i>{{ .Params.author }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="mr-4 inline-block">
|
||||
<i class="fa-regular fa-folder mr-1"></i>
|
||||
{{ range $i,$p:= $categories }}
|
||||
<a
|
||||
href="{{ `categories/` | relLangURL }}{{ . | urlize | lower }}/"
|
||||
class="ms-1"
|
||||
>{{ . | humanize }}{{ if ne $i (sub (len $categories) 1) }}
|
||||
{{ "," }}
|
||||
{{ end }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</li>
|
||||
</ul>
|
||||
{{ end }}
|
||||
<p class="mb-6">{{ .Summary }}</p>
|
||||
<a class="btn btn-outline-primary btn-sm" href="{{ .RelPermalink }}">
|
||||
{{ i18n "read_more" }}
|
||||
</a>
|
||||
</div>
|
||||
28
themes/hugoplate/layouts/partials/components/breadcrumb.html
Normal file
28
themes/hugoplate/layouts/partials/components/breadcrumb.html
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{{ $context := .Context }}
|
||||
{{ $class := .Class }}
|
||||
{{ $base := site.Home.Permalink }}
|
||||
|
||||
|
||||
<ul class="{{ $class }} inline-flex space-x-1 capitalize">
|
||||
<li>
|
||||
<a class="text-primary " href="{{ $base }}">
|
||||
{{ i18n "home" | default "Home" }}
|
||||
</a>
|
||||
<span class="inlin-block mr-1">/</span>
|
||||
</li>
|
||||
{{ range $i, $e:= $context.Ancestors.Reverse }}
|
||||
{{ if and (not .IsHome) (ne .Title "Pages") }}
|
||||
<li>
|
||||
<a class="text-primary " href="{{ .RelPermalink }}">
|
||||
{{ .Title }}
|
||||
</a>
|
||||
<span class="inlin-block mr-1">/</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<li>
|
||||
<span class="text-primary ">
|
||||
{{ $context.Title }}
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<!-- Language List -->
|
||||
{{ $class := .Class }}
|
||||
{{ $context := .Context }}
|
||||
{{ $pageLang := $context.Lang }}
|
||||
{{ $base:= urls.Parse site.Home.Permalink }}
|
||||
{{ $siteLanguages := site.Home.AllTranslations }}
|
||||
{{ $pageLink := replace (replace $context.RelPermalink (add $pageLang "/") "") $base.Path "/" }}
|
||||
|
||||
{{ if $context.IsTranslated }}
|
||||
<select class="{{ $class }}" onchange="location = this.value">
|
||||
{{ range $siteLanguages }}
|
||||
{{ if eq (string $pageLang) (string .Language) }}
|
||||
<option
|
||||
id="{{ .Language }}"
|
||||
value="{{ replace (add .RelPermalink $pageLink) `//` `/` }}"
|
||||
selected>
|
||||
{{ .Language.LanguageName }}
|
||||
</option>
|
||||
{{ else }}
|
||||
<option
|
||||
id="{{ .Language }}"
|
||||
value="{{ replace (add .RelPermalink $pageLink) `//` `/` }}">
|
||||
{{ .Language.LanguageName }}
|
||||
</option>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</select>
|
||||
{{ end }}
|
||||
138
themes/hugoplate/layouts/partials/components/pagination.html
Executable file
138
themes/hugoplate/layouts/partials/components/pagination.html
Executable file
|
|
@ -0,0 +1,138 @@
|
|||
{{ $paginator := .Paginator }}
|
||||
<!-- Number of links either side of the current page. -->
|
||||
{{ $adjacent_links := 2 }}
|
||||
<!-- $max_links = ($adjacent_links * 2) + 1 -->
|
||||
{{ $max_links := (add (mul $adjacent_links 2) 1) }}
|
||||
<!-- $lower_limit = $adjacent_links + 1 -->
|
||||
{{ $lower_limit := (add $adjacent_links 1) }}
|
||||
<!-- $upper_limit = $paginator.TotalPages - $adjacent_links -->
|
||||
{{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) }}
|
||||
<!-- If there's more than one page. -->
|
||||
{{ if gt $paginator.TotalPages 1 }}
|
||||
<nav
|
||||
class="flex items-center justify-center space-x-3"
|
||||
aria-label="Pagination">
|
||||
<!-- Previous page. -->
|
||||
{{ if $paginator.HasPrev }}
|
||||
<a
|
||||
class="text-dark hover:bg-theme-light rounded px-2 py-1.5"
|
||||
href="{{ $paginator.Prev.URL }}"
|
||||
aria-label="Pagination Arrow">
|
||||
<span class="sr-only">Previous</span>
|
||||
<svg
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor"
|
||||
aria-hidden="true"
|
||||
height="30"
|
||||
width="30">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</a>
|
||||
{{ else }}
|
||||
<span class="text-light rounded px-2 py-1.5">
|
||||
<span class="sr-only">Previous</span>
|
||||
<svg
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor"
|
||||
aria-hidden="true"
|
||||
height="30"
|
||||
width="30">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
|
||||
<!-- Page numbers -->
|
||||
{{ range $paginator.Pagers }}
|
||||
{{ $.Scratch.Set "page_number_flag" false }}
|
||||
<!-- Advanced page numbers. -->
|
||||
{{ if gt $paginator.TotalPages $max_links }}
|
||||
<!-- Lower limit pages. -->
|
||||
<!-- If the user is on a page which is in the lower limit. -->
|
||||
{{ if le $paginator.PageNumber $lower_limit }}
|
||||
<!-- If the current loop page is less than max_links. -->
|
||||
{{ if le .PageNumber $max_links }}
|
||||
{{ $.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
<!-- Upper limit pages. -->
|
||||
<!-- If the user is on a page which is in the upper limit. -->
|
||||
{{ else if ge $paginator.PageNumber $upper_limit }}
|
||||
<!-- If the current loop page is greater than total pages minus $max_links -->
|
||||
{{ if gt .PageNumber (sub $paginator.TotalPages $max_links) }}
|
||||
{{ $.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
<!-- Middle pages. -->
|
||||
{{ else }}
|
||||
{{ if and ( ge .PageNumber (sub $paginator.PageNumber $adjacent_links) ) ( le .PageNumber (add $paginator.PageNumber $adjacent_links) ) }}
|
||||
{{ $.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<!-- Simple page numbers. -->
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
<!-- Output page numbers. -->
|
||||
{{ if eq ($.Scratch.Get "page_number_flag") true }}
|
||||
|
||||
{{ if eq . $paginator }}
|
||||
<span
|
||||
aria-current="page"
|
||||
class="bg-primary rounded px-4 py-2 text-white">
|
||||
{{ .PageNumber }}
|
||||
</span>
|
||||
{{ else }}
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
aria-current="page"
|
||||
class="text-dark hover:bg-theme-light rounded px-4 py-2">
|
||||
{{ .PageNumber }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<!-- Next page. -->
|
||||
{{ if $paginator.HasNext }}
|
||||
<a
|
||||
class="text-dark hover:bg-theme-light rounded px-2 py-1.5"
|
||||
href="{{ $paginator.Next.URL }}"
|
||||
aria-label="Pagination Arrow">
|
||||
<span class="sr-only">Next</span>
|
||||
<svg
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor"
|
||||
aria-hidden="true"
|
||||
height="30"
|
||||
width="30">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</a>
|
||||
{{ else }}
|
||||
<span class="text-light rounded px-2 py-1.5">
|
||||
<span class="sr-only">Next</span>
|
||||
<svg
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor"
|
||||
aria-hidden="true"
|
||||
height="30"
|
||||
width="30">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<!-- theme switcher -->
|
||||
{{ $class := .Class }}
|
||||
{{ if site.Params.theme_switcher }}
|
||||
<div class="theme-switcher {{ $class }}">
|
||||
<input id="theme-switcher" data-theme-switcher type="checkbox" />
|
||||
<label for="theme-switcher">
|
||||
<span class="sr-only">theme switcher</span>
|
||||
<span>
|
||||
<!-- sun -->
|
||||
<svg
|
||||
class="absolute left-[4px] top-[4px] z-10 opacity-100 "
|
||||
viewBox="0 0 56 56"
|
||||
fill="#fff"
|
||||
height="16"
|
||||
width="16">
|
||||
<path
|
||||
d="M30 4.6c0-1-.9-2-2-2a2 2 0 0 0-2 2v5c0 1 .9 2 2 2s2-1 2-2Zm9.6 9a2 2 0 0 0 0 2.8c.8.8 2 .8 2.9 0L46 13a2 2 0 0 0 0-2.9 2 2 0 0 0-3 0Zm-26 2.8c.7.8 2 .8 2.8 0 .8-.7.8-2 0-2.9L13 10c-.7-.7-2-.8-2.9 0-.7.8-.7 2.1 0 3ZM28 16a12 12 0 0 0-12 12 12 12 0 0 0 12 12 12 12 0 0 0 12-12 12 12 0 0 0-12-12Zm23.3 14c1.1 0 2-.9 2-2s-.9-2-2-2h-4.9a2 2 0 0 0-2 2c0 1.1 1 2 2 2ZM4.7 26a2 2 0 0 0-2 2c0 1.1.9 2 2 2h4.9c1 0 2-.9 2-2s-1-2-2-2Zm37.8 13.6a2 2 0 0 0-3 0 2 2 0 0 0 0 2.9l3.6 3.5a2 2 0 0 0 2.9 0c.8-.8.8-2.1 0-3ZM10 43.1a2 2 0 0 0 0 2.9c.8.7 2.1.8 3 0l3.4-3.5c.8-.8.8-2.1 0-2.9-.8-.8-2-.8-2.9 0Zm20 3.4c0-1.1-.9-2-2-2a2 2 0 0 0-2 2v4.9c0 1 .9 2 2 2s2-1 2-2Z" />
|
||||
</svg>
|
||||
<!-- moon -->
|
||||
<svg
|
||||
class="absolute left-[4px] top-[4px] z-10 opacity-0 "
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
height="16"
|
||||
width="16">
|
||||
<path
|
||||
fill="#000"
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M8.2 2.2c1-.4 2 .6 1.6 1.5-1 3-.4 6.4 1.8 8.7a8.4 8.4 0 0 0 8.7 1.8c1-.3 2 .5 1.5 1.5v.1a10.3 10.3 0 0 1-9.4 6.2A10.3 10.3 0 0 1 3.2 6.7c1-2 2.9-3.5 4.9-4.4Z" />
|
||||
</svg>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- theme switcher -->
|
||||
<script>
|
||||
var darkMode = {{if eq site.Params.theme_default "dark"}}true{{else}}false{{end}};
|
||||
|
||||
{{ if eq site.Params.theme_default "system" }}
|
||||
if (window.matchMedia("(prefers-color-scheme: dark)").matches){darkMode = true}
|
||||
{{ end }}
|
||||
|
||||
if (localStorage.getItem("theme") === "dark"){darkMode = true}
|
||||
else if (localStorage.getItem("theme") === "light"){darkMode = false}
|
||||
if (darkMode){document.documentElement.classList.toggle("dark")}
|
||||
var themeSwitch = document.querySelectorAll("[data-theme-switcher]");
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
[].forEach.call(themeSwitch, function (ts) {
|
||||
ts.checked = darkMode ? true : false;
|
||||
ts.addEventListener("click", () => {
|
||||
document.documentElement.classList.toggle("dark");
|
||||
localStorage.setItem(
|
||||
"theme",
|
||||
document.documentElement.classList.contains("dark") ? "dark" : "light"
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<div
|
||||
class="fixed left-0 top-0 z-50 flex w-[30px] items-center justify-center bg-gray-200 py-[2.5px] text-[12px] uppercase text-black sm:bg-red-200 md:bg-yellow-200 lg:bg-green-200 xl:bg-blue-200 2xl:bg-pink-200">
|
||||
<span class="block sm:hidden">all</span>
|
||||
<span class="hidden sm:block md:hidden">sm</span>
|
||||
<span class="hidden md:block lg:hidden">md</span>
|
||||
<span class="hidden lg:block xl:hidden">lg</span>
|
||||
<span class="hidden xl:block 2xl:hidden">xl</span>
|
||||
<span class="hidden 2xl:block">2xl</span>
|
||||
</div>
|
||||
57
themes/hugoplate/layouts/partials/essentials/footer.html
Executable file
57
themes/hugoplate/layouts/partials/essentials/footer.html
Executable file
|
|
@ -0,0 +1,57 @@
|
|||
<footer class="bg-theme-light ">
|
||||
<div class="container">
|
||||
<div class="row items-center py-10">
|
||||
<div class="lg:col-3 mb-8 text-center lg:mb-0 lg:text-left">
|
||||
<!-- navbar brand/logo -->
|
||||
<a
|
||||
class="navbar-brand inline-block"
|
||||
href="{{ site.Home.RelPermalink }}">
|
||||
{{ partial "logo" }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="lg:col-6 mb-8 text-center lg:mb-0">
|
||||
<ul>
|
||||
{{ range site.Menus.footer }}
|
||||
<li class="m-3 inline-block">
|
||||
<a
|
||||
{{ if findRE `^http` .URL }}
|
||||
target="_blank" rel="noopener"
|
||||
{{ end }}
|
||||
href="{{ if findRE `^#` .URL }}
|
||||
{{ if not $.IsHome }}
|
||||
{{ site.Home.RelPermalink }}
|
||||
{{ end }}{{ .URL }}
|
||||
{{ else }}
|
||||
{{ .URL | relLangURL }}
|
||||
{{ end }}"
|
||||
>{{ .Name }}</a
|
||||
>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="lg:col-3 mb-8 text-center lg:mb-0 lg:mt-0 lg:text-right">
|
||||
<ul class="social-icons">
|
||||
{{ range site.Data.social.main }}
|
||||
<li>
|
||||
<a
|
||||
target="_blank"
|
||||
aria-label="{{ .name }}"
|
||||
rel="nofollow noopener"
|
||||
href="{{ .link | safeURL }}">
|
||||
<i class="{{ .icon }}"></i>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="border-border border-t py-7">
|
||||
<div class="text-light container text-center">
|
||||
<p>
|
||||
{{ site.Params.copyright | markdownify }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
58
themes/hugoplate/layouts/partials/essentials/head.html
Executable file
58
themes/hugoplate/layouts/partials/essentials/head.html
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
<meta charset="utf-8" />
|
||||
|
||||
<!-- responsive meta -->
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, maximum-scale=5" />
|
||||
|
||||
<!-- theme meta -->
|
||||
<meta name="theme-name" content="hugoplate" />
|
||||
|
||||
<!-- 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 -->
|
||||
{{ if and site.Config.Services.GoogleAnalytics.ID (ne site.Config.Services.GoogleAnalytics.ID "G-MEASUREMENT_ID") }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<!-- google tag manager -->
|
||||
{{ partialCached "gtm.html" . }}
|
||||
|
||||
|
||||
<!-- search index -->
|
||||
{{ partial "search-index.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" . }} */}}
|
||||
135
themes/hugoplate/layouts/partials/essentials/header.html
Executable file
135
themes/hugoplate/layouts/partials/essentials/header.html
Executable file
|
|
@ -0,0 +1,135 @@
|
|||
<header
|
||||
class="header {{ if site.Params.navbar_fixed }}sticky top-0{{ end }} z-30">
|
||||
<nav class="navbar container">
|
||||
<!-- logo -->
|
||||
<div class="order-0">
|
||||
<!-- navbar brand/logo -->
|
||||
<a class="navbar-brand block" href="{{ site.Home.RelPermalink }}">
|
||||
{{ partial "logo" }}
|
||||
</a>
|
||||
</div>
|
||||
<!-- navbar toggler -->
|
||||
<input id="nav-toggle" type="checkbox" class="hidden" />
|
||||
<label
|
||||
for="nav-toggle"
|
||||
class="order-3 cursor-pointer flex items-center lg:hidden text-dark lg:order-1">
|
||||
<svg id="show-button" class="h-6 fill-current block" viewBox="0 0 20 20">
|
||||
<title>Menu Open</title>
|
||||
<path d="M0 3h20v2H0V3z m0 6h20v2H0V9z m0 6h20v2H0V0z"></path>
|
||||
</svg>
|
||||
<svg id="hide-button" class="h-6 fill-current hidden" viewBox="0 0 20 20">
|
||||
<title>Menu Close</title>
|
||||
<polygon
|
||||
points="11 9 22 9 22 11 11 11 11 22 9 22 9 11 -2 11 -2 9 9 9 9 -2 11 -2"
|
||||
transform="rotate(45 10 10)"></polygon>
|
||||
</svg>
|
||||
</label>
|
||||
<!-- /navbar toggler -->
|
||||
|
||||
<!-- main navbar -->
|
||||
<ul
|
||||
id="nav-menu"
|
||||
class="navbar-nav order-3 hidden lg:flex w-full pb-6 lg:order-1 lg:w-auto lg:space-x-2 lg:pb-0 xl:space-x-8">
|
||||
{{ $currentPage := . }}
|
||||
{{ range site.Menus.main }}
|
||||
{{ $menuURL := .URL | absLangURL }}
|
||||
{{ $pageURL:= $currentPage.Permalink | absLangURL }}
|
||||
{{ $active := eq $menuURL $pageURL }}
|
||||
{{ if .HasChildren }}
|
||||
<li class="nav-item nav-dropdown group relative">
|
||||
<span
|
||||
class="nav-link {{ range .Children }}
|
||||
{{ $childURL := .URL | absLangURL }}
|
||||
{{ $active := eq $childURL $pageURL }}
|
||||
{{ if $active }}active{{ end }}
|
||||
{{ end }} inline-flex items-center">
|
||||
{{ .Name }}
|
||||
<svg class="h-4 w-4 fill-current" viewBox="0 0 20 20">
|
||||
<path
|
||||
d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z" />
|
||||
</svg>
|
||||
</span>
|
||||
<ul
|
||||
class="nav-dropdown-list lg:group-hover:visible lg:group-hover:opacity-100">
|
||||
{{ range .Children }}
|
||||
{{ $childURL := .URL | absLangURL }}
|
||||
{{ $active := eq $childURL $pageURL }}
|
||||
<li class="nav-dropdown-item">
|
||||
<a
|
||||
class="nav-dropdown-link {{ if $active }}
|
||||
active
|
||||
{{- end -}}"
|
||||
{{ if findRE `^http` .URL }}
|
||||
target="_blank" rel="noopener"
|
||||
{{ end }}
|
||||
href="{{- if findRE `^#` .URL -}}
|
||||
{{- if not $.IsHome -}}
|
||||
{{- site.Home.RelPermalink -}}
|
||||
{{- end }}
|
||||
{{- .URL -}}
|
||||
{{- else -}}
|
||||
{{- .URL | relLangURL -}}
|
||||
{{- end -}}">
|
||||
{{ .Name }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="nav-item">
|
||||
<a
|
||||
class="nav-link {{ if $active }}active{{- end -}}"
|
||||
{{ if findRE `^http` .URL }}
|
||||
target="_blank" rel="noopener"
|
||||
{{ end }}
|
||||
href="{{- if findRE `^#` .URL -}}
|
||||
{{- if not $.IsHome -}}
|
||||
{{- site.Home.RelPermalink -}}
|
||||
{{- end }}{{- .URL -}}
|
||||
{{- else -}}
|
||||
{{- .URL | relLangURL -}}
|
||||
{{- end -}}"
|
||||
>{{ .Name }}</a
|
||||
>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if site.Params.navigation_button.enable }}
|
||||
<li class="mt-4 inline-block lg:hidden">
|
||||
<a
|
||||
class="btn btn-outline-primary btn-sm"
|
||||
href="{{ site.Params.navigation_button.link | relLangURL }}">
|
||||
{{ site.Params.navigation_button.label }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
<div class="order-1 ml-auto flex items-center md:order-2 lg:ml-0">
|
||||
{{ with site.Params.search }}
|
||||
{{ if .enable }}
|
||||
<button
|
||||
aria-label="search"
|
||||
class="border-border text-dark hover:text-primary mr-5 inline-block border-r pr-5 text-xl "
|
||||
data-target="search-modal">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "components/language-switcher" (dict "Context" . "Class" "mr-5 pl-2 py-1 rounded") }}
|
||||
{{ partial "components/theme-switcher" (dict "Class" "mr-5") }}
|
||||
|
||||
|
||||
<!-- navigation btn -->
|
||||
{{ if site.Params.navigation_button.enable }}
|
||||
<a
|
||||
href="{{ site.Params.navigation_button.link | relLangURL }}"
|
||||
class="btn btn-outline-primary btn-sm hidden lg:inline-block">
|
||||
{{ site.Params.navigation_button.label }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
54
themes/hugoplate/layouts/partials/essentials/script.html
Executable file
54
themes/hugoplate/layouts/partials/essentials/script.html
Executable file
|
|
@ -0,0 +1,54 @@
|
|||
<!-- JS Plugins + Main script -->
|
||||
{{ $scripts := slice }}
|
||||
{{ $scriptsLazy := slice }}
|
||||
{{ range site.Params.plugins.js }}
|
||||
{{ if findRE "^http" .link }}
|
||||
<script
|
||||
src="{{ .link | relURL }}"
|
||||
type="application/javascript"
|
||||
{{ .attributes | safeHTMLAttr }}></script>
|
||||
{{ else }}
|
||||
{{ if not .lazy }}
|
||||
{{ $scripts = $scripts | append (resources.Get .link) }}
|
||||
{{ else }}
|
||||
{{ $scriptsLazy = $scriptsLazy | append (resources.Get .link) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<!-- main script -->
|
||||
{{ $scripts = $scripts | append (resources.Get "js/main.js") }}
|
||||
{{ $scripts = $scripts | resources.Concat "js/script.js" }}
|
||||
|
||||
{{ $scriptsLazy = $scriptsLazy | resources.Concat "js/script-lazy.js" }}
|
||||
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $scripts = $scripts | minify | fingerprint }}
|
||||
{{ $scriptsLazy = $scriptsLazy | minify | fingerprint }}
|
||||
{{ end }}
|
||||
|
||||
{{/* scripts */}}
|
||||
<script
|
||||
crossorigin="anonymous"
|
||||
integrity="{{ $scripts.Data.Integrity }}"
|
||||
src="{{ $scripts.RelPermalink }}"></script>
|
||||
|
||||
{{/* scripts lazy */}}
|
||||
<script
|
||||
defer
|
||||
async
|
||||
crossorigin="anonymous"
|
||||
integrity="{{ $scriptsLazy.Data.Integrity }}"
|
||||
src="{{ $scriptsLazy.RelPermalink }}"></script>
|
||||
|
||||
<!-- progressive web app -->
|
||||
{{ partialCached "pwa.html" . }}
|
||||
|
||||
|
||||
<!-- cookie consent -->
|
||||
{{ partialCached "cookie-consent.html" . }}
|
||||
|
||||
|
||||
<!-- google adsense -->
|
||||
{{ partialCached "adsense-script.html" . }}
|
||||
82
themes/hugoplate/layouts/partials/essentials/style.html
Executable file
82
themes/hugoplate/layouts/partials/essentials/style.html
Executable file
|
|
@ -0,0 +1,82 @@
|
|||
<!-- 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="preconnect" href="//www.googletagmanager.com" />
|
||||
<link rel="preconnect" href="//www.google-analytics.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" />
|
||||
|
||||
<!-- google fonts -->
|
||||
{{ $pf:= site.Data.theme.fonts.font_family.primary }}
|
||||
{{ $sf:= site.Data.theme.fonts.font_family.secondary }}
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<script>
|
||||
(function () {
|
||||
const googleFont = document.createElement("link");
|
||||
googleFont.href = "https://fonts.googleapis.com/css2?family={{$pf | safeURL}}{{with $sf}}&family={{. | safeURL}}{{end}}&display=swap";
|
||||
googleFont.type = "text/css";
|
||||
googleFont.rel = "stylesheet";
|
||||
document.head.appendChild(googleFont);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<!-- plugins + stylesheet -->
|
||||
{{ $styles := slice }}
|
||||
{{ $stylesLazy := slice }}
|
||||
{{ range site.Params.plugins.css }}
|
||||
{{ if findRE "^http" .link }}
|
||||
<link
|
||||
crossorigin="anonymous"
|
||||
media="all"
|
||||
rel="stylesheet"
|
||||
href="{{ .link | relURL }}"
|
||||
{{ .attributes | safeHTMLAttr }} />
|
||||
{{ else }}
|
||||
{{ if not .lazy }}
|
||||
{{ $styles = $styles | append (resources.Get .link) }}
|
||||
{{ else }}
|
||||
{{ $stylesLazy = $stylesLazy | append (resources.Get .link) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{/* main style */}}
|
||||
{{ $styles = $styles | append (resources.Get "scss/main.scss" | toCSS) }}
|
||||
{{ $styles = $styles | resources.Concat "css/style.css" }}
|
||||
{{ $styles = $styles | resources.PostCSS }}
|
||||
|
||||
{{ $stylesLazy = $stylesLazy | resources.Concat "css/style-lazy.css" }}
|
||||
{{ $stylesLazy = $stylesLazy | resources.PostCSS }}
|
||||
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $styles = $styles | resources.ExecuteAsTemplate "css/style.css" . | minify | fingerprint | resources.PostProcess }}
|
||||
{{ $stylesLazy = $stylesLazy | resources.ExecuteAsTemplate "css/style-lazy.css" . | minify | fingerprint | resources.PostProcess }}
|
||||
{{ else }}
|
||||
{{ $styles = $styles | resources.ExecuteAsTemplate "css/style.css" . }}
|
||||
{{ $stylesLazy = $stylesLazy | resources.ExecuteAsTemplate "css/style-lazy.css" . }}
|
||||
{{ end }}
|
||||
|
||||
{{/* styles */}}
|
||||
<link
|
||||
href="{{ $styles.RelPermalink }}"
|
||||
integrity="{{ $styles.Data.Integrity }}"
|
||||
rel="stylesheet" />
|
||||
|
||||
{{/* styles lazy */}}
|
||||
<link
|
||||
defer
|
||||
async
|
||||
rel="stylesheet"
|
||||
href="{{ $stylesLazy.RelPermalink }}"
|
||||
integrity="{{ $stylesLazy.Data.Integrity }}"
|
||||
media="print"
|
||||
onload="this.media='all'; this.onload=null;" />
|
||||
9
themes/hugoplate/layouts/partials/page-header.html
Executable file
9
themes/hugoplate/layouts/partials/page-header.html
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
<section>
|
||||
<div class="container text-center">
|
||||
<div
|
||||
class="from-body to-theme-light rounded-2xl bg-gradient-to-b px-8 py-14">
|
||||
<h1>{{ .Title | title }}</h1>
|
||||
{{ partial "components/breadcrumb" (dict "Context" . "Class" "mt-6") }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
23
themes/hugoplate/layouts/partials/widgets/categories.html
Executable file
23
themes/hugoplate/layouts/partials/widgets/categories.html
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
<!-- categories -->
|
||||
{{ if isset site.Taxonomies "categories" }}
|
||||
{{ if not (eq (len site.Taxonomies.categories) 0) }}
|
||||
<div class="mb-8">
|
||||
<h5 class="mb-6">{{ i18n "categories" }}</h5>
|
||||
<div class="bg-theme-light rounded p-8">
|
||||
<ul class="space-y-4">
|
||||
{{ range $name, $items := site.Taxonomies.categories }}
|
||||
<li>
|
||||
<a
|
||||
class="hover:text-primary {{ if (and (eq $.Page.Kind `term`) (eq $.Page.Type `categories`) (eq $.Page.Title .Page.Title)) }}
|
||||
active
|
||||
{{ end }} flex justify-between"
|
||||
href="{{ .Page.RelPermalink }}">
|
||||
{{ .Page.Title }} <span>( {{ len $items }} )</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
23
themes/hugoplate/layouts/partials/widgets/tags.html
Executable file
23
themes/hugoplate/layouts/partials/widgets/tags.html
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
<!-- tags -->
|
||||
{{ if isset site.Taxonomies "tags" }}
|
||||
{{ if not (eq (len site.Taxonomies.tags) 0) }}
|
||||
<div class="mb-8">
|
||||
<h5 class="mb-6">Tags</h5>
|
||||
<div class="bg-theme-light rounded p-6">
|
||||
<ul>
|
||||
{{ range $name, $items := site.Taxonomies.tags }}
|
||||
<li class="inline-block">
|
||||
<a
|
||||
class="hover:bg-primary {{ if (and (eq $.Page.Kind `term`) (eq $.Page.Type `tags`) (eq $.Page.Title .Page.Title)) }}
|
||||
active
|
||||
{{ end }} m-1 block rounded bg-white px-3 py-1 hover:text-white"
|
||||
href="{{ .Page.RelPermalink }}">
|
||||
{{ .Page.Title }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
3
themes/hugoplate/layouts/partials/widgets/widget-wrapper.html
Executable file
3
themes/hugoplate/layouts/partials/widgets/widget-wrapper.html
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
{{ range .Widgets }}
|
||||
{{ partial ( print "widgets/" . ) $.Scope }}
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue