summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--content/about.md33
-rw-r--r--content/images/powerdebian.gifbin0 -> 904 bytes
-rw-r--r--content/images/vcss-blue.gifbin0 -> 1176 bytes
-rw-r--r--content/index.md25
-rw-r--r--content/styles/style.css92
-rw-r--r--content/thoughts.md4
-rw-r--r--content/thoughts/first-entry.md (renamed from content/thoughts/thought-1.md)2
-rw-r--r--content/thoughts/updated-css-and-navigation.md7
-rwxr-xr-xgenerate.sh5
-rwxr-xr-xmain.py (renamed from generate.py)58
-rw-r--r--templates/about.html.j24
-rw-r--r--templates/index.html.j22
-rw-r--r--templates/template.html.j252
-rw-r--r--templates/thought.html.j24
-rw-r--r--templates/thoughts.html.j25
16 files changed, 245 insertions, 49 deletions
diff --git a/.gitignore b/.gitignore
index 4084451..846e08e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,2 @@
-.git
venv
static
diff --git a/content/about.md b/content/about.md
new file mode 100644
index 0000000..a49608a
--- /dev/null
+++ b/content/about.md
@@ -0,0 +1,33 @@
+My name is Eva and I'm 27 year old computer science enthusiast. I graduated in
+business information systems and am currently employed as an IT specialist
+working in security and application administration. In my spare time I like to
+go climbing and bouldering in a gym or do some recreational programming. I also
+sometimes go on walks or "explorations". I search on
+[openstreetmap](https://www.openstreetmap.org) for places in my area I've never
+been to and take a walk there. Sometimes I find interesting or nice places and
+take pictures.
+
+Other things I'm interested in:
+- homelabbing, I have a server which runs a couple of webservices (and also this
+website). Maybe I'll make a dedicated page to my setup in the future
+- video games, especially grinding heavy ones like Disgaea. Also rogue-likes
+- anime and manga
+- I like to read books, horror is my preferred genre. I also like non-fiction
+- Magic the Gathering
+
+My favourite anime of all time is Detective Conan and my favourite manga is
+Baki.
+My favourite video game series is Monster Hunter, especially Freedom Unite for
+the PSP and 4 Ultimate for the 3DS. I also have a Medion 1998 OF CRT monitor
+for playing retro games.
+
+I also listen to a lot of music. I can't even tell if I have a favourite genre,
+because I listen to so many different types of music. Pop, Hip-Hop, Death Metal,
+Grindcore, Speedcore, Vaporwave... I'm pretty much open to all genres, as long
+as it sounds good I don't care what it is.
+Some of my most listened to artists, in no particular order, are:
+- Death Grips
+- t+pazolite
+- Utsu-P
+- Pig Destroyer
+- reol \ No newline at end of file
diff --git a/content/images/powerdebian.gif b/content/images/powerdebian.gif
new file mode 100644
index 0000000..1f617c8
--- /dev/null
+++ b/content/images/powerdebian.gif
Binary files differ
diff --git a/content/images/vcss-blue.gif b/content/images/vcss-blue.gif
new file mode 100644
index 0000000..697fbfc
--- /dev/null
+++ b/content/images/vcss-blue.gif
Binary files differ
diff --git a/content/index.md b/content/index.md
index 9630063..5a0ac9c 100644
--- a/content/index.md
+++ b/content/index.md
@@ -1,14 +1,17 @@
-# eva's site
+## hi
-## About Me
+I'm a 27 year old graduate in business information systems. I made this website
+because I feel like too much of the internet is centered around social media and
+sometimes it feels as if the whole internet is only a handful of websites. Years
+back I really enjoyed browsing random websites created by people who just wanted
+to share their hobby, which made the web feel way more alive and individual than
+it is now. I still do this sometimes using [wiby.me](https://wiby.me). Maybe
+this website can encourage someone to create their own.
+In my spare time I like to go climbing and do some programming on various
+projects. Occasionally I'll go on a walk in a random place I've never been in
+and take pictures. Maybe I'll add a photo album sometime later. You can read
+more about me [here](./about.html)
-I'm a 27 year old graduate in business information systems. I like to go climbing
-in my spare time and sometimes do some programming on various projects.
-Occasionally I'll go on a walk in a random place I've never been in and take pictures.
-Maybe I'll add a photo album sometime later.
+## thoughts
-## Thoughts
-
-You can read my thoughts [here](thoughts/thought-1.html).
-This is just a short test for now. I'll add an index later, once I write some more
-thoughts down.
+I'll sometimes post my thoughts. You can read them [here](./thoughts.html).
diff --git a/content/styles/style.css b/content/styles/style.css
index 725b930..a731649 100644
--- a/content/styles/style.css
+++ b/content/styles/style.css
@@ -1,32 +1,94 @@
-body {
+html {
background-color: black;
- color: pink;
+ font-family: 'Open Sans', sans-serif;
+ font-size: small;
+}
+
+body {
+ background: black;
+ margin-left: 0px;
+ margin-right: 0px;
+ margin-bottom: 0px;
+ position: relative;
+}
+
+footer {
+ padding: 300px 10px 5px 20px;
+ margin-bottom: 300px;
+ font-size: xx-small;
+ align-content: center;
+}
+
+#headerflex {
+ display: flex;
+}
+
+#headers {
+ flex-grow: 1;
+}
+
+header nav {
+ flex-grow: 1;
+ display: inline;
+}
+
+header div {
+ padding-left: 20px;
+ padding-bottom: 20px;
+}
+
+nav ul {
+ margin: 0;
+ padding: 0;
+}
+
+nav li {
+ display: inline-block;
+ list-style-type: none;
+}
+
+nav a {
+ text-decoration: none;
+ display: block;
+ padding: 5px 6px 5px 6px;
+ color: black;
+}
+
+#the_title {
+ text-decoration: none;
+ color: black;
}
-p {
- padding-bottom: 30px;
+#the_title h1 {
+ padding-left: 6px;
+}
+
+#navbar {
+ text-align: left;
+ background-color: white;
+}
+
+#footer_banners {
+ display: flex;
+ align-items: center;
}
#wrapper {
- background-color: #000000;
+ background-color: #f1e7d5;
max-width: 974px;
min-width: 850px;
margin: auto;
margin-top: -10px;
+ padding: 30px;
}
-.center {
- text-align: center;
- justify-content: center;
-}
-
-.left {
- text-align: left;
- justify-content: center;
+#thoughts_list ul {
+ padding-left: 12px;
+ line-height: 20px;
}
-.limit-text-width {
- width: 50%;
+#thoughts_list ul li {
+ list-style: none;
}
.header_linker {
diff --git a/content/thoughts.md b/content/thoughts.md
new file mode 100644
index 0000000..ded8a19
--- /dev/null
+++ b/content/thoughts.md
@@ -0,0 +1,4 @@
+Here are all of the thoughts I've posted so far:
+
+- [first entry, 2024-10-24](./thoughts/first-entry.html)
+- [updated css and navigation, 2024-10-25](./thoughts/updated-css-and-navigation.html)
diff --git a/content/thoughts/thought-1.md b/content/thoughts/first-entry.md
index 1f4effe..a2402b6 100644
--- a/content/thoughts/thought-1.md
+++ b/content/thoughts/first-entry.md
@@ -1,5 +1,3 @@
-# 2024-10-24
-
Finally putting some content on this website. I've had this domain for 18 months now
to host my matrix server, but never did anything with the site itself. I thought it
would be a waste not to put something here, so here you go.
diff --git a/content/thoughts/updated-css-and-navigation.md b/content/thoughts/updated-css-and-navigation.md
new file mode 100644
index 0000000..0d2bb09
--- /dev/null
+++ b/content/thoughts/updated-css-and-navigation.md
@@ -0,0 +1,7 @@
+Implemented the index for all thoughts and changed the css. Also made a proper
+navigation bar. Maybe I'll ditch the css completely and go brutalist style, not
+sure yet. This website is currently just html+css. I wrote a very basic static
+site generator with Jinja2, mistune and Pygments to convert markdown to html.
+Maybe I'll rewrite this into Flask and use a database to store these entries.
+But that will have to wait, if I ever decide to do this, because right now that
+would be total overkill.
diff --git a/generate.sh b/generate.sh
new file mode 100755
index 0000000..1b7247b
--- /dev/null
+++ b/generate.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+source ./venv/bin/activate
+python3 main.py
+deactivate
diff --git a/generate.py b/main.py
index 65e6ef6..89c1544 100755
--- a/generate.py
+++ b/main.py
@@ -45,11 +45,11 @@ def parse_file(path):
with open(path, "r") as f:
unformatted = f.read()
- return parse_text(unformatted)[0]
+ return parse_text(unformatted)[0]
def parse_text(unformatted):
md = mistune.create_markdown(
- renderer = MyRenderer(),
+ renderer = MyRenderer(),
plugins = ["strikethrough", "table", "url", "task_lists", "def_list"]
)
html = md(unformatted)
@@ -72,14 +72,14 @@ def get_headers(html):
level,
"#%s" % node.attrib["id"])
)
-
+
headers = [(i[0], i[1] - thesmallestlevel, i[2]) for i in headers]
md_template = jinja2.Template("""
-{% for text, depth, link in contents -%}
- {{ " " * depth }} - [{{ text }}]({{ link }})
-{% endfor %}
- """)
-
+ {% for text, depth, link in contents %}
+ {{ " " * depth }} - [{{ text }}]({{ link }})
+ {% endfor %}
+ """)
+
return mistune.html(md_template.render(contents = headers))
def index():
@@ -98,9 +98,26 @@ def index():
)
html_file.write(html)
+def thoughts_overview():
+ src_file = "content/thoughts.md"
+ template_file = "thoughts.html.j2"
+ dst_file = "thoughts.html"
+
+ template = ENV.get_template(template_file)
+
+ with open(os.path.join('static/%s' % dst_file), 'w') as html_file:
+ with open(src_file, "r") as f:
+ html = template.render(
+ prefix = "./",
+ title = "my thoughts",
+ content = parse_text(f.read())[0]
+ )
+ html_file.write(html)
+
+
def thoughts():
src_path = "content/thoughts"
- template_file = "thoughts.html.j2"
+ template_file = "thought.html.j2"
dst_path = "static/thoughts"
template = ENV.get_template(template_file)
@@ -114,20 +131,39 @@ def thoughts():
with open(os.path.join(src_path, file), 'r') as f:
html = template.render(
prefix = "../",
- title = "eva's site :: thoughts",
+ title = file.replace("-", " ").replace(".md", ""),
content = parse_text(f.read())[0]
)
html_file.write(html)
+def about():
+ src_file = "content/about.md"
+ template_file = "about.html.j2"
+ dst_file = "about.html"
+
+ template = ENV.get_template(template_file)
+
+ with open(os.path.join('static/%s' % dst_file), 'w') as html_file:
+ with open(src_file, "r") as f:
+ html = template.render(
+ prefix = "./",
+ title = "about me",
+ content = parse_text(f.read())[0]
+ )
+ html_file.write(html)
+
+
def main():
if os.path.isdir("static"):
shutil.rmtree("static")
os.mkdir("static")
-
+
shutil.copytree("content/styles", "static/styles")
shutil.copytree("content/images", "static/images")
index()
+ about()
+ thoughts_overview()
thoughts()
if __name__ == '__main__':
diff --git a/templates/about.html.j2 b/templates/about.html.j2
new file mode 100644
index 0000000..8ebc3d7
--- /dev/null
+++ b/templates/about.html.j2
@@ -0,0 +1,4 @@
+{% extends "template.html.j2" %}
+{% block content %}
+ {{ content|safe }}
+{% endblock %} \ No newline at end of file
diff --git a/templates/index.html.j2 b/templates/index.html.j2
index 8257ab2..fa4873e 100644
--- a/templates/index.html.j2
+++ b/templates/index.html.j2
@@ -1,4 +1,4 @@
{% extends "template.html.j2" %}
{% block content %}
- {{ content }}
+ {{ content|safe }}
{% endblock %}
diff --git a/templates/template.html.j2 b/templates/template.html.j2
index 96f7f9d..4753dfd 100644
--- a/templates/template.html.j2
+++ b/templates/template.html.j2
@@ -2,14 +2,54 @@
<html lang="en">
<head>
<link rel='stylesheet' href="{{ prefix }}styles/style.css">
- <title>{{ title }}</title>
+ <link rel="icon" type="image/png" href="{{ prefix }}images/favicon-32x32.png" sizes="32x32" />
+ <link rel="icon" type="image/png" href="{{ prefix }}images/favicon-16x16.png" sizes="16x16" />
+ <title>cafebabe.gay :: {{ title }}</title>
+
+ <meta content="{{ title }}" property="og:title" />
+ <meta content="https://cafebabe.gay" property="og:url" />
</head>
<body>
- <div id='wrapper'>
- <div id='content'>
- {% block content %}
- {% endblock %}
- </div>
+ <div id="wrapper">
+ <header>
+ <div id="headerflex">
+ <div id="headers">
+ <a href="/" id="the_title"><h1>{{ title }}</h1></a>
+ <nav id="navbar">
+ <ul>
+ <li>
+ <a href="{{ prefix }}index.html">home</a>
+ </li>
+ <li>
+ <a href="{{ prefix }}thoughts.html">thoughts</a>
+ </li>
+ <li>
+ <a href="{{ prefix }}about.html">about me</a>
+ </li>
+ </ul>
+ </nav>
+ </div>
+ </div>
+ </header>
+ <div id="content">
+ {% block content %}
+ {% endblock %}
+ </div>
+ <footer>
+ <p>This website does not contain any javascript and will always remain javascript-free.</p>
+ <div id="footer_banners">
+ <p>
+ <a href="https://jigsaw.w3.org/css-validator/check/referer">
+ <img style="border:0;width:88px;height:31px"
+ src="{{ prefix }}images/vcss-blue.gif"
+ alt="Valid CSS!" />
+ </a>
+ </p>
+ <a href="https://www.debian.org/">
+ <img src="{{ prefix }}images/powerdebian.gif" alt="Powered By Debian">
+ </a>
+ </div>
+ </footer>
</div>
</body>
</html>
diff --git a/templates/thought.html.j2 b/templates/thought.html.j2
new file mode 100644
index 0000000..fa4873e
--- /dev/null
+++ b/templates/thought.html.j2
@@ -0,0 +1,4 @@
+{% extends "template.html.j2" %}
+{% block content %}
+ {{ content|safe }}
+{% endblock %}
diff --git a/templates/thoughts.html.j2 b/templates/thoughts.html.j2
index 17b2797..69734fa 100644
--- a/templates/thoughts.html.j2
+++ b/templates/thoughts.html.j2
@@ -1,5 +1,6 @@
{% extends "template.html.j2" %}
{% block content %}
- <a href='../index.html'>Back to main page</a>
- {{ content }}
+ <div id="thoughts_list">
+ {{ content|safe }}
+ </div>
{% endblock %}