From a4e1ebf073fdef817943bf997f474363f8308221 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 4 Oct 2019 21:33:37 +0200 Subject: [PATCH] redesign, part 1! --- about.html | 240 +++++++++++++++++++++++++++++++++++++ blog.html | 240 +++++++++++++++++++++++++++++++++++++ generate.js | 39 ++++++ index.html | 151 ++++++++++-------------- node/sitemap.js | 48 -------- projects.html | 240 +++++++++++++++++++++++++++++++++++++ scripts/cookies.js | 15 --- scripts/main.js | 8 -- scripts/navbar.js | 5 - social.html | 255 ++++++++++++++++++++++++++++++++++++++++ style/style.css | 19 ++- templates/about.html | 13 ++ templates/blog.html | 13 ++ templates/index.html | 18 +++ templates/main.html | 228 +++++++++++++++++++++++++++++++++++ templates/projects.html | 13 ++ templates/social.html | 28 +++++ 17 files changed, 1401 insertions(+), 172 deletions(-) create mode 100644 about.html create mode 100644 blog.html create mode 100644 generate.js delete mode 100644 node/sitemap.js create mode 100644 projects.html delete mode 100644 scripts/cookies.js delete mode 100644 scripts/navbar.js create mode 100644 social.html create mode 100644 templates/about.html create mode 100644 templates/blog.html create mode 100644 templates/index.html create mode 100644 templates/main.html create mode 100644 templates/projects.html create mode 100644 templates/social.html diff --git a/about.html b/about.html new file mode 100644 index 0000000..3a27601 --- /dev/null +++ b/about.html @@ -0,0 +1,240 @@ + + + + + + + + Ellpeck.de - About + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+

About

+

+ Sometimes, some people ask me some questions about myself or my projects, so I decided to compile a list of some of the answers in a Q&A-like fashion so that I don't have to keep repeating them. If you're curious about me, this might be interesting to you! +

+
+ The content that should be here is dynamically generated. Please enable JavaScript if you see this. +
+ +
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/blog.html b/blog.html new file mode 100644 index 0000000..5f04d18 --- /dev/null +++ b/blog.html @@ -0,0 +1,240 @@ + + + + + + + + Ellpeck.de - Blog + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+

Blog

+

+ Occasionally I enjoy writing stuff. So here's some of the stuff I've written. Just click on any of the headers to expand the post. +

+
+ The content that should be here is dynamically generated. Please enable JavaScript if you see this. +
+ +
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/generate.js b/generate.js new file mode 100644 index 0000000..a7f0ad7 --- /dev/null +++ b/generate.js @@ -0,0 +1,39 @@ +var fs = require("fs"); + +var subPages = [ + "index", + "projects", + "social", + "about", + "blog" +]; + +if (process.argv[2] == "delete") { + for (var s of subPages) { + var path = s + ".html"; + if (fs.existsSync(path)) { + console.log("Deleting " + path); + fs.unlinkSync(path); + } + } +} else { + var main = fs.readFileSync("templates/main.html").toString(); + for (var s of subPages) { + var path = s + ".html"; + var content = main; + + var template = fs.readFileSync("templates/" + path).toString(); + content = content.replace("INSERT CONTENT", template); + + var titleIndex = template.indexOf("TITLE") + 5; + var title = template.substring(titleIndex, template.indexOf("-->", titleIndex)); + content = content.split("INSERT TITLE").join(title); + + var descIndex = template.indexOf("DESCRIPTION") + 11; + var desc = template.substring(descIndex, template.indexOf("-->", descIndex)) + content = content.split("INSERT DESCRIPTION").join(desc); + + console.log("Creating " + path); + fs.writeFileSync(path, content); + } +} \ No newline at end of file diff --git a/index.html b/index.html index b514e07..f85bfbf 100644 --- a/index.html +++ b/index.html @@ -5,9 +5,9 @@ - Ellpeck.de + Ellpeck.de - + @@ -16,8 +16,8 @@ - - + + @@ -34,13 +34,19 @@ - +