Commit bfc957e2 authored by Kaushal Modi's avatar Kaushal Modi

Use the taxo buttons at the bottom of post singles too

- Improve the logic to derive the taxo term permalinks
- Add mf2 p-category class to the tags/categories
- Remove fontawesome icons for tags and categories
- Remove the post_taxo.html partial
parent 52c50b11
......@@ -75,7 +75,8 @@
{{ end }}
<!-- Tags/categories -->
{{ partial "post_taxo.html" . }}
<div class="right">{{ partial "taxo-buttons.html" . }}</div>
<div class="clear-float"></div>
<!-- Prev/next post -->
{{ partial "prev_next.html" . }}
......
{{ $icons_map := .Site.Data.taxonomy.icons }}
<div class="post-taxo right no-color-links">
{{ range $taxo, $icon := $icons_map }}
{{ with $.Page.Param $taxo }}
<div>
{{ $taxo_list := . }}
{{ $count := len $taxo_list }}
{{ if gt $count 0 }}
&nbsp;
<i class="{{ $.Param "fontawesome.style" | default "fal" }} {{ $icon }}"></i>&nbsp;&nbsp;
{{ range $cnt, $taxo_term := $taxo_list }}
{{ with $.Site.GetPage "taxonomy" $taxo ($taxo_term | urlize) }}
<a class="p-category" href="{{ .Permalink }}">{{ $taxo_term }}</a>
{{ end }}
{{ if lt $cnt (sub $count 1) }}
,
{{ end }}
{{ end }}
{{ end }}
</div>
{{ end }}
{{ end }}
</div>
......@@ -3,15 +3,15 @@
{{ range $taxo,$_ := . }} <!-- Defaults taxos: "tags", "categories" -->
{{ with $.Page.Param $taxo }}
<ul class="{{ printf "no-bullets inline %s" $taxo }}">
{{ $taxo_list := . }} <!-- $taxo_list will be the tags/categories list -->
{{ with $.Site.GetPage "taxonomyTerm" $taxo }}
{{ $taxonomy_page := . }}
{{ range $taxo_list }} <!-- Below, assuming pretty URLs -->
<!-- The "__<taxo>__" are special classes used to search/replace in taxonomy.html. -->
<li class="{{ printf "__%s__" (. | urlize) }}">
<a href="{{ printf "%s%s" $taxonomy_page.Permalink (. | urlize) }}">{{ . }}</a>
</li>
{{ end }}
{{ range . }}
{{ $term := . }}
{{ $term_urlized := (. | urlize) }}
<!-- The "__<taxo>__" are special classes used to search/replace in taxonomy.html. -->
<li class="{{ printf "__%s__" $term_urlized }}">
{{ with $.Site.GetPage "taxonomy" $taxo $term_urlized }}
<a class="p-category" href="{{ .Permalink }}">{{ $term }}</a>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
......
......@@ -540,7 +540,6 @@ figcaption, /* All things captions */
.table-caption,
.generated,
.post-date, /* Date stamps */
.post-taxo, /* Tags and categories lists in post singles */
.prev-post, /* 'Prev' and 'Next' links in post singles */
.next-post {
font-family: var(--italics), serif;
......@@ -840,9 +839,13 @@ ul.no-bullets {
/* ** Tags/categories buttons */
.taxo {
margin-top: -0.5em;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
/* Taxo buttons in summaries in header tag */
header .taxo {
margin-top: -0.5em;
}
.taxo li {
font-family: var(--sans-serif-1);
......@@ -1053,12 +1056,6 @@ ol>li::before {
font-size: 0.75em;
}
/* Right align the tags and categories lists in post singles */
.post-taxo {
margin-top: 0.5rem;
margin-bottom: 1rem;
}
.all-terms a {
color: var(--theme-color);
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment