Something went wrong. Try again.
Website hub for the atmosphere community, aggregating posts, events, regional, and more forked from atmosphere.community/atmosphere.community
Something went wrong. Try again.
2.7 kB · 84 lines
Astro
at main
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485---interface Props { title: string; description?: string; ogImage?: string;}
const { title, description = 'The community hub for apps and people building on AT Protocol', ogImage,} = Astro.props;
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
import '../styles/global.css';---
<!doctype html><html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="generator" content={Astro.generator} />
<title>{title} — atmosphere.community</title> <meta name="description" content={description} /> <link rel="canonical" href={canonicalURL} />
<!-- Open Graph --> <meta property="og:type" content="website" /> <meta property="og:url" content={canonicalURL} /> <meta property="og:title" content={title} /> <meta property="og:description" content={description} /> {ogImage && <meta property="og:image" content={ogImage} />}
<!-- Favicons --> <link rel="icon" type="image/webp" href="/goose.webp" /> <link rel="apple-touch-icon" href="/goose.webp" />
<!-- Fonts: Bitter (display) + Source Sans 3 (body) --> <link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link href="https://fonts.googleapis.com/css2?family=Bitter:wght@600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap" rel="stylesheet" /> </head> <body> <a href="#main" class="skip-link">Skip to content</a> <slot name="header" /> <main id="main"> <slot /> </main> <slot name="footer" /> <script> // Localize event times to the user's timezone. // Falls back to the UTC time rendered at build time if anything fails. document.querySelectorAll('time[data-event-time]').forEach((el) => { try { const iso = el.getAttribute('datetime'); if (!iso) return; const d = new Date(iso); if (isNaN(d.getTime())) return; const date = d.toLocaleDateString('en-US', { weekday: 'short', month: 'short', day: 'numeric', }); const time = d.toLocaleTimeString('en-US', { hour: 'numeric', minute: '2-digit', }); const tz = Intl.DateTimeFormat().resolvedOptions().timeZone; const short = d.toLocaleTimeString('en-US', { timeZoneName: 'short' }) .replace(/.*\s/, ''); // extract "PDT", "EST", etc. el.textContent = `${date} · ${time} ${short}`; } catch { // Keep the UTC fallback rendered at build time } }); </script> </body></html>