CTAO portal demo (Astro + Sveltia)

This commit is contained in:
ctao
2026-07-24 18:09:00 +02:00
commit a1c85d73c7
16 changed files with 6118 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
---
import '../styles/global.css';
const { title = 'CTAO Portal', description = 'Portal obserwatorium CTAO' } = Astro.props;
const path = Astro.url.pathname;
const isActive = (href) => (href === '/' ? path === '/' : path.startsWith(href));
const links = [
{ href: '/', label: 'Newsy' },
{ href: '/telescopes', label: 'Teleskopy' },
{ href: '/dashboard', label: 'Dashboard' },
];
---
<!doctype html>
<html lang="pl">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{title}</title>
<meta name="description" content={description} />
</head>
<body>
<header class="site-header">
<div class="container nav">
<a class="brand" href="/"><span class="dot"></span> CTAO&nbsp;Portal</a>
<span class="spacer"></span>
{links.map((l) => (
<a class="navlink" href={l.href} aria-current={isActive(l.href) ? 'page' : undefined}>{l.label}</a>
))}
<a class="navlink" href="/admin" style="color:var(--brand-2)">✎ Edytor</a>
</div>
</header>
<main>
<slot />
</main>
<footer class="footer">
<div class="container">
CTAO Portal — demo (git-based CMS). Treść generowana statycznie z plików Markdown.
</div>
</footer>
</body>
</html>