diff --git a/.gitignore b/.gitignore
index bec1af8..66238b6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,3 @@
target
.env
-html
-templates
-static
db.sqlite3
diff --git a/content/html/index.html b/content/html/index.html
new file mode 100644
index 0000000..58c0a6c
--- /dev/null
+++ b/content/html/index.html
@@ -0,0 +1,16 @@
+
+
+
+
+ mtrx' site
+
+
+
+
+
+ Hi, I'm mtrx.
+ I have a blog.
+ If you have questions or input for me please send me an E-Mail to me[at]mtrx.tech
+
+
+
diff --git a/content/static/css/blog.css b/content/static/css/blog.css
new file mode 100644
index 0000000..7029cfa
--- /dev/null
+++ b/content/static/css/blog.css
@@ -0,0 +1,81 @@
+* {
+ margin: 0;
+ padding: 0;
+}
+
+html {
+ font-family: sans-serif;
+ padding: 20px;
+ width: 60%;
+ padding-left: 20%;
+}
+
+article {
+ padding-top: 2em;
+ display: flex;
+}
+
+.post-link {
+ padding-right: 20px;
+}
+
+.post-title {
+ font-weight: 400;
+}
+
+.post-publish-date {
+ font-size: 0.7em;
+}
+
+.post-body {
+ padding-top: 1em;
+}
+
+#submit-form {
+ padding-top: 2em;
+}
+
+#submit-body, #submit-title {
+ width: 100%;
+ margin-bottom: 2em;
+ resize: none;
+}
+
+#submit-body {
+ height: 500px;
+}
+
+#submit-form {
+ display: block
+}
+
+@media (max-width:1080px) {
+ html {
+ padding: 20px;
+ width: 90%;
+ padding-left: 5%;
+ }
+
+/*
+ h1 {
+ font-size: 1.5em;
+ }
+
+ .post-link {
+ font-size: 2.5em;
+ }
+
+ .post-title {
+ font-size: 2.5em;
+ }
+
+ .post-body {
+ font-size: 2em;
+ }
+
+ .post-publish-date {
+ font-size: 1.7em;
+ font-weight: 400;
+ }
+*/
+}
diff --git a/content/static/css/index.css b/content/static/css/index.css
new file mode 100644
index 0000000..3aab276
--- /dev/null
+++ b/content/static/css/index.css
@@ -0,0 +1,21 @@
+* {
+ margin: 0;
+ padding: 0;
+}
+
+html {
+ font-family: sans-serif;
+ padding: 20px;
+ width: 60%;
+ padding-left: 20%;
+ font-size: 1.5em;
+}
+
+@media (max-width:1080px) {
+ html {
+ font-family: sans-serif;
+ padding: 20px;
+ width: 90%;
+ padding-left: 5%;
+ font-size: 2em;
+}
diff --git a/content/static/favicon.ico b/content/static/favicon.ico
new file mode 100755
index 0000000..f0d4932
Binary files /dev/null and b/content/static/favicon.ico differ
diff --git a/content/static/js/blog.js b/content/static/js/blog.js
new file mode 100644
index 0000000..b330ebb
--- /dev/null
+++ b/content/static/js/blog.js
@@ -0,0 +1,31 @@
+function setTokenCookie() {
+ let token = document.getElementById('set-token').value;
+ let tokenCookie = 'token=' + token + "; SameSite=None; secure";
+ document.cookie = tokenCookie;
+ document.getElementById("token").value = token
+ document.getElementById("cookie-block").hidden = true;
+}
+
+function clearTokenCookie() {
+ document.cookie = "token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; SameSite=None; secure";
+ document.getElementById("cookie-block").hidden = false;
+}
+
+// if cookie is set, use it to pass the token
+let c_pairs = document.cookie.split(";");
+let cookie_set = false;
+for (c of c_pairs) {
+ if (c.trim().split("=")[0].startsWith("token")){
+ // stick token into all the form input fields
+ let token = c.split("=")[1];
+ let tokenFields = document.querySelectorAll(".token");
+ for (t of tokenFields) {
+ t.value = token;
+ }
+ cookie_set = true;
+ }
+}
+
+if (!cookie_set) {
+ document.getElementById("cookie-block").hidden = false;
+}
diff --git a/content/templates/blog.html b/content/templates/blog.html
new file mode 100644
index 0000000..4b6abbe
--- /dev/null
+++ b/content/templates/blog.html
@@ -0,0 +1,29 @@
+
+
+
+
+ mtrx' blog
+
+
+
+
+
+
+ {% for post in posts %}
+
+ [link]
+
+
{{ post.title }}
+
{{ post.publish_date }}
+
{{ post.body }}
+
+
+ {% endfor %}
+
+
+
+
+
diff --git a/content/templates/edit.html b/content/templates/edit.html
new file mode 100644
index 0000000..42f989b
--- /dev/null
+++ b/content/templates/edit.html
@@ -0,0 +1,18 @@
+
+
+
+
+ mtrx' blog
+
+
+
+
+
+ Edit posts
+
+
+
diff --git a/content/templates/post-edit.html b/content/templates/post-edit.html
new file mode 100644
index 0000000..65030ba
--- /dev/null
+++ b/content/templates/post-edit.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+ Edit Post
+
+
+
+
+
+
Please set your token cookie first.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/content/templates/post-submit.html b/content/templates/post-submit.html
new file mode 100644
index 0000000..7e8c14c
--- /dev/null
+++ b/content/templates/post-submit.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+ Submit Post
+
+
+
+
+
+
Please set your token cookie first.
+
+
+
+
+
+
+
+
+