---
import CookieConsent from '../components/CookieConsent.astro'
import Footer from '../components/Footer.astro'
import Header from '../components/Header.jsx'

const canonicalURL = new URL(Astro.url.pathname, Astro.site)
const socialImageURL = new URL('/xahau-logo.png', Astro.site)
const title = Astro.props.frontmatter?.title
  ? `Xahau: ${Astro.props.frontmatter?.title}`
  : 'Xahau'
const description = Astro.props.frontmatter?.description
  ? Astro.props.frontmatter?.description
  : 'Xahau is a blockchain for the real world. It is a smart blockchain with account-based programmability. It is cheap and fast by design. It is built for the real world.'
---
<html lang="en">
  <head>
    <link rel="shortcut icon" href="/favicon.svg" type="image/svg+xml">
    <meta charset="UTF-8" />
    <title>{title}</title>
    <meta name="description" content={description} />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link href="https://fonts.googleapis.com/css2?family=Onest:wght@400;700&display=swap" rel="stylesheet" />
    <link rel="canonical" href={canonicalURL} />
    <meta property="og:title" content={title} />
    <meta property="og:type" content="website" />
    <meta property="og:description" content={description} />
    <meta property="og:url" content={canonicalURL} />
    <meta property="og:image" content={socialImageURL} />
    <meta property="og:image:alt" content="Xahau logo" />

    <meta name="twitter:card" content="summary_large_image" />
    <meta property="twitter:domain" content="xahau.network" />
    <meta property="twitter:url" content={canonicalURL} />
    <meta name="twitter:title" content={title} />
    <meta name="twitter:description" content={description} />
    <meta name="twitter:image" content={socialImageURL} />

  </head>
  <body class="font-[Onest] bg-xahau-background min-h-screen flex flex-col">
    <Header client:load url={Astro.url} />
    <slot />
    <Footer />
    <CookieConsent />
  </body>
</html> 
