diff options
author | metamuffin <metamuffin@yandex.com> | 2021-09-14 20:49:15 +0200 |
---|---|---|
committer | metamuffin <metamuffin@yandex.com> | 2021-09-14 20:49:15 +0200 |
commit | 3e67f1724e5506d99ef5aff1c82ff3e66e30c9d5 (patch) | |
tree | 484b829b75795f3be320a8e45baa4d2d63e5b067 | |
parent | 2b5a1dd0009aa8172378a499e16f0d1248cb6536 (diff) | |
download | metamuffin-website-3e67f1724e5506d99ef5aff1c82ff3e66e30c9d5.tar metamuffin-website-3e67f1724e5506d99ef5aff1c82ff3e66e30c9d5.tar.bz2 metamuffin-website-3e67f1724e5506d99ef5aff1c82ff3e66e30c9d5.tar.zst |
added content
-rw-r--r-- | LICENCE | 4 | ||||
-rw-r--r-- | source/index.ts | 6 | ||||
-rw-r--r-- | views/about.pug | 6 | ||||
-rw-r--r-- | views/contact.pug | 8 | ||||
-rw-r--r-- | views/layout.pug | 11 | ||||
-rw-r--r-- | views/projects.pug (renamed from views/index.pug) | 4 |
6 files changed, 32 insertions, 7 deletions
@@ -1,3 +1,7 @@ +All source files and content of the webpage found on metamuffin.org and in it's +sources are licenced under the third version of the GNU Affero Public Licence only. +Sources can be found on https://codeberg.org/metamuffin/website + metamuffin.org - metamuffin's website Copyright (C) 2021 metamuffin diff --git a/source/index.ts b/source/index.ts index 209e8c8..816b513 100644 --- a/source/index.ts +++ b/source/index.ts @@ -9,20 +9,22 @@ import pug from "pug" const app = express() const render_env = { - commit: readFileSync() + commit: readFileSync(join(__dirname, "../.git/refs/heads/main")).toString().substr(0, 8) } app.set("view engine", "pug") app.set("views", join(__dirname, "../views")) app.get("/", (req, res) => { - res.render("index", render_env) }) app.get("/licence", async (req, res) => { const content = (await readFile(join(__dirname, "../LICENCE"))).toString() res.type("text/plain").send(content) }) +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)) const PORT = parseInt(process.env.PORT ?? "8080") diff --git a/views/about.pug b/views/about.pug new file mode 100644 index 0000000..3eda61a --- /dev/null +++ b/views/about.pug @@ -0,0 +1,6 @@ +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 diff --git a/views/contact.pug b/views/contact.pug new file mode 100644 index 0000000..aa89cef --- /dev/null +++ b/views/contact.pug @@ -0,0 +1,8 @@ +extends layout + +block content + h2 contact + ul + 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 ac71623..769fa3b 100644 --- a/views/layout.pug +++ b/views/layout.pug @@ -4,7 +4,12 @@ html(lang="en") title metamuffin.org body header - h2 metamuffin.org + h2 metamuffin + nav + ul + li:a(href="/about") about + li:a(href="/projects") projects + li:a(href="/contact") contact hr block content @@ -12,9 +17,7 @@ html(lang="en") hr footer - p metamuffin.org + p metamuffin.org version of commit #{commit} p Copyright (C) 2021 metamuffin - p This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - p This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. p See #[a(href="/licence") licence]. p Sources can be found on #[a(href="https://codeberg.org/metamuffin/website") codeberg]. diff --git a/views/index.pug b/views/projects.pug index 6c1bf18..9c2cbb8 100644 --- a/views/index.pug +++ b/views/projects.pug @@ -1,4 +1,6 @@ extends layout block content - p Here is some content + h2 projects + h3 todo + |