mirror of
https://github.com/Xevion/undefined.behavio.rs.git
synced 2025-12-11 10:09:10 -06:00
Summary card component
This commit is contained in:
38
src/components/Summary.astro
Normal file
38
src/components/Summary.astro
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
interface Props {
|
||||
url: string;
|
||||
date: Date;
|
||||
title: string;
|
||||
tags: string[];
|
||||
description: string;
|
||||
}
|
||||
|
||||
const { url, date, title, tags, description } = Astro.props;
|
||||
---
|
||||
<div class="clear-both">
|
||||
<div class="post_date text-center uppercase mb-4 ml-8 py-1 border-y border-white leading-4 float-right">
|
||||
<a href={url}>
|
||||
<time datetime={date.toISOString()}>
|
||||
<span class="month">
|
||||
{ date.getMonth() }
|
||||
</span>
|
||||
<br>
|
||||
<span class="date">
|
||||
{ date.getDay() }
|
||||
</span>
|
||||
<br>
|
||||
<span class="year">
|
||||
{ date.getFullYear() }</span>
|
||||
</time>
|
||||
</a>
|
||||
</div>
|
||||
<div class="post_combo">
|
||||
<h2>
|
||||
<a href={url}>{ title }</a>
|
||||
</h2>
|
||||
<i>
|
||||
{ tags.join(" ")}
|
||||
</i>
|
||||
</div>
|
||||
{ description }
|
||||
</div>
|
||||
Reference in New Issue
Block a user