Clean up the taxonomy list
Make the name of the taxonomy copyable by putting it in the dom, rather than in the CSS content:.
This commit is contained in:
parent
cd503b1275
commit
f7928c2190
2 changed files with 32 additions and 23 deletions
|
@ -8,21 +8,28 @@
|
||||||
***************************/
|
***************************/
|
||||||
|
|
||||||
.taxonomy-list {
|
.taxonomy-list {
|
||||||
|
display: flex;
|
||||||
|
gap: 1ch;
|
||||||
|
font-family: var(--font-family-monospace);
|
||||||
|
|
||||||
|
.taxonomy-list__name {
|
||||||
|
color: var(--text-color-secondary);
|
||||||
|
text-transform: uppercase;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: " =";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.taxonomy-list__terms {
|
||||||
--spacing: 1ch;
|
--spacing: 1ch;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
font-family: var(--font-family-monospace);
|
|
||||||
gap: var(--spacing);
|
gap: var(--spacing);
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
margin-block: 0;
|
margin-block: 0;
|
||||||
padding-inline-start: 0;
|
padding-inline-start: 0;
|
||||||
|
|
||||||
&::before {
|
|
||||||
color: var(--text-color-secondary);
|
|
||||||
content: attr(data-name) " =";
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
|
|
||||||
li {
|
li {
|
||||||
padding-inline-start: 0;
|
padding-inline-start: 0;
|
||||||
}
|
}
|
||||||
|
@ -32,4 +39,5 @@
|
||||||
content: ":";
|
content: ":";
|
||||||
margin-inline-start: var(--spacing);
|
margin-inline-start: var(--spacing);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,9 +13,10 @@
|
||||||
{{- with T $taxonomy (len .) }}
|
{{- with T $taxonomy (len .) }}
|
||||||
{{ $name = . }}
|
{{ $name = . }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
<ul class="taxonomy-list" data-name="{{ $name }}">
|
<div class="taxonomy-list">
|
||||||
{{ range . }}
|
<span class="taxonomy-list__name">{{ $name }}</span>
|
||||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
<ul class="taxonomy-list__terms" data-name="{{ $name }}">
|
||||||
{{ end }}
|
{{ range . }}<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue