Template formatting

master
Will Faught 3 years ago
parent 4af9532c74
commit f3c02d6922

@ -1,7 +1,7 @@
<!doctype html> <!doctype html>
{{ $rtl := eq .Language.LanguageDirection "rtl" }} {{ $rtl := eq .Language.LanguageDirection "rtl" }}
{{ $lang := .Site.LanguageCode | default .Site.Language.Lang }} {{ $lang := .Site.LanguageCode | default .Site.Language.Lang }}
<html{{ if eq .Site.Params.paige.color_scheme `dark` }} data-bs-theme="dark"{{ end }}{{ if $rtl }} dir="rtl"{{ end }}{{ with $lang }} lang="{{ . }}"{{ end }}> <html {{ if eq .Site.Params.paige.color_scheme `dark` }} data-bs-theme="dark" {{ end }} {{ if $rtl }} dir="rtl" {{ end }} {{ with $lang }} lang="{{ . }}" {{ end }}>
{{ partial "paige/head.html" . }} {{ partial "paige/head.html" . }}
{{ partial "paige/body.html" . }} {{ partial "paige/body.html" . }}
<div class="container flex-fill"> <div class="container flex-fill">

@ -17,11 +17,11 @@
{{ else }} {{ else }}
{{ $pills = true }} {{ $pills = true }}
{{ end }} {{ end }}
<nav class="justify-content-center my-3 nav{{ if $pills }} nav-pills{{ else if $tabs }} nav-tabs{{ end }}"> <nav class="justify-content-center my-3 nav {{ if $pills }} nav-pills {{ else if $tabs }} nav-tabs {{ end }}">
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{ $pagePath := strings.TrimPrefix $basePath $p.RelPermalink }} {{ $pagePath := strings.TrimPrefix $basePath $p.RelPermalink }}
{{ $menuPath := strings.TrimPrefix $basePath .URL }} {{ $menuPath := strings.TrimPrefix $basePath .URL }}
{{ $active := or (and (eq $menuPath `/`) (eq $pagePath `/`)) (and (ne $menuPath `/`) (hasPrefix $pagePath $menuPath)) }} {{ $active := or (and (eq $menuPath `/`) (eq $pagePath `/`)) (and (ne $menuPath `/`) (hasPrefix $pagePath $menuPath)) }}
<a href="{{ .URL }}" class="{{ if $active }}active {{ if $links }}link-secondary {{ end }}{{ end }}nav-link"{{ if $active }} aria-current="page"{{ end }}>{{ .Name }}</a> <a href="{{ .URL }}" class="{{ if $active }} active {{ if $links }} link-secondary {{ end }} {{ end }} nav-link" {{ if $active }} aria-current="page" {{ end }}>{{ .Name }}</a>
{{ end }} {{ end }}
</nav> </nav>

@ -51,7 +51,7 @@
<figure> <figure>
{{ if eq $type "grid" }} {{ if eq $type "grid" }}
<div class="container-fluid{{ if $caption }} figure-img{{ end }} px-0"> <div class="container-fluid {{ if $caption }} figure-img {{ end }} px-0">
<div class="align-items-{{ $align }} gx-3 gy-3 justify-content-{{ $justify }} row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 row-cols-xl-5 row-cols-xxl-6"> <div class="align-items-{{ $align }} gx-3 gy-3 justify-content-{{ $justify }} row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 row-cols-xl-5 row-cols-xxl-6">
{{ with $inner }} {{ with $inner }}
{{ . }} {{ . }}
@ -77,7 +77,7 @@
{{ if not (or $height $maxheight) }} {{ if not (or $height $maxheight) }}
{{ $maxheight = $maxheight | default "10rem" }} {{ $maxheight = $maxheight | default "10rem" }}
{{ end }} {{ end }}
<div class="align-items-{{ $align }} column-gap-3 d-flex{{ with $caption }} figure-img{{ end }} flex-wrap justify-content-{{ $justify }} row-gap-3"> <div class="align-items-{{ $align }} column-gap-3 d-flex {{ with $caption }} figure-img {{ end }} flex-wrap justify-content-{{ $justify }} row-gap-3">
{{ with $inner }} {{ with $inner }}
{{ . }} {{ . }}
{{ else }} {{ else }}

Loading…
Cancel
Save