mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-08-10 17:31:35 -05:00
Use individual <a> for each tag/category/etc in post metadata
Fixes #85
This commit is contained in:
@@ -506,6 +506,14 @@ footer p {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
:is(
|
||||
.page-metadata-section:is(.categories, .tags, .series),
|
||||
.page-metadata-item.authors
|
||||
) > a:not(:last-child):after {
|
||||
color: var(--text-0);
|
||||
content: ",";
|
||||
}
|
||||
|
||||
.post-media {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
@@ -1,16 +1,9 @@
|
||||
{{ with .Params.authors }}
|
||||
<span class="page-metadata-item" data-pagefind-meta="authors" aria-label="{{ i18n "aria_post_meta_authors" }}">
|
||||
{{ with .GetTerms "authors" }}
|
||||
<span class="page-metadata-item authors" aria-label="{{ i18n "aria_post_meta_authors" }}">
|
||||
{{ partial "icon.html" "user-circle" }}
|
||||
|
||||
{{ if index $.Site.Taxonomies "authors" }}
|
||||
{{ $authors := slice }}
|
||||
{{ range . }}
|
||||
{{ $url := (printf "authors/%s" (. | anchorize)) | absLangURL }}
|
||||
{{ $authors = $authors | append (printf `<a href="%s">%s</a>` $url .) }}
|
||||
{{ end }}
|
||||
{{ delimit $authors ", " | safeHTML }}
|
||||
{{ else }}
|
||||
{{ delimit . ", " }}
|
||||
<a href="{{ .Permalink }}" data-pagefind-filter="author">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
@@ -4,8 +4,10 @@
|
||||
{{ $categories = $categories | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||
{{ end }}
|
||||
|
||||
<div class="page-metadata-section categories" data-pagefind-meta="categories" aria-label="{{ i18n "aria_post_meta_categories" }}">
|
||||
<div class="page-metadata-section categories" aria-label="{{ i18n "aria_post_meta_categories" }}">
|
||||
{{ partial "icon.html" "folder" }}
|
||||
{{ delimit $categories ", " | safeHTML }}
|
||||
{{ range . }}
|
||||
<a href="{{ .Permalink }}" data-pagefind-filter="category">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@@ -1,11 +1,8 @@
|
||||
{{ with (.GetTerms "series") }}
|
||||
{{ $series := slice }}
|
||||
{{ range . }}
|
||||
{{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||
{{ end }}
|
||||
|
||||
<div class="page-metadata-section series" data-pagefind-meta="series" aria-label="{{ i18n "aria_post_meta_series" }}">
|
||||
<div class="page-metadata-section series" aria-label="{{ i18n "aria_post_meta_series" }}">
|
||||
{{ partial "icon.html" "files" }}
|
||||
{{ delimit $series ", " | safeHTML }}
|
||||
{{ range . }}
|
||||
<a href="{{ .Permalink }}" data-pagefind-filter="series">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@@ -1,11 +1,10 @@
|
||||
{{ with (.GetTerms "tags") }}
|
||||
{{ $tags := slice }}
|
||||
{{ range . }}
|
||||
{{ $tags = $tags | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||
{{ end }}
|
||||
|
||||
<div class="page-metadata-section tags" data-pagefind-meta="tags" aria-label="{{ i18n "aria_post_meta_tags" }}">
|
||||
<div class="page-metadata-section tags" aria-label="{{ i18n "aria_post_meta_tags" }}">
|
||||
{{ partial "icon.html" "tag" }}
|
||||
{{ delimit $tags ", " | safeHTML }}
|
||||
{{ range . }}
|
||||
<a href="{{ .Permalink }}" data-pagefind-filter="tag">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user