mirror of
https://github.com/GenZmeY/casper-i18n.git
synced 2024-11-10 02:28:02 +00:00
Add alt and caption support to feature images (#812)
* Add alt and caption support to feature images * Add feature image alt support to post card * Remove three-curlies
This commit is contained in:
parent
21bdffbd8a
commit
e49664eca4
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1042,7 +1042,7 @@ except for when immediately preceeded by a heading */
|
||||
|
||||
|
||||
/* Captions */
|
||||
.kg-card figcaption {
|
||||
figcaption {
|
||||
padding: 1.5rem 1.5rem 0;
|
||||
text-align: center;
|
||||
color: rgba(0,0,0,0.5);
|
||||
@ -1050,9 +1050,12 @@ except for when immediately preceeded by a heading */
|
||||
font-size: 1.3rem;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
.kg-card figcaption strong {
|
||||
figcaption strong {
|
||||
color: rgba(0,0,0,0.8);
|
||||
}
|
||||
figcaption a {
|
||||
color: var(--ghost-accent-color);
|
||||
}
|
||||
|
||||
|
||||
/* Highly specific styles for traditional Instagram embeds */
|
||||
|
5
page.hbs
5
page.hbs
@ -21,8 +21,11 @@ into the {body} tag of the default.hbs template --}}
|
||||
{{img_url feature_image size="xl"}} 2000w"
|
||||
sizes="(min-width: 1400px) 1400px, 92vw"
|
||||
src="{{img_url feature_image size="xl"}}"
|
||||
alt="{{title}}"
|
||||
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
|
||||
/>
|
||||
{{#if feature_image_caption}}
|
||||
<figcaption>{{feature_image_caption}}</figcaption>
|
||||
{{/if}}
|
||||
</figure>
|
||||
{{/if}}
|
||||
</header>
|
||||
|
@ -14,7 +14,7 @@ which templates loop over to generate a list of posts. --}}
|
||||
{{img_url feature_image size="xl"}} 2000w"
|
||||
sizes="(max-width: 1000px) 400px, 800px"
|
||||
src="{{img_url feature_image size="m"}}"
|
||||
alt="{{title}}"
|
||||
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
|
||||
loading="lazy"
|
||||
/>
|
||||
</a>
|
||||
|
5
post.hbs
5
post.hbs
@ -59,8 +59,11 @@ into the {body} tag of the default.hbs template --}}
|
||||
{{img_url feature_image size="xl"}} 2000w"
|
||||
sizes="(min-width: 1400px) 1400px, 92vw"
|
||||
src="{{img_url feature_image size="xl"}}"
|
||||
alt="{{title}}"
|
||||
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
|
||||
/>
|
||||
{{#if feature_image_caption}}
|
||||
<figcaption>{{feature_image_caption}}</figcaption>
|
||||
{{/if}}
|
||||
</figure>
|
||||
{{/if}}
|
||||
</header>
|
||||
|
Loading…
Reference in New Issue
Block a user