init commit
This commit is contained in:
commit
7a46269eff
55 changed files with 1423 additions and 0 deletions
17
components/Background.module.css
Normal file
17
components/Background.module.css
Normal file
|
|
@ -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%;
|
||||
}
|
||||
21
components/Background.tsx
Normal file
21
components/Background.tsx
Normal file
|
|
@ -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 (
|
||||
<div className={styles.background}>
|
||||
<Image alt="chora" src={darkTheme ? darkBackground : lightBackground} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Background
|
||||
55
components/Footer.module.css
Normal file
55
components/Footer.module.css
Normal file
|
|
@ -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;
|
||||
}
|
||||
93
components/Footer.tsx
Normal file
93
components/Footer.tsx
Normal file
|
|
@ -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 (
|
||||
<div className={styles.footer}>
|
||||
<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>
|
||||
</div>
|
||||
<div className={styles.list}>
|
||||
<h3>{'chora studio'}</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<Link href="https://blog.chora.studio" target="_blank">
|
||||
{'blog ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/products">
|
||||
{'products'}
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/solutions">
|
||||
{'solutions'}
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/validator">
|
||||
{'validator'}
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div className={styles.list}>
|
||||
<h3>{'chora protocol'}</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<Link href="https://chora.io" target="_blank">
|
||||
{'chora dashboard ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="https://docs.chora.io" target="_blank">
|
||||
{'chora documentation ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="https://github.com/choraio" target="_blank">
|
||||
{'chora repositories ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div className={styles.list}>
|
||||
<h3>{'chora validator'}</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<Link href="https://www.mintscan.io/regen/validators/regenvaloper1t8p3zdu3h8qzggfmvvvmtdnaj4trcsfh79xp4e" target="_blank">
|
||||
{'regen ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="https://chora.io/scan/regen-redwood-1" target="_blank">
|
||||
{'regen-redwood ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="https://chora.io/scan/chora-testnet-1" target="_blank">
|
||||
{'chora-testnet ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Footer
|
||||
70
components/Header.module.css
Normal file
70
components/Header.module.css
Normal file
|
|
@ -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;
|
||||
}
|
||||
62
components/Header.tsx
Normal file
62
components/Header.tsx
Normal file
|
|
@ -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 (
|
||||
<div className={styles.header}>
|
||||
<div style={{ display: 'none' }}>{darkTheme.toString()}</div>
|
||||
<div>
|
||||
<div className={styles.title}>
|
||||
<Link href="/">
|
||||
<Image
|
||||
alt="chora studio"
|
||||
src={darkTheme ? choraLogoDark : choraLogoLight}
|
||||
/>
|
||||
<div>{'chora '}<span style={{ opacity: '0.75' }}>{'studio'}</span></div>
|
||||
</Link>
|
||||
</div>
|
||||
<div className={styles.menu}>
|
||||
<ul>
|
||||
<li>
|
||||
<Link href="/products">{'products'}</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/solutions">{'solutions'}</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/validator">{'validator'}</Link>
|
||||
</li>
|
||||
<li className={styles.divider}>{'|'}</li>
|
||||
<li>
|
||||
<Link href="https://blog.chora.studio" target="_blank">
|
||||
{'blog ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
<ThemeButton darkTheme={darkTheme} toggleTheme={toggleTheme} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Header
|
||||
8
components/ThemeButton.module.css
Normal file
8
components/ThemeButton.module.css
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
.button {
|
||||
align-items: center;
|
||||
background: none;
|
||||
display: inline-flex;
|
||||
height: var(--header-height);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
19
components/ThemeButton.tsx
Normal file
19
components/ThemeButton.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import * as React from 'react'
|
||||
|
||||
import styles from './ThemeButton.module.css'
|
||||
|
||||
const ThemeButton = ({ darkTheme, toggleTheme }: any) => (
|
||||
<button className={styles.button} onClick={toggleTheme}>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="1.5em"
|
||||
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'} />
|
||||
</svg>
|
||||
</button>
|
||||
)
|
||||
|
||||
export default ThemeButton
|
||||
Loading…
Add table
Add a link
Reference in a new issue