added site modes
This commit is contained in:
@@ -3,6 +3,10 @@ import Layout from '../layouts/Layout.astro';
|
||||
import PostList from '../components/react/PostList';
|
||||
import EditableText from '../components/react/EditableText';
|
||||
import AssetsButton from '../components/react/AssetsButton';
|
||||
import { getSiteMode, copy } from '../lib/siteMode';
|
||||
|
||||
const siteMode = getSiteMode();
|
||||
const c = copy(siteMode);
|
||||
|
||||
const API_URL = process.env.PUBLIC_API_URL || 'http://localhost:3000';
|
||||
|
||||
@@ -60,7 +64,7 @@ try {
|
||||
const isAdmin = Astro.cookies.get('admin_session')?.value === '1';
|
||||
---
|
||||
|
||||
<Layout title="Catalogue" description={siteConfig.welcome_subtitle}>
|
||||
<Layout title={c.indexTitle} description={siteConfig.welcome_subtitle}>
|
||||
{posts[0]?.cover_image?.url && (
|
||||
<Fragment slot="head">
|
||||
<link rel="preload" as="image" href={posts[0].cover_image.url} fetchpriority="high" />
|
||||
@@ -133,5 +137,5 @@ const isAdmin = Astro.cookies.get('admin_session')?.value === '1';
|
||||
</div>
|
||||
)}
|
||||
|
||||
{posts.length > 0 && <PostList posts={posts} isAdmin={isAdmin} client:idle />}
|
||||
{posts.length > 0 && <PostList posts={posts} isAdmin={isAdmin} mode={siteMode} client:idle />}
|
||||
</Layout>
|
||||
|
||||
Reference in New Issue
Block a user