diff --git a/.gitmodules b/.gitmodules index 10cdf98..1020fa1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "artifacts"] - path = artifacts - url = https://github.com/chora-studio/artifacts +[submodule "research"] + path = research + url = https://github.com/chora-studio/research diff --git a/app/globals.css b/app/globals.css index 7b05eee..80937a4 100644 --- a/app/globals.css +++ b/app/globals.css @@ -1,196 +1 @@ -@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 */ -} +@import 'chora/styles/globals.css'; diff --git a/app/layout.module.css b/app/layout.module.css new file mode 100644 index 0000000..4dc146b --- /dev/null +++ b/app/layout.module.css @@ -0,0 +1,119 @@ +.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; + } +} + diff --git a/app/layout.tsx b/app/layout.tsx index af93498..23d9cb0 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,7 +1,7 @@ 'use client' -import { Background, Footer, Header, Sidebar } from 'components' -import { MenuContextProvider, ThemeContextProvider } from 'contexts' +import { Background, Footer, Header, Sidebar } from 'chora/components' +import { MenuContextProvider, ThemeContextProvider } from 'chora/contexts' import './globals.css' @@ -23,8 +23,8 @@ const Layout = ({ children }: any) => ( target: '', }, { - link: '/prototypes', - title: 'prototypes', + link: '/projects', + title: 'projects', target: '', }, { @@ -54,9 +54,9 @@ const Layout = ({ children }: any) => ( title: 'research', }, { - link: 'prototypes', + link: 'projects', target: '', - title: 'prototypes', + title: 'projects', }, { link: 'services', @@ -98,9 +98,9 @@ const Layout = ({ children }: any) => ( title: 'research', }, { - link: '/prototypes', + link: '/projects', target: '', - title: 'prototypes', + title: 'projects', }, { link: '/services', diff --git a/app/not-found.module.css b/app/not-found.module.css index 38e6395..c4b88a4 100644 --- a/app/not-found.module.css +++ b/app/not-found.module.css @@ -1,3 +1,3 @@ .page { - composes: page-center-not-found from '../styles/page.css'; + composes: page-center-not-found from 'chora/styles/page.css'; } diff --git a/app/page.module.css b/app/page.module.css index 7c49f36..d909518 100644 --- a/app/page.module.css +++ b/app/page.module.css @@ -1,13 +1,13 @@ .page { - composes: page from '../styles/page.css'; + composes: page from 'chora/styles/page.css'; } .banner { - composes: banner-full from '../styles/banner.css'; + composes: banner-full from 'chora/styles/main.css'; } .content { - composes: content-full from '../styles/content.css'; + composes: content-full from 'chora/styles/main.css'; } .content > div { diff --git a/app/page.tsx b/app/page.tsx index 6118fa3..1b28bf0 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,4 +1,4 @@ -import { ArrowRight } from 'components/icons' +import { ArrowRight } from 'chora/components/icons' import { Metadata } from 'next' import Link from 'next/link' @@ -27,20 +27,26 @@ const HomePage = () => {

{'research'}

{ - 'Chora Studio is researching decentralized protocols and agentic systems with a special interest in privacy-preserving technologies.' + 'Chora Studio is researching decentalized protocols and agentic systems with a special interest in FOSS and privacy-preserving technologies.' }

{'learn more'} -

{'prototypes'}

+

{'projects'}

- { - 'Chora Studio is developing experimental software with a focus on tools and infrastructure for decentralized protocols and agentic systems.' - } + {'Chora Studio is prototyping software under two project names: '} + + {'Chora IO'} + + {' for decentralized protocols and '} + + {'Chora AI'} + + {' for agentic systems.'}

- + {'learn more'} diff --git a/app/projects/page.module.css b/app/projects/page.module.css new file mode 100644 index 0000000..0fc453f --- /dev/null +++ b/app/projects/page.module.css @@ -0,0 +1,11 @@ +.page { + composes: page from 'chora/styles/page.css'; +} + +.banner { + composes: banner from 'chora/styles/main.css'; +} + +.content { + composes: content-full from 'chora/styles/main.css'; +} diff --git a/app/projects/page.tsx b/app/projects/page.tsx new file mode 100644 index 0000000..e8a8ddb --- /dev/null +++ b/app/projects/page.tsx @@ -0,0 +1,77 @@ +import { Metadata } from 'next' + +import styles from './page.module.css' + +export const metadata: Metadata = { + title: 'chora studio | projects', +} + +const ProjectsPage = () => { + return ( +
+
+
+

{'projects'}

+
+
+
+
+

{'Chora AI'}

+

+ { + 'Chora Studio is prototyping a privacy-preserving multi-agent management system and researching specification-driven development practices.' + } +

+

+ + {'source code'} + +

+

{'Chora IO'}

+

+ {'Chora Studio is prototyping '} + + {'Chora'} + + { + ' - software for commons governance and ecological regeneration built with distributed ledger technology.' + } +

+

+ { + 'Chora includes a blockchain application, blockchain modules, an API service, and three web applications: ' + } + + {'Groups'} + + {', '} + + {'Registry'} + + {', and '} + + {'Ledger'} + + {'.'} +

+

+ { + 'Chora also includes demo applications, developer tools, and other software projects. For more information, see ' + } + + {'Chora Documentation'} + + {'.'} +

+

+ + {'source code'} + +

+
+
+
+ ) +} + +export default ProjectsPage diff --git a/app/prototypes/page.module.css b/app/prototypes/page.module.css deleted file mode 100644 index 91e597a..0000000 --- a/app/prototypes/page.module.css +++ /dev/null @@ -1,11 +0,0 @@ -.page { - composes: page from '../../styles/page.css'; -} - -.banner { - composes: banner from '../../styles/banner.css'; -} - -.content { - composes: content-full from '../../styles/content.css'; -} diff --git a/app/prototypes/page.tsx b/app/prototypes/page.tsx deleted file mode 100644 index 4e08a08..0000000 --- a/app/prototypes/page.tsx +++ /dev/null @@ -1,192 +0,0 @@ -import { Metadata } from 'next' - -import styles from './page.module.css' -import Link from 'next/link' - -export const metadata: Metadata = { - title: 'chora studio | prototypes', -} - -const PrototypesPage = () => { - return ( -
-
-
-

{'prototypes'}

-
-
-
-
-

{'chai'}

-

- {'2026 - present'} -

-

- { - 'Chai is a multi-agent management system. Chai includes a command-line interface and a desktop application. Chai is also a research project exploring agentic systems and specification-driven development practices.' - } -

-

- {'tech stack'} -

- {'Rust, LLMs'} -

- {'source code'} -

- -
-

{'chora'}

-

- {'2026 - present'} -

-

- { - 'Chora is an open protocol in its early design phase. Chora is also a research project exploring decentralized protocols, knowledge graphs, and how the two intersect. Check back soon for more information.' - } -

-

- {'tech stack'} -

- {'Rust, Typescript, React, Nostr, IPFS'} -

- {'source code'} -

- -
-

{'chora (distributed ledger technology)'}

-

- {'2022 - 2025'} -

-

- { - 'Chora started out as a generic blockchain application that was used to test inter-blockchain communication with Regen Ledger. Chora later became a software stack built to support and extend Regen Ledger and to provide improved support for proof-of-authority in the Cosmos ecosystem.' - } -

-

- { - 'Chora was described as "software for commons governance and ecological regeneration built with distributed ledger technology." The stack included a blockchain application, blockchain modules, an indexing service, three web applications (Groups, Registry, and Ledger), and developer tools.' - } -

-

- { - 'In addition to building the stack, Chora Studio also operated validators on Regen mainnet and Regen and Chora test networks. Chora applications and services used the public full nodes operated by ' - } - {'Chora Validator'} - {'.'} -

-

- {'tech stack'} -

- {'Go, Cosmos SDK, Typescript, React, Postgres, IPFS'} -

- {'source code'} -

- -
-

{'chora (simple and secure technologies)'}

-

- {'2020'} -

-

- { - 'Chora was a decentralized organization (or "DAO") deployed using Colony smart contracts. The organization itself was never operational but the vision was "simple and secure technologies for small farmers" and it was pursued through ethnographic research, media production, software development, and building prototypes with open-source hardware.' - } -

-

- { - 'A few short videos were produced from interviews with people working on small-scale farms. The interviewees were asked about the technologies they use and their relationship to technology. Alongside field research and video production, mesh networks and smart (or "simple and secure") devices were being built and tested using open-source hardware.' - } -

-

- {'film kit'} -

- {'Canon Mark ii, Zoom H4n, OpenShot'} -

- {'tech stack'} -

- {'Typescript, React, Arduino, RaspberryPi'} -

- {'source code'} -

- {'unavailable'} -
-

{'chora (decentralized organizations)'}

-

- {'2018'} -

-

- { - 'Chora was a name for many projects, but the first project named Chora related to the work of Chora Studio was a side project for learning how to build applications with smart contracts in the Ethereum ecosystem. Chora was a web application and a set of smart contracts built for decentralized organizations (or "DAOs") operating on the Ethereum blockchain.' - } -

-

- {'tech stack'} -

- {'Solidity, Truffle, Typescript, React, IPFS'} -

- {'source code'} -

- {'unavailable'} -
-
-
- ) -} - -export default PrototypesPage diff --git a/app/research/[id]/page.module.css b/app/research/[id]/page.module.css new file mode 100644 index 0000000..8f3e108 --- /dev/null +++ b/app/research/[id]/page.module.css @@ -0,0 +1,11 @@ +.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'; +} diff --git a/app/research/[id]/page.tsx b/app/research/[id]/page.tsx new file mode 100644 index 0000000..9f66fb8 --- /dev/null +++ b/app/research/[id]/page.tsx @@ -0,0 +1,34 @@ +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 ( +
+
+
+

{doc.date}

+

{doc.title}

+

{`by ${doc.author}`}

+
+
+
+
+
+
+ ) +} + +export default DocumentPage diff --git a/app/research/about/[id]/page.module.css b/app/research/about/[id]/page.module.css deleted file mode 100644 index 7d2c1fc..0000000 --- a/app/research/about/[id]/page.module.css +++ /dev/null @@ -1,11 +0,0 @@ -.page { - composes: page from '../../../../styles/page.css'; -} - -.banner { - composes: banner-document from '../../../../styles/banner.css'; -} - -.content { - composes: content-full from '../../../../styles/content.css'; -} diff --git a/app/research/about/[id]/page.tsx b/app/research/about/[id]/page.tsx deleted file mode 100644 index 78932af..0000000 --- a/app/research/about/[id]/page.tsx +++ /dev/null @@ -1,35 +0,0 @@ -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 ( -
-
-
-

{`author: ${artifact.author}`}

-

{`title: ${artifact.title}`}

-

{`description: ${artifact.description}`}

-

{`created: ${artifact.created.toDateString()}`}

-

{`updated: ${artifact.updated.toDateString()}`}

-
-
-
-
-
-
- ) -} - -export default ArtifactPage diff --git a/app/research/concepts/[id]/page.module.css b/app/research/concepts/[id]/page.module.css deleted file mode 100644 index 7d2c1fc..0000000 --- a/app/research/concepts/[id]/page.module.css +++ /dev/null @@ -1,11 +0,0 @@ -.page { - composes: page from '../../../../styles/page.css'; -} - -.banner { - composes: banner-document from '../../../../styles/banner.css'; -} - -.content { - composes: content-full from '../../../../styles/content.css'; -} diff --git a/app/research/concepts/[id]/page.tsx b/app/research/concepts/[id]/page.tsx deleted file mode 100644 index 572cfba..0000000 --- a/app/research/concepts/[id]/page.tsx +++ /dev/null @@ -1,35 +0,0 @@ -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 ( -
-
-
-

{`author: ${artifact.author}`}

-

{`title: ${artifact.title}`}

-

{`description: ${artifact.description}`}

-

{`created: ${artifact.created.toDateString()}`}

-

{`updated: ${artifact.updated.toDateString()}`}

-
-
-
-
-
-
- ) -} - -export default ArtifactPage diff --git a/app/research/page.module.css b/app/research/page.module.css index 6f026c6..8b3109d 100644 --- a/app/research/page.module.css +++ b/app/research/page.module.css @@ -1,24 +1,35 @@ .page { - composes: page from '../../styles/page.css'; + composes: page from 'chora/styles/page.css'; } .banner { - composes: banner from '../../styles/banner.css'; + composes: banner from 'chora/styles/main.css'; } .content { - composes: content-full from '../../styles/content.css'; + composes: content-full from 'chora/styles/main.css'; + min-height: 25vh !important; + align-items: end !important; } -.content ul { +.contentFull { + composes: content-full from 'chora/styles/main.css'; + min-height: 25vh !important; + align-items: start !important; +} + +.contentFull h2 { + margin: 0.5em 0; +} + +.contentFull h3 { + color: var(--color-text); +} + +.contentFull h4 { + color: var(--color-text); +} + +.contentFull ul { list-style: none inside none; } - -.content li { - margin: 2em 0; -} - -.content p { - color: var(--color-text); - font-weight: 300; -} diff --git a/app/research/page.tsx b/app/research/page.tsx index c88b76c..7e635df 100644 --- a/app/research/page.tsx +++ b/app/research/page.tsx @@ -1,7 +1,7 @@ import { Metadata } from 'next' -import Link from 'next/link' +// import Link from 'next/link' -import { getArtifacts } from '@utils' +// import { getDocs } from '@utils' import styles from './page.module.css' @@ -9,62 +9,55 @@ export const metadata: Metadata = { title: 'chora studio | research', } -async function getResearchArtifacts() { - return [ - { group: 'about', items: getArtifacts('about') }, - { group: 'concepts', items: getArtifacts('concepts') }, - { group: 'tutorials', items: getArtifacts('tutorials') }, - ] -} +// 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 +// } +// }) +// } const ResearchPage = async () => { - const artifacts = await getResearchArtifacts() + // const docs = await getResearch() + return (
-

{'research'}

+

{'research'}

{ - 'Chora Studio is researching decentralized protocols and agentic systems with a special interest in privacy-preserving technologies.' + 'Chora Studio is researching decentalized protocols and agentic systems with a special interest in FOSS and privacy-preserving technologies.' }

- {!artifacts.length ? ( -

- {'failed to load artifacts'} -

- ) : ( -
- {artifacts.map(({ group, items }) => ( -
-

{group}

-
    - {items.map( - ({ id, title, description, created, updated }) => ( -
  • - -

    {title}

    -

    {description}

    -

    - {`created: ${created.toDateString()}`} - {' | '} - {`updated: ${updated.toDateString()}`} -

    - -
  • - ), - )} -
-
- ))} -
- )}
+
+ {/*{!docs.length ? (*/} +

{'coming soon...'}

+ {/*) : ( +
    + {docs.map(({ id, date, title, author }) => ( +
  • + +

    {date}

    +

    {title}

    +

    {`by ${author}`}

    + +
  • + ))} +
+ )}*/} +
) } diff --git a/app/research/tutorials/[id]/page.module.css b/app/research/tutorials/[id]/page.module.css deleted file mode 100644 index 6f43de1..0000000 --- a/app/research/tutorials/[id]/page.module.css +++ /dev/null @@ -1,33 +0,0 @@ -.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; -} diff --git a/app/research/tutorials/[id]/page.tsx b/app/research/tutorials/[id]/page.tsx deleted file mode 100644 index 052a47c..0000000 --- a/app/research/tutorials/[id]/page.tsx +++ /dev/null @@ -1,35 +0,0 @@ -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 ( -
-
-
-

{`author: ${artifact.author}`}

-

{`title: ${artifact.title}`}

-

{`description: ${artifact.description}`}

-

{`created: ${artifact.created.toDateString()}`}

-

{`updated: ${artifact.updated.toDateString()}`}

-
-
-
-
-
-
- ) -} - -export default ArtifactPage diff --git a/app/services/page.module.css b/app/services/page.module.css index 91e597a..0fc453f 100644 --- a/app/services/page.module.css +++ b/app/services/page.module.css @@ -1,11 +1,11 @@ .page { - composes: page from '../../styles/page.css'; + composes: page from 'chora/styles/page.css'; } .banner { - composes: banner from '../../styles/banner.css'; + composes: banner from 'chora/styles/main.css'; } .content { - composes: content-full from '../../styles/content.css'; + composes: content-full from 'chora/styles/main.css'; } diff --git a/app/services/page.tsx b/app/services/page.tsx index fefb548..a93b2e6 100644 --- a/app/services/page.tsx +++ b/app/services/page.tsx @@ -11,7 +11,7 @@ const ServicesPage = () => {
-

{'services'}

+

{'services'}

@@ -32,16 +32,11 @@ const ServicesPage = () => {

{ - 'If your organization is interested in working with Chora Studio, please reach out with information about the organization and project:' + 'If your organization is interested in working with Chora Studio, please reach out with information about your organization and your project.' }

-

{'contact [at] chora.studio'}

-

- - { - 'The above email address uses Proton Mail under the hood. If you send an email using Proton Mail, our communication will be end-to-end encrypted.' - } - +

+ {'contact [at] chora.studio'}

diff --git a/app/validator/page.module.css b/app/validator/page.module.css index 91e597a..ca6b896 100644 --- a/app/validator/page.module.css +++ b/app/validator/page.module.css @@ -1,11 +1,19 @@ .page { - composes: page from '../../styles/page.css'; + composes: page from 'chora/styles/page.css'; } .banner { - composes: banner from '../../styles/banner.css'; + composes: banner from 'chora/styles/main.css'; } .content { - composes: content-full from '../../styles/content.css'; + composes: content-full from 'chora/styles/main.css'; +} + +.content ul { + margin: 1em 1em 2em; +} + +.content li { + margin: 1em; } diff --git a/app/validator/page.tsx b/app/validator/page.tsx index a2b8815..1be559e 100644 --- a/app/validator/page.tsx +++ b/app/validator/page.tsx @@ -14,7 +14,7 @@ const ValidatorPage = () => {
-

{'validator'}

+

{'validator'}

@@ -22,7 +22,7 @@ const ValidatorPage = () => {

{'NOTICE: Chora Validator is no longer in operation.'}

-
+

{'Chora Studio operates Chora Validator on '} @@ -86,7 +86,7 @@ const ValidatorPage = () => {

{'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).' + '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.' }

    diff --git a/artifacts b/artifacts deleted file mode 160000 index 24c7084..0000000 --- a/artifacts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 24c70846869161333840198f41f0fc79822379ff diff --git a/assets/font/UFL.txt b/assets/font/UFL.txt deleted file mode 100644 index 6e722c8..0000000 --- a/assets/font/UFL.txt +++ /dev/null @@ -1,96 +0,0 @@ -------------------------------- -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. diff --git a/assets/font/Ubuntu-Bold.ttf b/assets/font/Ubuntu-Bold.ttf deleted file mode 100644 index 4af149a..0000000 Binary files a/assets/font/Ubuntu-Bold.ttf and /dev/null differ diff --git a/assets/font/Ubuntu-BoldItalic.ttf b/assets/font/Ubuntu-BoldItalic.ttf deleted file mode 100644 index a68afb6..0000000 Binary files a/assets/font/Ubuntu-BoldItalic.ttf and /dev/null differ diff --git a/assets/font/Ubuntu-Italic.ttf b/assets/font/Ubuntu-Italic.ttf deleted file mode 100644 index b022726..0000000 Binary files a/assets/font/Ubuntu-Italic.ttf and /dev/null differ diff --git a/assets/font/Ubuntu-Light.ttf b/assets/font/Ubuntu-Light.ttf deleted file mode 100644 index 0e9f90d..0000000 Binary files a/assets/font/Ubuntu-Light.ttf and /dev/null differ diff --git a/assets/font/Ubuntu-LightItalic.ttf b/assets/font/Ubuntu-LightItalic.ttf deleted file mode 100644 index 2e007de..0000000 Binary files a/assets/font/Ubuntu-LightItalic.ttf and /dev/null differ diff --git a/assets/font/Ubuntu-Medium.ttf b/assets/font/Ubuntu-Medium.ttf deleted file mode 100644 index 5296045..0000000 Binary files a/assets/font/Ubuntu-Medium.ttf and /dev/null differ diff --git a/assets/font/Ubuntu-MediumItalic.ttf b/assets/font/Ubuntu-MediumItalic.ttf deleted file mode 100644 index 5dc193d..0000000 Binary files a/assets/font/Ubuntu-MediumItalic.ttf and /dev/null differ diff --git a/assets/font/Ubuntu-Regular.ttf b/assets/font/Ubuntu-Regular.ttf deleted file mode 100644 index dbb834a..0000000 Binary files a/assets/font/Ubuntu-Regular.ttf and /dev/null differ diff --git a/assets/images/chora_dark.png b/assets/images/chora_dark.png deleted file mode 100644 index caca714..0000000 Binary files a/assets/images/chora_dark.png and /dev/null differ diff --git a/assets/images/chora_dark_background.png b/assets/images/chora_dark_background.png deleted file mode 100644 index aa1fa6b..0000000 Binary files a/assets/images/chora_dark_background.png and /dev/null differ diff --git a/assets/images/chora_dark_icon.png b/assets/images/chora_dark_icon.png deleted file mode 100644 index b977249..0000000 Binary files a/assets/images/chora_dark_icon.png and /dev/null differ diff --git a/assets/images/chora_dark_large.png b/assets/images/chora_dark_large.png deleted file mode 100644 index 3328a11..0000000 Binary files a/assets/images/chora_dark_large.png and /dev/null differ diff --git a/assets/images/chora_dark_small.png b/assets/images/chora_dark_small.png deleted file mode 100644 index ef8eed7..0000000 Binary files a/assets/images/chora_dark_small.png and /dev/null differ diff --git a/assets/images/chora_light.png b/assets/images/chora_light.png deleted file mode 100644 index df0aef6..0000000 Binary files a/assets/images/chora_light.png and /dev/null differ diff --git a/assets/images/chora_light_background.png b/assets/images/chora_light_background.png deleted file mode 100644 index 20fc1cd..0000000 Binary files a/assets/images/chora_light_background.png and /dev/null differ diff --git a/assets/images/chora_light_icon.png b/assets/images/chora_light_icon.png deleted file mode 100644 index de0d3f4..0000000 Binary files a/assets/images/chora_light_icon.png and /dev/null differ diff --git a/assets/images/chora_light_large.png b/assets/images/chora_light_large.png deleted file mode 100644 index 04a6cd4..0000000 Binary files a/assets/images/chora_light_large.png and /dev/null differ diff --git a/assets/images/chora_light_small.png b/assets/images/chora_light_small.png deleted file mode 100644 index 9258977..0000000 Binary files a/assets/images/chora_light_small.png and /dev/null differ diff --git a/assets/images/favicon.ico b/assets/images/favicon.ico deleted file mode 100644 index 7fa4473..0000000 Binary files a/assets/images/favicon.ico and /dev/null differ diff --git a/bun.lockb b/bun.lockb old mode 100755 new mode 100644 index 8013ac2..2c73027 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/components/Background.module.css b/components/Background.module.css deleted file mode 100644 index 5c24869..0000000 --- a/components/Background.module.css +++ /dev/null @@ -1,30 +0,0 @@ -.background { - align-items: center; - display: flex; - height: 100vh; - justify-content: center; - position: fixed; - width: 100vw; - z-index: -1; -} - -.background { - background: var(--background-primary); -} - -.background img { - scale: 65%; -} - -@media (max-width: 850px) { - .background img { - scale: 35%; - } -} - -.background div { - background: var(--background-primary-transparent); - height: 100vh; - position: fixed; - width: 100vw; -} diff --git a/components/Background.tsx b/components/Background.tsx deleted file mode 100644 index 1c9c0d5..0000000 --- a/components/Background.tsx +++ /dev/null @@ -1,24 +0,0 @@ -'use client' - -import Image from 'next/image' -import * as React from 'react' -import { useContext } from 'react' - -import darkBackground from '../assets/images/chora_dark.png' -import lightBackground from '../assets/images/chora_light.png' -import { ThemeContext } from '../contexts' - -import styles from './Background.module.css' - -const Background = () => { - const { darkTheme } = useContext(ThemeContext) - - return ( -
    - chora -
    -
    - ) -} - -export default Background diff --git a/components/Footer.module.css b/components/Footer.module.css deleted file mode 100644 index a3075cc..0000000 --- a/components/Footer.module.css +++ /dev/null @@ -1,11 +0,0 @@ -.footer { - composes: footer from '../styles/footer.css'; -} - -.title { - composes: footer-title from '../styles/footer.css'; -} - -.list { - composes: footer-list from '../styles/footer.css'; -} diff --git a/components/Footer.tsx b/components/Footer.tsx deleted file mode 100644 index d945121..0000000 --- a/components/Footer.tsx +++ /dev/null @@ -1,57 +0,0 @@ -'use client' - -import Image from 'next/image' -import Link from 'next/link' -import * as React from 'react' -import { useContext } from 'react' - -import choraDarkSmall from '../assets//images/chora_dark_small.png' -import choraLightSmall from '../assets//images/chora_light_small.png' -import { ThemeContext } from '../contexts' -import { ArrowUpRight } from './icons' - -import styles from './Footer.module.css' - -const Footer = ({ about, sections }: any) => { - const { darkTheme } = useContext(ThemeContext) - - const currentYear = new Date().getFullYear() - - return ( -
    -
    {darkTheme?.toString()}
    -
    -
    - chora -

    {`© ${currentYear} Chora Studio LLC`}

    -
    - {about && ( -
    -

    {about.title}

    -
    {about.text}
    -
    - )} - {sections.map((section: any) => ( -
    -

    {section.title}

    -
      - {section.items.map((item: any) => ( -
    • - - {item.title} - {item.target && } - -
    • - ))} -
    -
    - ))} -
    -
    - ) -} - -export default Footer diff --git a/components/Header.module.css b/components/Header.module.css deleted file mode 100644 index 8e4d950..0000000 --- a/components/Header.module.css +++ /dev/null @@ -1,22 +0,0 @@ -.header { - composes: header from '../styles/header.css'; -} - -.menu { - composes: header-menu from '../styles/header.css'; -} - -.divider { - composes: header-divider from '../styles/header.css'; -} - -.button { - background: none; -} - -@media (min-width: 850px) { - .buttonMobile { - composes: button; - display: none !important; - } -} diff --git a/components/Header.tsx b/components/Header.tsx deleted file mode 100644 index 5637d05..0000000 --- a/components/Header.tsx +++ /dev/null @@ -1,74 +0,0 @@ -'use client' - -import Link from 'next/link' -import * as React from 'react' -import { useContext } from 'react' - -import { MenuContext, ThemeContext } from '../contexts' -import { HeaderTitle } from '.' -import { ArrowUpRight, MenuIcon, ThemeIcon } from './icons' - -import styles from './Header.module.css' - -const Header = ({ title, items, showMenuButton, showMobileTitle }: any) => { - const { showMenu, setShowMenu } = useContext(MenuContext) - const { darkTheme, setDarkTheme } = useContext(ThemeContext) - - const toggleMenu = () => { - if (showMenu) { - setShowMenu(false) - } else { - setShowMenu(true) - } - } - - const toggleTheme = () => { - if (darkTheme) { - setDarkTheme(false) - } else { - setDarkTheme(true) - } - } - - return ( -
    -
    {darkTheme?.toString()}
    -
    - {showMenuButton && ( - - )} - -
    -
      - {items && - items.map((item: any, i: number) => - item === 'divider' ? ( -
    • - {'|'} -
    • - ) : ( -
    • - - {item.title} - {item.target && } - -
    • - ), - )} -
    - -
    -
    -
    - ) -} - -export default Header diff --git a/components/HeaderTitle.module.css b/components/HeaderTitle.module.css deleted file mode 100644 index 1b474bd..0000000 --- a/components/HeaderTitle.module.css +++ /dev/null @@ -1,17 +0,0 @@ -.title { - composes: header-title from '../styles/header.css'; -} - -@media (max-width: 850px) { - .title { - display: none !important; - } -} - -.mobileTitle { - composes: header-title from '../styles/header.css'; -} - -.headerTitleText { - composes: header-title-text from '../styles/header.css'; -} diff --git a/components/HeaderTitle.tsx b/components/HeaderTitle.tsx deleted file mode 100644 index 349998c..0000000 --- a/components/HeaderTitle.tsx +++ /dev/null @@ -1,26 +0,0 @@ -'use client' - -import Image from 'next/image' -import Link from 'next/link' -import * as React from 'react' - -import choraLogoDark from '../assets/images/chora_dark_small.png' -import choraLogoLight from '../assets/images/chora_light_small.png' - -import styles from './HeaderTitle.module.css' - -const HeaderTitle = ({ darkTheme, title, showMobileTitle }: any) => ( -
    - - chora -
    - {'chora '} - {title && title.titleX && ( - {title.titleX} - )} -
    - -
    -) - -export default HeaderTitle diff --git a/components/Sidebar.module.css b/components/Sidebar.module.css deleted file mode 100644 index 4543196..0000000 --- a/components/Sidebar.module.css +++ /dev/null @@ -1,35 +0,0 @@ -.sidebar { - composes: sidebar from '../styles/sidebar.css'; -} - -.mobileOnly { - composes: sidebar from '../styles/sidebar.css'; - min-height: calc(100vh - var(--header-height)); - width: 75vw; -} - -/* cancel sidebar styling */ -@media (max-width: 850px) { - .mobileOnly { - display: block !important; - } -} - -@media (min-width: 850px) { - .mobileOnly { - display: none !important; - } -} - -.active { - composes: sidebar-link-active from '../styles/sidebar.css'; -} - -.divider { - margin: 1em 0; -} - -.button { - background: none; - color: var(--color-theme); -} diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx deleted file mode 100644 index 5bd407e..0000000 --- a/components/Sidebar.tsx +++ /dev/null @@ -1,58 +0,0 @@ -'use client' - -import Link from 'next/link' -import { usePathname } from 'next/navigation' -import * as React from 'react' -import { useContext, useEffect, useState } from 'react' - -import { MenuContext } from '../contexts' -import { ArrowUpRight } from './icons' - -import styles from './Sidebar.module.css' - -const Sidebar = ({ items, mobileOnly }: any) => { - const currentRoute = usePathname() - - const { showMenu, setShowMenu } = useContext(MenuContext) - - const [initRoute, setInitRoute] = useState('') - - useEffect(() => { - if (currentRoute && !initRoute) { - setInitRoute(currentRoute) - } - if (initRoute && initRoute !== currentRoute) { - setInitRoute(currentRoute) - setShowMenu(false) - } - }, [currentRoute, initRoute, setShowMenu]) - - return !mobileOnly || showMenu ? ( -
    -
      - {items.map((item: any, i: number) => - item === 'divider' ? ( -
      - ) : ( -
    • - - {item.title} - {item.target === '_blank' && } - -
    • - ), - )} -
    -
    - ) : ( - <> - ) -} - -export default Sidebar diff --git a/components/icons/ArrowLeft.tsx b/components/icons/ArrowLeft.tsx deleted file mode 100644 index 67b8823..0000000 --- a/components/icons/ArrowLeft.tsx +++ /dev/null @@ -1,54 +0,0 @@ -'use client' - -import * as React from 'react' -import { useContext } from 'react' - -import { ThemeContext } from '../../contexts' - -const defaultColor = '#00C3A5' - -const ArrowRight = ({ color, useTheme }: any) => { - const { darkTheme } = useContext(ThemeContext) - - const stroke = color || defaultColor - - return ( - - - - - - ) -} - -export default ArrowRight diff --git a/components/icons/ArrowRight.tsx b/components/icons/ArrowRight.tsx deleted file mode 100644 index 4ce313c..0000000 --- a/components/icons/ArrowRight.tsx +++ /dev/null @@ -1,54 +0,0 @@ -'use client' - -import * as React from 'react' -import { useContext } from 'react' - -import { ThemeContext } from '../../contexts' - -const defaultColor = '#00C3A5' - -const ArrowRight = ({ color, useTheme }: any) => { - const { darkTheme } = useContext(ThemeContext) - - const stroke = color || defaultColor - - return ( - - - - - - ) -} - -export default ArrowRight diff --git a/components/icons/ArrowUpRight.tsx b/components/icons/ArrowUpRight.tsx deleted file mode 100644 index ada3b9d..0000000 --- a/components/icons/ArrowUpRight.tsx +++ /dev/null @@ -1,54 +0,0 @@ -'use client' - -import * as React from 'react' -import { useContext } from 'react' - -import { ThemeContext } from '../../contexts' - -const defaultColor = '#00C3A5' - -const ArrowUpRight = ({ color, useTheme }: any) => { - const { darkTheme } = useContext(ThemeContext) - - const stroke = color || defaultColor - - return ( - - - - - - ) -} - -export default ArrowUpRight diff --git a/components/icons/CheckIcon.tsx b/components/icons/CheckIcon.tsx deleted file mode 100644 index d875e79..0000000 --- a/components/icons/CheckIcon.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import * as React from 'react' - -const CheckIcon = ({ darkTheme }: any) => ( - - - - -) - -export default CheckIcon diff --git a/components/icons/MenuIcon.tsx b/components/icons/MenuIcon.tsx deleted file mode 100644 index 32544cf..0000000 --- a/components/icons/MenuIcon.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import * as React from 'react' - -const MenuIcon = ({ darkTheme }: any) => ( - - - - - -) - -export default MenuIcon diff --git a/components/icons/ThemeIcon.tsx b/components/icons/ThemeIcon.tsx deleted file mode 100644 index badd089..0000000 --- a/components/icons/ThemeIcon.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import * as React from 'react' - -const ThemeIcon = ({ darkTheme }: any) => ( - - - - -) - -export default ThemeIcon diff --git a/components/icons/UserIcon.tsx b/components/icons/UserIcon.tsx deleted file mode 100644 index 137222f..0000000 --- a/components/icons/UserIcon.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import * as React from 'react' - -const UserIcon = ({ darkTheme }: any) => ( - - - - - - -) - -export default UserIcon diff --git a/components/icons/index.ts b/components/icons/index.ts deleted file mode 100644 index a4a94ce..0000000 --- a/components/icons/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { default as ArrowLeft } from './ArrowLeft' -export { default as ArrowRight } from './ArrowRight' -export { default as ArrowUpRight } from './ArrowUpRight' -export { default as CheckIcon } from './CheckIcon' -export { default as MenuIcon } from './MenuIcon' -export { default as ThemeIcon } from './ThemeIcon' -export { default as UserIcon } from './UserIcon' diff --git a/components/index.ts b/components/index.ts deleted file mode 100644 index 89f737f..0000000 --- a/components/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { default as Background } from './Background' -export { default as Footer } from './Footer' -export { default as Header } from './Header' -export { default as HeaderTitle } from './HeaderTitle' -export { default as Sidebar } from './Sidebar' diff --git a/contexts/MenuContext.tsx b/contexts/MenuContext.tsx deleted file mode 100644 index 3b74922..0000000 --- a/contexts/MenuContext.tsx +++ /dev/null @@ -1,26 +0,0 @@ -'use client' - -import * as React from 'react' -import { createContext, useState } from 'react' - -const MenuContext = createContext({}) - -const MenuContextProvider = (props: any) => { - const [showMenu, setShowMenu] = useState(false) - const [showUser, setShowUser] = useState(false) - - return ( - - {props.children} - - ) -} - -export { MenuContext, MenuContextProvider } diff --git a/contexts/ThemeContext.tsx b/contexts/ThemeContext.tsx deleted file mode 100644 index 2d888bc..0000000 --- a/contexts/ThemeContext.tsx +++ /dev/null @@ -1,56 +0,0 @@ -'use client' - -import * as React from 'react' -import { createContext, useEffect, useState } from 'react' - -export const cachedDarkKey = 'chora-web-dark' - -const initDarkTheme = () => { - let initDarkTheme = false - - if ( - typeof localStorage !== 'undefined' && - localStorage.getItem(cachedDarkKey) - ) { - initDarkTheme = localStorage.getItem(cachedDarkKey) === 'true' - } else if (typeof window !== 'undefined') { - initDarkTheme = window.matchMedia('(prefers-color-scheme: dark)').matches - } - - return initDarkTheme -} - -const ThemeContext = createContext({}) - -const ThemeContextProvider = (props: any) => { - const [darkTheme, setDarkTheme] = useState(initDarkTheme()) - - useEffect(() => { - if (typeof window !== 'undefined' && typeof localStorage !== 'undefined') { - const root = window.document.documentElement - - if (darkTheme) { - root.classList.add('dark-theme') - root.style.backgroundColor = '#161616' // --background-secondary (dark-theme) - } else { - root.classList.remove('dark-theme') - root.style.backgroundColor = '#FCFCFC' // --background-secondary (light-theme) - } - - localStorage.setItem(cachedDarkKey, darkTheme ? 'true' : 'false') - } - }, [darkTheme]) - - return ( - - {props.children} - - ) -} - -export { ThemeContext, ThemeContextProvider } diff --git a/contexts/index.ts b/contexts/index.ts deleted file mode 100644 index 33e6364..0000000 --- a/contexts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -'use client' - -export { MenuContext, MenuContextProvider } from './MenuContext' -export { ThemeContext, ThemeContextProvider } from './ThemeContext' diff --git a/package.json b/package.json index 194f31a..d6fc584 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "clean": "rm -rf .next dist node_modules" }, "dependencies": { + "chora": "npm:@chora-io/chora@v0.1.0-beta12", "gray-matter": "^4", "next": "^14", "react": "^18", diff --git a/research b/research new file mode 160000 index 0000000..d16e431 --- /dev/null +++ b/research @@ -0,0 +1 @@ +Subproject commit d16e431f8436968a5cc38d1fc039e7ae1753fc18 diff --git a/styles/banner.css b/styles/banner.css deleted file mode 100644 index 6eba31c..0000000 --- a/styles/banner.css +++ /dev/null @@ -1,86 +0,0 @@ -/* 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; -} diff --git a/styles/content.css b/styles/content.css deleted file mode 100644 index e32bc92..0000000 --- a/styles/content.css +++ /dev/null @@ -1,77 +0,0 @@ -/* 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 h2 { - margin: 0.5em 0; -} - -.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)); -} diff --git a/styles/footer.css b/styles/footer.css deleted file mode 100644 index 4e72733..0000000 --- a/styles/footer.css +++ /dev/null @@ -1,68 +0,0 @@ -/* footer */ - -.footer { - background: var(--background-primary); - box-shadow: var(--box-shadow); - height: var(--footer-height); - overflow: hidden; - width: 100%; -} - -.footer > div { - align-items: center; - display: flex; - height: inherit; - justify-content: center; - margin: 0 1em; -} - -/* footer-title */ - -.footer-title { - margin: 0 4em; -} - -.footer-title img { - display: block; - height: 120px; - margin: 0 auto 1em auto; - width: 120px; -} - -@media (max-width: 850px) { - .footer-title img { - display: none; - } -} - -.footer-title h4 { - display: block; -} - -/* footer-list */ - -.footer-list { - font-size: 0.95em; - height: 160px; - margin: 0 2em; - max-width: 220px; - min-width: 140px; -} - -@media (max-width: 850px) { - .footer-list { - display: none; - } -} - -.footer-list h3 { - margin-bottom: 1em; -} - -.footer-list ul { - margin: 0 0.5em; -} - -.footer-list li { - margin: 0.75em; -} diff --git a/styles/header.css b/styles/header.css deleted file mode 100644 index 52dfef0..0000000 --- a/styles/header.css +++ /dev/null @@ -1,95 +0,0 @@ -/* header */ - -.header { - background: var(--background-primary); - box-shadow: var(--box-shadow); - height: var(--header-height); - overflow: hidden; - position: fixed; - width: 100%; - z-index: 1; -} - -.header > div { - display: flex; - height: inherit; - justify-content: space-between; - margin: 0 2em; -} - -/* header-title */ - -.header-title { - align-items: center; - display: flex; - justify-content: center; -} - -.header-title a { - align-items: center; - display: flex; - justify-content: center; -} - -.header-title img { - height: 36px; - width: 36px; -} - -@media (max-width: 850px) { - .header-title img { - height: 27px; - width: 27px; - } -} - -.header-title-text { - color: var(--color-text); - font-size: 20px; - font-weight: 300; /* cancel link weight */ - margin-left: 8px; -} - -@media (max-width: 850px) { - .header-title-text { - font-size: 15px; - margin-left: 6px; - } -} - -/* header-menu */ - -.header-menu { - display: flex; - height: var(--header-height); -} - -@media (max-width: 850px) { - .header-menu > div { - display: none; - } -} - -.header-menu ul { - align-items: center; - display: flex; - justify-content: center; - list-style: none inside none; - margin: 0 1em; -} - -@media (max-width: 850px) { - .header-menu ul { - display: none; - } -} - -.header-menu li { - margin: 0.6em; -} - -/* header-divider */ - -.header-divider { - color: var(--color-theme); -} diff --git a/styles/page.css b/styles/page.css deleted file mode 100644 index efb2492..0000000 --- a/styles/page.css +++ /dev/null @@ -1,61 +0,0 @@ -/* 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; -} diff --git a/styles/sidebar.css b/styles/sidebar.css deleted file mode 100644 index 3aeb99c..0000000 --- a/styles/sidebar.css +++ /dev/null @@ -1,59 +0,0 @@ -/* sidebar */ - -.sidebar { - background: var(--background-primary); - box-shadow: var(--box-shadow); - height: calc(100vh - var(--header-height)); - margin-top: var(--header-height); - overflow-y: scroll; - position: fixed; - scrollbar-width: none; /* hide scrollbar - Firefox */ - width: var(--sidebar-width); - z-index: 1; - -ms-overflow-style: none; /* hide scrollbar - Internet Explorer 10+ */ -} - -.sidebar::-webkit-scrollbar { - display: none; /* hide scrollbar - Safari and Chrome */ -} - -.sidebar ul { - list-style: none; -} - -.sidebar > ul { - padding: 1.5em; -} - -@media (max-width: 850px) { - .sidebar > ul { - padding: 1em; - } -} - -.sidebar > ul > li { - font-size: 1.2em; - padding: 0.75em 1.5em; -} - -.sidebar > ul > ul { - margin-left: 1.75em; -} - -.sidebar > ul > ul > li { - font-size: 1.1em; - padding: 0.65em 0.5em; -} - -/* sidebar-active */ - -.sidebar-active { - font-weight: 500; -} - -/* sidebar-breadcrumb */ - -.sidebar-breadcrumb a { - font-size: 0.85em; - margin-left: -0.5em; -} diff --git a/tsconfig.json b/tsconfig.json index 75ca144..a4667fd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,8 +20,6 @@ } ], "paths": { - "@components": ["components/index.ts"], - "@contexts": ["contexts/index.ts"], "@utils": ["utils/index.ts"] } }, diff --git a/utils/getArtifact.ts b/utils/getDoc.ts similarity index 76% rename from utils/getArtifact.ts rename to utils/getDoc.ts index faf1e2d..f47047d 100644 --- a/utils/getArtifact.ts +++ b/utils/getDoc.ts @@ -4,10 +4,10 @@ import matter from 'gray-matter' import { remark } from 'remark' import html from 'remark-html' -const root = path.join(process.cwd(), 'artifacts') +const docsDirectory = path.join(process.cwd(), 'research/docs') -export async function getArtifact(dir: string, id: string) { - const fullPath = path.join(root, dir, `${id}.md`) +export async function getDoc(id: string) { + const fullPath = path.join(docsDirectory, `${id}.md`) // read file contents const fileContents = fs.readFileSync(fullPath, 'utf8') diff --git a/utils/getArtifacts.ts b/utils/getDocs.ts similarity index 50% rename from utils/getArtifacts.ts rename to utils/getDocs.ts index 55bf388..9d708ae 100644 --- a/utils/getArtifacts.ts +++ b/utils/getDocs.ts @@ -2,19 +2,14 @@ import fs from 'fs' import path from 'path' import matter from 'gray-matter' -const root = path.join(process.cwd(), 'artifacts') +const docsDirectory = path.join(process.cwd(), 'research/docs') -export const getArtifacts = (dir: string) => { - const fileNames = fs.readdirSync(root + '/' + dir) - - const filtered = fileNames.filter((fileName) => fileName.includes(`.md`)) - - return filtered.map((fileName) => { - // set id +export const getDocs = () => { + const fileNames = fs.readdirSync(docsDirectory) + return fileNames.map((fileName) => { + // set id and full path const id = fileName.replace(/\.md$/, '') - - // set full path - const fullPath = path.join(root, dir, fileName) + const fullPath = path.join(docsDirectory, fileName) // read file contents const fileContents = fs.readFileSync(fullPath, 'utf8') diff --git a/utils/index.ts b/utils/index.ts index bed4bcc..8165489 100644 --- a/utils/index.ts +++ b/utils/index.ts @@ -1,2 +1,2 @@ -export { getArtifact } from './getArtifact' -export { getArtifacts } from './getArtifacts' +export { getDoc } from './getDoc' +export { getDocs } from './getDocs'