@@ -82,7 +82,8 @@ export default ({ initialLocation, stats = {} }) => {
gridTemplateColumns: [null, '1fr 1fr auto'],
textAlign: 'left',
alignItems: 'end',
- input: { bg: 'sunken' }
+ input: { bg: 'sunken' },
+ label: { fontFamily: 'phantomSans' }
}}
>
diff --git a/lib/theme.js b/lib/theme.js
index ee58687..9adc4d3 100644
--- a/lib/theme.js
+++ b/lib/theme.js
@@ -2,6 +2,12 @@ import { merge } from 'lodash'
import base from '@hackclub/theme'
const theme = merge(base, {
+ fonts: {
+ heading:
+ '"Zarathustra", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
+ body: 'system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
+ phantomSans: '"Phantom Sans", system-ui, -apple-system, "Segoe UI", sans-serif',
+ },
cards: {
event: {
display: 'flex',
@@ -42,8 +48,7 @@ const theme = merge(base, {
transform: 'scale(1.0625)',
boxShadow: 'elevated'
}
- },
-
+ }
}
})
diff --git a/next.config.js b/next.config.js
index 90c3d1c..b340423 100644
--- a/next.config.js
+++ b/next.config.js
@@ -7,11 +7,6 @@ const nextConfig = {
eslint: {
ignoreDuringBuilds: true
},
- turbopack: {
- resolveAlias: {
- '@theme-ui/mdx': './lib/theme-ui-mdx-stub.js'
- }
- },
webpack(config) {
config.resolve.alias['@theme-ui/mdx'] = path.resolve(__dirname, 'lib/theme-ui-mdx-stub.js')
return config
diff --git a/pages/_app.js b/pages/_app.js
index e29f82e..19b9648 100644
--- a/pages/_app.js
+++ b/pages/_app.js
@@ -2,7 +2,6 @@ import React from 'react'
import Head from 'next/head'
import Meta from '@hackclub/meta'
-import '@hackclub/theme/fonts/reg-bold.css'
import 'mapbox-gl/dist/mapbox-gl.css';
import theme from '../lib/theme'
import { ThemeProvider } from 'theme-ui'
diff --git a/pages/_document.js b/pages/_document.js
index 3ddda90..2107f19 100644
--- a/pages/_document.js
+++ b/pages/_document.js
@@ -1,6 +1,23 @@
import Document, { Html, Head, Main, NextScript } from 'next/document'
import { InitializeColorMode } from 'theme-ui'
+const fontFaceCss = `
+@font-face {
+ font-family: 'Zarathustra';
+ src: url('/fonts/zarathustra-kerned.ttf') format('truetype');
+ font-weight: 400;
+ font-style: normal;
+ font-display: swap;
+}
+@font-face {
+ font-family: 'Zarathustra';
+ src: url('/fonts/zarathustra-v01.otf') format('opentype');
+ font-weight: 700;
+ font-style: normal;
+ font-display: swap;
+}
+`
+
export default class extends Document {
static async getInitialProps(ctx) {
const initialProps = await Document.getInitialProps(ctx)
@@ -10,7 +27,23 @@ export default class extends Document {
render() {
return (
-
+
+
+
+
+
diff --git a/pages/index.js b/pages/index.js
index 22288c9..7f6a4c0 100644
--- a/pages/index.js
+++ b/pages/index.js
@@ -1,8 +1,9 @@
import Grouping from '../components/grouping'
-import { Box, Heading, Text, Link, Container } from 'theme-ui'
+import { Box, Heading, Text, Link, Container, Grid } from 'theme-ui'
import Head from 'next/head'
import Meta from '@hackclub/meta'
import Signup from '../components/signup'
+import Announcement from '../components/announcement'
import Years from '../components/years'
import Regions from '../components/regions'
import EventCard from '../components/event-card'
@@ -19,7 +20,7 @@ const eventsPreview = events =>
)
.join('')
-export default ({ stats, emailStats, events, header }) => (
+export default ({ stats, emailStats, events, officialEvents, header }) => (
(
events
)}`}
/>
-
- Upcoming High School Hackathons{' '}
- in {new Date().getFullYear()}
+
+ Hackathons for{' '}
+
+ teens
+
A curated list of high school hackathons with
@@ -64,11 +94,45 @@ export default ({ stats, emailStats, events, header }) => (
}
useFilter
-
>
-
+
+
+
+
+ Hack Club Official Hackathons
+
+
+ {officialEvents.map(event => (
+
+ ))}
+
+
)
@@ -106,7 +170,8 @@ export const getStaticProps = async () => {
countryCode: '',
virtual: false,
hybrid: false,
- mlhAssociated: false
+ mlhAssociated: false,
+ hack_club_event: true
}
// Sort upcoming events by start date
@@ -120,5 +185,10 @@ export const getStaticProps = async () => {
'desc'
)
- return { props: { events: [ ...upcomingEvents, ...previousEvents ], stats, emailStats, header: headerImages[Math.floor(Math.random() * headerImages.length)] }, revalidate: 1 }
+ const officialEvents = orderBy(
+ filter(upcomingEvents, e => e.hack_club_event),
+ 'start'
+ )
+
+ return { props: { events: [ ...upcomingEvents, ...previousEvents ], officialEvents, stats, emailStats, header: headerImages[Math.floor(Math.random() * headerImages.length)] }, revalidate: 1 }
}
diff --git a/public/fonts/zarathustra-kerned.ttf b/public/fonts/zarathustra-kerned.ttf
new file mode 100644
index 0000000..dfc0ae9
Binary files /dev/null and b/public/fonts/zarathustra-kerned.ttf differ
diff --git a/public/fonts/zarathustra-v01.otf b/public/fonts/zarathustra-v01.otf
new file mode 100644
index 0000000..e4708f5
Binary files /dev/null and b/public/fonts/zarathustra-v01.otf differ