Compare commits
1 Commits
main
...
post/thumb
Author | SHA1 | Date |
---|---|---|
|
65e857c43d |
|
@ -4,5 +4,6 @@ date: '2024-09-20'
|
||||||
description: "This is a placeholder description"
|
description: "This is a placeholder description"
|
||||||
tags: ["a123"]
|
tags: ["a123"]
|
||||||
series: ["placeholder", "another-series"]
|
series: ["placeholder", "another-series"]
|
||||||
|
thumbnail: "/favicon.png"
|
||||||
---
|
---
|
||||||
## Content
|
## Content
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
---
|
---
|
||||||
title: Placeholder 3
|
title: Placeholder 3
|
||||||
date: '2024-09-24'
|
date: '2024-09-24'
|
||||||
tags: []
|
tags: ["hi"]
|
||||||
series: ["placeholder"]
|
series: ["placeholder"]
|
||||||
|
thumbnail: "https://en.wikipedia.org/static/images/icons/wikipedia.png"
|
||||||
---
|
---
|
||||||
## Content
|
## Content
|
||||||
|
|
||||||
|
This post has a thumbnail.
|
||||||
|
|
|
@ -9,7 +9,17 @@
|
||||||
const series = post?.series || [];
|
const series = post?.series || [];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="post-heading">
|
<div id="post-header">
|
||||||
|
{#if post.thumbnail}
|
||||||
|
<div id="thumbnail">
|
||||||
|
{#if post.thumbnail.startsWith("<")}
|
||||||
|
{@html post.thumbnail}
|
||||||
|
{:else}
|
||||||
|
<img src={post.thumbnail} alt={post.title} />
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
<div id="infobox">
|
||||||
{#if series}
|
{#if series}
|
||||||
<div class="flex flex-row justify-left items-center">
|
<div class="flex flex-row justify-left items-center">
|
||||||
{#each series as seriesTag, i}
|
{#each series as seriesTag, i}
|
||||||
|
@ -45,11 +55,40 @@
|
||||||
<p class="text-l text-gray-500">{date}</p>
|
<p class="text-l text-gray-500">{date}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
#post-heading {
|
#post-header {
|
||||||
@apply flex flex-col;
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
margin: .5em 1em .5em 1em;
|
margin: .5em 1em .5em 1em;
|
||||||
|
align-content: center;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
#thumbnail {
|
||||||
|
margin: .3em .8em .3em .3em;
|
||||||
|
border: 1px solid #77777777;
|
||||||
|
|
||||||
|
width: 6em;
|
||||||
|
height: 6em;
|
||||||
|
align-content: center;
|
||||||
|
justify-conent: center;
|
||||||
|
}
|
||||||
|
#thumbnail img {
|
||||||
|
display: block;
|
||||||
|
border: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
aspect-ratio: 1;
|
||||||
|
}
|
||||||
|
#infobox {
|
||||||
|
width: 100%;
|
||||||
|
@apply flex flex-col;
|
||||||
}
|
}
|
||||||
#post-title {
|
#post-title {
|
||||||
@apply text-3xl;
|
@apply text-3xl;
|
||||||
|
|
Loading…
Reference in New Issue