Remove make figure images centered and remove border

Also use a generic .figure-media class instead of manually specifying
both img and video in the CSS

Fixes #36 and a draft issue
This commit is contained in:
2025-08-05 21:49:28 -05:00
parent b15ca73977
commit b79c956c07
2 changed files with 11 additions and 10 deletions

View File

@@ -198,21 +198,22 @@ video {
max-width: 100%; max-width: 100%;
} }
.post-media > figure img, figure > .figure-media {
.post-media > figure video {
padding: 5px; padding: 5px;
border: 7px solid var(--figure-border);
} }
figure img, figure > .figure-media.border {
figure video {
padding: 5px;
border: 2px solid var(--figure-border); border: 2px solid var(--figure-border);
} }
.post-media > figure > .figure-media {
border: 7px solid var(--figure-border);
}
figure { figure {
margin: auto; display: block;
display: inline-block; text-align: center;
margin: 0;
} }
figcaption { figcaption {

View File

@@ -3,9 +3,9 @@
* claims that images won't work with JS disabled since it would * claims that images won't work with JS disabled since it would
* make tracking possible, but my experience says otherwise * make tracking possible, but my experience says otherwise
*/}} */}}
<img src="{{ .Permalink }}" {{ with .Params.alt }}alt="{{ . }}"{{ end }} /> <img class="figure-media" src="{{ .Permalink }}" {{ with .Params.alt }}alt="{{ . }}"{{ end }} />
{{ else if eq .ResourceType "video" }} {{ else if eq .ResourceType "video" }}
<video controls preload="metadata"> <video class="figure-media" controls preload="metadata">
{{ with .Params.alt }} {{ with .Params.alt }}
{{ warnf "video does not support alt text, '%s'" . }} {{ warnf "video does not support alt text, '%s'" . }}
{{ end }} {{ end }}