CTAO portal demo (Astro + Sveltia)
This commit is contained in:
@@ -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 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>
|
||||
Reference in New Issue
Block a user