feat: update content

This commit is contained in:
ryanchristo 2026-11-15 20:31:14 -08:00
parent 5a98111911
commit 6bb8c947a3
No known key found for this signature in database
44 changed files with 696 additions and 268 deletions

View file

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

View file

@ -1,34 +0,0 @@
import { Metadata } from 'next'
import { getDoc, getDocs } from '@utils'
import styles from './page.module.css'
export const metadata: Metadata = {
title: 'chora studio | research',
}
export const generateStaticParams = () => {
return getDocs()
}
const DocumentPage = async ({ params }: any) => {
const doc = await getDoc(params.id)
return (
<div className={styles.page}>
<div className={styles.banner}>
<div>
<h3>{doc.date}</h3>
<h1>{doc.title}</h1>
<h2>{`by ${doc.author}`}</h2>
</div>
</div>
<div className={styles.content}>
<div dangerouslySetInnerHTML={{ __html: doc.content }} />
</div>
</div>
)
}
export default DocumentPage

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('about')
}
const ArtifactPage = async ({ params }: any) => {
const artifact = await getArtifact('about', 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,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,36 @@
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('concepts')
}
const ArtifactPage = async ({ params }: any) => {
const artifact = await getArtifact('concepts', 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

@ -1,35 +1,29 @@
.page {
composes: page from 'chora/styles/page.css';
composes: page from '../../styles/page.css';
}
.banner {
composes: banner from 'chora/styles/main.css';
composes: banner from '../../styles/banner.css';
}
.content {
composes: content-full from 'chora/styles/main.css';
min-height: 25vh !important;
align-items: end !important;
composes: content-full from '../../styles/content.css';
}
.contentFull {
composes: content-full from 'chora/styles/main.css';
min-height: 25vh !important;
align-items: start !important;
.content h2 {
margin: 1em 0;
}
.contentFull h2 {
margin: 0.5em 0;
}
.contentFull h3 {
color: var(--color-text);
}
.contentFull h4 {
color: var(--color-text);
}
.contentFull ul {
.content ul {
list-style: none inside none;
margin: 1em 0;
}
.content li {
margin: 1em 0;
}
.content p {
color: var(--color-text);
font-weight: 300;
}

View file

@ -1,7 +1,7 @@
import { Metadata } from 'next'
// import Link from 'next/link'
import Link from 'next/link'
// import { getDocs } from '@utils'
import { getArtifacts } from '@utils'
import styles from './page.module.css'
@ -9,21 +9,15 @@ export const metadata: Metadata = {
title: 'chora studio | research',
}
// async function getResearch() {
// const allDocs = getDocs().filter((p) => p.tags.includes('research'))
// // sort docs by date
// return allDocs.sort((a, b) => {
// if (a.date < b.date) {
// return 1
// } else {
// return -1
// }
// })
// }
async function getResearch() {
return [
{ group: 'about', items: getArtifacts('about') },
{ group: 'concepts', items: getArtifacts('concepts') },
]
}
const ResearchPage = async () => {
// const docs = await getResearch()
const artifacts = await getResearch()
return (
<div className={styles.page}>
@ -39,27 +33,38 @@ const ResearchPage = async () => {
'Chora Studio is researching decentralized protocols and agentic systems with a special interest in privacy-preserving technologies.'
}
</p>
{!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={`/research/` + 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 className={styles.contentFull}>
{/*{!docs.length ? (*/}
<p>
<i>{'check back soon'}</i>
</p>
{/*) : (
<ul>
{docs.map(({ id, date, title, author }) => (
<li key={id}>
<Link href={`/research/${id}`}>
<h4>{date}</h4>
<h2>{title}</h2>
<h3>{`by ${author}`}</h3>
</Link>
</li>
))}
</ul>
)}*/}
</div>
</div>
)
}