Rename feature-figure.html to featured-media and combine CSS with figures

- Rename feature-figure.html and its class from post-media to
  featured-media
- Move all <figure> formatting to a separate section
- Put the .featured-media CSS next to the rest of the figure formatting
  as it's sorta a special case of regular figure
This commit is contained in:
2025-09-01 01:10:16 -05:00
parent 1ee8d314c0
commit 8e22007bfd
4 changed files with 35 additions and 30 deletions

View File

@@ -174,30 +174,6 @@ video {
max-width: 100%; max-width: 100%;
} }
figure > .figure-media {
padding: 5px;
}
figure > .figure-media.border {
border: 2px solid var(--figure-border);
}
.post-media > figure > .figure-media {
border: 7px solid var(--figure-border);
}
figure {
display: block;
text-align: center;
margin: 0;
}
figcaption {
font-style: italic;
font-size: small;
text-align: center;
}
a { a {
color: var(--link-0); color: var(--link-0);
text-decoration: inherit; text-decoration: inherit;
@@ -495,9 +471,7 @@ body {
content: ","; content: ",";
} }
.post-media { /* for formatting of the featured image/media, see the .featured-media class */
margin-top: 15px;
}
.summary-card-description { .summary-card-description {
margin-top: 10px; margin-top: 10px;
@@ -509,6 +483,37 @@ body {
/* }}} */ /* }}} */
/* Figures, and featured media component (used in page.html and summary-card) {{{ */
figure > .figure-media {
padding: 5px;
}
figure > .figure-media.border {
border: 2px solid var(--figure-border);
}
figure {
display: block;
text-align: center;
margin: 0;
}
figcaption {
font-style: italic;
font-size: small;
text-align: center;
}
.featured-media {
margin-top: 15px;
}
.featured-media > figure > .figure-media {
border: 7px solid var(--figure-border);
}
/* }}} */
/* List layout {{{ */ /* List layout {{{ */
.page-list { .page-list {

View File

@@ -1,5 +1,5 @@
{{ with .Resources.Get "feature" }} {{ with .Resources.Get "feature" }}
<div class="post-media"> <div class="featured-media">
<figure> <figure>
{{ partial "embed-resource.html" . }} {{ partial "embed-resource.html" . }}
{{ with .Title }} {{ with .Title }}

View File

@@ -23,7 +23,7 @@
</div> </div>
{{ end }} {{ end }}
{{ partial "feature-figure.html" . }} {{ partial "featured-media.html" . }}
<div class="post-content" data-pagefind-body> <div class="post-content" data-pagefind-body>
{{ .Content }} {{ .Content }}

View File

@@ -7,7 +7,7 @@
{{ partial "page-metadata/post-short.html" . }} {{ partial "page-metadata/post-short.html" . }}
{{ partial "feature-figure.html" . }} {{ partial "featured-media.html" . }}
{{ with .Summary }} {{ with .Summary }}
<div class="summary-card-description"> <div class="summary-card-description">