Capital/src/layouts/Layout.astro
2024-12-21 00:18:49 +08:00

122 lines
3.4 KiB
Plaintext

---
import { Image } from 'astro:assets'
import { version } from '../../package.json'
import CompanyLogo from '../assets/images/company-logo.png'
import { getRelativeLocaleUrl } from 'astro:i18n'
interface Props {
title?: string
trailingTitle?: string
}
let { title, trailingTitle } = Astro.props
if (!trailingTitle) trailingTitle = 'Solsynth LLC'
console.log(title ? `${title} | ${trailingTitle}` : trailingTitle)
const locale = Astro.currentLocale ?? 'en'
---
<!doctype html>
<html lang={Astro.currentLocale ?? 'en'}>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/png" href="/favicon.png" />
<link rel="sitemap" href="/sitemap-index.xml" />
<title>{title ? `${title} | ${trailingTitle}` : trailingTitle}</title>
</head>
<body>
<div class="navbar backdrop-blur fixed top-0 left-0 right-0 z-10">
<div class="px-5 flex-1">
<div class="flex-none">
<a class="btn btn-ghost text-xl flex items-center gap-2" href="/">
<Image
src={CompanyLogo}
alt="company logo"
class="h-8 w-8 p-1 bg-white rounded-lg shadow-sm"
/>
<span>Solsynth</span>
</a>
</div>
<div class="flex-1 flex justify-end">
<ul class="menu menu-horizontal px-1">
<li><a href="/posts">Explore</a></li>
</ul>
</div>
</div>
</div>
<main class="mt-[68px]">
<slot />
</main>
<footer class="bg-neutral text-neutral-content p-10 mt-32">
<div class="container mx-auto footer">
<aside>
<Image
src={CompanyLogo}
alt="company logo"
class="h-12 w-12 p-1 bg-white rounded-lg shadow-sm"
/>
<div class="flex flex-col">
<span class="font-bold text-lg">Solsynth LLC</span>
Building wonderful software since 2019.
<span class="font-mono text-xs mt-3">Powered by RoadSign v2</span>
<span class="font-mono text-xs">Capital v{version}</span>
<a href="https://status.solsynth.dev" class="mt-4">
<img
src="https://uptime.betterstack.com/status-badges/v1/monitor/1ki5r.svg"
/>
</a>
</div>
</aside>
<nav>
<h6 class="footer-title">Services</h6>
<a class="link link-hover" href="https://sn.solsynth.dev"> Solian </a>
<a class="link link-hover" href="https://files.solsynth.dev">
Solarfiles
</a>
<a class="link link-hover" href="https://git.solsynth.dev">
Solargit
</a>
</nav>
<nav>
<h6 class="footer-title">Legal</h6>
<a
class="link link-hover"
href={getRelativeLocaleUrl(locale, '/terms/user-agreements')}
>
User Agreements
</a>
<a
class="link link-hover"
href={getRelativeLocaleUrl(locale, '/terms/privacy-policy')}
>
Privacy Policy
</a>
<a
class="link link-hover"
href={getRelativeLocaleUrl(locale, '/terms')}
>
All Terms & Conditions
</a>
</nav>
</div>
</footer>
</body>
</html>
<style>
html,
body {
margin: 0;
width: 100%;
height: 100%;
}
</style>