feat: add research submodule and page

This commit is contained in:
ryanchristo 2024-08-31 11:31:50 -07:00
parent 4a39e535a3
commit 3af3260500
12 changed files with 68 additions and 48 deletions

View file

@ -27,17 +27,16 @@ const Layout = ({ children }: any) => (
title: 'solutions',
target: '',
},
{
link: '/validator',
title: 'validator',
target: '',
},
'divider',
{
link: '/research',
title: 'research',
target: '',
},
{
link: '/validator',
title: 'validator',
target: '',
},
]}
showMenuButton={true}
showMobileTitle={true}
@ -59,22 +58,17 @@ const Layout = ({ children }: any) => (
target: '',
title: 'solutions',
},
{
link: 'validator',
target: '',
title: 'validator',
},
{
link: 'research',
target: '',
title: 'research',
},
'divider',
{
link: 'https://chora.blog',
target: '_blank',
title: 'chora blog',
link: 'validator',
target: '',
title: 'validator',
},
'divider',
{
link: 'https://chora.io',
target: '_blank',
@ -104,16 +98,16 @@ const Layout = ({ children }: any) => (
target: '',
title: 'solutions',
},
{
link: '/validator',
target: '',
title: 'validator',
},
{
link: '/research',
target: '',
title: 'research',
},
{
link: '/validator',
target: '',
title: 'validator',
},
],
},
{

View file

@ -48,6 +48,16 @@ const HomePage = () => {
{'learn more'}
<ArrowRight />
</Link>
<h2>{'research'}</h2>
<p>
{
'Chora Studio is researching distributed systems, governance frameworks, and tools for decentralized monitoring, reporting, and verification.'
}
</p>
<Link href="/research">
{'learn more'}
<ArrowRight />
</Link>
<h2>{'validator'}</h2>
<p>
{'Chora Studio operates Chora Validator on '}

View file

@ -2,6 +2,10 @@
composes: page from 'chora/styles/page.css';
}
.banner {
composes: banner from 'chora/styles/main.css';
}
.content {
composes: content-full from 'chora/styles/main.css';
}

View file

@ -9,9 +9,13 @@ export const metadata: Metadata = {
const ProductsPage = () => {
return (
<div className={styles.page}>
<div className={styles.banner}>
<div>
<h1 style={{ opacity: '0.75' }}>{'products'}</h1>
</div>
</div>
<div className={styles.content}>
<div>
<h1>{'products'}</h1>
<p>
{'Chora Studio is stewarding '}
<a href="https://chora.io" target="_blank">

View file

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

View file

@ -6,14 +6,14 @@ import { getDocs } from '@utils'
import styles from './page.module.css'
export const metadata: Metadata = {
title: 'chora blog | research',
title: 'chora studio | research',
}
async function getPosts() {
const allPosts = getDocs().filter((p) => p.tags.includes('research'))
async function getResearch() {
const allDocs = getDocs().filter((p) => p.tags.includes('research'))
// sort posts by date
return allPosts.sort((a, b) => {
// sort docs by date
return allDocs.sort((a, b) => {
if (a.date < b.date) {
return 1
} else {
@ -23,7 +23,7 @@ async function getPosts() {
}
const ResearchPage = async () => {
const posts = await getPosts()
const docs = await getResearch()
return (
<div className={styles.page}>
@ -33,11 +33,11 @@ const ResearchPage = async () => {
</div>
</div>
<div className={styles.content}>
{!posts.length ? (
{!docs.length ? (
<p>{'coming soon...'}</p>
) : (
<ul>
{posts.map(({ id, date, title, author }) => (
{docs.map(({ id, date, title, author }) => (
<li key={id}>
<Link href={`/research/${id}`}>
<h4>{date}</h4>

View file

@ -2,6 +2,10 @@
composes: page from 'chora/styles/page.css';
}
.banner {
composes: banner from 'chora/styles/main.css';
}
.content {
composes: content-full from 'chora/styles/main.css';
}

View file

@ -9,9 +9,13 @@ export const metadata: Metadata = {
const SolutionsPage = () => {
return (
<div className={styles.page}>
<div className={styles.banner}>
<div>
<h1 style={{ opacity: '0.75' }}>{'solutions'}</h1>
</div>
</div>
<div className={styles.content}>
<div>
<h1>{'solutions'}</h1>
<p>
{
'Chora Studio provides software research and development as a service with a focus on distributed ledger technology and regenerative finance.'

View file

@ -2,6 +2,10 @@
composes: page from 'chora/styles/page.css';
}
.banner {
composes: banner from 'chora/styles/main.css';
}
.content {
composes: content-full from 'chora/styles/main.css';
}

View file

@ -12,9 +12,13 @@ const regenLink =
const ValidatorPage = () => {
return (
<div className={styles.page}>
<div className={styles.banner}>
<div>
<h1 style={{ opacity: '0.75' }}>{'validator'}</h1>
</div>
</div>
<div className={styles.content}>
<div>
<h1>{'validator'}</h1>
<p>
{'Chora Studio operates Chora Validator on '}
<a href={regenLink} target="_blank">