Skip to content

Commit

Permalink
Merge pull request #1621 from vmware-tanzu/site/blog-post-tags
Browse files Browse the repository at this point in the history
blog: clean up tags page
  • Loading branch information
benjaminapetersen authored Aug 15, 2023
2 parents c54933b + 2891da2 commit decd40b
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 11 deletions.

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions site/themes/pinniped/assets/scss/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -587,3 +587,11 @@ pre code {
}
}
}

.terms {
ul {
li {
display: block
}
}
}
22 changes: 14 additions & 8 deletions site/themes/pinniped/layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
{{ define "main" }}
<main>
{{ if or .Title .Content }}
<div>
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
{{ with .Content }}<div>{{ . }}</div>{{ end }}
<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>
{{ end }}

{{ range .Paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
<div class="wrapper landing">
{{ range .Paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
</div>
</main>
{{ end }}
4 changes: 2 additions & 2 deletions site/themes/pinniped/layouts/_default/tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<main>
<div class="hero blog">
<div class="wrapper">
<h2>Pinniped Blog Posts by {{ .Title }}</h2>
<h2>Pinniped Blog Posts For {{ .Title }}</h2>
</div>
</div>
<div class="wrapper blog landing">
Expand All @@ -14,4 +14,4 @@ <h2>Pinniped Blog Posts by {{ .Title }}</h2>
</div>
</main>
{{ partial "getting-started" . }}
{{ end }}
{{ end }}
28 changes: 28 additions & 0 deletions site/themes/pinniped/layouts/_default/terms.html
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit decd40b

Please sign in to comment.