fix build

This commit is contained in:
ryanchristo 2026-11-17 22:15:27 -08:00
parent c0ee8a4a11
commit 71590024e7
No known key found for this signature in database
28 changed files with 943 additions and 2 deletions

View file

@ -0,0 +1,30 @@
.background {
align-items: center;
display: flex;
height: 100vh;
justify-content: center;
position: fixed;
width: 100vw;
z-index: -1;
}
.background {
background: var(--background-primary);
}
.background img {
scale: 65%;
}
@media (max-width: 850px) {
.background img {
scale: 35%;
}
}
.background div {
background: var(--background-primary-transparent);
height: 100vh;
position: fixed;
width: 100vw;
}

24
components/Background.tsx Normal file
View file

@ -0,0 +1,24 @@
'use client'
import Image from 'next/image'
import * as React from 'react'
import { useContext } from 'react'
import darkBackground from '../assets/images/chora_dark.png'
import lightBackground from '../assets/images/chora_light.png'
import { ThemeContext } from '../contexts'
import styles from './Background.module.css'
const Background = () => {
const { darkTheme } = useContext(ThemeContext)
return (
<div className={styles.background}>
<Image alt="chora" src={darkTheme ? darkBackground : lightBackground} />
<div />
</div>
)
}
export default Background

View file

@ -0,0 +1,11 @@
.footer {
composes: footer from '../styles/footer.css';
}
.title {
composes: footer-title from '../styles/footer.css';
}
.list {
composes: footer-list from '../styles/footer.css';
}

57
components/Footer.tsx Normal file
View file

@ -0,0 +1,57 @@
'use client'
import Image from 'next/image'
import Link from 'next/link'
import * as React from 'react'
import { useContext } from 'react'
import choraDarkSmall from '../assets//images/chora_dark_small.png'
import choraLightSmall from '../assets//images/chora_light_small.png'
import { ThemeContext } from '../contexts'
import { ArrowUpRight } from './icons'
import styles from './Footer.module.css'
const Footer = ({ about, sections }: any) => {
const { darkTheme } = useContext(ThemeContext)
const currentYear = new Date().getFullYear()
return (
<footer className={styles.footer}>
<div style={{ display: 'none' }}>{darkTheme?.toString()}</div>
<div>
<div className={styles.title}>
<Image
alt="chora"
src={darkTheme ? choraDarkSmall : choraLightSmall}
/>
<h4>{`© ${currentYear} Chora Studio LLC`}</h4>
</div>
{about && (
<div className={styles.list}>
<h3>{about.title}</h3>
<div>{about.text}</div>
</div>
)}
{sections.map((section: any) => (
<div className={styles.list} key={section.title}>
<h3>{section.title}</h3>
<ul>
{section.items.map((item: any) => (
<li key={item.title}>
<Link href={item.link} target={item.target}>
{item.title}
{item.target && <ArrowUpRight />}
</Link>
</li>
))}
</ul>
</div>
))}
</div>
</footer>
)
}
export default Footer

View file

@ -0,0 +1,22 @@
.header {
composes: header from '../styles/header.css';
}
.menu {
composes: header-menu from '../styles/header.css';
}
.divider {
composes: header-divider from '../styles/header.css';
}
.button {
background: none;
}
@media (min-width: 850px) {
.buttonMobile {
composes: button;
display: none !important;
}
}

74
components/Header.tsx Normal file
View file

@ -0,0 +1,74 @@
'use client'
import Link from 'next/link'
import * as React from 'react'
import { useContext } from 'react'
import { MenuContext, ThemeContext } from '../contexts'
import { HeaderTitle } from '.'
import { ArrowUpRight, MenuIcon, ThemeIcon } from './icons'
import styles from './Header.module.css'
const Header = ({ title, items, showMenuButton, showMobileTitle }: any) => {
const { showMenu, setShowMenu } = useContext(MenuContext)
const { darkTheme, setDarkTheme } = useContext(ThemeContext)
const toggleMenu = () => {
if (showMenu) {
setShowMenu(false)
} else {
setShowMenu(true)
}
}
const toggleTheme = () => {
if (darkTheme) {
setDarkTheme(false)
} else {
setDarkTheme(true)
}
}
return (
<header className={styles.header}>
<div style={{ display: 'none' }}>{darkTheme?.toString()}</div>
<div>
{showMenuButton && (
<button className={styles.buttonMobile} onClick={toggleMenu}>
<MenuIcon darkTheme={darkTheme} />
</button>
)}
<HeaderTitle
darkTheme={darkTheme}
title={title}
showMobileTitle={showMobileTitle}
/>
<div className={styles.menu}>
<ul>
{items &&
items.map((item: any, i: number) =>
item === 'divider' ? (
<li key={i} className={styles.divider}>
{'|'}
</li>
) : (
<li key={item.title}>
<Link href={item.link} target={item.target}>
{item.title}
{item.target && <ArrowUpRight />}
</Link>
</li>
),
)}
</ul>
<button className={styles.button} onClick={toggleTheme}>
<ThemeIcon darkTheme={darkTheme} />
</button>
</div>
</div>
</header>
)
}
export default Header

View file

@ -0,0 +1,17 @@
.title {
composes: header-title from '../styles/header.css';
}
@media (max-width: 850px) {
.title {
display: none !important;
}
}
.mobileTitle {
composes: header-title from '../styles/header.css';
}
.headerTitleText {
composes: header-title-text from '../styles/header.css';
}

View file

@ -0,0 +1,26 @@
'use client'
import Image from 'next/image'
import Link from 'next/link'
import * as React from 'react'
import choraLogoDark from '../assets/images/chora_dark_small.png'
import choraLogoLight from '../assets/images/chora_light_small.png'
import styles from './HeaderTitle.module.css'
const HeaderTitle = ({ darkTheme, title, showMobileTitle }: any) => (
<div className={showMobileTitle ? styles.mobileTitle : styles.title}>
<Link href={(title && title.link) || '/'}>
<Image alt="chora" src={darkTheme ? choraLogoDark : choraLogoLight} />
<div className={styles.headerTitleText}>
{'chora '}
{title && title.titleX && (
<span style={{ opacity: '0.75' }}>{title.titleX}</span>
)}
</div>
</Link>
</div>
)
export default HeaderTitle

View file

@ -0,0 +1,35 @@
.sidebar {
composes: sidebar from '../styles/sidebar.css';
}
.mobileOnly {
composes: sidebar from '../styles/sidebar.css';
min-height: calc(100vh - var(--header-height));
width: 75vw;
}
/* cancel sidebar styling */
@media (max-width: 850px) {
.mobileOnly {
display: block !important;
}
}
@media (min-width: 850px) {
.mobileOnly {
display: none !important;
}
}
.active {
composes: sidebar-link-active from '../styles/sidebar.css';
}
.divider {
margin: 1em 0;
}
.button {
background: none;
color: var(--color-theme);
}

58
components/Sidebar.tsx Normal file
View file

@ -0,0 +1,58 @@
'use client'
import Link from 'next/link'
import { usePathname } from 'next/navigation'
import * as React from 'react'
import { useContext, useEffect, useState } from 'react'
import { MenuContext } from '../contexts'
import { ArrowUpRight } from './icons'
import styles from './Sidebar.module.css'
const Sidebar = ({ items, mobileOnly }: any) => {
const currentRoute = usePathname()
const { showMenu, setShowMenu } = useContext(MenuContext)
const [initRoute, setInitRoute] = useState<string>('')
useEffect(() => {
if (currentRoute && !initRoute) {
setInitRoute(currentRoute)
}
if (initRoute && initRoute !== currentRoute) {
setInitRoute(currentRoute)
setShowMenu(false)
}
}, [currentRoute, initRoute, setShowMenu])
return !mobileOnly || showMenu ? (
<div className={mobileOnly ? styles.mobileOnly : styles.sidebar}>
<ul>
{items.map((item: any, i: number) =>
item === 'divider' ? (
<hr key={i} className={styles.divider} />
) : (
<li key={item.title}>
<Link
href={item.link}
className={
currentRoute === item.link ? styles.active : undefined
}
target={item.target}
>
{item.title}
{item.target === '_blank' && <ArrowUpRight />}
</Link>
</li>
),
)}
</ul>
</div>
) : (
<></>
)
}
export default Sidebar

View file

@ -0,0 +1,54 @@
'use client'
import * as React from 'react'
import { useContext } from 'react'
import { ThemeContext } from '../../contexts'
const defaultColor = '#00C3A5'
const ArrowRight = ({ color, useTheme }: any) => {
const { darkTheme } = useContext(ThemeContext)
const stroke = color || defaultColor
return (
<svg
xmlns="http://www.w3.org/2000/svg"
height="0.5em"
width="0.5em"
viewBox="0 0 20 20"
style={{ marginRight: '0.5em' }}
>
<line
x1="3"
y1="10"
x2="17"
y2="10"
stroke={useTheme ? (darkTheme ? '#000' : '#FFF') : stroke}
strokeLinecap="round"
strokeWidth="3"
/>
<line
x1="3"
y1="10"
x2="7"
y2="15"
stroke={useTheme ? (darkTheme ? '#000' : '#FFF') : stroke}
strokeLinecap="round"
strokeWidth="3"
/>
<line
x1="3"
y1="10"
x2="7"
y2="5"
stroke={useTheme ? (darkTheme ? '#000' : '#FFF') : stroke}
strokeLinecap="round"
strokeWidth="3"
/>
</svg>
)
}
export default ArrowRight

View file

@ -0,0 +1,54 @@
'use client'
import * as React from 'react'
import { useContext } from 'react'
import { ThemeContext } from '../../contexts'
const defaultColor = '#00C3A5'
const ArrowRight = ({ color, useTheme }: any) => {
const { darkTheme } = useContext(ThemeContext)
const stroke = color || defaultColor
return (
<svg
xmlns="http://www.w3.org/2000/svg"
height="0.5em"
width="0.5em"
viewBox="0 0 20 20"
style={{ marginLeft: '0.5em' }}
>
<line
x1="3"
y1="10"
x2="17"
y2="10"
stroke={useTheme ? (darkTheme ? '#000' : '#FFF') : stroke}
strokeLinecap="round"
strokeWidth="3"
/>
<line
x1="17"
y1="10"
x2="12"
y2="5"
stroke={useTheme ? (darkTheme ? '#000' : '#FFF') : stroke}
strokeLinecap="round"
strokeWidth="3"
/>
<line
x1="17"
y1="10"
x2="12"
y2="15"
stroke={useTheme ? (darkTheme ? '#000' : '#FFF') : stroke}
strokeLinecap="round"
strokeWidth="3"
/>
</svg>
)
}
export default ArrowRight

View file

@ -0,0 +1,54 @@
'use client'
import * as React from 'react'
import { useContext } from 'react'
import { ThemeContext } from '../../contexts'
const defaultColor = '#00C3A5'
const ArrowUpRight = ({ color, useTheme }: any) => {
const { darkTheme } = useContext(ThemeContext)
const stroke = color || defaultColor
return (
<svg
xmlns="http://www.w3.org/2000/svg"
height="0.5em"
width="0.5em"
viewBox="0 0 20 20"
style={{ marginLeft: '0.5em' }}
>
<line
x1="3"
y1="17"
x2="17"
y2="3"
stroke={useTheme ? (darkTheme ? '#000' : '#FFF') : stroke}
strokeLinecap="round"
strokeWidth="3"
/>
<line
x1="17"
y1="3"
x2="7"
y2="3"
stroke={useTheme ? (darkTheme ? '#000' : '#FFF') : stroke}
strokeLinecap="round"
strokeWidth="3"
/>
<line
x1="17"
y1="3"
x2="17"
y2="12"
stroke={useTheme ? (darkTheme ? '#000' : '#FFF') : stroke}
strokeLinecap="round"
strokeWidth="3"
/>
</svg>
)
}
export default ArrowUpRight

View file

@ -0,0 +1,31 @@
import * as React from 'react'
const CheckIcon = ({ darkTheme }: any) => (
<svg
xmlns="http://www.w3.org/2000/svg"
height="0.5em"
width="0.5em"
viewBox="0 0 20 20"
>
<line
x1="7"
y1="17"
x2="17"
y2="3"
stroke={darkTheme ? '#FFFFFF' : '#111111'}
strokeLinecap="round"
strokeWidth="6"
/>
<line
x1="7"
y1="17"
x2="3"
y2="10"
stroke={darkTheme ? '#FFFFFF' : '#111111'}
strokeLinecap="round"
strokeWidth="6"
/>
</svg>
)
export default CheckIcon

View file

@ -0,0 +1,40 @@
import * as React from 'react'
const MenuIcon = ({ darkTheme }: any) => (
<svg
xmlns="http://www.w3.org/2000/svg"
height="1.5em"
width="1.5em"
viewBox="0 0 100 100"
>
<line
x1="10"
y1="85"
x2="90"
y2="85"
stroke={darkTheme ? '#FFFFFF' : '#111111'}
strokeLinecap="round"
strokeWidth="10"
/>
<line
x1="10"
y1="50"
x2="90"
y2="50"
stroke={darkTheme ? '#FFFFFF' : '#111111'}
strokeLinecap="round"
strokeWidth="10"
/>
<line
x1="10"
y1="15"
x2="90"
y2="15"
stroke={darkTheme ? '#FFFFFF' : '#111111'}
strokeLinecap="round"
strokeWidth="10"
/>
</svg>
)
export default MenuIcon

View file

@ -0,0 +1,15 @@
import * as React from 'react'
const ThemeIcon = ({ darkTheme }: any) => (
<svg
xmlns="http://www.w3.org/2000/svg"
height="1.5em"
width="1.5em"
viewBox="0 0 100 100"
>
<circle cx="50" cy="50" r="40" fill={darkTheme ? '#F5F5F5' : '#0A0A0A'} />
<circle cx="60" cy="50" r="37" fill={darkTheme ? '#111111' : '#FFFFFF'} />
</svg>
)
export default ThemeIcon

View file

@ -0,0 +1,17 @@
import * as React from 'react'
const UserIcon = ({ darkTheme }: any) => (
<svg
xmlns="http://www.w3.org/2000/svg"
height="1.5em"
width="1.5em"
viewBox="0 0 100 100"
>
<circle cx="50" cy="40" r="30" fill={darkTheme ? '#FFFFFF' : '#111111'} />
<circle cx="48" cy="40" r="22" fill={darkTheme ? '#111111' : '#FFFFFF'} />
<circle cx="50" cy="105" r="40" fill={darkTheme ? '#FFFFFF' : '#111111'} />
<circle cx="48" cy="105" r="32" fill={darkTheme ? '#111111' : '#FFFFFF'} />
</svg>
)
export default UserIcon

View file

@ -0,0 +1,7 @@
export { default as ArrowLeft } from './ArrowLeft'
export { default as ArrowRight } from './ArrowRight'
export { default as ArrowUpRight } from './ArrowUpRight'
export { default as CheckIcon } from './CheckIcon'
export { default as MenuIcon } from './MenuIcon'
export { default as ThemeIcon } from './ThemeIcon'
export { default as UserIcon } from './UserIcon'

5
components/index.ts Normal file
View file

@ -0,0 +1,5 @@
export { default as Background } from './Background'
export { default as Footer } from './Footer'
export { default as Header } from './Header'
export { default as HeaderTitle } from './HeaderTitle'
export { default as Sidebar } from './Sidebar'