···6666</header>
67676868<style>
6969+ /* UPDATE RSS STYLE XML WHEN YOU CHANGE THESE */
6970 header {
7071 border-image: var(--box-blr-png) 10 fill / 20px / 20px round;
7172 margin: 0 20px 20px;
+130-2
src/pages/rss.style.xml.ts
···11import BoxTlbr from "/assets/box-tlbr.png";
22-import Hr from "/assets/hr.png";
32import Box4x3Mask from "/assets/box-4x3-mask.png";
33+import { experimental_AstroContainer } from "astro/container";
44+import Header from "/components/Header.astro";
55+66+const header = await experimental_AstroContainer
77+ .create()
88+ .then((x) => x.renderToString(Header))
99+ .then((x) =>
1010+ // match data-astro-cid attributes where there no value
1111+ // this is because xml hates boolean attributes for some reason. :(
1212+ x.replaceAll(/data-astro-cid-[a-zA-Z0-9]*(?!=["'])/gm, (m) => m + '=""'),
1313+ )
1414+ .then((x) =>
1515+ // match wbr tags (with data astro cid) and close em
1616+ x.replaceAll(/<wbr data-astro-cid-[a-zA-Z0-9]*="">/gm, (m) => m + "</wbr>"),
1717+ );
418519export async function GET() {
620 return new Response(
721 `
2222+<!DOCTYPE XSL [ <!ENTITY shy ""> ]>
823<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
924 <xsl:output method="html" />
1025···26412742 html,
2843 body {
4444+ min-width: 30ch;
4545+ }
4646+4747+ .blog {
2948 width: 30ch;
3049 margin: auto;
5050+ }
5151+5252+ .intro {
5353+ max-width: 60ch;
5454+ padding-inline: 20px;
5555+ margin: 20px auto;
3156 }
32573358 img,
···6691 a:active {
6792 text-decoration-style: dashed;
6893 }
9494+9595+ /* from Header.astro */
9696+ header {
9797+ border-image: var(--box-blr-png) 10 fill / 20px / 20px round;
9898+ margin: 0 20px 20px;
9999+ padding: 10px 20px;
100100+ height: 3rem; /* 2rem * 1.5 */
101101+ /* render over feed bg */
102102+ z-index: 2;
103103+104104+ display: flex;
105105+ flex-direction: row;
106106+ justify-content: space-between;
107107+ align-items: center;
108108+109109+ @media (max-width: 650px) {
110110+ flex-direction: column;
111111+ align-items: start;
112112+ height: 4.5rem; /* (2rem + 1rem) * 1.5 */
113113+114114+ nav {
115115+ margin-inline: auto;
116116+ contain: inline-size;
117117+ width: 100%;
118118+ overflow: auto;
119119+ scrollbar-width: thin;
120120+ }
121121+122122+ h1 {
123123+ width: 100%;
124124+ text-align: center;
125125+ }
126126+ }
127127+128128+ & > nav > ul {
129129+ display: flex;
130130+ flex-direction: row;
131131+ align-items: center;
132132+ justify-content: start;
133133+ gap: 10px;
134134+ z-index: 999;
135135+ width: fit-content;
136136+ margin-inline: auto;
137137+138138+ & > li {
139139+ display: flex;
140140+ flex-direction: row;
141141+ align-items: center;
142142+ gap: 10px;
143143+144144+ &::marker {
145145+ content: none;
146146+ }
147147+148148+ & + &::before {
149149+ content: "";
150150+ background-image: var(--dot-png);
151151+ background-size: contain;
152152+ width: 9px;
153153+ height: 9px;
154154+ display: block;
155155+ }
156156+ }
157157+ }
158158+ }
159159+160160+ nav > ul > li:last-child > details > ul {
161161+ right: 10px;
162162+ }
163163+164164+ details {
165165+ summary {
166166+ cursor: pointer;
167167+ text-wrap: nowrap;
168168+ }
169169+170170+ & > ul {
171171+ position: absolute;
172172+ z-index: 99999;
173173+174174+ @media (max-width: 650px) {
175175+ inset: auto 15px;
176176+ }
177177+178178+ margin-top: 10px;
179179+ padding: 20px;
180180+ padding-left: 40px;
181181+ & ul {
182182+ margin-left: 10px;
183183+ }
184184+185185+ border-image: var(--box-tlbr-png) 10 fill / 20px round;
186186+ }
187187+ }
188188+189189+ header h1 {
190190+ margin-block: 0;
191191+ position: sticky;
192192+ inset: 0;
193193+ }
69194 </style>
70195 </head>
7119672197 <body>
7373- <section class="blog">
198198+ ${header}
199199+ <section class="intro">
74200 <h1>Blog Posts</h1>
75201 <p>If you want to use this page in your RSS reader, simply paste this page's URL in and it'll just work. To view the original RSS, view the page source. The styling of this page is made possible by <a href="https://developer.mozilla.org/en-US/docs/Web/XML/XSLT" target="_blank">XSLT</a></p>
202202+ </section>
203203+ <section class="blog">
76204 <xsl:for-each select="/rss/channel/item">
77205 <a target="_blank">
78206 <xsl:attribute name="href">