Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"options": {
"parser": "go-template",
"goTemplateBracketSpacing": true,
"bracketSameLine": true
"bracketSameLine": true,
"tabWidth": 4
}
}
]
Expand Down
29 changes: 15 additions & 14 deletions layouts/about/list.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{{ define "main" }}
<section class="section-sm">
<div class="container">
<div class="row justify-center">
<div class="md:col-10 lg:col-10 text-center flex flex-col md:flex-row">
<div class="w-full md:w-2/3 order-2 md:order-1">
<h2 class="h3 mb-6">{{ .Title }}</h2>
<div class="content">{{ .Content }}</div>
</div>
<div class="w-full md:w-1/3 order-1 md:order-2">
{{ partial "image" (dict "Src" .Params.image "Alt" .Title "Class" "mx-auto mb-6" "Size" .Params.image_size) }}
</div>
<section class="section-sm">
<div class="container">
<div class="row justify-center">
<div
class="md:col-10 lg:col-10 text-center flex flex-col md:flex-row">
<div class="w-full md:w-2/3 order-2 md:order-1">
<h2 class="h3 mb-6">{{ .Title }}</h2>
<div class="content">{{ .Content }}</div>
</div>
<div class="w-full md:w-1/3 order-1 md:order-2">
{{ partial "image" (dict "Src" .Params.image "Alt" .Title "Class" "mx-auto mb-6" "Size" .Params.image_size) }}
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</section>
{{ end }}
14 changes: 7 additions & 7 deletions layouts/partials/components/theme-switcher.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
{{ $class := .Class }}
<!-- theme switcher -->
{{ if site.Params.theme_switcher }}
<script>
// ensures the user is always served dark mode
document.documentElement.classList.remove("dark");
<script>
// ensures the user is always served dark mode
document.documentElement.classList.remove("dark");

if (!document.documentElement.classList.contains("light")) {
document.documentElement.classList.add("light");
}
</script>
if (!document.documentElement.classList.contains("light")) {
document.documentElement.classList.add("light");
}
</script>
{{ end }}
12 changes: 6 additions & 6 deletions layouts/partials/page-header.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<section>
<div class="container text-center">
<div
class="from-body to-theme-light dark:from-darkmode-body dark:to-darkmode-theme-light rounded-2xl bg-gradient-to-b px-8 py-8">
<h2>{{ .Title | title }}</h2>
{{ partial "components/breadcrumb" (dict "Context" . "Class" "mt-6") }}
<div class="container text-center">
<div
class="from-body to-theme-light dark:from-darkmode-body dark:to-darkmode-theme-light rounded-2xl bg-gradient-to-b px-8 py-8">
<h2>{{ .Title | title }}</h2>
{{ partial "components/breadcrumb" (dict "Context" . "Class" "mt-6") }}
</div>
</div>
</div>
</section>
47 changes: 24 additions & 23 deletions themes/hugoplate/layouts/404.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
{{ 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 dark:text-darkmode-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>
<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 dark:text-darkmode-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>
</div>
</div>
</section>
</section>
{{ end }}
88 changes: 44 additions & 44 deletions themes/hugoplate/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,47 +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>
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>
32 changes: 16 additions & 16 deletions themes/hugoplate/layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{{ define "main" }}
{{ partial "page-header" . }}
{{ 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>
<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 }}
22 changes: 11 additions & 11 deletions themes/hugoplate/layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{{ define "main" }}
{{ partial "page-header" . }}
{{ 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>
<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>
</div>
</div>
</section>
</section>
{{ end }}
32 changes: 16 additions & 16 deletions themes/hugoplate/layouts/_default/taxonomy.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{{ define "main" }}
{{ partial "page-header" . }}
{{ 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>
<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>
</div>
</div>
</section>
</section>
{{ end }}
Loading