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

View File

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