update new article

This commit is contained in:
2026-01-18 22:15:07 +01:00
parent 1255ce4f07
commit cc8b8b6d8b
8 changed files with 515 additions and 67 deletions

View File

@@ -10,6 +10,10 @@ const style = css`
flex-direction: row;
gap: 4px;
}
h2 {
margin-top: 0;
}
`;
export default defineComponent({
@@ -28,9 +32,9 @@ export default defineComponent({
{blogEntries.result.value?.map(_ => (
<li key={_.slug}>
<div class="entry">
<RouterLink to={{ name: 'DjBlogEntry', params: { slug: _.slug }}}>{ _.title }</RouterLink>
<span>-</span>
<time datetime={ _.createdAt }>{ new Date(_.createdAt).toLocaleDateString() }</time>
<span>-</span>
<RouterLink to={{ name: 'DjBlogEntry', params: { slug: _.slug }}}>{ _.title }</RouterLink>
</div>
</li>
)) ?? <li>Blog posts loading...</li>}

View File

@@ -28,27 +28,32 @@ export const routes: RouteRecordRaw[] = [
];
const styles = css`
body {
height: 100svh;
}
.dj-blog-root {
width: 100vw;
display: flex;
flex-direction: column;
align-items: center;
height: 100vh;
margin: auto;
width: 800px;
.container {
width: 800px;
.dot {
margin-left: 10px;
margin-right: 10px;
}
.spacer {
flex: 1;
.container {
width: 100%;
}
footer {
color: gray;
width: calc(100% - 10px);
margin-bottom: 20px;
width: 800px;
font-style: italic;
padding-left: 10px;
margin-left: 10px;
margin-bottom: 25px;
text-align: left;
}
a {
@@ -61,11 +66,12 @@ const styles = css`
}
nav {
width: 100%;
font-size: 40px;
margin-bottom: 40px;
margin-top: 10px;
margin-bottom: 10px;
text-decoration: none;
text-align: right;
width: 100%;
a, a:visited {
color: var(--dj-palette3);
@@ -73,11 +79,16 @@ const styles = css`
}
@media only screen and (max-width: 1024px) {
width: 100%;
.container {
width: calc(100% - 20px);
padding: 10px;
}
.dj-title {
margin-right: 30px;
}
footer {
margin-bottom: 0;
}
@@ -98,14 +109,14 @@ export default defineComponent({
<>
<div ref={carrier} class="tooltip-carrier" />
<div class="dj-blog-root">
<nav>
<DjTooltip tooltip="flog, clog, bog, frog, cog, log, grog, fog, snog...">
<RouterLink to={{ name: 'DjBlogMain' }}>
dj blog
</RouterLink>
</DjTooltip>
</nav>
<div class="container">
<nav>
<DjTooltip tooltip="flog, clog, bog, frog, cog, log, grog, fog, snog...">
<RouterLink to={{ name: 'DjBlogMain' }}>
dj blog
</RouterLink>
</DjTooltip>
</nav>
<RouterView>
{{
default: ({ Component }: { Component: VNode }) => (Component &&
@@ -120,11 +131,11 @@ export default defineComponent({
}}
</RouterView>
</div>
<div class="spacer" />
<hr />
<footer>
<div class="bottom">
<div>
<a href="/">djledda.net</a> {new Date().getFullYear()} - <DjEmail>{() => "Contact"}</DjEmail>
<a href="/">djledda.net</a> {new Date().getFullYear()}<span class="dot">·</span><DjEmail>{() => "Contact"}</DjEmail><span class="dot">·</span><a href="/blog/djblog.rss">RSS Feed</a>
</div>
</div>
</footer>

View File

@@ -6,7 +6,7 @@ import { addCSS, css } from "@/util.ts";
const styles = css`
body {
height: 100vh;
height: 100svh;
}
.dj-home-root {
@@ -65,6 +65,7 @@ body {
footer {
margin-left: 10px;
margin-bottom: 20px;
font-style: italic;
}
@media only screen and (max-width: 1024px) {