mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
init
This commit is contained in:
committed by
Morten Olsen
parent
98e39a54cc
commit
ee37ac9d90
@@ -1,27 +1,27 @@
|
||||
---
|
||||
import { Picture } from 'astro:assets';
|
||||
import { Picture } from 'astro:assets'
|
||||
|
||||
import Time from '@/components/time/absolute.astro';
|
||||
import type { Article } from '@/data/data.js';
|
||||
import { formatDate } from '@/utils/time.js';
|
||||
import Time from '@/components/time/absolute.astro'
|
||||
import type { Article } from '@/data/data.js'
|
||||
import { formatDate } from '@/utils/time.js'
|
||||
|
||||
type Props = {
|
||||
article: Article;
|
||||
};
|
||||
article: Article
|
||||
}
|
||||
|
||||
const { article: item } = Astro.props;
|
||||
const { article: item } = Astro.props
|
||||
---
|
||||
|
||||
<a href={`/articles/${item.slug}`}>
|
||||
<article>
|
||||
<Picture
|
||||
class="thumb"
|
||||
alt="thumbnail image"
|
||||
class='thumb'
|
||||
alt='thumbnail image'
|
||||
src={item.data.heroImage}
|
||||
formats={['avif', 'webp', 'jpeg']}
|
||||
width={100}
|
||||
/>
|
||||
<div class="content">
|
||||
<div class='content'>
|
||||
<small>
|
||||
<Time format={formatDate} datetime={item.data.pubDate} />
|
||||
</small>
|
||||
@@ -30,7 +30,7 @@ const { article: item } = Astro.props;
|
||||
</article>
|
||||
</a>
|
||||
|
||||
<style>
|
||||
<style lang='less'>
|
||||
a {
|
||||
width: 45%;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user