Files
NexStudio/src/layouts/BaseLayout.astro
Javaxman d12826b314 Aggiunge un link esplicito al CSS compilato in BaseLayout.
Garantisce che le route /en e /th carichino sempre il foglio stile Astro anche quando il wrapping della homepage non aggancia automaticamente l'asset.

Made-with: Cursor
2026-04-27 13:33:50 +02:00

61 lines
2.3 KiB
Plaintext

---
import '../styles/global.css';
import globalStylesheetHref from '../styles/global.css?url';
import CookieConsent from '../components/CookieConsent.astro';
import ChatGateModal from '../components/ChatGateModal.astro';
interface Props {
title?: string;
description?: string;
}
const {
title = 'NexStudio — Software su misura',
description = 'Studio di sviluppo software: web app, API, automazioni e prodotti digitali, con focus su qualità e time-to-market.',
} = Astro.props;
const pathname = Astro.url.pathname;
const localeMatch = pathname.match(/^\/(en|th)(\/|$)/);
const htmlLang = localeMatch?.[1] ?? 'it';
const canonicalUrl = Astro.url.toString();
---
<!doctype html>
<html lang={htmlLang} class="bg-nx-bg">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content={description} />
<link rel="canonical" href={canonicalUrl} />
<meta name="theme-color" content="#030712" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="NexStudio" />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:url" content={canonicalUrl} />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} />
<link rel="stylesheet" href={globalStylesheetHref} />
<title>{title}</title>
<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=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=JetBrains+Mono:wght@400;500&display=swap"
rel="stylesheet"
/>
</head>
<body class="min-h-screen">
<slot />
<CookieConsent />
<ChatGateModal />
<script src="/particle-bg.js" defer></script>
<!--
Widget chat / analytics: caricare solo dopo consenso, es. ascoltando
`nexstudio:cookie-consent` (vedi informativa cookie) o usando
`window.NexStudioCookieConsent?.getConsent()`.
-->
</body>
</html>