File tree Expand file tree Collapse file tree 2 files changed +25
-25
lines changed Expand file tree Collapse file tree 2 files changed +25
-25
lines changed Original file line number Diff line number Diff line change 11---
22import { z } from " astro:schema" ;
33import { Icon } from " @astrojs/starlight/components" ;
4+ import type { StarlightIcon } from " @astrojs/starlight/types" ;
45
56const props = z
67 .object ({
7- changelog: z
8- .string ()
9- .transform ((val ) => val .toLowerCase ().replaceAll (" " , " -" )),
8+ text: z .string ().default (" Subscribe to RSS" ),
9+ icon: z .custom <StarlightIcon >().default (" rss" ),
1010 })
11- .or (
12- z .object ({
13- href: z .string (),
14- }),
11+ .and (
12+ z
13+ .object ({
14+ changelog: z
15+ .string ()
16+ .transform ((val ) => val .toLowerCase ().replaceAll (" " , " -" )),
17+ })
18+ .or (
19+ z .object ({
20+ href: z .string (),
21+ }),
22+ ),
1523 );
1624
1725const input = props .parse (Astro .props );
@@ -22,6 +30,6 @@ const input = props.parse(Astro.props);
2230 class =" inline-flex items-center justify-center gap-1 rounded font-semibold no-underline"
2331 target =" _blank"
2432>
25- Subscribe to RSS
26- <Icon name =" rss " size =" 1.25rem" />
33+ { input . text }
34+ <Icon name ={ input . icon } size =" 1.25rem" />
2735</a >
Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ import { Image } from "astro:assets";
33import { z } from " astro:schema" ;
44import { getEntry , type CollectionEntry } from " astro:content" ;
55
6- import { StarlightIcon } from " .." ;
6+ import { Icon } from " @astrojs/starlight/components" ;
7+ import RSSButton from " ~/components/RSSButton.astro" ;
8+
79import HeroImage from " ~/assets/images/changelog/hero.svg" ;
810
911type Props = z .input <typeof props >;
@@ -35,21 +37,11 @@ const products = await uniqueProducts(notes);
3537 <div class =" text-center sm:text-left" >
3638 <h1 >Changelog</h1 >
3739 <p >New updates and improvements at Cloudflare.</p >
38- <div class =" changelog-rss-links" >
39- <a
40- href =" /changelog/rss/index.xml"
41- class =" dark:!hover:text-[#79B1FF] -mx-2 whitespace-nowrap px-2 text-[#056DFF] no-underline hover:rounded-[4px] hover:bg-[#DCEBFF] hover:!text-[#056DFF] dark:text-[#79B1FF] dark:hover:bg-[#002B66] max-sm:block"
42- >
43- Subscribe to RSS
44- <StarlightIcon name =" rss" size =" 18px" class =" !inline align-text-top" />
45- </a >
46- <a
47- href =" /fundamentals/new-features/available-rss-feeds/"
48- class =" dark:!hover:text-[#79B1FF] -mx-2 whitespace-nowrap px-2 text-[#056DFF] no-underline hover:rounded-[4px] hover:bg-[#DCEBFF] hover:!text-[#056DFF] dark:text-[#79B1FF] dark:hover:bg-[#002B66] max-sm:block"
49- >
50- View all RSS feeds >
51- </a >
52- </div >
40+ <p >
41+ <RSSButton changelog =" index" />
42+ <br />
43+ <RSSButton href =" index" text =" View all RSS feeds" icon =" right-caret" />
44+ </p >
5345 {
5446 products .length > 0 && (
5547 <div >
You can’t perform that action at this time.
0 commit comments