init commit

This commit is contained in:
ryanchristo 2026-11-17 18:44:03 -08:00
commit c0ee8a4a11
No known key found for this signature in database
54 changed files with 1055 additions and 0 deletions

View file

@ -0,0 +1,11 @@
.page {
composes: page from '../../../../styles/page.css';
}
.banner {
composes: banner-document from '../../../../styles/banner.css';
}
.content {
composes: content-full from '../../../../styles/content.css';
}

View file

@ -0,0 +1,35 @@
import { Metadata } from 'next'
import { getArtifact, getArtifacts } from '@utils'
import styles from './page.module.css'
export const metadata: Metadata = {
title: 'chora studio | research',
}
export const generateStaticParams = () => {
return getArtifacts('choreography')
}
const ArtifactPage = async ({ params }: any) => {
const artifact = await getArtifact('choreography', params.id)
return (
<div className={styles.page}>
<div className={styles.banner}>
<div>
<p>{`author: ${artifact.author}`}</p>
<p>{`title: ${artifact.title}`}</p>
<p>{`description: ${artifact.description}`}</p>
<p>{`created: ${artifact.created.toDateString()}`}</p>
<p>{`updated: ${artifact.updated.toDateString()}`}</p>
</div>
</div>
<div className={styles.content}>
<div dangerouslySetInnerHTML={{ __html: artifact.content }} />
</div>
</div>
)
}
export default ArtifactPage

View file

@ -0,0 +1,24 @@
.page {
composes: page from '../../styles/page.css';
}
.banner {
composes: banner from '../../styles/banner.css';
}
.content {
composes: content-full from '../../styles/content.css';
}
.content ul {
list-style: none inside none;
}
.content li {
margin: 2em 0;
}
.content p {
color: var(--color-text);
font-weight: 300;
}

65
app/artifacts/page.tsx Normal file
View file

@ -0,0 +1,65 @@
import { Metadata } from 'next'
import Link from 'next/link'
import { getArtifacts } from '@utils'
import styles from './page.module.css'
export const metadata: Metadata = {
title: 'chora | artifacts',
}
async function getResearchArtifacts() {
return [
{ group: 'choreography', items: getArtifacts('choreography') },
]
}
const ResearchPage = async () => {
const artifacts = await getResearchArtifacts()
return (
<div className={styles.page}>
<div className={styles.banner}>
<div>
<h1>{'artifacts'}</h1>
</div>
</div>
<div className={styles.content}>
<div>
{!artifacts.length ? (
<p>
<i>{'failed to load artifacts'}</i>
</p>
) : (
<div>
{artifacts.map(({ group, items }) => (
<div key={group} style={{ margin: '1em 0' }}>
<h2>{group}</h2>
<ul>
{items.map(
({ id, title, description, created, updated }) => (
<li key={id}>
<Link href={`/artifacts/` + group + '/' + id}>
<h3>{title}</h3>
<p>{description}</p>
<p>
<i>{`created: ${created.toDateString()}`}</i>
{' | '}
<i>{`updated: ${updated.toDateString()}`}</i>
</p>
</Link>
</li>
),
)}
</ul>
</div>
))}
</div>
)}
</div>
</div>
</div>
)
}
export default ResearchPage

196
app/globals.css Normal file
View file

@ -0,0 +1,196 @@
@font-face {
font-family: 'Ubuntu';
font-style: normal;
font-weight: normal;
src: url('../assets/font/Ubuntu-Regular.ttf');
}
@font-face {
font-family: 'Ubuntu';
font-style: italic;
font-weight: normal;
src: url('../assets/font/Ubuntu-Italic.ttf');
}
@font-face {
font-family: 'Ubuntu';
font-style: normal;
font-weight: bold;
src: url('../assets/font/Ubuntu-Bold.ttf');
}
@font-face {
font-family: 'Ubuntu';
font-style: italic;
font-weight: bold;
src: url('../assets/font/Ubuntu-BoldItalic.ttf');
}
@font-face {
font-family: 'Ubuntu';
font-style: normal;
font-weight: 300;
src: url('../assets/font/Ubuntu-Light.ttf');
}
@font-face {
font-family: 'Ubuntu';
font-style: italic;
font-weight: 300;
src: url('../assets/font/Ubuntu-LightItalic.ttf');
}
@font-face {
font-family: 'Ubuntu';
font-style: normal;
font-weight: 500;
src: url('../assets/font/Ubuntu-Medium.ttf');
}
@font-face {
font-family: 'Ubuntu';
font-style: italic;
font-weight: 500;
src: url('../assets/font/Ubuntu-MediumItalic.ttf');
}
:root {
--color-error: rgb(245, 45, 45);
--color-theme: rgb(0, 195, 165);
--font-family: 'Ubuntu', sans-serif;
--footer-height: 320px;
--header-height: 80px;
--sidebar-width: 240px;
--transition: 0.25s;
/* light theme */
--background-primary: rgb(255, 255, 255);
--background-primary-transparent: rgba(255, 255, 255, 0.98);
--background-secondary: rgb(250, 250, 250);
--background-secondary-transparent: rgba(250, 250, 250, 0.98);
--box-shadow: 0 0 4px rgb(245, 245, 245);
--box-shadow-color: rgb(245, 245, 245);
--color-text: rgb(10, 10, 10);
--color-text-placeholder: rgba(10, 10, 10, 0.5);
}
@media (max-width: 850px) {
:root {
--footer-height: 80px;
}
}
.dark-theme {
--background-primary: rgb(17, 17, 17);
--background-primary-transparent: rgba(17, 17, 17, 0.98);
--background-secondary: rgb(22, 22, 22);
--background-secondary-transparent: rgba(22, 22, 22, 0.98);
--box-shadow: 0 0 4px rgb(27, 27, 27);
--box-shadow-color: rgb(27, 27, 27);
--color-text: rgb(245, 245, 245);
--color-text-placeholder: rgba(245, 245, 245, 0.5);
}
* {
margin: 0;
padding: 0;
}
html {
cursor: default;
}
body {
color: var(--color-text);
font-family: var(--font-family);
font-weight: 300;
}
main {
overflow: hidden;
}
h1,
h2,
h3,
h4,
h5 {
font-weight: 300;
}
p {
line-height: 1.75;
}
a,
a:active {
color: var(--color-theme);
font-weight: 400;
text-decoration: none;
transition: var(--transition);
}
a:hover {
opacity: 0.75;
}
button {
background: var(--color-theme);
border: none;
border-radius: 1em;
color: var(--background-primary);
font-family: var(--font-family);
font-size: 1em;
outline: none;
transition: var(--transition);
}
button:hover {
cursor: pointer;
opacity: 0.75;
}
input,
textarea,
select {
background: var(--background-primary);
border: none;
box-shadow: var(--box-shadow);
color: var(--color-text);
font-family: var(--font-family);
outline: none;
}
textarea {
line-height: 1.5;
white-space: pre;
}
input::placeholder,
textarea::placeholder {
color: var(--color-text-placeholder);
}
pre {
overflow-x: scroll;
scrollbar-width: none; /* hide scrollbar - Firefox */
-ms-overflow-style: none; /* hide scrollbar - Internet Explorer 10+ */
}
pre::-webkit-scrollbar {
display: none; /* hide scrollbar - Safari and Chrome */
}
hr {
border: 0.05em solid var(--box-shadow-color);
}
td {
overflow-x: scroll;
scrollbar-width: none; /* hide scrollbar - Firefox */
-ms-overflow-style: none; /* hide scrollbar - Internet Explorer 10+ */
}
td::-webkit-scrollbar {
display: none; /* hide scrollbar - Safari and Chrome */
}

50
app/layout.tsx Normal file
View file

@ -0,0 +1,50 @@
'use client'
import { Background, Header, Sidebar } from 'chora/components'
import { MenuContextProvider, ThemeContextProvider } from 'chora/contexts'
import './globals.css'
const Layout = ({ children }: any) => (
<html lang="en">
<body>
<ThemeContextProvider>
<MenuContextProvider>
<Background />
<Header
title={{
link: '/',
}}
items={[
{
link: '/artifacts',
title: 'artifacts',
target: '',
},
]}
showMenuButton={true}
showMobileTitle={true}
/>
<Sidebar
items={[
{
link: '.',
target: '',
title: 'home',
},
{
link: 'artifacts',
target: '',
title: 'artifacts',
},
]}
mobileOnly={true}
/>
<main>{children}</main>
</MenuContextProvider>
</ThemeContextProvider>
</body>
</html>
)
export default Layout

3
app/not-found.module.css Normal file
View file

@ -0,0 +1,3 @@
.page {
composes: page-center-not-found from '../styles/page.css';
}

18
app/not-found.tsx Normal file
View file

@ -0,0 +1,18 @@
import { Metadata } from 'next'
import styles from './not-found.module.css'
export const metadata: Metadata = {
title: '404 | a placeless place',
}
const NotFoundPage = () => (
<div className={styles.page}>
<div>
<h1>{'404'}</h1>
<h2>{'a placeless place'}</h2>
</div>
</div>
)
export default NotFoundPage

25
app/page.module.css Normal file
View file

@ -0,0 +1,25 @@
.page {
composes: page from '../styles/page.css';
}
.banner {
composes: banner-full from '../styles/banner.css';
}
.content {
composes: content-full from '../styles/content.css';
}
.content > div {
padding: 6em 0 !important;
}
@media (max-width: 850px) {
.content > div {
padding: 4em 0 !important;
}
}
.content > div > a {
margin-bottom: 3em !important;
}

27
app/page.tsx Normal file
View file

@ -0,0 +1,27 @@
import { Metadata } from 'next'
import styles from './page.module.css'
export const metadata: Metadata = {
title: 'chora | open protocol',
}
const HomePage = () => {
return (
<div className={styles.page}>
<div className={styles.banner}>
<div>
<h1>
{'chora'}
</h1>
<p>
<i>{'a third thing or perhaps no thing'}</i>
</p>
<p>{'open protocol'}</p>
</div>
</div>
</div>
)
}
export default HomePage