mirror of
https://github.com/SebastianStork/kita.git
synced 2026-01-21 13:21:35 +01:00
feat: add optional cover image alt (#20)
Co-authored-by: st1020 <me@st1020.com>
This commit is contained in:
parent
11028d729f
commit
fe3b3a6e14
4 changed files with 10 additions and 9 deletions
|
|
@ -5,7 +5,8 @@ description = "Sample article showcasing basic Markdown syntax and formatting fo
|
||||||
[taxonomies]
|
[taxonomies]
|
||||||
tags = ["markdown", "css", "html"]
|
tags = ["markdown", "css", "html"]
|
||||||
[extra]
|
[extra]
|
||||||
cover_image = "images/markdown-syntax.png"
|
cover.image = "images/markdown-syntax.png"
|
||||||
|
cover.alt = "A Markdown logo"
|
||||||
+++
|
+++
|
||||||
|
|
||||||
This article offers a sample of basic Markdown syntax that can be used in Zola content files, also it shows whether basic HTML elements are decorated with CSS in a Kita theme.
|
This article offers a sample of basic Markdown syntax that can be used in Zola content files, also it shows whether basic HTML elements are decorated with CSS in a Kita theme.
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,12 @@
|
||||||
{% include "partials/page_info.html" %}
|
{% include "partials/page_info.html" %}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{% if page.extra.cover_image %}<!---->
|
{% if page.extra.cover.image %}<!---->
|
||||||
<figure class="mb-12 mt-0">
|
<figure class="mb-12 mt-0">
|
||||||
<img
|
<img
|
||||||
class="h-auto w-full rounded-lg"
|
class="h-auto w-full rounded-lg"
|
||||||
src="{{ get_url(path=page.extra.cover_image) }}"
|
src="{{ get_url(path=page.extra.cover.image) }}"
|
||||||
alt="cover"
|
alt="{{ page.extra.cover.alt | default(value='cover') }}"
|
||||||
/>
|
/>
|
||||||
</figure>
|
</figure>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,9 @@
|
||||||
<meta property="og:site_name" content="{{ config.title }}" />
|
<meta property="og:site_name" content="{{ config.title }}" />
|
||||||
<meta property="og:description" content="{{ description }}" />
|
<meta property="og:description" content="{{ description }}" />
|
||||||
<meta property="og:url" content="{{ page.permalink }}" />
|
<meta property="og:url" content="{{ page.permalink }}" />
|
||||||
{% if page.extra.cover_image %}
|
{% if page.extra.cover.image %}
|
||||||
<!---->
|
<!---->
|
||||||
{% set image = page.extra.cover_image %}
|
{% set image = page.extra.cover.image %}
|
||||||
<!---->
|
<!---->
|
||||||
{% elif config.extra.social_image %}
|
{% elif config.extra.social_image %}
|
||||||
<!---->
|
<!---->
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,12 @@
|
||||||
<section
|
<section
|
||||||
class="block-bg relative mb-4 rounded-lg p-4 first-of-type:mt-0 last-of-type:mb-0 active:scale-95 lg:mb-6 lg:p-6"
|
class="block-bg relative mb-4 rounded-lg p-4 first-of-type:mt-0 last-of-type:mb-0 active:scale-95 lg:mb-6 lg:p-6"
|
||||||
>
|
>
|
||||||
{% if page.extra.cover_image %}
|
{% if page.extra.cover.image %}
|
||||||
<figure class="mb-4 mt-0">
|
<figure class="mb-4 mt-0">
|
||||||
<img
|
<img
|
||||||
class="h-auto w-full rounded-lg"
|
class="h-auto w-full rounded-lg"
|
||||||
src="{{ get_url(path=page.extra.cover_image) }}"
|
src="{{ get_url(path=page.extra.cover.image) }}"
|
||||||
alt="cover"
|
alt="{{ page.extra.cover.alt | default(value='cover') }}"
|
||||||
/>
|
/>
|
||||||
</figure>
|
</figure>
|
||||||
{% endif %}<!---->
|
{% endif %}<!---->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue