diff options
| author | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2025-02-14 16:40:30 +1100 |
|---|---|---|
| committer | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2025-02-14 16:40:30 +1100 |
| commit | 6e1fbeceedada4de17a12bb25fad9c28933d6b29 (patch) | |
| tree | 2be3e99cca95949f1153e3276af2b4497b98191e | |
initial commit
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | README.md | 8 | ||||
| -rw-r--r-- | package.json | 34 | ||||
| -rw-r--r-- | src/.index.jsx.kate-swp | bin | 0 -> 123 bytes | |||
| -rw-r--r-- | src/assets/favicon.ico | bin | 0 -> 1094 bytes | |||
| -rw-r--r-- | src/components/not_found/NotFound.jsx | 8 | ||||
| -rw-r--r-- | src/components/site/Site.jsx | 9 | ||||
| -rw-r--r-- | src/index.css | 20 | ||||
| -rw-r--r-- | src/index.html | 16 | ||||
| -rw-r--r-- | src/index.jsx | 25 | ||||
| -rw-r--r-- | src/reset.css | 47 | ||||
| -rw-r--r-- | webpack.config.js | 59 |
12 files changed, 229 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..320c107 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +dist/ +package-lock.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..3ffb0dd --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# react-go-forum + +The top level nj3.xyz website. + +## Dependencies + +- [npm](https://npmjs.com) : npm is a package manager for the JavaScript programming language. + diff --git a/package.json b/package.json new file mode 100644 index 0000000..e7be8f3 --- /dev/null +++ b/package.json @@ -0,0 +1,34 @@ +{ + "private": true, + "name": "site", + "version": "0.0.1", + "description": "The toplevel nj3.xyz website.", + "main": "webpack.config.js", + "scripts": { + "build": "webpack --mode=development", + "build_release": "webpack --mode=production" + }, + "repository": { + "type": "git", + "url": "git@git.nj3.xyz:site" + }, + "author": "nj3ahxac", + "license": "ISC", + "devDependencies": { + "@babel/core": "^7.26.8", + "@babel/preset-env": "^7.26.8", + "@babel/preset-react": "^7.26.3", + "babel-loader": "^9.2.1", + "css-loader": "^7.1.2", + "html-webpack-plugin": "^5.6.3", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "react-router-dom": "^7.1.5", + "style-loader": "^4.0.0", + "webpack": "^5.98.0", + "webpack-cli": "^6.0.1" + }, + "dependencies": { + "@fontsource/pitagon-sans-mono": "^5.1.0" + } +} diff --git a/src/.index.jsx.kate-swp b/src/.index.jsx.kate-swp Binary files differnew file mode 100644 index 0000000..cde11c5 --- /dev/null +++ b/src/.index.jsx.kate-swp diff --git a/src/assets/favicon.ico b/src/assets/favicon.ico Binary files differnew file mode 100644 index 0000000..ede3f4f --- /dev/null +++ b/src/assets/favicon.ico diff --git a/src/components/not_found/NotFound.jsx b/src/components/not_found/NotFound.jsx new file mode 100644 index 0000000..71ed075 --- /dev/null +++ b/src/components/not_found/NotFound.jsx @@ -0,0 +1,8 @@ +import React from "react"; + + +export default function NotFound() { + return ( + <div>Not Found!</div> + ) +} diff --git a/src/components/site/Site.jsx b/src/components/site/Site.jsx new file mode 100644 index 0000000..0c6c2f9 --- /dev/null +++ b/src/components/site/Site.jsx @@ -0,0 +1,9 @@ +import react from "react"; + +export default function Site() { + return ( + <div> + site page placeholder + </div> + ) +} diff --git a/src/index.css b/src/index.css new file mode 100644 index 0000000..ebb3fc5 --- /dev/null +++ b/src/index.css @@ -0,0 +1,20 @@ +:root { + font-size: calc(1vw + 0.6em); + font-family: 'Pitagon Sans Mono', monospace; + letter-spacing: 0.04em; + overscroll-behavior: none; +} +@media (min-width: 50em) { + :root { + font-size: 1.125em; + } +} + +:root { + box-sizing: border-box; +} +*, +*::before, +*::after { + box-sizing: inherit; +} diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..faaf03c --- /dev/null +++ b/src/index.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>GoReact</title> + </head> + + <body style="margin:0;"> + <noscript> + <p style="text-align: center;"><strong>JavaScript is required for this site to function.</strong></p> + </noscript> + <div id="root" style="display: flex; flex-direction: column; min-height: 100%"> + </div> + </body> +</html> diff --git a/src/index.jsx b/src/index.jsx new file mode 100644 index 0000000..e0f355b --- /dev/null +++ b/src/index.jsx @@ -0,0 +1,25 @@ +import React from "react"; +import {createRoot} from "react-dom/client"; +import {BrowserRouter, Routes, Route} from "react-router-dom"; + +import Site from "./components/site/Site.jsx"; +import NotFound from "./components/not_found/NotFound.jsx"; + +import "./reset.css"; +import "./index.css"; +import "@fontsource/pitagon-sans-mono"; + +function BrowserRoutes() { + return ( + <BrowserRouter> + <Routes> + <Route path="/*" element={<Site />} /> + <Route path="*" element={<NotFound />} /> + </Routes> + </BrowserRouter> + ); +} + +const r = document.getElementById("root"); +const root = createRoot(r); +root.render(); diff --git a/src/reset.css b/src/reset.css new file mode 100644 index 0000000..5f5af49 --- /dev/null +++ b/src/reset.css @@ -0,0 +1,47 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) +*/ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +}
\ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..ce4f1da --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,59 @@ +const path = require("path"); +const HtmlWebpackPlugin = require("html-webpack-plugin"); + +module.exports = { + entry: path.resolve(__dirname, "src/"), + plugins: [ + new HtmlWebpackPlugin({ + template: path.join(__dirname, "src/", "index.html"), + favicon: path.join(__dirname, "src/assets/", "favicon.ico") + }), + ], + module: { + rules: [ + { + test: /\.?jsx$/, + use: { + loader: "babel-loader", + options: { + presets: ["@babel/preset-env", "@babel/preset-react"] + } + }, + }, + { + test: /\.(jpg|png|svg|gif)$/, + type: "asset/resource", + }, + { + test: /\.css$/i, + use: [ + "style-loader", + { + loader: "css-loader", + options: { + importLoaders: 1, + modules: true, + }, + }, + ], + }, + { + test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/, + generator: { + filename: "[name][ext]" + } + } + ] + }, + resolve: { + modules: [path.resolve(__dirname, "src/"), "node_modules"], + alias: { + client: path.resolve(__dirname, "") + }, + extensions: [".js", ".jsx"] + }, + output: { + path: path.resolve(__dirname, "dist"), + assetModuleFilename: "[hash][ext][query]" + }, +}; |
