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 +1,196 @@
@import 'chora/styles/globals.css'; @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 */
}

View file

@ -1,119 +0,0 @@
.body {
min-height: 100vh;
display: flex;
flex-direction: column;
}
.header {
position: sticky;
top: 0;
z-index: 10;
backdrop-filter: blur(10px);
background: color-mix(in srgb, var(--background-secondary, #fcfcfc) 85%, transparent);
border-bottom: 1px solid color-mix(in srgb, var(--text-secondary, #0a0a0a) 10%, transparent);
}
.headerInner {
max-width: 980px;
margin: 0 auto;
padding: 16px 20px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
}
.brand {
font-size: 20px;
font-weight: 600;
text-decoration: none;
color: inherit;
white-space: nowrap;
}
.brandDim {
opacity: 0.75;
}
.nav {
display: flex;
gap: 14px;
flex-wrap: wrap;
}
.nav a {
text-decoration: none;
color: inherit;
opacity: 0.85;
}
.nav a:hover {
opacity: 1;
text-decoration: underline;
}
.main {
flex: 1;
}
.footer {
border-top: 1px solid color-mix(in srgb, var(--text-secondary, #0a0a0a) 10%, transparent);
background: var(--background-secondary, #fcfcfc);
}
.footerInner {
max-width: 980px;
margin: 0 auto;
padding: 28px 20px;
display: grid;
grid-template-columns: 1.2fr 1.8fr;
gap: 24px;
}
.footerInner h3 {
margin: 0 0 10px 0;
font-size: 14px;
text-transform: lowercase;
opacity: 0.85;
}
.footerInner p {
margin: 0;
opacity: 0.85;
}
.footerCols {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
}
.footerInner ul {
list-style: none;
padding: 0;
margin: 0;
display: grid;
gap: 8px;
}
.footerInner a {
color: inherit;
text-decoration: none;
opacity: 0.85;
}
.footerInner a:hover {
opacity: 1;
text-decoration: underline;
}
@media (max-width: 700px) {
.footerInner {
grid-template-columns: 1fr;
}
.footerCols {
grid-template-columns: 1fr;
}
}

View file

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

View file

@ -1,13 +1,13 @@
.page { .page {
composes: page from 'chora/styles/page.css'; composes: page from '../styles/page.css';
} }
.banner { .banner {
composes: banner-full from 'chora/styles/main.css'; composes: banner-full from '../styles/banner.css';
} }
.content { .content {
composes: content-full from 'chora/styles/main.css'; composes: content-full from '../styles/content.css';
} }
.content > div { .content > div {

View file

@ -1,26 +1,11 @@
.page { .page {
composes: page from 'chora/styles/page.css'; composes: page from '../../styles/page.css';
} }
.banner { .banner {
composes: banner from 'chora/styles/main.css'; composes: banner from '../../styles/banner.css';
} }
.content { .content {
composes: content-full from 'chora/styles/main.css'; composes: content-full from '../../styles/content.css';
}
.content ul {
list-style-position: inside;
}
.content li {
line-height: 1.75;
}
.content hr {
border: 1px solid var(--box-shadow-color);
border-bottom-width: 0;
box-shadow: 0 0 1px var(--box-shadow-color);
margin: 5vh 0;
} }

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 { .page {
composes: page from 'chora/styles/page.css'; composes: page from '../../styles/page.css';
} }
.banner { .banner {
composes: banner from 'chora/styles/main.css'; composes: banner from '../../styles/banner.css';
} }
.content { .content {
composes: content-full from 'chora/styles/main.css'; composes: content-full from '../../styles/content.css';
min-height: 25vh !important;
align-items: end !important;
} }
.contentFull { .content h2 {
composes: content-full from 'chora/styles/main.css'; margin: 1em 0;
min-height: 25vh !important;
align-items: start !important;
} }
.contentFull h2 { .content ul {
margin: 0.5em 0;
}
.contentFull h3 {
color: var(--color-text);
}
.contentFull h4 {
color: var(--color-text);
}
.contentFull ul {
list-style: none inside none; 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 { 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' import styles from './page.module.css'
@ -9,21 +9,15 @@ export const metadata: Metadata = {
title: 'chora studio | research', title: 'chora studio | research',
} }
// async function getResearch() { async function getResearch() {
// const allDocs = getDocs().filter((p) => p.tags.includes('research')) return [
{ group: 'about', items: getArtifacts('about') },
// // sort docs by date { group: 'concepts', items: getArtifacts('concepts') },
// return allDocs.sort((a, b) => { ]
// if (a.date < b.date) { }
// return 1
// } else {
// return -1
// }
// })
// }
const ResearchPage = async () => { const ResearchPage = async () => {
// const docs = await getResearch() const artifacts = await getResearch()
return ( return (
<div className={styles.page}> <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.' 'Chora Studio is researching decentralized protocols and agentic systems with a special interest in privacy-preserving technologies.'
} }
</p> </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> </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> </div>
) )
} }

View file

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

View file

@ -1,19 +1,19 @@
.page { .page {
composes: page from 'chora/styles/page.css'; composes: page from '../../styles/page.css';
} }
.banner { .banner {
composes: banner from 'chora/styles/main.css'; composes: banner from '../../styles/banner.css';
} }
.content { .content {
composes: content-full from 'chora/styles/main.css'; composes: content-full from '../../styles/content.css';
}
.content h2 {
margin: 0.5em 0;
} }
.content ul { .content ul {
margin: 1em 1em 2em; margin: 0.5em 0 2em 0;
}
.content li {
margin: 1em;
} }

View file

@ -86,7 +86,7 @@ const ValidatorPage = () => {
<h2>{'regen'}</h2> <h2>{'regen'}</h2>
<p> <p>
{ {
'Chora Validator is running a validator node and a full node with public API endpoints. Chora Validator is also running a testnet validator node on Regen Redwood (the stable test network for Regen). Chora Validator is committed to offsetting energy costs with carbon credits issued on Regen.' 'Chora Validator is running a validator node and a full node with public API endpoints. Chora Validator is also running a testnet validator node on Regen Redwood (the stable test network for Regen).'
} }
</p> </p>
<ul> <ul>

96
assets/font/UFL.txt Normal file
View file

@ -0,0 +1,96 @@
-------------------------------
UBUNTU FONT LICENCE Version 1.0
-------------------------------
PREAMBLE
This licence allows the licensed fonts to be used, studied, modified and
redistributed freely. The fonts, including any derivative works, can be
bundled, embedded, and redistributed provided the terms of this licence
are met. The fonts and derivatives, however, cannot be released under
any other licence. The requirement for fonts to remain under this
licence does not require any document created using the fonts or their
derivatives to be published under this licence, as long as the primary
purpose of the document is not to be a vehicle for the distribution of
the fonts.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this licence and clearly marked as such. This may
include source files, build scripts and documentation.
"Original Version" refers to the collection of Font Software components
as received under this licence.
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to
a new environment.
"Copyright Holder(s)" refers to all individuals and companies who have a
copyright ownership of the Font Software.
"Substantially Changed" refers to Modified Versions which can be easily
identified as dissimilar to the Font Software by users of the Font
Software comparing the Original Version with the Modified Version.
To "Propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification and with or without charging
a redistribution fee), making available to the public, and in some
countries other activities as well.
PERMISSION & CONDITIONS
This licence does not grant any rights under trademark law and all such
rights are reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of the Font Software, to propagate the Font Software, subject to
the below conditions:
1) Each copy of the Font Software must contain the above copyright
notice and this licence. These can be included either as stand-alone
text files, human-readable headers or in the appropriate machine-
readable metadata fields within text or binary files as long as those
fields can be easily viewed by the user.
2) The font name complies with the following:
(a) The Original Version must retain its name, unmodified.
(b) Modified Versions which are Substantially Changed must be renamed to
avoid use of the name of the Original Version or similar names entirely.
(c) Modified Versions which are not Substantially Changed must be
renamed to both (i) retain the name of the Original Version and (ii) add
additional naming elements to distinguish the Modified Version from the
Original Version. The name of such Modified Versions must be the name of
the Original Version, with "derivative X" where X represents the name of
the new work, appended to that name.
3) The name(s) of the Copyright Holder(s) and any contributor to the
Font Software shall not be used to promote, endorse or advertise any
Modified Version, except (i) as required by this licence, (ii) to
acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with
their explicit written permission.
4) The Font Software, modified or unmodified, in part or in whole, must
be distributed entirely under this licence, and must not be distributed
under any other licence. The requirement for fonts to remain under this
licence does not affect any document created using the Font Software,
except any version of the Font Software extracted from a document
created using the Font Software may only be distributed under this
licence.
TERMINATION
This licence becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
DEALINGS IN THE FONT SOFTWARE.

BIN
assets/font/Ubuntu-Bold.ttf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
assets/images/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

View file

@ -20,7 +20,6 @@
"clean": "rm -rf .next dist node_modules" "clean": "rm -rf .next dist node_modules"
}, },
"dependencies": { "dependencies": {
"chora": "npm:@chora-io/chora@v0.1.0-beta12",
"gray-matter": "^4", "gray-matter": "^4",
"next": "^14", "next": "^14",
"react": "^18", "react": "^18",

@ -1 +1 @@
Subproject commit d16e431f8436968a5cc38d1fc039e7ae1753fc18 Subproject commit d5efdcc152b8fd8a0eafb17eca0b1e682d3f8865

86
styles/banner.css Normal file
View file

@ -0,0 +1,86 @@
/* banner */
.banner {
align-items: center;
display: flex;
font-size: 1.5em;
justify-content: center;
min-height: 10vh;
padding: 2em 0;
text-align: center;
}
@media (max-width: 850px) {
.banner {
font-size: 1em;
}
}
.banner h1 {
font-size: 1.75em;
margin-top: 2.5%;
padding: 0.15em 0;
}
@media (max-width: 850px) {
.banner h1 {
padding: 0.1em 0 !important;
}
}
.banner p {
padding: 0.2em 0;
}
@media (max-width: 850px) {
.banner p {
padding: 0.15em 0 !important;
}
}
.banner p > i {
color: var(--color-theme);
}
/* banner-full */
.banner-full {
composes: banner;
min-height: calc(100vh - var(--header-height));
padding: 0;
}
.banner-full > div {
margin-bottom: calc(1% + var(--header-height));
}
/* banner-document */
.banner-document {
composes: banner;
font-size: 1em;
}
.banner-document h1 {
color: var(--color-theme);
font-size: 1.5em;
margin: 0.5em 0;
}
@media (max-width: 850px) {
.banner-document h1 {
font-size: 1.25em;
}
}
.banner-document h2,
.banner-document h3 {
color: var(--color-text);
font-size: 1em;
font-weight: 300;
opacity: 0.8;
}
.banner-document h3 {
margin-top: 1em;
}

73
styles/content.css Normal file
View file

@ -0,0 +1,73 @@
/* content */
.content {
align-items: center;
background: var(--background-primary);
display: flex;
font-size: 1.2em;
justify-content: center;
}
@media (max-width: 850px) {
.content {
font-size: 1em;
padding: 0 2em;
}
}
.content > div {
display: block;
max-width: 650px;
padding: 2em 0 4em 0;
}
@media (max-width: 850px) {
.content > div {
padding: 1em 0 2em 0;
}
}
.content > div > h1 {
font-size: 1.8em;
padding: 0.5em 0;
}
.content > div > h2 {
padding: 0.25em 0;
}
@media (max-width: 850px) {
.content > div > h2 {
padding-bottom: 0;
}
}
.content > div > p {
padding: 1em 0;
}
.content > div > a {
display: block;
}
.content ul {
list-style-position: inside;
}
.content li {
line-height: 1.75;
}
.content hr {
border: 1px solid var(--box-shadow-color);
border-bottom-width: 0;
box-shadow: 0 0 1px var(--box-shadow-color);
margin: 5vh 0;
}
/* content-full */
.content-full {
composes: content;
min-height: calc(100vh - var(--header-height) - var(--footer-height));
}

61
styles/page.css Normal file
View file

@ -0,0 +1,61 @@
/* page */
.page {
margin-top: var(--header-height);
min-height: calc(100vh - var(--header-height) - var(--footer-height));
}
/* page-center */
.page-center {
composes: page;
align-items: center;
display: flex;
justify-content: center;
text-align: center;
}
.page-center > div {
margin-bottom: 10vh;
}
/* page-center-not-found */
.page-center-not-found {
composes: page-center;
background: var(--background-primary);
}
@media (max-width: 850px) {
.page-center-not-found {
padding: 0 1.5em;
}
}
.page-center-not-found h1 {
color: var(--color-theme);
font-size: 3em;
margin-bottom: 0.25em;
}
@media (max-width: 850px) {
.page-center-not-found h1 {
font-size: 2em;
}
}
.page-center-not-found h2 {
font-size: 2em;
font-weight: 300;
margin-bottom: 0.5em;
}
@media (max-width: 850px) {
.page-center-not-found h2 {
font-size: 1.25em;
}
}
.page-center-not-found p {
font-style: italic;
}

View file

@ -4,10 +4,10 @@ import matter from 'gray-matter'
import { remark } from 'remark' import { remark } from 'remark'
import html from 'remark-html' import html from 'remark-html'
const docsDirectory = path.join(process.cwd(), 'research/docs') const root = path.join(process.cwd(), 'research')
export async function getDoc(id: string) { export async function getArtifact(dir: string, id: string) {
const fullPath = path.join(docsDirectory, `${id}.md`) const fullPath = path.join(root, dir, `${id}.md`)
// read file contents // read file contents
const fileContents = fs.readFileSync(fullPath, 'utf8') const fileContents = fs.readFileSync(fullPath, 'utf8')

View file

@ -2,14 +2,19 @@ import fs from 'fs'
import path from 'path' import path from 'path'
import matter from 'gray-matter' import matter from 'gray-matter'
const docsDirectory = path.join(process.cwd(), 'research/docs') const root = path.join(process.cwd(), 'research')
export const getDocs = () => { export const getArtifacts = (dir: string) => {
const fileNames = fs.readdirSync(docsDirectory) const fileNames = fs.readdirSync(root + '/' + dir)
return fileNames.map((fileName) => {
// set id and full path const filtered = fileNames.filter((fileName) => fileName.includes(`.md`))
return filtered.map((fileName) => {
// set id
const id = fileName.replace(/\.md$/, '') const id = fileName.replace(/\.md$/, '')
const fullPath = path.join(docsDirectory, fileName)
// set full path
const fullPath = path.join(root, dir, fileName)
// read file contents // read file contents
const fileContents = fs.readFileSync(fullPath, 'utf8') const fileContents = fs.readFileSync(fullPath, 'utf8')

View file

@ -1,2 +1,2 @@
export { getDoc } from './getDoc' export { getArtifact } from './getArtifact'
export { getDocs } from './getDocs' export { getArtifacts } from './getArtifacts'