added site modes
This commit is contained in:
@@ -10,6 +10,7 @@ import CyberFx from '../components/CyberFx.astro';
|
||||
import Search from '../components/react/Search';
|
||||
import LogoutButton from '../components/react/LogoutButton';
|
||||
import EditableText from '../components/react/EditableText';
|
||||
import { getSiteMode, copy } from '../lib/siteMode';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
@@ -24,6 +25,9 @@ interface Props {
|
||||
|
||||
const { title, wide = false, description, image, type = 'website', minimal = false } = Astro.props;
|
||||
|
||||
const siteMode = getSiteMode();
|
||||
const c = copy(siteMode);
|
||||
|
||||
const API_URL = process.env.PUBLIC_API_URL || 'http://backend:3000';
|
||||
const isAdmin = Astro.cookies.get('admin_session')?.value === '1';
|
||||
|
||||
@@ -60,7 +64,7 @@ const hasContact = (siteConfig.contact_links?.length ?? 0) > 0;
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="en" class={`mode-${siteMode}`}>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
@@ -133,7 +137,7 @@ const hasContact = (siteConfig.contact_links?.length ?? 0) > 0;
|
||||
{hasContact && (
|
||||
<a href="/contact" class="topbar-control">Contact</a>
|
||||
)}
|
||||
<Search client:idle />
|
||||
<Search client:idle mode={siteMode} />
|
||||
<span class="topbar-divider" aria-hidden="true"></span>
|
||||
{isAdmin ? (
|
||||
<LogoutButton client:idle />
|
||||
@@ -162,7 +166,7 @@ const hasContact = (siteConfig.contact_links?.length ?? 0) > 0;
|
||||
<>
|
||||
<div class="section-rule mb-6">
|
||||
<span class="ornament">✦</span>
|
||||
<span class="font-display italic text-[var(--subtext0)] text-sm">end of catalogue</span>
|
||||
<span class="font-display italic text-[var(--subtext0)] text-sm">{c.footerEnd}</span>
|
||||
<span class="ornament">✦</span>
|
||||
</div>
|
||||
<p class="font-display italic text-base text-[var(--subtext1)] mb-2">
|
||||
|
||||
Reference in New Issue
Block a user