mirror of
https://git.ari.lt/ari.lt/ari.lt.git
synced 2025-02-04 17:49:24 +01:00
serve blogs in correct order
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
parent
5ee00714cd
commit
6596a19e29
1 changed files with 22 additions and 27 deletions
|
@ -40,33 +40,28 @@ async function main() {
|
||||||
FETCH_BLOG_POSTS().then((j) => {
|
FETCH_BLOG_POSTS().then((j) => {
|
||||||
blog.innerText = "";
|
blog.innerText = "";
|
||||||
|
|
||||||
Object.entries(j)
|
Object.entries(j).forEach((post) => {
|
||||||
.reverse()
|
let id = post[0];
|
||||||
.forEach((post) => {
|
post = post[1];
|
||||||
let id = post[0];
|
|
||||||
post = post[1];
|
|
||||||
|
|
||||||
mkelem(
|
mkelem(
|
||||||
"li",
|
"li",
|
||||||
[
|
[
|
||||||
mkelem(
|
mkelem(
|
||||||
"a",
|
"a",
|
||||||
[
|
[
|
||||||
post["title"],
|
post["title"],
|
||||||
" -- ",
|
" -- ",
|
||||||
new Date(post["time"] * 1000).toUTCString(),
|
new Date(post["time"] * 1000).toUTCString(),
|
||||||
],
|
],
|
||||||
null,
|
null,
|
||||||
{ href: `${BLOG_SITE}/b/${id}` }
|
{ href: `${BLOG_SITE}/b/${id}` },
|
||||||
),
|
),
|
||||||
mkelem(
|
mkelem("pre", linkify(post["content"]).concat([" ..."])),
|
||||||
"pre",
|
],
|
||||||
linkify(post["content"]).concat([" ..."])
|
blog,
|
||||||
),
|
);
|
||||||
],
|
});
|
||||||
blog
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
FETCH_COMMENTS().then((j) => {
|
FETCH_COMMENTS().then((j) => {
|
||||||
|
@ -86,7 +81,7 @@ async function main() {
|
||||||
}),
|
}),
|
||||||
mkelem("pre", linkify(post[1], COMMENT_SITE)),
|
mkelem("pre", linkify(post[1], COMMENT_SITE)),
|
||||||
],
|
],
|
||||||
comment
|
comment,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue