diff options
| author | anoduck <9925396+anoduck@users.noreply.github.com> | 2025-02-15 02:33:34 -0500 |
|---|---|---|
| committer | anoduck <9925396+anoduck@users.noreply.github.com> | 2025-02-15 02:33:34 -0500 |
| commit | d43ab2e37e681e222da93226bcd5211e29e84438 (patch) | |
| tree | 9b46730f754a9a0fa46fb9d6582609068d714c57 /layouts/_default/single.html | |
| parent | f079abb5cbc39bf5356bc7349f47b9b5c3627a48 (diff) | |
feat: 🎸 Module additions
Added created modules to the site along with more content.
Diffstat (limited to 'layouts/_default/single.html')
| -rw-r--r-- | layouts/_default/single.html | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..f14768d --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,47 @@ +{{ define "main" -}} + {{- $breakpoint := $.Scratch.Get "breakpoint" -}} + {{- $hasSidebar := .Site.Params.navigation.sidebar | default true -}} + {{ $sidebar := "" }} + {{ if $hasSidebar }}{{ $sidebar = .Render "single/sidebar" }}{{ end }} + {{ $toc := .Render "single/panel-toc" }} + + {{ with $sidebar }} + <div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvass-sidebar" aria-labelledby="offcanvas-label"> + <div class="offcanvas-header"> + <h5 class="offcanvas-title" id="offcanvas-label">{{ strings.FirstUpper $.Section }}</h5> + <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="{{ T "close" }}"></button> + </div> + <div class="offcanvas-body"> + {{ . | safeHTML }} + </div> + </div> + {{ end }} + + <div class="container-xxl flex-fill p-4 px-xxl-0"> + {{ if $hasSidebar -}} + <div class="row row-cols-1 row-cols-{{ $breakpoint.current }}-2 row-cols-{{ $breakpoint.next }}-3"> + <div class="col col-{{ $breakpoint.next }}-2 d-none d-{{ $breakpoint.next }}-block sidebar-overflow sticky-top pt-5"> + {{ $sidebar | safeHTML }} + </div> + <div class="col-12 col-{{ $breakpoint.current }}-9 col-{{ $breakpoint.next }}-8 mb-5 p-4"> + {{ .Render "single/main" }} + </div> + <div class="col col-{{ $breakpoint.current }}-3 col-{{ $breakpoint.next }}-2 d-none d-{{ $breakpoint.current }}-block pt-5"> + {{ $toc | safeHTML }} + </div> + </div> + {{ else }} + <div class="row row-cols-1 row-cols-{{ $breakpoint.current }}-2"> + <div class="col col-{{ $breakpoint.prev }}-12 col-{{ $breakpoint.current }}-9"> + {{ .Render "single/main" }} + </div> + <div class="col col-{{ $breakpoint.current }}-3 d-none d-{{ $breakpoint.current }}-block"> + {{ $toc | safeHTML }} + </div> + </div> + {{ end -}} + <div> + {{ partial "disqus.html" . }} + </div> + </div> +{{ end -}}
\ No newline at end of file |
