feat: update content
This commit is contained in:
parent
5aef42e16f
commit
f667a9468d
34 changed files with 1014 additions and 5 deletions
|
|
@ -13,6 +13,7 @@ async function getResearchArtifacts() {
|
|||
return [
|
||||
{ group: 'about', items: getArtifacts('about') },
|
||||
{ group: 'concepts', items: getArtifacts('concepts') },
|
||||
{ group: 'tutorials', items: getArtifacts('tutorials') },
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
33
app/research/tutorials/[id]/page.module.css
Normal file
33
app/research/tutorials/[id]/page.module.css
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
.page {
|
||||
composes: page from '../../../../styles/page.css';
|
||||
}
|
||||
|
||||
.banner {
|
||||
composes: banner-document from '../../../../styles/banner.css';
|
||||
}
|
||||
|
||||
.content {
|
||||
composes: content-full from '../../../../styles/content.css';
|
||||
}
|
||||
|
||||
.content h2,
|
||||
.content h3,
|
||||
.content h4 {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.content h4 {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.content p {
|
||||
margin: 1em 0;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.content pre {
|
||||
background-color: rgba(150, 150, 150, 0.1);
|
||||
border-radius: 1em;
|
||||
margin: 1em 0;
|
||||
padding: 1.5em;
|
||||
}
|
||||
35
app/research/tutorials/[id]/page.tsx
Normal file
35
app/research/tutorials/[id]/page.tsx
Normal 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('tutorials')
|
||||
}
|
||||
|
||||
const ArtifactPage = async ({ params }: any) => {
|
||||
const artifact = await getArtifact('tutorials', 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue