Add admin slideshow, horizontal animated calendar, and weather strip
This commit is contained in:
+56
-37
@@ -1,3 +1,8 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect, useState } from 'react';
|
||||
import Slideshow from '@/components/Slideshow';
|
||||
import CalendarStrip from '@/components/CalendarStrip';
|
||||
import MeasuredText from '@/components/MeasuredText';
|
||||
|
||||
const gold = '#E8A849';
|
||||
@@ -5,47 +10,61 @@ const navy = '#010D1E';
|
||||
const cream = '#f5f0e8';
|
||||
|
||||
export default function HomePage() {
|
||||
const [tagline, setTagline] = useState('Hotel · Restaurant · Andean Highlands');
|
||||
|
||||
useEffect(() => {
|
||||
fetch('/api/site-assets?key=tagline')
|
||||
.then((r) => r.json())
|
||||
.then((j) => {
|
||||
if (j.data) setTagline(j.data);
|
||||
})
|
||||
.catch(() => {});
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<main
|
||||
style={{
|
||||
padding: 'clamp(3rem, 9vw, 7rem) 2rem',
|
||||
minHeight: 'calc(100vh - 56px)',
|
||||
background: navy,
|
||||
color: cream,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
textAlign: 'center',
|
||||
}}
|
||||
>
|
||||
<p
|
||||
<main style={{ minHeight: 'calc(100vh - 56px)', background: navy, color: cream }}>
|
||||
<Slideshow />
|
||||
|
||||
<section
|
||||
style={{
|
||||
fontFamily: 'monospace',
|
||||
fontSize: '12px',
|
||||
letterSpacing: '0.18em',
|
||||
textTransform: 'uppercase',
|
||||
color: gold,
|
||||
margin: '0 0 1rem',
|
||||
padding: 'clamp(3rem, 9vw, 7rem) 2rem',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
textAlign: 'center',
|
||||
}}
|
||||
>
|
||||
Hotel · Restaurant · Vineyard
|
||||
</p>
|
||||
<h1
|
||||
style={{
|
||||
fontSize: 'clamp(44px, 7vw, 84px)',
|
||||
fontWeight: 400,
|
||||
fontStyle: 'italic',
|
||||
lineHeight: 1.08,
|
||||
margin: '0 0 1.25rem',
|
||||
color: cream,
|
||||
}}
|
||||
>
|
||||
La Huasca
|
||||
</h1>
|
||||
<p style={{ fontSize: '18px', lineHeight: 1.55, color: 'rgba(245,240,232,0.78)', maxWidth: '52ch', margin: '0 0 2rem' }}>
|
||||
Welcome to the TypeScript + Next.js version of La Huasca.
|
||||
</p>
|
||||
<MeasuredText text="Hello, Pretext!" />
|
||||
<p
|
||||
style={{
|
||||
fontFamily: 'monospace',
|
||||
fontSize: '12px',
|
||||
letterSpacing: '0.18em',
|
||||
textTransform: 'uppercase',
|
||||
color: gold,
|
||||
margin: '0 0 1rem',
|
||||
}}
|
||||
>
|
||||
{tagline}
|
||||
</p>
|
||||
<h1
|
||||
style={{
|
||||
fontSize: 'clamp(44px, 7vw, 84px)',
|
||||
fontWeight: 400,
|
||||
fontStyle: 'italic',
|
||||
lineHeight: 1.08,
|
||||
margin: '0 0 1.25rem',
|
||||
color: cream,
|
||||
}}
|
||||
>
|
||||
La Huasca
|
||||
</h1>
|
||||
<p style={{ fontSize: '18px', lineHeight: 1.55, color: 'rgba(245,240,232,0.78)', maxWidth: '52ch', margin: '0 0 2rem' }}>
|
||||
Welcome to the TypeScript + Next.js version of La Huasca.
|
||||
</p>
|
||||
<MeasuredText text="Hello, Pretext!" />
|
||||
</section>
|
||||
|
||||
<CalendarStrip />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user