style: format with new style

This commit is contained in:
taskylizard 2024-01-25 16:32:45 +00:00
parent bc3bbaafeb
commit ef422dcda8
No known key found for this signature in database
GPG key ID: 1820131ED1A24120
43 changed files with 686 additions and 583 deletions

View file

@ -1,14 +1,14 @@
<!-- eslint-disable vue/require-v-for-key -->
<script setup lang="ts">
import { data as posts } from "./posts.data";
import { data as posts } from './posts.data'
const formatDate = (raw: string): string => {
const date = new Date(raw);
return date.toLocaleDateString("en-US", {
month: "short",
day: "numeric",
});
};
const date = new Date(raw)
return date.toLocaleDateString('en-US', {
month: 'short',
day: 'numeric'
})
}
</script>
<template>
@ -28,11 +28,14 @@ const formatDate = (raw: string): string => {
<ul>
<li v-for="post of posts[year]" :key="post.url">
<article>
<a :href="post.url" class="border-none">{{ post.title }}</a> -
<a :href="post.url" class="border-none">{{ post.title }}</a>
-
<dl class="m-0 inline">
<dt class="sr-only">Published on</dt>
<dd class="m-0 inline">
<time :datetime="post.date" class="font-bold">{{ formatDate(post.date) }}</time>
<time :datetime="post.date" class="font-bold">
{{ formatDate(post.date) }}
</time>
</dd>
</dl>
</article>