├── .gitignore ├── LICENSE.md ├── README.md ├── components ├── color-switcher.js └── script.mdx ├── next.config.js ├── package.json ├── pages ├── _app.js ├── _document.js └── index.js ├── prettier.config.js ├── public └── moon.png ├── styles └── crt.css ├── vercel.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | .now 2 | .next 3 | node_modules 4 | .DS_Store 5 | .env 6 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | ### MIT License 2 | 3 | Copyright 2022 The Hack Foundation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Hack Club logo

2 |

Project Moonbeam

3 |

The source code for Hack Club's Project Moonbeam website.

4 | 5 | ## How to run locally 6 | 7 | To execute the steps below, you will need the following installed: 8 | 9 | - [Node.js](https://nodejs.org/en/) (and the [Yarn](https://yarn.com) package manager) 10 | - [Git](https://git-scm.com/) 11 | 12 | Clone the repository: 13 | 14 | $ git clone https://github.com/hackclub/moonbeam-site.git 15 | 16 | Install dependencies: 17 | 18 | $ yarn 19 | 20 | Start the dev server: 21 | 22 | $ yarn dev 23 | 24 | Then, open up your web browser and go to http://localhost:3000. 25 | 26 | Powered by [Next.js](https://nextjs.org) with [MDX](https://mdxjs.com), [Theme UI](https://theme-ui.com), & [Hack Club Theme](https://theme.hackclub.com). 27 | 28 | Code under [MIT License](LICENSE.md). 29 | -------------------------------------------------------------------------------- /components/color-switcher.js: -------------------------------------------------------------------------------- 1 | import { IconButton, useColorMode } from 'theme-ui' 2 | 3 | const ColorSwitcher = props => { 4 | const [mode, setMode] = useColorMode() 5 | return ( 6 | setMode(mode === 'dark' ? 'light' : 'dark')} 8 | title={`Switch to ${mode === 'dark' ? 'light' : 'dark'} mode`} 9 | sx={{ 10 | position: 'absolute', 11 | top: [2, 3], 12 | right: [2, 3], 13 | color: 'primary', 14 | cursor: 'pointer', 15 | borderRadius: 'circle', 16 | transition: 'box-shadow .125s ease-in-out', 17 | ':hover,:focus': { 18 | boxShadow: '0 0 0 3px', 19 | outline: 'none' 20 | } 21 | }} 22 | {...props} 23 | > 24 | 25 | 33 | 34 | 35 | 36 | ) 37 | } 38 | 39 | export default ColorSwitcher 40 | -------------------------------------------------------------------------------- /components/script.mdx: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 6 | 7 | # Project Moonbeam 8 | 9 | We're a team of 50+ high schoolers around the world using mirrors put up by NASA's 10 | Apollo 11 mission to encode data, send it to the moon as a laser, and decode it back. 11 | 12 | We're just getting started and would love for you to be involved! Get in touch through 13 | [our Slack](https://hackclub.com/slack) or [email](mailto:moonbeam-aaaaeyno5c2ppm6gn2xw3cq3ve@hackclub.slack.com). 14 | 15 | An [open source project](https://github.com/hackclub/moonbeam) by [Hack Clubbers](https://hackclub.com). 16 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | const withMDX = require('@next/mdx')({ extension: /\.mdx?$/ }) 2 | module.exports = withMDX({ pageExtensions: ['js', 'jsx', 'mdx'] }) 3 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@hackclub/moonbeam-site", 3 | "version": "0.0.1", 4 | "license": "MIT", 5 | "private": true, 6 | "scripts": { 7 | "dev": "next", 8 | "build": "next build", 9 | "start": "next start" 10 | }, 11 | "dependencies": { 12 | "@emotion/react": "^11.7.1", 13 | "@emotion/styled": "^11.8.1", 14 | "@hackclub/meta": "^1.1.32", 15 | "@hackclub/theme": "^0.3.3", 16 | "@mdx-js/loader": "^1.6.22", 17 | "@next/mdx": "^10.0.4", 18 | "next": "^12.1.4", 19 | "react": "^17.0.2", 20 | "react-dom": "^17.0.2", 21 | "theme-ui": "^0.14.2" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /pages/_app.js: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import NextApp from 'next/app' 3 | import '@hackclub/theme/fonts/reg-bold.css' 4 | import theme from '@hackclub/theme' 5 | import { ThemeProvider } from 'theme-ui' 6 | import Meta from '@hackclub/meta' 7 | import Head from 'next/head' 8 | import ColorSwitcher from '../components/color-switcher' 9 | import '../styles/crt.css' 10 | 11 | export default class App extends NextApp { 12 | render() { 13 | const { Component, pageProps } = this.props 14 | return ( 15 | 21 | 28 | 29 | 30 | ) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /pages/_document.js: -------------------------------------------------------------------------------- 1 | import Document, { Html, Head, Main, NextScript } from 'next/document' 2 | import { InitializeColorMode } from 'theme-ui' 3 | 4 | export default class extends Document { 5 | static async getInitialProps(ctx) { 6 | const initialProps = await Document.getInitialProps(ctx) 7 | return { ...initialProps } 8 | } 9 | 10 | render() { 11 | return ( 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | ) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /pages/index.js: -------------------------------------------------------------------------------- 1 | import { Container } from 'theme-ui' 2 | import Script from '../components/script.mdx' 3 | 4 | export default function Home() { 5 | return ( 6 | 11 |