update
This commit is contained in:
@@ -5,15 +5,22 @@ import { RouterLink } from "vue-router";
|
|||||||
import { addCSS, css } from "@/util.ts";
|
import { addCSS, css } from "@/util.ts";
|
||||||
|
|
||||||
const style = css`
|
const style = css`
|
||||||
|
.dj-blog-main {
|
||||||
.entry {
|
.entry {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
em {
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@@ -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>
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
.container {
|
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
|
||||||
|
|
||||||
.dj-title {
|
.dj-title {
|
||||||
margin-right: 30px;
|
margin-right: 30px;
|
||||||
|
|||||||
Reference in New Issue
Block a user