Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/pages/changelog/index.astro
Original file line number Diff line number Diff line change
@@ -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();
Expand All @@ -27,7 +28,7 @@ const { products, productAreas, changelogs } = await getChangelogs();
</p>
<br />
<label for="products">Product:</label>
<select name="products" id="products">
<select name="products" id="products" class="mr-4">
<option value="all">Select...</option>
{
products.map((product) => (
Expand All @@ -46,9 +47,9 @@ const { products, productAreas, changelogs } = await getChangelogs();
</select>
{
changelogs.map(([date, entries]) => (
<div class="md:grid md:grid-cols-[20%_80%]" data-date={date}>
<div class="md:grid md:grid-cols-[18%_82%]" data-date={date}>
<div>
<h2 class="text-nowrap">{date}</h2>
<h4 class="text-nowrap">{format(date, "do MMMM yyyy")}</h4>
</div>
<div class="!mt-0">
{entries?.map((entry) => (
Expand Down Expand Up @@ -102,7 +103,7 @@ const { products, productAreas, changelogs } = await getChangelogs();
const navHeightPx = Number(navHeightRem.split("rem")[0]) * 16 + 16;

const headers = document.querySelectorAll<HTMLElement>(
"[data-date] > div > h2",
"[data-date] > div > h4",
);
headers.forEach(
(header) => new StickyHeader(header, { offset: 0 - navHeightPx }),
Expand Down Expand Up @@ -162,7 +163,7 @@ const { products, productAreas, changelogs } = await getChangelogs();
</script>

<style>
h2.sticky-pinned {
h4.sticky-pinned {
top: var(--sl-nav-height);
background-color: var(--sl-color-bg);
}
Expand Down
Loading