aboutsummaryrefslogtreecommitdiffhomepage
path: root/nuldoc-src/pages
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2023-03-29 01:22:53 +0900
committernsfisis <nsfisis@gmail.com>2023-03-29 01:22:53 +0900
commitc01083ef9e8d2e30eac2e44855d5e08b8e775eab (patch)
tree45921ed63426d33f15e3ffab66556c51e13460f1 /nuldoc-src/pages
parent7d7d1affd2e96fb90c452758d3d6c7be27937028 (diff)
downloadblog.nsfisis.dev-c01083ef9e8d2e30eac2e44855d5e08b8e775eab.tar.gz
blog.nsfisis.dev-c01083ef9e8d2e30eac2e44855d5e08b8e775eab.tar.zst
blog.nsfisis.dev-c01083ef9e8d2e30eac2e44855d5e08b8e775eab.zip
feat(nuldoc): sort slides in about page
Diffstat (limited to 'nuldoc-src/pages')
-rw-r--r--nuldoc-src/pages/about.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/nuldoc-src/pages/about.ts b/nuldoc-src/pages/about.ts
index 459b88c..3306006 100644
--- a/nuldoc-src/pages/about.ts
+++ b/nuldoc-src/pages/about.ts
@@ -117,7 +117,13 @@ export async function generateAboutPage(
el(
"ul",
[],
- ...slides.map((slide) =>
+ ...Array.from(slides).sort((a, b) => {
+ const ta = dateToString(getPostCreatedDate(a));
+ const tb = dateToString(getPostCreatedDate(b));
+ if (ta > tb) return -1;
+ if (ta < tb) return 1;
+ return 0;
+ }).map((slide) =>
el(
"li",
[],