Switch from submodule to static checked in theme
This commit is contained in:
.drone.yml
themes/hugo-theme-notrack
.gitignoreLICENSE.mdREADME.mdtheme.toml
archetypes
assets
data
notrack
images
layouts
404.html
_default
home.htmlpartials
blog-entry-summary.htmlblog-taxonomy-info.htmlfooter.htmlhead.htmlheader.htmlpagination.htmlpost-category-link.htmlpost-tag-link.html
shortcodes
contact-box.htmlcontainer.htmlgallery-category.htmlgallery-modal.htmlgallery-photo.htmlgallery-script.htmlimage.htmlrawhtml.htmlresume-category.htmlresume-entry.htmlresume-section.htmlsocial.htmlvideo.html
taxonomy
static
css
fonts
FreeMono.woffFreeMonoBold.woffFreeMonoBoldOblique.woffFreeMonoOblique.woffFreeSans-small.woffFreeSans.woffFreeSansBold-small.woffFreeSansBold.woffFreeSansBoldOblique.woffFreeSansOblique.woffFreeSerif-small.woffFreeSerif.woffFreeSerifBold-small.woffFreeSerifBold.woffFreeSerifBoldItalic-small.woffFreeSerifBoldItalic.woffFreeSerifItalic-small.woffFreeSerifItalic.wofffa-brands-400.woff2fa-solid-900.woff2mononoki-Bold.woff2mononoki-BoldItalic.woff2mononoki-Italic.woff2mononoki-Regular.woff2
js
41
themes/hugo-theme-notrack/layouts/home.html
Normal file
41
themes/hugo-theme-notrack/layouts/home.html
Normal file
@ -0,0 +1,41 @@
|
||||
{{ define "main" }}
|
||||
<main>
|
||||
{{ $contentExists := gt (len .Content) 0 }}
|
||||
{{ $blogPages := where .Site.RegularPages.ByDate.Reverse ".Type" "in" .Site.Params.mainSections }}
|
||||
{{ $blogPages = where $blogPages ".Params.draft" "!=" true }}
|
||||
{{ $showLatest := and (default true site.Params.showBlogLatest) $blogPages }}
|
||||
{{ $headlessExists := false }}
|
||||
|
||||
{{ if $contentExists }}
|
||||
{{ .Content }}
|
||||
{{ else }}
|
||||
{{ with .Site.GetPage "/homepage" }}
|
||||
{{ $headlessExists = true }}
|
||||
<div class="headless-homepage">
|
||||
{{ range .Resources }}
|
||||
<h2>
|
||||
{{ .Title }}
|
||||
</h2>
|
||||
<p>{{ .Content }}</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (or $headlessExists $contentExists) $showLatest }}
|
||||
<p class="delimiter">♦ ♦ ♦</p>
|
||||
|
||||
{{ $blogLatest := default "Latest Blog Posts" site.Params.blogLatestHeading }}
|
||||
<h2 id="latest-blog-home">{{- $blogLatest -}}</h2>
|
||||
{{ end }}
|
||||
|
||||
{{ if $showLatest }}
|
||||
{{ with $blogPages }}
|
||||
{{ range first (default 3 site.Params.nBlogLatest) . }}
|
||||
{{- partial "blog-entry-summary" . -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
</main>
|
||||
{{ end }}
|
Reference in New Issue
Block a user