commit 7a46269effb992611d6ac8efdc16cc2dcf080ef6 Author: ryanchristo <12519942+ryanchristo@users.noreply.github.com> Date: Sat Oct 28 09:56:18 2023 -0700 init commit diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..adc0468 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,24 @@ +{ + "plugins": ["react"], + "extends": [ + "eslint:recommended", + "next/core-web-vitals", + "plugin:@typescript-eslint/recommended" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + } + }, + "rules": { + "@typescript-eslint/no-explicit-any": "off" + }, + "settings": { + "react": { + "version": "detect" + } + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5783daf --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +.idea +dist +node_modules diff --git a/README.md b/README.md new file mode 100644 index 0000000..7195a78 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# www + +chora studio website diff --git a/app/favicon.ico b/app/favicon.ico new file mode 100644 index 0000000..7fa4473 Binary files /dev/null and b/app/favicon.ico differ diff --git a/app/globals.css b/app/globals.css new file mode 100644 index 0000000..f2b9a38 --- /dev/null +++ b/app/globals.css @@ -0,0 +1,140 @@ +@font-face { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: normal; + src: url('../public/font/Ubuntu-Regular.ttf'); +} + +@font-face { + font-family: 'Ubuntu'; + font-style: italic; + font-weight: normal; + src: url('../public/font/Ubuntu-Italic.ttf'); +} + +@font-face { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: bold; + src: url('../public/font/Ubuntu-Bold.ttf'); +} + +@font-face { + font-family: 'Ubuntu'; + font-style: italic; + font-weight: bold; + src: url('../public/font/Ubuntu-BoldItalic.ttf'); +} + +@font-face { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: 300; + src: url('../public/font/Ubuntu-Light.ttf'); +} + +@font-face { + font-family: 'Ubuntu'; + font-style: italic; + font-weight: 300; + src: url('../public/font/Ubuntu-LightItalic.ttf'); +} + +@font-face { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: 500; + src: url('../public/font/Ubuntu-Medium.ttf'); +} + +@font-face { + font-family: 'Ubuntu'; + font-style: italic; + font-weight: 500; + src: url('../public/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); +} + +.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 { + font-family: var(--font-family); + font-weight: 300; + overflow-x: hidden; +} + +main { + color: var(--color-text); +} + +h1, h2, h3, h4, h5 { + font-weight: 400; +} + +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; +} diff --git a/app/layout.tsx b/app/layout.tsx new file mode 100644 index 0000000..dd1f8c4 --- /dev/null +++ b/app/layout.tsx @@ -0,0 +1,22 @@ +import { ThemeContextProvider } from '@contexts/ThemeContext' + +import Footer from '@components/Footer' +import Header from '@components/Header' + +import './globals.css' + +const Layout = ({ children }: any) => ( + + +
+ +
+ {children} +
+ + +) + +export default Layout diff --git a/app/not-found.module.css b/app/not-found.module.css new file mode 100644 index 0000000..0caff32 --- /dev/null +++ b/app/not-found.module.css @@ -0,0 +1,58 @@ +/* page */ + +.page { + align-items: flex-start; + display: flex; + justify-content: center; + margin-bottom: var(--footer-height); + min-height: 100vh; +} + +/* page-with-sidebar */ + +.page-with-sidebar { + align-items: flex-start; + display: flex; + justify-content: center; + margin-bottom: var(--footer-height); + padding-left: var(--sidebar-width); + min-height: 100vh; +} + +/* page and page-with-sidebar */ + +.page h1, +.page-with-sidebar h1 { + margin-bottom: 1.5em; +} + +.page > div, +.page-with-sidebar > div { + margin-top: var(--header-height); + padding-top: 4em; +} + +/* page-center */ + +.page-center { + background: var(--background-primary-transparent); + align-items: center; + display: flex; + justify-content: center; + min-height: 100vh; + text-align: center; +} + +.page-center div { + margin-bottom: 2%; +} + +.page-center h1 { + color: var(--color-theme); + font-size: 2.5em; +} + +.page-center h1, +.page-center h2 { + margin: 0.5em 0; +} diff --git a/app/not-found.tsx b/app/not-found.tsx new file mode 100644 index 0000000..eda36ac --- /dev/null +++ b/app/not-found.tsx @@ -0,0 +1,18 @@ +import { Metadata } from 'next' + +import styles from './not-found.module.css' + +export const metadata: Metadata = { + title: '404 | a placeless place', +} + +const NotFoundPage = () => ( +
+
+

{'404'}

+

{'a placeless place'}

+
+
+) + +export default NotFoundPage diff --git a/app/page.module.css b/app/page.module.css new file mode 100644 index 0000000..a388d5e --- /dev/null +++ b/app/page.module.css @@ -0,0 +1,91 @@ +/* container */ + +.container { + background: var(--background-primary-transparent); + width: 100vw; +} + +/* sectionMain */ + +.sectionMain { + align-items: center; + display: flex; + font-size: 1.5rem; + justify-content: center; + min-height: 100vh; + text-align: center; +} + +.sectionMain div { + margin-bottom: 2%; +} + +.sectionMain h1 { + padding: 0.75rem 0; +} + +.sectionMain p { + padding: 0.5rem 0; +} + +.sectionMain p > i { + color: var(--color-theme); +} + +@media (max-width: 850px) { + .sectionMain { + font-size: 1.2rem; + } +} + +/* sectionText */ + +.sectionText { + align-items: center; + background: var(--background-primary); + display: flex; + font-size: 1.2rem; + justify-content: center; + min-height: 100vh; +} + +@media (max-width: 850px) { + .sectionText { + font-size: 1rem; + } +} + +.sectionText div { + display: block; + margin-bottom: 5%; + max-width: 650px; + padding: 2rem; +} + +.sectionText div h2 { + margin-top: 2rem; +} + +.sectionText div p { + padding: 1rem 0; +} + +@media (max-width: 850px) { + .sectionText div { + padding: 2rem; + } +} + +/* sectionTextLinks */ + +.sectionTextLinks { + align-items: center; + display: flex; + justify-content: center; + padding: 1rem; + text-align: center; +} + +.sectionTextLinks a { + padding: 1rem; +} diff --git a/app/page.tsx b/app/page.tsx new file mode 100644 index 0000000..fd6721f --- /dev/null +++ b/app/page.tsx @@ -0,0 +1,74 @@ +import { Metadata } from 'next' + +import Background from '@components/Background' + +import styles from './page.module.css' + +export const metadata: Metadata = { + title: 'chora studio | home', +} + +const regenLink = + 'https://www.mintscan.io/regen/validators/regenvaloper1t8p3zdu3h8qzggfmvvvmtdnaj4trcsfh79xp4e' + +const HomePage = () => { + return ( +
+ +
+
+

{'chora '}{'studio'}

+

+ {'what is the role of technology in ecological regeneration?'} +

+

{'protocol research and development'}

+
+
+
+
+

{'products'}

+

+ { + 'Chora Studio is stewarding ' + } + + {'Chora Protocol'} + + {' - software tools and services for commons governance and ecological regeneration.'} +

+

+ + {'learn more ⇾'} + +

+

{'solutions'}

+

+ {'Chora Studio offers software research and development consulting services to clients building infrastructure for climate solutions.'} +

+

+ + {'learn more ⇾'} + +

+

{'validator'}

+

+ {'Chora Studio operates Chora Validator on '} + + {'Regen'} + + { + ' in addition to multiple test networks including Chora Testnet and Regen Redwood.' + } +

+

+ + {'learn more ⇾'} + +

+
+
+
+ ) +} + +export default HomePage diff --git a/app/products/page.module.css b/app/products/page.module.css new file mode 100644 index 0000000..a388d5e --- /dev/null +++ b/app/products/page.module.css @@ -0,0 +1,91 @@ +/* container */ + +.container { + background: var(--background-primary-transparent); + width: 100vw; +} + +/* sectionMain */ + +.sectionMain { + align-items: center; + display: flex; + font-size: 1.5rem; + justify-content: center; + min-height: 100vh; + text-align: center; +} + +.sectionMain div { + margin-bottom: 2%; +} + +.sectionMain h1 { + padding: 0.75rem 0; +} + +.sectionMain p { + padding: 0.5rem 0; +} + +.sectionMain p > i { + color: var(--color-theme); +} + +@media (max-width: 850px) { + .sectionMain { + font-size: 1.2rem; + } +} + +/* sectionText */ + +.sectionText { + align-items: center; + background: var(--background-primary); + display: flex; + font-size: 1.2rem; + justify-content: center; + min-height: 100vh; +} + +@media (max-width: 850px) { + .sectionText { + font-size: 1rem; + } +} + +.sectionText div { + display: block; + margin-bottom: 5%; + max-width: 650px; + padding: 2rem; +} + +.sectionText div h2 { + margin-top: 2rem; +} + +.sectionText div p { + padding: 1rem 0; +} + +@media (max-width: 850px) { + .sectionText div { + padding: 2rem; + } +} + +/* sectionTextLinks */ + +.sectionTextLinks { + align-items: center; + display: flex; + justify-content: center; + padding: 1rem; + text-align: center; +} + +.sectionTextLinks a { + padding: 1rem; +} diff --git a/app/products/page.tsx b/app/products/page.tsx new file mode 100644 index 0000000..02008b2 --- /dev/null +++ b/app/products/page.tsx @@ -0,0 +1,30 @@ +import { Metadata } from 'next' + +import styles from './page.module.css' + +export const metadata: Metadata = { + title: 'chora studio | products', +} + +const ProductsPage = () => { + return ( +
+
+
+

{'products'}

+

+ { + 'Chora Studio is stewarding ' + } + + {'Chora Protocol'} + + {' - software tools and services for commons governance and ecological regeneration.'} +

+
+
+
+ ) +} + +export default ProductsPage diff --git a/app/solutions/page.module.css b/app/solutions/page.module.css new file mode 100644 index 0000000..a388d5e --- /dev/null +++ b/app/solutions/page.module.css @@ -0,0 +1,91 @@ +/* container */ + +.container { + background: var(--background-primary-transparent); + width: 100vw; +} + +/* sectionMain */ + +.sectionMain { + align-items: center; + display: flex; + font-size: 1.5rem; + justify-content: center; + min-height: 100vh; + text-align: center; +} + +.sectionMain div { + margin-bottom: 2%; +} + +.sectionMain h1 { + padding: 0.75rem 0; +} + +.sectionMain p { + padding: 0.5rem 0; +} + +.sectionMain p > i { + color: var(--color-theme); +} + +@media (max-width: 850px) { + .sectionMain { + font-size: 1.2rem; + } +} + +/* sectionText */ + +.sectionText { + align-items: center; + background: var(--background-primary); + display: flex; + font-size: 1.2rem; + justify-content: center; + min-height: 100vh; +} + +@media (max-width: 850px) { + .sectionText { + font-size: 1rem; + } +} + +.sectionText div { + display: block; + margin-bottom: 5%; + max-width: 650px; + padding: 2rem; +} + +.sectionText div h2 { + margin-top: 2rem; +} + +.sectionText div p { + padding: 1rem 0; +} + +@media (max-width: 850px) { + .sectionText div { + padding: 2rem; + } +} + +/* sectionTextLinks */ + +.sectionTextLinks { + align-items: center; + display: flex; + justify-content: center; + padding: 1rem; + text-align: center; +} + +.sectionTextLinks a { + padding: 1rem; +} diff --git a/app/solutions/page.tsx b/app/solutions/page.tsx new file mode 100644 index 0000000..44baa24 --- /dev/null +++ b/app/solutions/page.tsx @@ -0,0 +1,24 @@ +import { Metadata } from 'next' + +import styles from './page.module.css' + +export const metadata: Metadata = { + title: 'chora studio | solutions', +} + +const SolutionsPage = () => { + return ( +
+
+
+

{'solutions'}

+

+ {'Chora Studio offers software research and development consulting services to clients building infrastructure for climate solutions.'} +

+
+
+
+ ) +} + +export default SolutionsPage diff --git a/app/validator/page.module.css b/app/validator/page.module.css new file mode 100644 index 0000000..a388d5e --- /dev/null +++ b/app/validator/page.module.css @@ -0,0 +1,91 @@ +/* container */ + +.container { + background: var(--background-primary-transparent); + width: 100vw; +} + +/* sectionMain */ + +.sectionMain { + align-items: center; + display: flex; + font-size: 1.5rem; + justify-content: center; + min-height: 100vh; + text-align: center; +} + +.sectionMain div { + margin-bottom: 2%; +} + +.sectionMain h1 { + padding: 0.75rem 0; +} + +.sectionMain p { + padding: 0.5rem 0; +} + +.sectionMain p > i { + color: var(--color-theme); +} + +@media (max-width: 850px) { + .sectionMain { + font-size: 1.2rem; + } +} + +/* sectionText */ + +.sectionText { + align-items: center; + background: var(--background-primary); + display: flex; + font-size: 1.2rem; + justify-content: center; + min-height: 100vh; +} + +@media (max-width: 850px) { + .sectionText { + font-size: 1rem; + } +} + +.sectionText div { + display: block; + margin-bottom: 5%; + max-width: 650px; + padding: 2rem; +} + +.sectionText div h2 { + margin-top: 2rem; +} + +.sectionText div p { + padding: 1rem 0; +} + +@media (max-width: 850px) { + .sectionText div { + padding: 2rem; + } +} + +/* sectionTextLinks */ + +.sectionTextLinks { + align-items: center; + display: flex; + justify-content: center; + padding: 1rem; + text-align: center; +} + +.sectionTextLinks a { + padding: 1rem; +} diff --git a/app/validator/page.tsx b/app/validator/page.tsx new file mode 100644 index 0000000..52d1be4 --- /dev/null +++ b/app/validator/page.tsx @@ -0,0 +1,33 @@ +import { Metadata } from 'next' + +import styles from './page.module.css' + +export const metadata: Metadata = { + title: 'chora studio | validator', +} + +const regenLink = + 'https://www.mintscan.io/regen/validators/regenvaloper1t8p3zdu3h8qzggfmvvvmtdnaj4trcsfh79xp4e' + +const ValidatorPage = () => { + return ( +
+
+
+

{'validator'}

+

+ {'Chora Studio operates Chora Validator on '} + + {'Regen'} + + { + ' in addition to multiple test networks including Chora Testnet and Regen Redwood.' + } +

+
+
+
+ ) +} + +export default ValidatorPage diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000..39bf8b6 Binary files /dev/null and b/bun.lockb differ diff --git a/components/Background.module.css b/components/Background.module.css new file mode 100644 index 0000000..6dbaaf7 --- /dev/null +++ b/components/Background.module.css @@ -0,0 +1,17 @@ +.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%; +} diff --git a/components/Background.tsx b/components/Background.tsx new file mode 100644 index 0000000..6274ae1 --- /dev/null +++ b/components/Background.tsx @@ -0,0 +1,21 @@ +'use client' + +import { ThemeContext } from '@contexts/ThemeContext' +import darkBackground from '../public/images/chora_dark.png' +import lightBackground from '../public/images/chora_light.png' +import Image from 'next/image' +import { useContext } from 'react' + +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 new file mode 100644 index 0000000..d03285e --- /dev/null +++ b/components/Footer.module.css @@ -0,0 +1,55 @@ +/* footer */ + +.footer { + background: var(--background-primary); + box-shadow: var(--box-shadow); + height: var(--footer-height); + width: 100vw; +} + +.footer > div { + align-items: center; + display: flex; + height: inherit; + justify-content: center; + margin: 0 1em; +} + +/* title */ + +.title { + margin: 0 4em; +} + +.title img { + display: block; + height: 120px; + margin: 0 auto 1em auto; + width: 120px; +} + +.title h4 { + display: block; +} + +/* list */ + +.list { + font-size: 0.95em; + height: 160px; + margin: 0 3em; + min-width: 140px; +} + +.list h3 { + margin-bottom: 1em; +} + +.list ul { + list-style: inside; + margin: 0 0.5em; +} + +.list li { + margin: 0.75em 0; +} diff --git a/components/Footer.tsx b/components/Footer.tsx new file mode 100644 index 0000000..d0ff71d --- /dev/null +++ b/components/Footer.tsx @@ -0,0 +1,93 @@ +'use client' + +import { ThemeContext } from '@contexts/ThemeContext' +import choraLogoDark from '../public/images/chora_dark_small.png' +import choraLogoLight from '../public/images/chora_light_small.png' +import Image from 'next/image' +import Link from 'next/link' +import { useContext } from 'react' + +import styles from './Footer.module.css' + +const Footer = () => { + const { darkTheme } = useContext(ThemeContext) + + return ( +
+
{darkTheme.toString()}
+
+
+ chora +

{'© 2023 Chora Studio, LLC'}

+
+
+

{'chora studio'}

+
    +
  • + + {'blog ↗'} + +
  • +
  • + + {'products'} + +
  • +
  • + + {'solutions'} + +
  • +
  • + + {'validator'} + +
  • +
+
+
+

{'chora protocol'}

+
    +
  • + + {'chora dashboard ↗'} + +
  • +
  • + + {'chora documentation ↗'} + +
  • +
  • + + {'chora repositories ↗'} + +
  • +
+
+
+

{'chora validator'}

+
    +
  • + + {'regen ↗'} + +
  • +
  • + + {'regen-redwood ↗'} + +
  • +
  • + + {'chora-testnet ↗'} + +
  • +
+
+
+
+ ) +} + +export default Footer diff --git a/components/Header.module.css b/components/Header.module.css new file mode 100644 index 0000000..1fac84a --- /dev/null +++ b/components/Header.module.css @@ -0,0 +1,70 @@ +/* header */ + +.header { + background: var(--background-primary); + box-shadow: var(--box-shadow); + height: var(--header-height); + position: fixed; + width: 100vw; + z-index: 1; +} + +.header > div { + display: flex; + height: inherit; + justify-content: space-between; + margin: 0 1em; +} + +/* title */ + +.title { + align-items: center; + display: flex; + justify-content: center; + margin: 0 2em; +} + +.title a { + align-items: center; + display: flex; + justify-content: center; +} + +.title img { + height: 40px; + width: 40px; +} + +.title div { + color: var(--color-text); + font-size: 22px; + margin-left: 12px; +} + +/* menu */ + +.menu { + display: flex; + height: var(--header-height); + margin-right: 3em; +} + +.menu ul { + align-items: center; + display: flex; + justify-content: center; + list-style: none inside none; + margin: 0 2em; +} + +.menu li { + margin: 0.75em; +} + +/* divider */ + +.divider { + color: var(--color-theme); + padding: 0; +} diff --git a/components/Header.tsx b/components/Header.tsx new file mode 100644 index 0000000..6736301 --- /dev/null +++ b/components/Header.tsx @@ -0,0 +1,62 @@ +'use client' + +import { ThemeContext } from '@contexts/ThemeContext' +import choraLogoDark from '../public/images/chora_dark_small.png' +import choraLogoLight from '../public/images/chora_light_small.png' +import ThemeButton from '@components/ThemeButton' +import Image from 'next/image' +import Link from 'next/link' +import { useContext } from 'react' + +import styles from './Header.module.css' + +const Header = () => { + const { darkTheme, setDarkTheme } = useContext(ThemeContext) + + const toggleTheme = () => { + if (darkTheme) { + setDarkTheme(false) + } else { + setDarkTheme(true) + } + } + + return ( +
+
{darkTheme.toString()}
+
+
+ + chora studio +
{'chora '}{'studio'}
+ +
+
+
    +
  • + {'products'} +
  • +
  • + {'solutions'} +
  • +
  • + {'validator'} +
  • +
  • {'|'}
  • +
  • + + {'blog ↗'} + +
  • +
+ +
+
+
+ ) +} + +export default Header diff --git a/components/ThemeButton.module.css b/components/ThemeButton.module.css new file mode 100644 index 0000000..ee23fc1 --- /dev/null +++ b/components/ThemeButton.module.css @@ -0,0 +1,8 @@ +.button { + align-items: center; + background: none; + display: inline-flex; + height: var(--header-height); + margin: 0; + padding: 0; +} diff --git a/components/ThemeButton.tsx b/components/ThemeButton.tsx new file mode 100644 index 0000000..52e4e87 --- /dev/null +++ b/components/ThemeButton.tsx @@ -0,0 +1,19 @@ +import * as React from 'react' + +import styles from './ThemeButton.module.css' + +const ThemeButton = ({ darkTheme, toggleTheme }: any) => ( + +) + +export default ThemeButton diff --git a/contexts/ThemeContext.tsx b/contexts/ThemeContext.tsx new file mode 100644 index 0000000..3f1ee63 --- /dev/null +++ b/contexts/ThemeContext.tsx @@ -0,0 +1,56 @@ +'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 = '#FAFAFA' // --background-secondary (light-theme) + } + + localStorage.setItem(cachedDarkKey, darkTheme ? 'true' : 'false') + } + }, [darkTheme]) + + return ( + + {props.children} + + ) +} + +export { ThemeContext, ThemeContextProvider } diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..81cbecb --- /dev/null +++ b/deploy.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env sh + +# abort on errors +set -e + +# build website +bun run build + +# add CNAME file +echo 'chora.studio' >> dist/CNAME + +# change to build directory +cd dist + +# git init and commit +git init +git add -A +git commit -m 'publish' + +# push to gh-pages branch +git push https://github.com/chora-studio/www master:gh-pages -f + +# clean up git +rm -rf .git + +cd - diff --git a/module.d.ts b/module.d.ts new file mode 100644 index 0000000..6c344ed --- /dev/null +++ b/module.d.ts @@ -0,0 +1 @@ +declare module '*.module.css' diff --git a/next-env.d.ts b/next-env.d.ts new file mode 100644 index 0000000..4f11a03 --- /dev/null +++ b/next-env.d.ts @@ -0,0 +1,5 @@ +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/next.config.js b/next.config.js new file mode 100644 index 0000000..681c906 --- /dev/null +++ b/next.config.js @@ -0,0 +1,8 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + distDir: 'dist', + output: 'export', + images: { unoptimized: true } +} + +module.exports = nextConfig diff --git a/package.json b/package.json new file mode 100644 index 0000000..a0e38c4 --- /dev/null +++ b/package.json @@ -0,0 +1,40 @@ +{ + "name": "www", + "private": true, + "description": "chora studio website", + "version": "0.0.0", + "homepage": "https://chora.studio", + "bugs": { + "url": "https://github.com/chora-studio/www/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/chora-studio/www" + }, + "scripts": { + "dev": "next dev", + "build": "next build", + "lint": "next lint", + "format": "prettier --write .", + "test": "echo 'test not configured'", + "clean": "rm -rf .next dist node_modules" + }, + "dependencies": { + "next": "^14", + "react": "^18", + "react-dom": "^18" + }, + "devDependencies": { + "@types/node": "^20", + "@types/react": "^18", + "@types/react-dom": "^18", + "@typescript-eslint/eslint-plugin": "^6", + "@typescript-eslint/parser": "^6", + "autoprefixer": "^10", + "postcss": "^8", + "tailwindcss": "^3", + "typescript": "^5", + "eslint": "^8", + "eslint-config-next": "^14" + } +} diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..6e41d95 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + autoprefixer: {}, + tailwindcss: {}, + }, +} diff --git a/public/CNAME b/public/CNAME new file mode 100644 index 0000000..4ed6cc9 --- /dev/null +++ b/public/CNAME @@ -0,0 +1 @@ +chora.studio diff --git a/public/font/UFL.txt b/public/font/UFL.txt new file mode 100644 index 0000000..6e722c8 --- /dev/null +++ b/public/font/UFL.txt @@ -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. diff --git a/public/font/Ubuntu-Bold.ttf b/public/font/Ubuntu-Bold.ttf new file mode 100644 index 0000000..4af149a Binary files /dev/null and b/public/font/Ubuntu-Bold.ttf differ diff --git a/public/font/Ubuntu-BoldItalic.ttf b/public/font/Ubuntu-BoldItalic.ttf new file mode 100644 index 0000000..a68afb6 Binary files /dev/null and b/public/font/Ubuntu-BoldItalic.ttf differ diff --git a/public/font/Ubuntu-Italic.ttf b/public/font/Ubuntu-Italic.ttf new file mode 100644 index 0000000..b022726 Binary files /dev/null and b/public/font/Ubuntu-Italic.ttf differ diff --git a/public/font/Ubuntu-Light.ttf b/public/font/Ubuntu-Light.ttf new file mode 100644 index 0000000..0e9f90d Binary files /dev/null and b/public/font/Ubuntu-Light.ttf differ diff --git a/public/font/Ubuntu-LightItalic.ttf b/public/font/Ubuntu-LightItalic.ttf new file mode 100644 index 0000000..2e007de Binary files /dev/null and b/public/font/Ubuntu-LightItalic.ttf differ diff --git a/public/font/Ubuntu-Medium.ttf b/public/font/Ubuntu-Medium.ttf new file mode 100644 index 0000000..5296045 Binary files /dev/null and b/public/font/Ubuntu-Medium.ttf differ diff --git a/public/font/Ubuntu-MediumItalic.ttf b/public/font/Ubuntu-MediumItalic.ttf new file mode 100644 index 0000000..5dc193d Binary files /dev/null and b/public/font/Ubuntu-MediumItalic.ttf differ diff --git a/public/font/Ubuntu-Regular.ttf b/public/font/Ubuntu-Regular.ttf new file mode 100644 index 0000000..dbb834a Binary files /dev/null and b/public/font/Ubuntu-Regular.ttf differ diff --git a/public/images/chora_dark.png b/public/images/chora_dark.png new file mode 100644 index 0000000..caca714 Binary files /dev/null and b/public/images/chora_dark.png differ diff --git a/public/images/chora_dark_background.png b/public/images/chora_dark_background.png new file mode 100644 index 0000000..aa1fa6b Binary files /dev/null and b/public/images/chora_dark_background.png differ diff --git a/public/images/chora_dark_icon.png b/public/images/chora_dark_icon.png new file mode 100644 index 0000000..b977249 Binary files /dev/null and b/public/images/chora_dark_icon.png differ diff --git a/public/images/chora_dark_large.png b/public/images/chora_dark_large.png new file mode 100644 index 0000000..3328a11 Binary files /dev/null and b/public/images/chora_dark_large.png differ diff --git a/public/images/chora_dark_small.png b/public/images/chora_dark_small.png new file mode 100644 index 0000000..ef8eed7 Binary files /dev/null and b/public/images/chora_dark_small.png differ diff --git a/public/images/chora_light.png b/public/images/chora_light.png new file mode 100644 index 0000000..df0aef6 Binary files /dev/null and b/public/images/chora_light.png differ diff --git a/public/images/chora_light_background.png b/public/images/chora_light_background.png new file mode 100644 index 0000000..20fc1cd Binary files /dev/null and b/public/images/chora_light_background.png differ diff --git a/public/images/chora_light_icon.png b/public/images/chora_light_icon.png new file mode 100644 index 0000000..de0d3f4 Binary files /dev/null and b/public/images/chora_light_icon.png differ diff --git a/public/images/chora_light_large.png b/public/images/chora_light_large.png new file mode 100644 index 0000000..04a6cd4 Binary files /dev/null and b/public/images/chora_light_large.png differ diff --git a/public/images/chora_light_small.png b/public/images/chora_light_small.png new file mode 100644 index 0000000..9258977 Binary files /dev/null and b/public/images/chora_light_small.png differ diff --git a/public/images/favicon.ico b/public/images/favicon.ico new file mode 100644 index 0000000..7fa4473 Binary files /dev/null and b/public/images/favicon.ico differ diff --git a/tailwind.config.ts b/tailwind.config.ts new file mode 100644 index 0000000..9a4e1ea --- /dev/null +++ b/tailwind.config.ts @@ -0,0 +1,3 @@ +module.exports = { + content: ['./app/**/*.{js,ts,jsx,tsx}'], +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..4645354 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,42 @@ +{ + "compilerOptions": { + "baseUrl": "./", + "target": "es5", + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@components/*": ["components/*"], + "@contexts/*": ["contexts/*"], + "@hooks/*": ["hooks/*"] + } + }, + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts", + "dist/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +}