From 66aa5de6040bf14d427c64f345bf88be72ba975c Mon Sep 17 00:00:00 2001 From: Kian Newman-Hazel Date: Tue, 19 Nov 2024 13:47:46 +0000 Subject: [PATCH] [Docs Site] Change date format in changelog, adjust dropdown margin --- src/pages/changelog/index.astro | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/pages/changelog/index.astro b/src/pages/changelog/index.astro index 0e276c6342eb1b7..39a2d3926549fe1 100644 --- a/src/pages/changelog/index.astro +++ b/src/pages/changelog/index.astro @@ -1,7 +1,8 @@ --- import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro"; -import { Aside, Badge } from "~/components"; +import { Aside } from "~/components"; import { marked } from "marked"; +import { format } from "date-fns"; import { getChangelogs } from "~/util/changelogs"; const { products, productAreas, changelogs } = await getChangelogs(); @@ -27,7 +28,7 @@ const { products, productAreas, changelogs } = await getChangelogs();


- { products.map((product) => ( @@ -46,9 +47,9 @@ const { products, productAreas, changelogs } = await getChangelogs(); { changelogs.map(([date, entries]) => ( -
+
-

{date}

+

{format(date, "do MMMM yyyy")}

{entries?.map((entry) => ( @@ -102,7 +103,7 @@ const { products, productAreas, changelogs } = await getChangelogs(); const navHeightPx = Number(navHeightRem.split("rem")[0]) * 16 + 16; const headers = document.querySelectorAll( - "[data-date] > div > h2", + "[data-date] > div > h4", ); headers.forEach( (header) => new StickyHeader(header, { offset: 0 - navHeightPx }), @@ -162,7 +163,7 @@ const { products, productAreas, changelogs } = await getChangelogs();