Skip to content

Commit 1eb2ac1

Browse files
authored
Merge pull request #1687 from gethinode/templatev2
Templatev2
2 parents 9a7bc7e + 9115ca3 commit 1eb2ac1

File tree

6 files changed

+197
-189
lines changed

6 files changed

+197
-189
lines changed

assets/scss/common/_styles.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ div.rounded, img.rounded {
2828
--max-section-height: 1024px;
2929

3030
min-height: 100vh;
31+
margin-top: var(--navbar-height);
32+
}
33+
34+
main:has(> * > section:first-of-type.section-cover) {
3135
margin-top: var(--overlay-offset);
3236
}
3337

exampleSite/hugo_stats.json

Lines changed: 184 additions & 184 deletions
Large diffs are not rendered by default.

layouts/_partials/footer/social.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{{ if gt .Site.Menus.social 0 }}
2+
{{- $padding := partial "utilities/GetPadding.html" -}}
23
{{- $tab := site.Params.main.externalLinks.tab -}}
34
<div class="container-fluid bg-primary bg-opacity-{{ .Site.Params.style.themeOpacity | default "25" | safeHTML }}">
4-
<div class="container-xxl px-4 px-xxl-0">
5+
<div class="container-xxl px-{{ $padding.x }} px-xxl-0">
56
<div class="row row-cols-2 py-3 align-items-center">
67
<div class="col col-6">
78
<div class="row justify-content-end p-0">

layouts/list.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
{{- $breakpoint := $.Scratch.Get "breakpoint" -}}
33
{{- $blocks := $.Scratch.Get "blocks" -}}
44
{{- $content := partial "utilities/ProcessContent" (dict "page" .Page "raw" .RawContent) }}
5+
{{- $padding := partial "utilities/GetPadding.html" -}}
56

67
{{ $blocks | safeHTML }}
78

89
{{ with $content }}
9-
<div class="container-xxl flex-fill p-4 px-xxl-0">
10+
<div class="container-xxl flex-fill py-{{ $padding.y }} px-{{ $padding.x }} px-xxl-0">
1011
{{ . }}
1112
</div>
1213
{{ end }}

layouts/single.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{{- $blocks := $.Scratch.Get "blocks" -}}
33
{{- $breakpoint := $.Scratch.Get "breakpoint" -}}
44
{{- $sidebar := partial "page/sidebar" . -}}
5+
{{- $padding := partial "utilities/GetPadding.html" -}}
56

67
{{ with $sidebar }}
78
<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvas-sidebar" aria-labelledby="offcanvas-label">
@@ -18,12 +19,12 @@ <h5 class="offcanvas-title" id="offcanvas-label">{{ strings.FirstUpper $.Section
1819
{{ $blocks | safeHTML }}
1920

2021
{{ if (gt (len .RawContent) 0) }}
21-
<div class="container-xxl flex-fill p-4 px-xxl-0">
22+
<div class="container-xxl flex-fill py-{{ $padding.y }} px-{{ $padding.x }} px-xxl-0">
2223
<div class="row row-cols-1 row-cols-{{ $breakpoint.current }}-2 row-cols-{{ $breakpoint.next }}-3">
2324
<div class="col col-{{ $breakpoint.next }}-2 d-none d-{{ $breakpoint.next }}-block sidebar-overflow sticky-top pt-5">
2425
{{ $sidebar | safeHTML }}
2526
</div>
26-
<div class="col-12 col-{{ $breakpoint.current }}-9 col-{{ $breakpoint.next }}-8 mb-5 py-4">
27+
<div class="col-12 col-{{ $breakpoint.current }}-9 col-{{ $breakpoint.next }}-8 mb-5">
2728
{{ .Render "header" }}
2829

2930
{{ .Render "body" }}

layouts/tags/list.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
{{- $page := . -}}
33
{{- $layout := $page.Params.layout -}}
44
{{- $breakpoint := $.Scratch.Get "breakpoint" -}}
5+
{{- $padding := partial "utilities/GetPadding.html" -}}
56
{{- $hasSidebar := site.Params.navigation.sidebar | default true -}}
67
{{- $pageTitle := .Page.Title }}
78
{{ if and site.Params.main.titleCase (not .Page.Params.exact) }}{{ $pageTitle = title $pageTitle }}{{ end }}
89

9-
<div class="container-xxl flex-fill p-4 px-xxl-0">
10+
<div class="container-xxl flex-fill py-{{ $padding.y }} px-{{ $padding.x }} px-xxl-0">
1011
<div class="row row-cols-1 row-cols-{{ $breakpoint.prev }}-{{ if $hasSidebar }}3{{ else }}2{{ end }}">
1112
{{ if $hasSidebar }}<div class="col col-{{ $breakpoint.current }}-2 d-none d-{{ $breakpoint.current }}-block"></div>{{ end }}
1213
<div class="col col-{{ $breakpoint.prev }}-12 col-{{ $breakpoint.current }}-8">

0 commit comments

Comments
 (0)