use chora web

This commit is contained in:
ryanchristo 2023-11-09 21:38:05 -08:00
parent e83fdac27c
commit d5c629db4a
12 changed files with 102 additions and 346 deletions

View file

@ -1,5 +1 @@
@import 'chora/styles/main.css'; @import 'chora/styles/globals.css';
.dark-theme {
composes: dark-theme from 'chora/styles/main.css';
}

View file

@ -1,10 +1,8 @@
'use client' 'use client'
import { Footer, Header } from 'chora/components'
import { ThemeContextProvider } from 'chora/contexts' import { ThemeContextProvider } from 'chora/contexts'
import Footer from '@components/Footer'
import Header from '@components/Header'
import './globals.css' import './globals.css'
const Layout = ({ children }: any) => ( const Layout = ({ children }: any) => (
@ -12,9 +10,102 @@ const Layout = ({ children }: any) => (
<body> <body>
<main> <main>
<ThemeContextProvider> <ThemeContextProvider>
<Header /> <Header
title={{
link: '/',
titleX: 'studio',
}}
itemsLeft={[
{
link: '/products',
title: 'products',
},
{
link: '/solutions',
title: 'solutions',
},
{
link: '/validator',
title: 'validator',
},
]}
itemsRight={[
{
link: 'https://chora.blog',
title: 'blog ↗',
},
]}
/>
{children} {children}
<Footer /> <Footer
lists={[
{
title: 'chora studio',
items: [
{
link: 'https://chora.blog',
target: '_blank',
title: 'blog ↗',
},
{
link: '/products',
target: '',
title: 'products',
},
{
link: '/solutions',
target: '',
title: 'solutions',
},
{
link: '/validator',
target: '',
title: 'validator',
},
],
},
{
title: 'chora protocol',
items: [
{
link: 'https://chora.io',
target: '_blank',
title: 'chora applications ↗',
},
{
link: 'https://docs.chora.io',
target: '_blank',
title: 'chora documentation ↗',
},
{
link: 'https://github.com/chora-io',
target: '_blank',
title: 'chora repositories ↗',
},
],
},
{
title: 'chora validator',
items: [
{
link: 'https://www.mintscan.io/regen/validators/regenvaloper1t8p3zdu3h8qzggfmvvvmtdnaj4trcsfh79xp4e',
target: '_blank',
title: 'regen ↗',
},
{
link: 'https://chora.io/scan/regen-redwood-1',
target: '_blank',
title: 'regen-redwood ↗',
},
{
link: 'https://chora.io/scan/chora-testnet-1',
target: '_blank',
title: 'chora-testnet ↗',
},
],
},
]}
/>
</ThemeContextProvider> </ThemeContextProvider>
</main> </main>
</body> </body>

View file

@ -1,7 +1,6 @@
import { Background } from 'chora/components'
import { Metadata } from 'next' import { Metadata } from 'next'
import Background from '@components/Background'
import styles from './page.module.css' import styles from './page.module.css'
export const metadata: Metadata = { export const metadata: Metadata = {

BIN
bun.lockb

Binary file not shown.

View file

@ -1,17 +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%;
}

View file

@ -1,21 +0,0 @@
'use client'
import { ThemeContext } from 'chora/contexts'
import darkBackground from 'chora/assets/images/chora_dark.png'
import lightBackground from 'chora/assets/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

View file

@ -1,55 +0,0 @@
/* 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;
}

View file

@ -1,96 +0,0 @@
'use client'
import { ThemeContext } from 'chora/contexts'
import choraLogoDark from 'chora/assets//images/chora_dark_small.png'
import choraLogoLight from 'chora/assets//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://chora.blog" 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 applications ↗'}
</Link>
</li>
<li>
<Link href="https://docs.chora.io" target="_blank">
{'chora documentation ↗'}
</Link>
</li>
<li>
<Link href="https://github.com/chora-io" 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

View file

@ -1,74 +0,0 @@
/* 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;
}
.header button {
background: none;
}
/* 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;
}

View file

@ -1,65 +0,0 @@
'use client'
import { ThemeContext } from 'chora/contexts'
import ThemeButton from 'chora/components/ThemeButton'
import choraLogoDark from 'chora/assets/images/chora_dark_small.png'
import choraLogoLight from 'chora/assets/images/chora_light_small.png'
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://chora.blog" target="_blank">
{'blog ↗'}
</Link>
</li>
</ul>
<ThemeButton darkTheme={darkTheme} toggleTheme={toggleTheme} />
</div>
</div>
</div>
)
}
export default Header

View file

@ -20,8 +20,9 @@
"clean": "rm -rf .next dist node_modules" "clean": "rm -rf .next dist node_modules"
}, },
"dependencies": { "dependencies": {
"chora": "npm:@chora-io/chora@v0.1.0-alpha2", "@keplr-wallet/proto-types": "^0.12",
"cosmos": "npm:@chora-io/cosmos@v0.1.0-alpha2", "chora": "npm:@chora-io/chora@v0.1.0-alpha8",
"cosmos": "npm:@chora-io/cosmos@v0.1.0-alpha8",
"next": "^14", "next": "^14",
"react": "^18", "react": "^18",
"react-dom": "^18" "react-dom": "^18"

View file

@ -18,10 +18,7 @@
{ {
"name": "next" "name": "next"
} }
], ]
"paths": {
"@components/*": ["components/*"]
}
}, },
"include": [ "include": [
"next-env.d.ts", "next-env.d.ts",