Skip to content

📧✨ Beautiful email. For everyone.

2.4 KB
Raw Blame
---
import '@fontsource-variable/newsreader/opsz.css'
import '@fontsource-variable/newsreader/opsz-italic.css'
import '@fontsource-variable/hanken-grotesk'
import '@fontsource-variable/jetbrains-mono'
import '@fontsource-variable/inter'
import '../styles/global.css'

interface Props {
  title: string
  description: string
}

const { title, description } = Astro.props
// Link previews need absolute URLs.
const card = new URL('/social-card.png', Astro.site)
const url = new URL(Astro.url.pathname, Astro.site)
---

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>{title}</title>
    <meta name="description" content={description} />
    <meta name="theme-color" content="#fbfbfc" media="(prefers-color-scheme: light)" />
    <meta name="theme-color" content="#09090a" media="(prefers-color-scheme: dark)" />
    <meta name="color-scheme" content="light dark" />
    <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
    <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
    <meta property="og:type" content="website" />
    <meta property="og:title" content={title} />
    <meta property="og:description" content={description} />
    <meta property="og:url" content={url} />
    <meta property="og:site_name" content="inlark" />
    <meta property="og:image" content={card} />
    <meta property="og:image:type" content="image/png" />
    <meta property="og:image:width" content="1200" />
    <meta property="og:image:height" content="630" />
    <meta
      property="og:image:alt"
      content="inlark: beautiful email, for everyone. The unified inbox rising over a dawn horizon."
    />
    <meta name="twitter:card" content="summary_large_image" />
    <slot name="head" />
  </head>
  <body class="grain bg-night font-sans text-ink antialiased">
    <slot />
    <script>
      // Reveal sections as they scroll into view. Without JavaScript they are simply visible.
      const observer = new IntersectionObserver(
        (entries) => {
          for (const entry of entries) {
            if (!entry.isIntersecting) continue
            entry.target.classList.add('is-visible')
            observer.unobserve(entry.target)
          }
        },
        { rootMargin: '0px 0px -8% 0px', threshold: 0.12 },
      )
      document.querySelectorAll('.reveal').forEach((el) => observer.observe(el))
    </script>
  </body>
</html>