mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-22 14:35:43 -06:00
Merge pull request #320 from nunocoracao/309-term-add-hero-image
✨Term add hero image
This commit is contained in:
commit
5d5dcaa7f8
7 changed files with 21 additions and 5 deletions
|
@ -96,6 +96,7 @@ enableCodeCopy = true
|
|||
[term]
|
||||
#showHero = true
|
||||
#heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
||||
showBreadcrumbs = false
|
||||
#showSummary = false
|
||||
#showViews = false
|
||||
#showLikes = false
|
||||
|
|
|
@ -95,6 +95,7 @@ defaultBackgroundImage = "/img/iceland.jpg"
|
|||
[term]
|
||||
showHero = true
|
||||
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
||||
showBreadcrumbs = false
|
||||
showSummary = false
|
||||
showViews = true
|
||||
showLikes = true
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: advanced
|
||||
title: Advanced
|
||||
---
|
||||
|
||||
This is the advanced tag. Just like other listing pages in Blowfish, you can add custom content to individual taxonomy terms and it will be displayed at the top of the term listing. :rocket:
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 782 KiB |
|
@ -17,7 +17,7 @@
|
|||
{{ if .Params.showBreadcrumbs | default (.Site.Params.taxonomy.showBreadcrumbs | default false) }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
{{ end }}
|
||||
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
|
||||
<h1 class="mt-5 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
|
||||
<div class="mt-1 mb-2 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
|
||||
{{ partial "article-meta-taxonomy.html" (dict "context" . "scope" "single") }}
|
||||
</div>
|
||||
|
|
|
@ -1,9 +1,23 @@
|
|||
{{ define "main" }}
|
||||
|
||||
{{ .Scratch.Set "scope" "list" }}
|
||||
{{ if .Site.Params.term.showHero | default false }}
|
||||
{{ $heroStyle := print "partials/hero/" .Site.Params.term.heroStyle ".html" }}
|
||||
{{ if templates.Exists $heroStyle }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "partials/hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{ $toc := and (.Params.showTableOfContents | default (.Site.Params.term.showTableOfContents | default false)) (in
|
||||
.TableOfContents "<ul") }}
|
||||
|
||||
<header>
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.list.showBreadcrumbs | default false) }}
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.term.showBreadcrumbs | default false) }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
{{ end }}
|
||||
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
|
||||
<h1 class="mt-5 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
|
||||
<div class="mt-1 mb-2 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
|
||||
{{ partial "article-meta-term.html" (dict "context" . "scope" "single") }}
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{ $articleClasses := "flex flex-wrap article" }}
|
||||
{{ if .Site.Params.list.showCards }}
|
||||
{{ $articleClasses = delimit (slice $articleClasses "border border-neutral-200 dark:border-neutral-700 border-2 rounded-md") " " }}
|
||||
{{ $articleClasses = delimit (slice $articleClasses "border border-neutral-200 dark:border-neutral-700 border-2 rounded-md backdrop-blur") " " }}
|
||||
{{ else }}
|
||||
{{ $articleClasses = delimit (slice $articleClasses "") " " }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue