11---
22import StarlightPage from " @astrojs/starlight/components/StarlightPage.astro" ;
3- import { Badge } from " ~/components" ;
3+ import { Aside , Badge } from " ~/components" ;
44import { marked } from " marked" ;
55import { getChangelogs } from " ~/util/changelogs" ;
66
77const { products, productAreas, changelogs } = await getChangelogs ();
88---
99
1010<StarlightPage frontmatter ={ { title: " Changelogs" , template: " splash" }} >
11- <Badge text =" Beta" variant =" caution" size =" medium" />
12- <br />
13- <br />
11+ <Aside >
12+ Looking for API deprecations? They can be found on our <a
13+ href =" /deprecations/" >dedicated deprecations page.</a
14+ >
15+ </Aside >
1416 <p id =" productDescription" >
1517 Subscribe to all Changelog posts via <a href =" /changelog/index.xml" >RSS</a >.
1618 </p >
@@ -44,43 +46,48 @@ const { products, productAreas, changelogs } = await getChangelogs();
4446 </select >
4547 {
4648 changelogs .map (([date , entries ]) => (
47- <div style = " overflow-anchor: none;" data-date = { date } >
48- <h2 >{ date } </h2 >
49- { entries ?.map ((entry ) => (
50- <div
51- data-product = { entry .product .toLowerCase ()}
52- data-productArea = { entry .productAreaName .toLowerCase ()}
53- >
54- <h3 >
55- <a href = { entry .link } >{ entry .product } </a >
56- </h3 >
57- { [" WAF" , " DDoS protection" ].includes (entry .product ) ? (
58- <p
59- set :html = { marked .parse (
60- entry .scheduled
61- ? " **" +
62- " Scheduled changes for " +
63- (entry .date ?? " " ) +
64- " **"
65- : " **" + (entry .date ?? " " ) + " **" ,
66- )}
67- />
68- ) : (
69- <p set :html = { marked .parse (" **" + (entry .title ?? " " ) + " **" )} />
70- )}
71- { [" WAF" , " DDoS protection" ].includes (entry .product ) ? (
72- <p
73- set :html = { marked .parse (
74- " For more details, refer to the [changelog page](" +
75- entry .link +
76- " )." ,
77- )}
78- />
79- ) : (
80- <p set :html = { marked .parse (entry .description ?? " " )} />
81- )}
82- </div >
83- ))}
49+ <div class = " md:grid md:grid-cols-[20%_80%]" data-date = { date } >
50+ <div >
51+ <h2 class = " text-nowrap" >{ date } </h2 >
52+ </div >
53+ <div class = " !mt-0" >
54+ { entries ?.map ((entry ) => (
55+ <div
56+ data-product = { entry .product .toLowerCase ()}
57+ data-productArea = { entry .productAreaName .toLowerCase ()}
58+ >
59+ <h3 >
60+ <a href = { entry .link } >{ entry .product } </a >
61+ </h3 >
62+ { [" WAF" , " DDoS protection" ].includes (entry .product ) && (
63+ <p
64+ set :html = { marked .parse (
65+ entry .scheduled
66+ ? " **" +
67+ " Scheduled changes for " +
68+ (entry .date ?? " " ) +
69+ " **"
70+ : " **" + (entry .date ?? " " ) + " **" ,
71+ )}
72+ />
73+ )}
74+ { entry .title && (
75+ <p set :html = { marked .parse (" **" + (entry .title ?? " " ) + " **" )} />
76+ )}
77+ { [" WAF" , " DDoS protection" ].includes (entry .product ) ? (
78+ <p
79+ set :html = { marked .parse (
80+ " For more details, refer to the [changelog page](" +
81+ entry .link +
82+ " )." ,
83+ )}
84+ />
85+ ) : (
86+ <p set :html = { marked .parse (entry .description ?? " " )} />
87+ )}
88+ </div >
89+ ))}
90+ </div >
8491 </div >
8592 ))
8693 }
@@ -94,7 +101,9 @@ const { products, productAreas, changelogs } = await getChangelogs();
94101 );
95102 const navHeightPx = Number(navHeightRem.split("rem")[0]) * 16 + 16;
96103
97- const headers = document.querySelectorAll<HTMLElement>("[data-date] > h2");
104+ const headers = document.querySelectorAll<HTMLElement>(
105+ "[data-date] > div > h2",
106+ );
98107 headers.forEach(
99108 (header) => new StickyHeader(header, { offset: 0 - navHeightPx }),
100109 );
0 commit comments