Merge pull request #1621 from vmware-tanzu/site/blog-post-tags

blog: clean up tags page
This commit is contained in:
Ben Petersen 2023-08-15 15:07:31 -04:00 committed by GitHub
commit decd40bc26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -587,3 +587,11 @@ pre code {
} }
} }
} }
.terms {
ul {
li {
display: block
}
}
}

View File

@ -1,14 +1,20 @@
{{ define "main" }} {{ define "main" }}
<main> <main>
{{ if or .Title .Content }} <div class="hero subpage">
<div> <div class="wrapper">
{{ with .Title }}<h1>{{ . }}</h1>{{ end }} {{ if or .Title .Content }}
{{ with .Content }}<div>{{ . }}</div>{{ end }} <div>
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
{{ with .Content }}<div>{{ . }}</div>{{ end }}
</div>
{{ end }}
</div>
</div> </div>
{{ end }}
{{ range .Paginator.Pages }} <div class="wrapper landing">
{{ .Render "summary" }} {{ range .Paginator.Pages }}
{{ end }} {{ .Render "summary" }}
{{ end }}
</div>
</main> </main>
{{ end }} {{ end }}

View File

@ -2,7 +2,7 @@
<main> <main>
<div class="hero blog"> <div class="hero blog">
<div class="wrapper"> <div class="wrapper">
<h2>Pinniped Blog Posts by {{ .Title }}</h2> <h2>Pinniped Blog Posts For {{ .Title }}</h2>
</div> </div>
</div> </div>
<div class="wrapper blog landing"> <div class="wrapper blog landing">
@ -14,4 +14,4 @@
</div> </div>
</main> </main>
{{ partial "getting-started" . }} {{ partial "getting-started" . }}
{{ end }} {{ end }}

View File

@ -0,0 +1,28 @@
{{ define "main" }}
<main>
<div class="hero subpage">
<div class="wrapper">
{{ if or .Title .Content }}
<div>
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
{{ with .Content }}<div>{{ . }}</div>{{ end }}
</div>
{{ end }}
</div>
</div>
<div class="wrapper terms">
<p>Blog posts have been tagged with the following set of tags (including authors):</p>
<ul>
{{range $name, $taxonomy := .Site.Taxonomies.tags}} {{ $cnt := .Count }}
{{ with $.Site.GetPage (printf "/tags/%s" $name) }}
<li>
<a href={{ .RelPermalink }} title="All pages with tag <i>{{$name}}</i>">{{ .Title }}</a>
<sup>{{$cnt}}</sup>
</li>
{{end}}
{{end}}
</ul>
</div>
</main>
{{ end }}