setup hugoplate for development of chill website

This commit is contained in:
2023-10-09 15:42:02 +02:00
parent 4ff26745b7
commit 084dd2d8ed
96 changed files with 67 additions and 7 deletions

View File

@@ -0,0 +1,47 @@
<!doctype html>
<html
itemscope
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>

View File

@@ -0,0 +1,20 @@
{{ 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 dark:text-darkmode-dark block text-xl">
{{ .Title }}
</a>
</li>
{{ end }}
</ul>
</div>
</section>
{{ end }}

View 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 }}

View 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 }}

View 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 dark:bg-darkmode-theme-light dark:text-darkmode-dark block rounded px-4 py-2 text-xl">
{{ .Page.Title }}
<span class="bg-body dark:bg-darkmode-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 dark:bg-darkmode-theme-light dark:text-darkmode-dark block rounded px-4 py-2 text-xl">
{{ .Page.Title }}
<span class="bg-body dark:bg-darkmode-body ml-2 rounded px-2">
{{ .Count }}
</span>
</a>
</li>
{{ end }}
{{ end }}
</ul>
</div>
</section>
{{ end }}