feat: add card image upload to link content types

This commit is contained in:
João Peixoto
2021-01-26 20:18:42 +00:00
committed by João Peixoto
parent 17b7c193aa
commit c5ba9f33fc
7 changed files with 11 additions and 5 deletions
@@ -21,6 +21,9 @@ fields:
- type: text
name: path
label: path
- type: file
name: card_image
label: card_image
- type: datetime
name: date
label: date
Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 KiB

@@ -19,11 +19,14 @@
img-class="h-full"
itemprop="image"
:alt="title"
:src="`${
frontmatter.header_image
? frontmatter.header_image
: '/header-image-placeholder.png'
}`"
:src="
frontmatter.card_image
? frontmatter.card_image
: `/${frontmatter.type
.toLowerCase()
.split(' ')
.join('-')}-placeholder.png`
"
/>
</UnstyledLink>
</div>