File tree Expand file tree Collapse file tree 2 files changed +26
-14
lines changed
Expand file tree Collapse file tree 2 files changed +26
-14
lines changed Original file line number Diff line number Diff line change 11{%- if page.image %}
2- < figure class ="wp-block-post-featured-image ">
3- < figure class ="wp-caption featured ">
4- < img
5- src ="{{ page.image | prepend: '/assets/images/' | relative_url }} "
6- class ="attachment-post-thumbnail size-post-thumbnail wp-post-image "
7- alt =""
8- style ="object-fit:cover; "
9- decoding ="async "
10- fetchpriority ="high "/>
11- {%- if page.image_caption %}
12- < figcaption style ="font-size: var(--wp--preset--font-size--x-small); text-align: right; margin-top: -25px; padding-right: 5px; color: white; "> {{ page.image_caption }}</ figcaption >
13- {%- endif %}
14- </ figure >
2+ < figure class ="featured-image ">
3+ < img
4+ src ="{{ page.image | prepend: '/assets/images/' | relative_url }} " alt ="Featured image for post '{{ page.title | escape }}' "
5+ decoding ="async "
6+ fetchpriority ="high "/>
7+ {%- if page.image_caption %}
8+ < figcaption class ="overlay-caption "> {{ page.image_caption }}</ figcaption >
9+ {%- endif %}
1510</ figure >
1611{%- endif %}
Original file line number Diff line number Diff line change @@ -160,6 +160,23 @@ body {
160160 margin-bottom : 1em ;
161161 margin-top : 0.5em ;
162162 }
163+
164+ figcaption .overlay-caption {
165+ font-size : var (--wp--preset--font-size--x-small );
166+ text-align : right ;
167+ margin-top : -2em ;
168+ margin-bottom : 0 ;
169+ padding-right : 1em ;
170+ color : white ;
171+ }
172+ }
173+
174+ .featured-image {
175+ @extend .document-figure ;
176+
177+ img {
178+ object-fit : cover ;
179+ }
163180}
164181
165182/* overrides for content types */
@@ -170,4 +187,4 @@ body {
170187
171188.page {
172189 @extend .page-like ;
173- }
190+ }
You can’t perform that action at this time.
0 commit comments