diff options
author | metamuffin <metamuffin@yandex.com> | 2021-09-14 21:07:24 +0200 |
---|---|---|
committer | metamuffin <metamuffin@yandex.com> | 2021-09-14 21:07:24 +0200 |
commit | 50c76a45f596afa6575eb5577ab06bb99cdadbce (patch) | |
tree | 1d375e30f3402bcbdf1e8bf81cfd415b7c31c70c | |
parent | 3e67f1724e5506d99ef5aff1c82ff3e66e30c9d5 (diff) | |
download | metamuffin-website-50c76a45f596afa6575eb5577ab06bb99cdadbce.tar metamuffin-website-50c76a45f596afa6575eb5577ab06bb99cdadbce.tar.bz2 metamuffin-website-50c76a45f596afa6575eb5577ab06bb99cdadbce.tar.zst |
it probably doesnt make sense to comment commits at this point
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | package.json | 3 | ||||
-rw-r--r-- | source/index.ts | 11 | ||||
-rw-r--r-- | tsconfig.json | 6 | ||||
-rw-r--r-- | views/about.pug | 6 | ||||
-rw-r--r-- | views/contact.pug | 2 | ||||
-rw-r--r-- | views/layout.pug | 14 |
7 files changed, 25 insertions, 18 deletions
@@ -1 +1,2 @@ /node_modules +/dist diff --git a/package.json b/package.json index b740b2e..5662894 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,9 @@ "version": "1.0.0", "main": "index.js", "license": "MIT", + "scripts": { + "start": "tsc && node dist/index.js" + }, "dependencies": { "@types/express": "^4.17.13", "@types/node": "^16.9.1", diff --git a/source/index.ts b/source/index.ts index 816b513..e22478e 100644 --- a/source/index.ts +++ b/source/index.ts @@ -15,17 +15,16 @@ const render_env = { app.set("view engine", "pug") app.set("views", join(__dirname, "../views")) -app.get("/", (req, res) => { -}) -app.get("/licence", async (req, res) => { - const content = (await readFile(join(__dirname, "../LICENCE"))).toString() - res.type("text/plain").send(content) -}) +app.get("/", (req, res) => res.redirect("/about")) app.get("/about", (req, res) => res.render("about", render_env)) app.get("/projects", (req, res) => res.render("projects", render_env)) app.get("/contact", (req, res) => res.render("contact", render_env)) +app.get("/licence", async (req, res) => { + const content = (await readFile(join(__dirname, "../LICENCE"))).toString() + res.type("text/plain").send(content) +}) const PORT = parseInt(process.env.PORT ?? "8080") const HOST = process.env.HOST || "127.0.0.1" diff --git a/tsconfig.json b/tsconfig.json index 194d0d1..ee35985 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ + "target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ @@ -14,8 +14,8 @@ // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ // "sourceMap": true, /* Generates corresponding '.map' file. */ // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + "outDir": "./dist", /* Redirect output structure to the directory. */ + "rootDir": "./source", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ // "composite": true, /* Enable project compilation */ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ // "removeComments": true, /* Do not emit comments to output. */ diff --git a/views/about.pug b/views/about.pug index 3eda61a..210916f 100644 --- a/views/about.pug +++ b/views/about.pug @@ -3,4 +3,8 @@ extends layout block content h2 about p hello. i am a muffin. i enjoy starting projects and never finishing them. i am also interested in the free software movement. i am *not* interested to use capitalization on this page. -
\ No newline at end of file + + h3 notes + p + | this webpage is optimized to be viewed with non-graphical browser. #[br] + | also styling is left as an exercise to the reader. #[br]
\ No newline at end of file diff --git a/views/contact.pug b/views/contact.pug index aa89cef..8716d04 100644 --- a/views/contact.pug +++ b/views/contact.pug @@ -3,6 +3,6 @@ extends layout block content h2 contact ul - li Matrix: #[a(href="https://matrix.to/#/@metamuffin:metamuffin.org") @metamuffin:metamuffin.org] + li matrix: #[a(href="https://matrix.to/#/@metamuffin:metamuffin.org") @metamuffin:metamuffin.org] li thats it. diff --git a/views/layout.pug b/views/layout.pug index 769fa3b..082922c 100644 --- a/views/layout.pug +++ b/views/layout.pug @@ -7,17 +7,17 @@ html(lang="en") h2 metamuffin nav ul - li:a(href="/about") about - li:a(href="/projects") projects - li:a(href="/contact") contact + li: a(href="/about") about + li: a(href="/projects") projects + li: a(href="/contact") contact hr block content - p Pretty empty here... + p pretty empty here... hr footer p metamuffin.org version of commit #{commit} - p Copyright (C) 2021 metamuffin - p See #[a(href="/licence") licence]. - p Sources can be found on #[a(href="https://codeberg.org/metamuffin/website") codeberg]. + p copyright (C) 2021 metamuffin + p see #[a(href="/licence") licence]. + p sources can be found on #[a(href="https://codeberg.org/metamuffin/website") codeberg]. |