diff options
| author | Anoduck, The Anonymous Duck <9925396+anoduck@users.noreply.github.com> | 2025-02-16 09:16:39 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-16 09:16:39 +0000 |
| commit | b5290138e1f73a7a56578f9975ba3b50829ca8d4 (patch) | |
| tree | b4d2d0d4a5b10754f0d075248f97f63f74bbb9aa /layouts/_default/single.html | |
| parent | 5354e537b7e02b96cf0b842adfc5faaae5d1a862 (diff) | |
| parent | 5086a041c02412f1a5f811325d4798c49acd328b (diff) | |
Merge pull request #77 from anoduck/develop
Regardless of failed style linting pulling this shit.
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 |
