firq-dev-website/src/layouts/Layout.astro
Firq 6b1b3ab6f3
Some checks failed
/ get-version (push) Successful in 3s
/ astro-check (push) Successful in 15s
/ check-tag (push) Successful in 3s
/ checking (push) Successful in 13s
/ auto-deploy-dockge (push) Successful in 6s
/ create-release (push) Failing after 1m53s
/ build-site (push) Successful in 56s
final prerelease
2024-10-01 22:12:04 +02:00

136 lines
3.3 KiB
Text

---
import Navbar from '../components/navbar/navbar.astro'
import NavbarEntry from '../components/navbar/navbarEntry.astro'
import navdata from '../../static/data/_navdata.json'
import embed from '../assets/embed.png'
import home from 'iconoir/icons/home.svg'
import servants from 'iconoir/icons/task-list.svg'
import ta_collection from 'iconoir/icons/database.svg'
import blog from 'iconoir/icons/bookmark-book.svg'
import about from 'iconoir/icons/mail.svg'
export interface Props {
title: string
currentpage: string
descriptionOverride?: string
}
interface IconsLookup {
[key: string]: ImageMetadata
}
const icons: IconsLookup = {
home: home,
servants: servants,
ta_collection: ta_collection,
blog: blog,
about: about,
}
const { descriptionOverride, currentpage, title } = Astro.props
let description
if (descriptionOverride === undefined) {
description = 'Firqs own site!'
} else {
description = descriptionOverride
}
let currPage = 'https://firq.dev/'
if (currentpage !== 'home') {
currPage += currentpage
}
const mapped_navdata = navdata.map((item) => ({
...item,
...{ icon: icons[item.icon] },
}))
---
<!doctype html>
<html lang="en">
<head>
<title>{title}</title>
<!-- Meta Tags -->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<meta name="description" content={description} />
<meta property="og:title" content={title} />
<meta property="og:url" content={currPage} />
<meta property="og:description" content={description} />
<meta property="og:image" content={embed.src} />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta name="theme-color" content="#b86cff" />
<meta
name="google-site-verification"
content="SmcWcewh7DCANcLeTe3ntU0R-LESbo_bsolICJnmulE"
/>
<!-- Disable DarkReader, as site is already in dark mode -->
<meta name="darkreader-lock" content="this site only has darkmode">
<!-- Links -->
<link rel="icon" type="image/ico" href="/favicon.ico" />
<link rel="sitemap" href="/sitemap-index.xml" />
<link href="https://mastodon.neshweb.net/@Firq" rel="me" />
</head>
<body>
<Navbar>
{
mapped_navdata.map((item) => (
<NavbarEntry
currentPage={currentpage}
navtype="desktop"
{...item}
slot="desktop"
/>
))
}
{
mapped_navdata.map((item) => (
<NavbarEntry
currentPage={currentpage}
navtype="mobile"
{...item}
slot="mobile"
/>
))
}
</Navbar>
<slot />
</body>
</html>
<style is:global>
:root {
--hover-scale: 1.05;
--speed: 50%;
--ease: 50%;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
--c-darkgray: #1e1e1e;
--c-duskgray: #242424;
--c-gray: #2e2e2e;
--c-lighter: #eee;
--c-lightgray: #3e3e3e;
--c-darkpurple: #b86cff;
--c-purplepink: #c105ff;
--c-darkergray: #1b1b1b;
--c-reddish: #ff0077;
}
body {
background: var(--c-lightgray);
margin: 0px;
}
.visually-hidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
</style>