fix and format
This commit is contained in:
parent
818f984f7b
commit
f9b77511d2
17 changed files with 206 additions and 202 deletions
4
.prettierrc
Normal file
4
.prettierrc
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"semi": false,
|
||||
"singleQuote": true
|
||||
}
|
||||
|
|
@ -1,63 +1,63 @@
|
|||
@font-face {
|
||||
font-family: "Ubuntu";
|
||||
font-family: 'Ubuntu';
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src: url("../public/font/Ubuntu-Regular.ttf");
|
||||
src: url('../public/font/Ubuntu-Regular.ttf');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Ubuntu";
|
||||
font-family: 'Ubuntu';
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
src: url("../public/font/Ubuntu-Italic.ttf");
|
||||
src: url('../public/font/Ubuntu-Italic.ttf');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Ubuntu";
|
||||
font-family: 'Ubuntu';
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
src: url("../public/font/Ubuntu-Bold.ttf");
|
||||
src: url('../public/font/Ubuntu-Bold.ttf');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Ubuntu";
|
||||
font-family: 'Ubuntu';
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
src: url("../public/font/Ubuntu-BoldItalic.ttf");
|
||||
src: url('../public/font/Ubuntu-BoldItalic.ttf');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Ubuntu";
|
||||
font-family: 'Ubuntu';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: url("../public/font/Ubuntu-Light.ttf");
|
||||
src: url('../public/font/Ubuntu-Light.ttf');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Ubuntu";
|
||||
font-family: 'Ubuntu';
|
||||
font-style: italic;
|
||||
font-weight: 300;
|
||||
src: url("../public/font/Ubuntu-LightItalic.ttf");
|
||||
src: url('../public/font/Ubuntu-LightItalic.ttf');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Ubuntu";
|
||||
font-family: 'Ubuntu';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: url("../public/font/Ubuntu-Medium.ttf");
|
||||
src: url('../public/font/Ubuntu-Medium.ttf');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Ubuntu";
|
||||
font-family: 'Ubuntu';
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
src: url("../public/font/Ubuntu-MediumItalic.ttf");
|
||||
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;
|
||||
--font-family: 'Ubuntu', sans-serif;
|
||||
--footer-height: 320px;
|
||||
--header-height: 80px;
|
||||
--sidebar-width: 240px;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { ThemeContextProvider } from "@contexts/ThemeContext";
|
||||
import { ThemeContextProvider } from '@contexts/ThemeContext'
|
||||
|
||||
import Footer from "@components/Footer";
|
||||
import Header from "@components/Header";
|
||||
import Footer from '@components/Footer'
|
||||
import Header from '@components/Header'
|
||||
|
||||
import "./globals.css";
|
||||
import './globals.css'
|
||||
|
||||
const Layout = ({ children }: any) => (
|
||||
<html lang="en">
|
||||
|
|
@ -17,6 +17,6 @@ const Layout = ({ children }: any) => (
|
|||
</main>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
)
|
||||
|
||||
export default Layout;
|
||||
export default Layout
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
import { Metadata } from "next";
|
||||
import { Metadata } from 'next'
|
||||
|
||||
import styles from "./not-found.module.css";
|
||||
import styles from './not-found.module.css'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "404 | a placeless place",
|
||||
};
|
||||
title: '404 | a placeless place',
|
||||
}
|
||||
|
||||
const NotFoundPage = () => (
|
||||
<div className={styles.page}>
|
||||
<div>
|
||||
<h1>{"404"}</h1>
|
||||
<h2>{"a placeless place"}</h2>
|
||||
<h1>{'404'}</h1>
|
||||
<h2>{'a placeless place'}</h2>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
)
|
||||
|
||||
export default NotFoundPage;
|
||||
export default NotFoundPage
|
||||
|
|
|
|||
50
app/page.tsx
50
app/page.tsx
|
|
@ -1,12 +1,12 @@
|
|||
import { Metadata } from "next";
|
||||
import { Metadata } from 'next'
|
||||
|
||||
import Background from "@components/Background";
|
||||
import Background from '@components/Background'
|
||||
|
||||
import styles from "./page.module.css";
|
||||
import styles from './page.module.css'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "chora studio | research and development",
|
||||
};
|
||||
title: 'chora studio | research and development',
|
||||
}
|
||||
|
||||
const HomePage = () => {
|
||||
return (
|
||||
|
|
@ -15,61 +15,61 @@ const HomePage = () => {
|
|||
<div className={styles.sectionMain}>
|
||||
<div>
|
||||
<h1>
|
||||
{"chora "}
|
||||
<span style={{ opacity: "0.75" }}>{"studio"}</span>
|
||||
{'chora '}
|
||||
<span style={{ opacity: '0.75' }}>{'studio'}</span>
|
||||
</h1>
|
||||
<p>
|
||||
<i>
|
||||
{"what is the role of technology in ecological regeneration?"}
|
||||
{'what is the role of technology in ecological regeneration?'}
|
||||
</i>
|
||||
</p>
|
||||
<p>{"software research and development"}</p>
|
||||
<p>{'software research and development'}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className={styles.sectionText}>
|
||||
<div>
|
||||
<h2>{"products"}</h2>
|
||||
<h2>{'products'}</h2>
|
||||
<p>
|
||||
{"Chora Studio is stewarding "}
|
||||
{'Chora Studio is stewarding '}
|
||||
<a href="https://chora.io" target="_blank">
|
||||
{"Chora Protocol"}
|
||||
{'Chora Protocol'}
|
||||
</a>
|
||||
{
|
||||
" - distributed ledger technology for commons governance and ecological regeneration."
|
||||
' - distributed ledger technology for commons governance and ecological regeneration.'
|
||||
}
|
||||
</p>
|
||||
<p>
|
||||
<a href="/products">{"learn more ⇾"}</a>
|
||||
<a href="/products">{'learn more ⇾'}</a>
|
||||
</p>
|
||||
<h2>{"solutions"}</h2>
|
||||
<h2>{'solutions'}</h2>
|
||||
<p>
|
||||
{
|
||||
"Chora Studio offers software research and development consulting services to clients building infrastructure for climate solutions."
|
||||
'Chora Studio offers software research and development consulting services to clients building infrastructure for climate solutions.'
|
||||
}
|
||||
</p>
|
||||
<p>
|
||||
<a href="/solutions">{"learn more ⇾"}</a>
|
||||
<a href="/solutions">{'learn more ⇾'}</a>
|
||||
</p>
|
||||
<h2>{"validator"}</h2>
|
||||
<h2>{'validator'}</h2>
|
||||
<p>
|
||||
{"Chora Studio operates Chora Validator on "}
|
||||
{'Chora Studio operates Chora Validator on '}
|
||||
<a
|
||||
href="https://www.mintscan.io/regen/validators/regenvaloper1t8p3zdu3h8qzggfmvvvmtdnaj4trcsfh79xp4e"
|
||||
target="_blank"
|
||||
>
|
||||
{"Regen"}
|
||||
{'Regen'}
|
||||
</a>
|
||||
{
|
||||
" and multiple test networks including Regen Redwood and Chora Testnet."
|
||||
' and multiple test networks including Regen Redwood and Chora Testnet.'
|
||||
}
|
||||
</p>
|
||||
<p>
|
||||
<a href="/validator">{"learn more ⇾"}</a>
|
||||
<a href="/validator">{'learn more ⇾'}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export default HomePage;
|
||||
export default HomePage
|
||||
|
|
|
|||
|
|
@ -1,30 +1,30 @@
|
|||
import { Metadata } from "next";
|
||||
import { Metadata } from 'next'
|
||||
|
||||
import styles from "./page.module.css";
|
||||
import styles from './page.module.css'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "chora studio | products",
|
||||
};
|
||||
title: 'chora studio | products',
|
||||
}
|
||||
|
||||
const ProductsPage = () => {
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<div className={styles.sectionText}>
|
||||
<div>
|
||||
<h1>{"products"}</h1>
|
||||
<h1>{'products'}</h1>
|
||||
<p>
|
||||
{"Chora Studio is stewarding "}
|
||||
{'Chora Studio is stewarding '}
|
||||
<a href="https://chora.io" target="_blank">
|
||||
{"Chora Protocol"}
|
||||
{'Chora Protocol'}
|
||||
</a>
|
||||
{
|
||||
" - distributed ledger technology for commons governance and ecological regeneration."
|
||||
' - distributed ledger technology for commons governance and ecological regeneration.'
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export default ProductsPage;
|
||||
export default ProductsPage
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
import { Metadata } from "next";
|
||||
import { Metadata } from 'next'
|
||||
|
||||
import styles from "./page.module.css";
|
||||
import styles from './page.module.css'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "chora studio | solutions",
|
||||
};
|
||||
title: 'chora studio | solutions',
|
||||
}
|
||||
|
||||
const SolutionsPage = () => {
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<div className={styles.sectionText}>
|
||||
<div>
|
||||
<h1>{"solutions"}</h1>
|
||||
<h1>{'solutions'}</h1>
|
||||
<p>
|
||||
{
|
||||
"Chora Studio offers software research and development consulting services to clients building infrastructure for climate solutions."
|
||||
'Chora Studio offers software research and development consulting services to clients building infrastructure for climate solutions.'
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export default SolutionsPage;
|
||||
export default SolutionsPage
|
||||
|
|
|
|||
|
|
@ -1,73 +1,73 @@
|
|||
import { Metadata } from "next";
|
||||
import { Metadata } from 'next'
|
||||
|
||||
import styles from "./page.module.css";
|
||||
import styles from './page.module.css'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "chora studio | validator",
|
||||
};
|
||||
title: 'chora studio | validator',
|
||||
}
|
||||
|
||||
const regenLink =
|
||||
"https://www.mintscan.io/regen/validators/regenvaloper1t8p3zdu3h8qzggfmvvvmtdnaj4trcsfh79xp4e";
|
||||
'https://www.mintscan.io/regen/validators/regenvaloper1t8p3zdu3h8qzggfmvvvmtdnaj4trcsfh79xp4e'
|
||||
|
||||
const ValidatorPage = () => {
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<div className={styles.sectionText}>
|
||||
<div>
|
||||
<h1>{"validator"}</h1>
|
||||
<h1>{'validator'}</h1>
|
||||
<p>
|
||||
{"Chora Studio operates Chora Validator on "}
|
||||
{'Chora Studio operates Chora Validator on '}
|
||||
<a href={regenLink} target="_blank">
|
||||
{"Regen"}
|
||||
{'Regen'}
|
||||
</a>
|
||||
{
|
||||
" and multiple test networks including Regen Redwood and Chora Testnet."
|
||||
' and multiple test networks including Regen Redwood and Chora Testnet.'
|
||||
}
|
||||
</p>
|
||||
<h2>{"what is a validator?"}</h2>
|
||||
<h2>{'what is a validator?'}</h2>
|
||||
<p>
|
||||
{
|
||||
"In the context of distributed ledger technology, a validator is a node in a network responsible for verifying and producing state transitions. Validators play a critical role in ensuring the security and integrity of a network. "
|
||||
'In the context of distributed ledger technology, a validator is a node in a network responsible for verifying and producing state transitions. Validators play a critical role in ensuring the security and integrity of a network. '
|
||||
}
|
||||
</p>
|
||||
<p>
|
||||
{
|
||||
"Chora Validator is currently operating on proof-of-stake blockchains in the Cosmos ecosystem. On proof-of-stake networks, validators stake tokens (i.e. lock up their tokens in the network) and then earn rewards for successfully verifying and producing blocks. Validators are also penalized for downtime or acting maliciously. When a validator is penalized, a portion of the staked tokens are slashed (i.e. destroyed and cannot be recovered)."
|
||||
'Chora Validator is currently operating on proof-of-stake blockchains in the Cosmos ecosystem. On proof-of-stake networks, validators stake tokens (i.e. lock up their tokens in the network) and then earn rewards for successfully verifying and producing blocks. Validators are also penalized for downtime or acting maliciously. When a validator is penalized, a portion of the staked tokens are slashed (i.e. destroyed and cannot be recovered).'
|
||||
}
|
||||
</p>
|
||||
<p>
|
||||
{
|
||||
"In the Cosmos ecosystem, token holders stake tokens with validators to earn rewards alongside validators. When a validator is penalized for downtime or acting maliciously, the token holders are also penalized, i.e. a portion of the staked tokens from each account staking with the validator is slashed. Token holders are therefore incentivized to stake tokens with validators they trust, which in turn reduces the risk of lost assets and helps to ensure the security and integrity of the network."
|
||||
'In the Cosmos ecosystem, token holders stake tokens with validators to earn rewards alongside validators. When a validator is penalized for downtime or acting maliciously, the token holders are also penalized, i.e. a portion of the staked tokens from each account staking with the validator is slashed. Token holders are therefore incentivized to stake tokens with validators they trust, which in turn reduces the risk of lost assets and helps to ensure the security and integrity of the network.'
|
||||
}
|
||||
</p>
|
||||
<h2>{"what about governance?"}</h2>
|
||||
<h2>{'what about governance?'}</h2>
|
||||
<p>
|
||||
{
|
||||
"In addition to verifying and producing blocks, validators on proof-of-stake networks in the Cosmos ecosystem also act as representatives in network governance. When staking with a validator in the Cosmos ecosystem, token holders are also delegating their voting power (i.e. one token, one vote) to the validator. Token holders have the option to cancel out their delegated votes by voting independently. If a token holder does not intend to vote on every governance proposal independently, they should stake with validators they think will best represent their interests."
|
||||
'In addition to verifying and producing blocks, validators on proof-of-stake networks in the Cosmos ecosystem also act as representatives in network governance. When staking with a validator in the Cosmos ecosystem, token holders are also delegating their voting power (i.e. one token, one vote) to the validator. Token holders have the option to cancel out their delegated votes by voting independently. If a token holder does not intend to vote on every governance proposal independently, they should stake with validators they think will best represent their interests.'
|
||||
}
|
||||
</p>
|
||||
<h2>{"what about other services?"}</h2>
|
||||
<h2>{'what about other services?'}</h2>
|
||||
<p>
|
||||
{
|
||||
"Although not required, validators (or companies running validators) often provide additional tools and services as public goods for the benefit of the network. For example, some may run additional infrastructure such as full nodes, archive nodes, relayers, oracle services, or a testnet validator on the corresponding test network, some may contribute to designing, building, or maintaining software, some may organize working groups and publish their research, etc. Token holders may want to consider staking with validators that bring additional and diverse forms of value to the network."
|
||||
'Although not required, validators (or companies running validators) often provide additional tools and services as public goods for the benefit of the network. For example, some may run additional infrastructure such as full nodes, archive nodes, relayers, oracle services, or a testnet validator on the corresponding test network, some may contribute to designing, building, or maintaining software, some may organize working groups and publish their research, etc. Token holders may want to consider staking with validators that bring additional and diverse forms of value to the network.'
|
||||
}
|
||||
</p>
|
||||
<h2>{"why choose chora validator?"}</h2>
|
||||
<h2>{'why choose chora validator?'}</h2>
|
||||
<p>
|
||||
{
|
||||
"Chora Validator is committed to ensuring the security and integrity of every network that Chora Validator operates on. Chora Validator is operated by senior software engineers with more than two years of experience building, maintaining, and testing software within the Cosmos ecosystem."
|
||||
'Chora Validator is committed to ensuring the security and integrity of every network that Chora Validator operates on. Chora Validator is operated by senior software engineers with more than two years of experience building, maintaining, and testing software within the Cosmos ecosystem.'
|
||||
}
|
||||
</p>
|
||||
<h3>{"regen"}</h3>
|
||||
<h3>{'regen'}</h3>
|
||||
<p>
|
||||
{
|
||||
"Chora Validator is running a validator node and a full node with public API endpoints. Chora Validator is also running a testnet validator node on Regen Redwood (the stable test network for Regen). Chora Validator is committed to offsetting energy costs with carbon credits issued on Regen."
|
||||
'Chora Validator is running a validator node and a full node with public API endpoints. Chora Validator is also running a testnet validator node on Regen Redwood (the stable test network for Regen). Chora Validator is committed to offsetting energy costs with carbon credits issued on Regen.'
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export default ValidatorPage;
|
||||
export default ValidatorPage
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
"use client";
|
||||
'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 { 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";
|
||||
import styles from './Background.module.css'
|
||||
|
||||
const Background = () => {
|
||||
const { darkTheme } = useContext(ThemeContext);
|
||||
const { darkTheme } = useContext(ThemeContext)
|
||||
|
||||
return (
|
||||
<div className={styles.background}>
|
||||
<Image alt="chora" src={darkTheme ? darkBackground : lightBackground} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export default Background;
|
||||
export default Background
|
||||
|
|
|
|||
|
|
@ -1,73 +1,73 @@
|
|||
"use client";
|
||||
'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 { 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";
|
||||
import styles from './Footer.module.css'
|
||||
|
||||
const Footer = () => {
|
||||
const { darkTheme } = useContext(ThemeContext);
|
||||
const { darkTheme } = useContext(ThemeContext)
|
||||
|
||||
return (
|
||||
<div className={styles.footer}>
|
||||
<div style={{ display: "none" }}>{darkTheme.toString()}</div>
|
||||
<div style={{ display: 'none' }}>{darkTheme.toString()}</div>
|
||||
<div>
|
||||
<div className={styles.title}>
|
||||
<Image alt="chora" src={darkTheme ? choraLogoDark : choraLogoLight} />
|
||||
<h4>{"© 2023 Chora Studio, LLC"}</h4>
|
||||
<h4>{'© 2023 Chora Studio, LLC'}</h4>
|
||||
</div>
|
||||
<div className={styles.list}>
|
||||
<h3>{"chora studio"}</h3>
|
||||
<h3>{'chora studio'}</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<Link href="https://blog.chora.studio" target="_blank">
|
||||
{"blog ↗"}
|
||||
<Link href="https://chora.blog" target="_blank">
|
||||
{'blog ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/products">{"products"}</Link>
|
||||
<Link href="/products">{'products'}</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/solutions">{"solutions"}</Link>
|
||||
<Link href="/solutions">{'solutions'}</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/validator">{"validator"}</Link>
|
||||
<Link href="/validator">{'validator'}</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div className={styles.list}>
|
||||
<h3>{"chora protocol"}</h3>
|
||||
<h3>{'chora protocol'}</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<Link href="https://chora.io" target="_blank">
|
||||
{"chora applications ↗"}
|
||||
{'chora applications ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="https://docs.chora.io" target="_blank">
|
||||
{"chora documentation ↗"}
|
||||
{'chora documentation ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="https://github.com/choraio" target="_blank">
|
||||
{"chora repositories ↗"}
|
||||
{'chora repositories ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div className={styles.list}>
|
||||
<h3>{"chora validator"}</h3>
|
||||
<h3>{'chora validator'}</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<Link
|
||||
href="https://www.mintscan.io/regen/validators/regenvaloper1t8p3zdu3h8qzggfmvvvmtdnaj4trcsfh79xp4e"
|
||||
target="_blank"
|
||||
>
|
||||
{"regen ↗"}
|
||||
{'regen ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
|
|
@ -75,7 +75,7 @@ const Footer = () => {
|
|||
href="https://chora.io/scan/regen-redwood-1"
|
||||
target="_blank"
|
||||
>
|
||||
{"regen-redwood ↗"}
|
||||
{'regen-redwood ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
|
|
@ -83,14 +83,14 @@ const Footer = () => {
|
|||
href="https://chora.io/scan/chora-testnet-1"
|
||||
target="_blank"
|
||||
>
|
||||
{"chora-testnet ↗"}
|
||||
{'chora-testnet ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export default Footer;
|
||||
export default Footer
|
||||
|
|
|
|||
|
|
@ -1,29 +1,29 @@
|
|||
"use client";
|
||||
'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 { 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";
|
||||
import styles from './Header.module.css'
|
||||
|
||||
const Header = () => {
|
||||
const { darkTheme, setDarkTheme } = useContext(ThemeContext);
|
||||
const { darkTheme, setDarkTheme } = useContext(ThemeContext)
|
||||
|
||||
const toggleTheme = () => {
|
||||
if (darkTheme) {
|
||||
setDarkTheme(false);
|
||||
setDarkTheme(false)
|
||||
} else {
|
||||
setDarkTheme(true);
|
||||
setDarkTheme(true)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.header}>
|
||||
<div style={{ display: "none" }}>{darkTheme.toString()}</div>
|
||||
<div style={{ display: 'none' }}>{darkTheme.toString()}</div>
|
||||
<div>
|
||||
<div className={styles.title}>
|
||||
<Link href="/">
|
||||
|
|
@ -32,26 +32,26 @@ const Header = () => {
|
|||
src={darkTheme ? choraLogoDark : choraLogoLight}
|
||||
/>
|
||||
<div>
|
||||
{"chora "}
|
||||
<span style={{ opacity: "0.75" }}>{"studio"}</span>
|
||||
{'chora '}
|
||||
<span style={{ opacity: '0.75' }}>{'studio'}</span>
|
||||
</div>
|
||||
</Link>
|
||||
</div>
|
||||
<div className={styles.menu}>
|
||||
<ul>
|
||||
<li>
|
||||
<Link href="/products">{"products"}</Link>
|
||||
<Link href="/products">{'products'}</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/solutions">{"solutions"}</Link>
|
||||
<Link href="/solutions">{'solutions'}</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/validator">{"validator"}</Link>
|
||||
<Link href="/validator">{'validator'}</Link>
|
||||
</li>
|
||||
<li className={styles.divider}>{"|"}</li>
|
||||
<li className={styles.divider}>{'|'}</li>
|
||||
<li>
|
||||
<Link href="https://blog.chora.studio" target="_blank">
|
||||
{"blog ↗"}
|
||||
<Link href="https://chora.blog" target="_blank">
|
||||
{'blog ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -59,7 +59,7 @@ const Header = () => {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export default Header;
|
||||
export default Header
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from "react";
|
||||
import * as React from 'react'
|
||||
|
||||
import styles from "./ThemeButton.module.css";
|
||||
import styles from './ThemeButton.module.css'
|
||||
|
||||
const ThemeButton = ({ darkTheme, toggleTheme }: any) => (
|
||||
<button className={styles.button} onClick={toggleTheme}>
|
||||
|
|
@ -10,10 +10,10 @@ const ThemeButton = ({ darkTheme, toggleTheme }: any) => (
|
|||
width="1.5em"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<circle cx="50" cy="50" r="40" fill={darkTheme ? "#F5F5F5" : "#0A0A0A"} />
|
||||
<circle cx="60" cy="50" r="35" fill={darkTheme ? "#111111" : "#FFFFFF"} />
|
||||
<circle cx="50" cy="50" r="40" fill={darkTheme ? '#F5F5F5' : '#0A0A0A'} />
|
||||
<circle cx="60" cy="50" r="35" fill={darkTheme ? '#111111' : '#FFFFFF'} />
|
||||
</svg>
|
||||
</button>
|
||||
);
|
||||
)
|
||||
|
||||
export default ThemeButton;
|
||||
export default ThemeButton
|
||||
|
|
|
|||
|
|
@ -1,45 +1,45 @@
|
|||
"use client";
|
||||
'use client'
|
||||
|
||||
import * as React from "react";
|
||||
import { createContext, useEffect, useState } from "react";
|
||||
import * as React from 'react'
|
||||
import { createContext, useEffect, useState } from 'react'
|
||||
|
||||
export const cachedDarkKey = "chora-web-dark";
|
||||
export const cachedDarkKey = 'chora-web-dark'
|
||||
|
||||
const initDarkTheme = () => {
|
||||
let initDarkTheme = false;
|
||||
let initDarkTheme = false
|
||||
|
||||
if (
|
||||
typeof localStorage !== "undefined" &&
|
||||
typeof localStorage !== 'undefined' &&
|
||||
localStorage.getItem(cachedDarkKey)
|
||||
) {
|
||||
initDarkTheme = localStorage.getItem(cachedDarkKey) === "true";
|
||||
} else if (typeof window !== "undefined") {
|
||||
initDarkTheme = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
||||
initDarkTheme = localStorage.getItem(cachedDarkKey) === 'true'
|
||||
} else if (typeof window !== 'undefined') {
|
||||
initDarkTheme = window.matchMedia('(prefers-color-scheme: dark)').matches
|
||||
}
|
||||
|
||||
return initDarkTheme;
|
||||
};
|
||||
return initDarkTheme
|
||||
}
|
||||
|
||||
const ThemeContext = createContext<any>({});
|
||||
const ThemeContext = createContext<any>({})
|
||||
|
||||
const ThemeContextProvider = (props: any) => {
|
||||
const [darkTheme, setDarkTheme] = useState<boolean>(initDarkTheme());
|
||||
const [darkTheme, setDarkTheme] = useState<boolean>(initDarkTheme())
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof window !== "undefined" && typeof localStorage !== "undefined") {
|
||||
const root = window.document.documentElement;
|
||||
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)
|
||||
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)
|
||||
root.classList.remove('dark-theme')
|
||||
root.style.backgroundColor = '#FAFAFA' // --background-secondary (light-theme)
|
||||
}
|
||||
|
||||
localStorage.setItem(cachedDarkKey, darkTheme ? "true" : "false");
|
||||
localStorage.setItem(cachedDarkKey, darkTheme ? 'true' : 'false')
|
||||
}
|
||||
}, [darkTheme]);
|
||||
}, [darkTheme])
|
||||
|
||||
return (
|
||||
<ThemeContext.Provider
|
||||
|
|
@ -50,7 +50,7 @@ const ThemeContextProvider = (props: any) => {
|
|||
>
|
||||
{props.children}
|
||||
</ThemeContext.Provider>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export { ThemeContext, ThemeContextProvider };
|
||||
export { ThemeContext, ThemeContextProvider }
|
||||
|
|
|
|||
2
module.d.ts
vendored
2
module.d.ts
vendored
|
|
@ -1 +1 @@
|
|||
declare module "*.module.css";
|
||||
declare module '*.module.css'
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
distDir: "dist",
|
||||
output: "export",
|
||||
distDir: 'dist',
|
||||
output: 'export',
|
||||
images: { unoptimized: true },
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = nextConfig;
|
||||
module.exports = nextConfig
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ module.exports = {
|
|||
autoprefixer: {},
|
||||
tailwindcss: {},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
module.exports = {
|
||||
content: ["./app/**/*.{js,ts,jsx,tsx}"],
|
||||
};
|
||||
content: ['./app/**/*.{js,ts,jsx,tsx}'],
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue