This commit is contained in:
2026-01-18 22:33:52 +01:00
parent 709053b27e
commit 28f657fb07
2 changed files with 29 additions and 16 deletions

View File

@@ -5,15 +5,22 @@ import { RouterLink } from "vue-router";
import { addCSS, css } from "@/util.ts";
const style = css`
.dj-blog-main {
.entry {
display: flex;
flex-direction: row;
gap: 4px;
}
em {
color: gray;
}
h2 {
margin-top: 0;
}
}
`;
export default defineComponent({
@@ -26,16 +33,17 @@ export default defineComponent({
await blogEntries.done;
return () => <>
<main>
<main class="dj-blog-main">
<h2>Entries</h2>
<ul>
{blogEntries.result.value?.map(_ => (
<li key={_.slug}>
<div class="entry">
<time datetime={ _.createdAt }>{ new Date(_.createdAt).toLocaleDateString() }</time>
<span>-</span>
<RouterLink to={{ name: 'DjBlogEntry', params: { slug: _.slug }}}>{ _.title }</RouterLink>
</div>
<div>
<em>first published <time datetime={ _.createdAt }>{ new Date(_.createdAt).toLocaleDateString() }</time></em>
</div>
</li>
)) ?? <li>Blog posts loading...</li>}
</ul>

View File

@@ -49,7 +49,7 @@ body {
}
footer {
width: 800px;
width: 100%;
font-style: italic;
margin-left: 10px;
margin-bottom: 25px;
@@ -65,6 +65,14 @@ body {
}
}
ul {
padding-left: 30px;
}
li {
list-style: disclosure-closed;
}
nav {
width: 100%;
font-size: 40px;
@@ -79,11 +87,8 @@ body {
}
@media only screen and (max-width: 1024px) {
width: 100%;
.container {
width: calc(100% - 20px);
padding: 10px;
}
.dj-title {
margin-right: 30px;