feat: events and event template page

This commit is contained in:
jinhojang6
2024-02-05 22:25:05 +09:00
committed by Jinho Jang
parent a406040820
commit 39c86a093d
39 changed files with 1025 additions and 7 deletions
@@ -42,8 +42,9 @@ const config = {
},
},
docs: {
routeBasePath: '/about',
path: 'docs',
id: 'root-pages',
routeBasePath: '/',
path: 'root-pages',
},
og: {},
@@ -76,6 +77,14 @@ const config = {
hostnames: ['localhost', 'waku.org'],
},
],
[
'@docusaurus/plugin-content-docs',
{
id: 'docs',
routeBasePath: '/about',
path: 'docs',
},
],
],
themeConfig:
@@ -0,0 +1,120 @@
---
title: Events
description: List of all Waku events
hide_table_of_contents: true
hude_title: true
---
import {
EventCardList,
EventCTASection,
Grid,
Box,
} from '@site/src/components/mdx'
# Events
List of all Waku events
<head>
<body className="events" />
</head>
<EventCardList
data={[
{
thumbnail: '/img/event-banner.png',
title: 'Meet Waku: Uncompromising Web3 Communication at Scale',
date: 'Monday 15-19 January 2024 / 6 PM PST',
location: '508 University Avenue Palo Alto, CA 94301 United States',
href: '/events/test',
},
{
thumbnail: '/img/event-banner.png',
title: 'Meet Waku: Uncompromising Web3 Communication at Scale',
date: 'Monday 15-19 January 2024 / 6 PM PST',
location: '508 University Avenue Palo Alto, CA 94301 United States',
href: '/events/test',
},
{
thumbnail: '/img/event-banner.png',
title: 'Meet Waku: Uncompromising Web3 Communication at Scale',
date: 'Monday 15-19 January 2024 / 6 PM PST',
location: '508 University Avenue Palo Alto, CA 94301 United States',
href: '/events/test',
},
{
thumbnail: '/img/event-banner.png',
title: 'Meet Waku: Uncompromising Web3 Communication at Scale',
date: 'Monday 15-19 January 2024 / 6 PM PST',
location: '508 University Avenue Palo Alto, CA 94301 United States',
href: '/events/test',
},
{
thumbnail: '/img/event-banner.png',
title: 'Meet Waku: Uncompromising Web3 Communication at Scale',
date: 'Monday 15-19 January 2024 / 6 PM PST',
location: '508 University Avenue Palo Alto, CA 94301 United States',
href: '/events/test',
},
{
thumbnail: '/img/event-banner.png',
title: 'Meet Waku: Uncompromising Web3 Communication at Scale',
date: 'Monday 15-19 January 2024 / 6 PM PST',
location: '508 University Avenue Palo Alto, CA 94301 United States',
href: '/events/test',
},
{
thumbnail: '/img/event-banner.png',
title: 'Meet Waku: Uncompromising Web3 Communication at Scale',
date: 'Monday 15-19 January 2024 / 6 PM PST',
location: '508 University Avenue Palo Alto, CA 94301 United States',
href: '/events/test',
},
{
thumbnail: '/img/event-banner.png',
title: 'Meet Waku: Uncompromising Web3 Communication at Scale',
date: 'Monday 15-19 January 2024 / 6 PM PST',
location: '508 University Avenue Palo Alto, CA 94301 United States',
href: '/events/test',
},
]}
/>
<Box top={{ xs: 152 }}>
<Grid xs={{ cols: 1, gap: '1rem' }} md={{ cols: 2 }}>
<Grid.Item xs={1}>
<EventCTASection
title="Logos Network State"
description={
'Want to get involved with Waku?\nJoin the Discord community.'
}
link="https://logos.co"
label="Get Involved"
/>
</Grid.Item>
<Grid.Item xs={1}>
<EventCTASection
title="Newsletter"
description={'Subscribe\nto our newsletter'}
label="Subscribe"
formInput={[
{
label: 'Name',
placeholder: 'Name',
type: 'text',
name: 'name',
required: true,
},
{
label: 'Email',
placeholder: 'Enter your email',
type: 'email',
name: 'email',
required: true,
},
]}
/>
</Grid.Item>
</Grid>
</Box>
@@ -0,0 +1,147 @@
---
title: Meet Waku
description: Uncompromising Web3 Communication at Scale
hide_table_of_contents: true
hide_title: true
---
import {
Box,
EventBanner,
EventInfo,
EventAbout,
EventProfileList,
EventCTA,
EventCTASection,
Grid,
} from '@site/src/components/mdx'
<head>
<body className="events" />
</head>
<Box top={{ xs: 8 }}>
<EventBanner src="/img/event-banner.png" />
# Meet Waku: Uncompromising Web3 Communication at Scale
We are a family of robust, censorship-resistant communication protocols designed to enable privacy-focused messaging for web3 apps.
<Box top={{ xs: 32 }}>
<Grid xs={{ cols: 1, gap: '1rem' }} md={{ cols: 2 }}>
<Grid.Item xs={1}>
<EventInfo
label="Date"
content="Monday 15-19 January 2024 / 6 PM PST"
/>
</Grid.Item>
<Grid.Item xs={1}>
<EventInfo
label="Location"
content="508 University Avenue Palo Alto, CA 94301 United States"
/>
</Grid.Item>
</Grid>
</Box>
</Box>
<Box top={{ xs: 120 }}>
<EventAbout>
Waku is a suite of generalised messaging protocols aiming to be the communication standard for the decentralised web. It enables private and secure human-to-human, machine-to-machine, and human-to-machine communication without reliance on centralised intermediaries. Messaging through Waku is possible from one-to-one to many-to-many.
<br />
Waku serves as the communications layer of the Logos tech stack. Alongside the trustless agreement layer, Nomos, and the storage layer, Codex, it is one of the Logos Collective's foundational projects.
<br />
Motive:
Today's internet is increasingly controlled by a small number of tech giants. Google, Amazon, Meta, and a few others dictate what we see and with whom we can communicate. Their influence is almost limitless, and their actions shape global public opinion and even geopolitics.
<br />
To anyone that understands the internet's present architecture, this outcome should be expected. The centralised entities through which we communicate have privileged access to reams of data that we, as internet users, produce daily, presenting an opportunity for the kind of surveillance that was once confined to the pages of science-fiction literature. Thinking that the most powerful commercial and political institutions would not leverage this would be naive.
<br />
Yet, it doesn't have to be this way. Advances in cryptography, peer-to-peer networking, and decentralised technologies provide an alternate path forward.
</EventAbout>
</Box>
<Box top={{ xs: 120 }}>
<EventProfileList
title="Our delegation"
description="Reach out for the appointment."
data={[
{
image: '/img/profile-image.png',
name: 'Kumaraguru T',
role: 'Developer relations engineer',
email: 'a@acid.info',
linkedin: 'https://www.linkedin.com/',
},
{
image: '/img/profile-image.png',
name: 'Aaron Bendersky',
role: 'Program Manager',
email: 'b@acid.info',
linkedin: 'https://www.linkedin.com/',
},
{
image: '/img/profile-image.png',
name: 'Pedro Lains',
role: 'Business Development Lead',
email: 'c@acid.info',
linkedin: 'https://www.linkedin.com/',
},
]}
/>
</Box>
<Box top={{ xs: 120 }}>
<EventCTA
title="Interested? Join the event"
label="CTA"
link="https://logos.co"
linkProps={{ target: '_self' }}
/>
</Box>
<Box top={{ xs: 120 }}>
<Grid xs={{ cols: 1, gap: '1rem' }} md={{ cols: 2 }}>
<Grid.Item xs={1}>
<EventCTASection
title="Logos Network State"
description={
'Want to get involved with Waku?\nJoin the Discord community.'
}
link="https://logos.co"
label="Get Involved"
/>
</Grid.Item>
<Grid.Item xs={1}>
<EventCTASection
title="Newsletter"
description={'Subscribe\nto our newsletter'}
label="Subscribe"
formInput={[
{
label: 'Name',
placeholder: 'Name',
type: 'text',
name: 'name',
required: true,
},
{
label: 'Email',
placeholder: 'Enter your email',
type: 'email',
name: 'email',
required: true,
},
]}
/>
</Grid.Item>
</Grid>
</Box>
@@ -5,3 +5,7 @@ body,
html {
overflow-x: hidden;
}
.theme-doc-breadcrumbs {
display: none;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 626 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

@@ -34,6 +34,7 @@ import TelegramWhiteSvg from '../../static/icons/telegram-white.svg'
import TelegramSvg from '../../static/icons/telegram.svg'
import TwitterSvg from '../../static/icons/twitter.svg'
import XWhiteSvg from '../../static/icons/x-white.svg'
import EmailSvg from '../../static/icons/email.svg'
type TIconProps = {
size?: 's' | 'm' | 'l'
@@ -249,3 +250,9 @@ export const IconRemove = (props: TIconProps): JSX.Element => (
<RemoveSvg />
</Icon>
)
export const IconEmail = (props: TIconProps): JSX.Element => (
<Icon {...props}>
<EmailSvg />
</Icon>
)
@@ -0,0 +1,25 @@
@use '../../../css/utils';
@use '../../../css/lsd';
.mdx-event-about__container {
display: grid;
grid-template-columns: repeat(12, 1fr);
gap: 16px;
h2 {
margin-top: 0 !important;
grid-column: 1 / 2;
}
span {
grid-column: 5 / 13;
}
}
@include utils.responsive('sm', 'down') {
.mdx-event-about__container {
display: flex;
flex-direction: column;
gap: 32px;
}
}
@@ -0,0 +1,22 @@
import React from 'react'
import './EventAbout.scss'
import { Typography } from '@acid-info/lsd-react'
export type EventAboutProps = React.HTMLProps<HTMLAnchorElement> & {
content: string
}
export const EventAbout: React.FC<EventAboutProps> = ({ children }) => {
return (
<div className="mdx-event-about__container">
<Typography
variant="h2"
component="h2"
className="mdx-event-about__title"
>
About
</Typography>
<Typography variant="body1">{children}</Typography>
</div>
)
}
@@ -0,0 +1 @@
export * from './EventAbout'
@@ -0,0 +1,8 @@
@use '../../../css/utils';
@use '../../../css/lsd';
.mdx-event-banner__thumbnail {
aspect-ratio: 5 / 1;
border: 1px solid rgba(var(--lsd-border-primary), 0.2);
margin-bottom: 32px;
}
@@ -0,0 +1,20 @@
import ThemedImage from '@theme/ThemedImage'
import React from 'react'
import './EventBanner.scss'
export type EventBannerProps = React.HTMLProps<HTMLAnchorElement> & {
src: string
}
export const EventBanner: React.FC<EventBannerProps> = ({ src }) => {
return (
<ThemedImage
sources={{
dark: src,
light: src,
}}
alt={'event thumbnail'}
className="mdx-event-banner__thumbnail"
/>
)
}
@@ -0,0 +1 @@
export * from './EventBanner'
@@ -0,0 +1,21 @@
@use '../../../css/utils';
@use '../../../css/lsd';
.mdx-event-cta__container {
h2 {
margin-top: 0px !important;
margin-bottom: 32px;
}
}
.mdx-event-cta__button {
width: 100% !important;
height: 70px !important;
& > span {
display: flex;
justify-content: space-between;
align-items: center;
height: 100%;
}
}
@@ -0,0 +1,40 @@
import React from 'react'
import './EventCTA.scss'
import { Button, Typography } from '@acid-info/lsd-react'
import Link, { Props } from '@docusaurus/Link'
import { IconExternalLink } from '@logos-theme/components/Icon'
export type EventCTAProps = {
title?: string
label: string
link: string
linkProps: Props
}
export const EventCTA: React.FC<EventCTAProps & Props> = ({
title,
label,
link,
linkProps,
}) => {
return (
<div className="mdx-event-cta__container">
{title && (
<Typography
variant="h2"
component="h2"
className="mdx-event-cta__title"
>
{title}
</Typography>
)}
<Link to={link} {...linkProps}>
<Button className="mdx-event-cta__button">
<Typography variant="body1">{label}</Typography>
<IconExternalLink />
</Button>
</Link>
</div>
)
}
@@ -0,0 +1 @@
export * from './EventCTA'
@@ -0,0 +1,67 @@
@use '../../../css/utils';
@use '../../../css/lsd';
.mdx-event-cta-section__container {
border-top: 1px solid rgb(var(--lsd-border-primary));
padding-top: 24px;
h2 {
margin-top: 0px !important;
margin-bottom: 16px;
}
h3 {
margin-top: 24px !important;
}
}
.mdx-event-cta-section__cta {
width: 160px !important;
height: 40px !important;
}
.mdx-event-cta-section__description {
white-space: pre-wrap;
margin-bottom: 32px !important;
}
.mdx-event-cta-section__form {
display: flex;
flex-direction: column;
gap: 40px;
}
.mdx-event-cta-section__input-fields {
display: flex;
gap: 16px;
}
@include utils.responsive('sm', 'down') {
.mdx-event-cta-section__input-fields {
display: flex;
flex-direction: column;
gap: 32px;
& > div {
width: 100% !important;
}
}
}
@include utils.responsive('sm', 'down') {
.mdx-event-cta-section__input-fields {
margin-bottom: 16px;
}
.mdx-event-cta-section__cta {
margin-top: 8px;
}
.mdx-grid__content {
gap: 64px !important;
}
.mdx-event-cta-section__form {
margin-bottom: -24px;
}
}
@@ -0,0 +1,112 @@
import React from 'react'
import './EventCTASection.scss'
import { Button, TextField, Typography } from '@acid-info/lsd-react'
import Link, { Props } from '@docusaurus/Link'
export type EventCTASectionProps = {
title: string
description: string
label: string
link?: string
linkProps: Props
formInput?: any[]
}
export const EventCTASection: React.FC<EventCTASectionProps & Props> = ({
title,
description,
label,
link,
linkProps,
formInput,
}) => {
const [formState, setFormState] = React.useState({ email: '', name: '' })
const [message, setMessage] = React.useState('')
const errorMessage =
'There was an error submitting the form. Please try again.'
const handleSubmit = async (e: any) => {
e.preventDefault()
try {
const res = await fetch(
`https://odoo.logos.co/website_mass_mailing/subscribe2`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
jsonrpc: '2.0',
method: 'call',
params: {
value: formState?.email,
name: formState?.name || '',
list_id: 2,
subscription_type: 'email',
},
}),
},
)
const data = await res.json()
setMessage(data.result.message)
} catch (error) {
console.log(error)
setMessage(errorMessage)
}
}
const handleChange = (e: any) => {
setFormState({ ...formState, [e.target.name]: e.target.value })
}
return (
<div className="mdx-event-cta-section__container">
<Typography
variant="subtitle1"
component="p"
className="mdx-event-cta-section__title"
>
{title}
</Typography>
<Typography
component="h3"
variant="h3"
className="mdx-event-cta-section__description"
>
{description}
</Typography>
{formInput?.length ? (
<form className="mdx-event-cta-section__form" onSubmit={handleSubmit}>
<div className="mdx-event-cta-section__input-fields">
{formInput.map((input, index) => (
<TextField
key={index}
className="mdx-event-cta-section__input"
onChange={handleChange}
value={formState[input.name]}
inputProps={{ ...input }}
/>
))}
</div>
<div>
<Button type="submit" className="mdx-event-cta-section__cta">
<Typography variant="body1">{label}</Typography>
</Button>
<Typography variant="body2">{message}</Typography>
</div>
</form>
) : (
<Link to={link} {...linkProps}>
<Button className="mdx-event-cta-section__cta">
<Typography variant="body1">{label}</Typography>
</Button>
</Link>
)}
</div>
)
}
@@ -0,0 +1 @@
export * from './EventCTASection'
@@ -0,0 +1,37 @@
@use '../../../css/utils';
@use '../../../css/lsd';
.mdx-event-card {
display: flex;
flex-direction: column;
gap: 24px;
text-decoration: none !important;
}
.mdx-event-card__row {
display: flex;
justify-content: space-between;
width: 100%;
gap: 8px;
}
.mdx-event-card__thumbnail {
aspect-ratio: 5 / 1;
border: 1px solid rgba(var(--lsd-border-primary), 0.2);
}
.mdx-event-card__title {
&:hover {
text-decoration: underline !important;
}
}
.mdx-event-card__info {
display: flex;
flex-direction: column;
gap: 16px;
border-top: 1px solid rgba(var(--lsd-border-primary), 0.2);
padding: 16px 16px 16px 0;
width: 100%;
}

Some files were not shown because too many files have changed in this diff Show More