3 Commits

Author SHA1 Message Date
ca0f8d390c Add workaround for code icon being chopped off on side
Introduced by 16f08dce7f. Since the aspect
ratio of the icon isn't square, it's too wide and collides with the text
next to it. Would be nice to follow #82 and switch to a better
maintained icon pack.
2025-07-01 02:57:55 -05:00
62f0d42140 Add possibility for adding custom meta items to page
Fixes #67
2025-07-01 02:48:37 -05:00
16f08dce7f Tweak icon size and alignment
Use em units so it matches the text size automatically. Using sub for
vertical-align seems to look a little nicer? Maybe only so because now
the height of icon matches the font size now.
2025-07-01 02:09:15 -05:00
5 changed files with 13 additions and 14 deletions

View File

@ -291,17 +291,17 @@ table.simple tbody tr:nth-child(even) {
/* Icons */ /* Icons */
.icon { .icon {
width: 20px; width: 1em;
height: 20px; height: 1em;
color: var(--text-1); color: var(--text-1);
text-align: center; text-align: center;
display: inline; display: inline;
vertical-align: middle; vertical-align: sub;
} }
h1 svg.icon { /* workarounds for some icons from jam-icons being non-square aspect ratio */
width: 30px; .icon-code {
height: 30px; width: 1.25em;
} }
/* }}} */ /* }}} */
@ -315,11 +315,6 @@ h1 svg.icon {
font-weight: bold; font-weight: bold;
} }
.heading-link svg {
width: 15px;
height: 15px;
}
/* }}} */ /* }}} */
/* Top bar formatting {{{ */ /* Top bar formatting {{{ */
@ -676,6 +671,7 @@ h1 svg.icon {
display: flex; display: flex;
gap: 8px; gap: 8px;
justify-content: center; justify-content: center;
font-size: 32px;
} }
.share-buttons a { .share-buttons a {
@ -690,8 +686,7 @@ h1 svg.icon {
} }
.share-buttons svg { .share-buttons svg {
width: 32px; display: block;
height: 32px;
} }
/* https://stackoverflow.com/a/72073682/19003757 */ /* https://stackoverflow.com/a/72073682/19003757 */

View File

@ -1,6 +1,6 @@
{{- $icon_resource := resources.Get (printf "jam/icons/%s.svg" .) -}} {{- $icon_resource := resources.Get (printf "jam/icons/%s.svg" .) -}}
{{- $icon := $icon_resource.Content -}} {{- $icon := $icon_resource.Content -}}
{{- $icon = replaceRE `<svg` `<svg class="icon"` $icon -}} {{- $icon = replaceRE `<svg` (printf `<svg class="icon icon-%s"` .) $icon -}}
{{- $icon = replaceRE `</svg>` (printf `<title>%s icon</title></svg>` .) $icon -}} {{- $icon = replaceRE `</svg>` (printf `<title>%s icon</title></svg>` .) $icon -}}
{{- $icon = replaceRE `(width|height)="[0-9]*"` "" $icon -}} {{- $icon = replaceRE `(width|height)="[0-9]*"` "" $icon -}}
{{- $icon | safeHTML -}} {{- $icon | safeHTML -}}

View File

@ -0,0 +1 @@
<!-- Placeholder for website to add custom post metadata to summaries -->

View File

@ -22,6 +22,8 @@
{{ partial "page-metadata/item/edithistory.html" . }} {{ partial "page-metadata/item/edithistory.html" . }}
{{ partial "page-metadata/item/viewraw.html" . }} {{ partial "page-metadata/item/viewraw.html" . }}
{{ partial "page-metadata/custom-full.html" . }}
{{ partial "page-metadata/item/categories.html" . }} {{ partial "page-metadata/item/categories.html" . }}
{{ partial "page-metadata/item/tags.html" . }} {{ partial "page-metadata/item/tags.html" . }}

View File

@ -9,6 +9,7 @@
{{ partial "page-metadata/item/authors.html" . }} {{ partial "page-metadata/item/authors.html" . }}
{{ partial "page-metadata/item/readingtime.html" . }} {{ partial "page-metadata/item/readingtime.html" . }}
{{ partial "page-metadata/item/series.html" . }} {{ partial "page-metadata/item/series.html" . }}
{{ partial "page-metadata/item/categories.html" . }} {{ partial "page-metadata/item/categories.html" . }}
{{ partial "page-metadata/item/tags.html" . }} {{ partial "page-metadata/item/tags.html" . }}