Spaces:
Sleeping
Sleeping
Download app/themes/hugo-theme-stack/layouts/_default/single.html from AstraOS/dailydev.com: direct link, hf CLI and curl.
- Browser
- Download file 1.43 kB
-
https://huggingface.co/spaces/AstraOS/dailydev.com/resolve/main/app/themes/hugo-theme-stack/layouts/_default/single.html
- Command line
-
hf download hf://spaces/AstraOS/dailydev.com/app/themes/hugo-theme-stack/layouts/_default/single.html
-
curl -L -o single.html https://huggingface.co/spaces/AstraOS/dailydev.com/resolve/main/app/themes/hugo-theme-stack/layouts/_default/single.html
1.43 kB
| {{ define "body-class" }} | |
| article-page | |
| {{/* | |
| Enable the right sidebar if | |
| - Widget different from 'TOC' is enabled | |
| - TOC is enabled and not empty | |
| */}} | |
| {{- $HasWidgetNotTOC := false -}} | |
| {{- $TOCWidgetEnabled := false -}} | |
| {{- range .Site.Params.widgets.page -}} | |
| {{- if ne .type "toc" -}} | |
| {{ $HasWidgetNotTOC = true -}} | |
| {{- else -}} | |
| {{ $TOCWidgetEnabled = true -}} | |
| {{- end -}} | |
| {{- end -}} | |
| {{- $TOCManuallyDisabled := eq .Params.toc false -}} | |
| {{- $TOCEnabled := and (not $TOCManuallyDisabled) $TOCWidgetEnabled -}} | |
| {{- $hasTOC := ge (len .TableOfContents) 100 -}} | |
| {{- .Scratch.Set "TOCEnabled" (and $TOCEnabled $hasTOC) -}} | |
| {{- .Scratch.Set "hasWidget" (or $HasWidgetNotTOC (and $TOCEnabled $hasTOC)) -}} | |
| {{ end }} | |
| {{ define "main" }} | |
| {{ partial "article/article.html" . }} | |
| {{ if .Params.links }} | |
| {{ partial "article/components/links" . }} | |
| {{ end }} | |
| {{ partial "article/components/related-content" . }} | |
| {{ if not (eq .Params.comments false) }} | |
| {{ partial "comments/include" . }} | |
| {{ end }} | |
| {{ partialCached "footer/footer" . }} | |
| {{ partialCached "article/components/photoswipe" . }} | |
| {{ end }} | |
| {{ define "right-sidebar" }} | |
| {{ if .Scratch.Get "hasWidget" }}{{ partial "sidebar/right.html" (dict "Context" . "Scope" "page") }}{{ end}} | |
| {{ end }} | |