summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--data/blogs.json24
-rw-r--r--data/blogs/0.md10
-rw-r--r--data/blogs/1.md10
-rw-r--r--data/blogs/altaf-devlog-0.md11
-rw-r--r--data/blogs/ass.md9
-rw-r--r--data/blogs/urban0.md32
-rw-r--r--pages.py14
-rw-r--r--www/scripts/blog.js5
-rw-r--r--www/scripts/constants.js4
10 files changed, 91 insertions, 29 deletions
diff --git a/.gitignore b/.gitignore
index eec4583..57f5e3e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ logs
.env
__pycache__
.DS_Store
+.obsidian
diff --git a/data/blogs.json b/data/blogs.json
index b1e9f09..bf65d3a 100644
--- a/data/blogs.json
+++ b/data/blogs.json
@@ -1,45 +1,21 @@
{ "posts":
[
{
- "id": 2,
- "title": "Catatan Publik — Zoom Fisika untuk ASS",
- "description": "ASS means Asesmen Sumatif Sekolah (Summative School Assesment)",
- "date": "Wed, 1 May 2024",
- "author": "altaf-creator",
- "tags": ["School"],
"thumbnail": "/assets/images/blog/ass.png",
"banner": "/assets/images/blog/ass.png",
"path": "/data/blogs/ass.md"
},
{
- "id": 0,
- "title": "beta0.2: The Visual Update is Out!",
- "description": "No description provided.",
- "date": "Wed, 26 July 2023",
- "author": "altaf-creator",
- "tags": ["simpliCity", "Devlog"],
"thumbnail": "/assets/images/blog/beta0.2_cover.png",
"banner": "/assets/images/blog/beta0.2_banner.png",
"path": "/data/blogs/0.md"
},
{
- "id": 1,
- "title": "Well that was dumb. (33nd Week of 2023)",
- "description": "No description provided.",
- "date": "Wed, 16 August 2023",
- "author": "altaf-creator",
- "tags": ["simpliCity", "Devlog"],
"thumbnail": "/assets/images/blog/33_cover.png",
"banner": "/assets/images/blog/33_banner.png",
"path": "/data/blogs/1.md"
},
{
- "id": 3,
- "title": "altaf-devlog[0]: Hello, world! And I'm sorry.",
- "description": "No description provided.",
- "date": "May 2026",
- "author": "altaf-creator",
- "tags": ["simpliCity", "Devlog", "Personal"],
"thumbnail": "",
"banner": "",
"path": "/data/blogs/altaf-devlog-0.md"
diff --git a/data/blogs/0.md b/data/blogs/0.md
index 91d9afc..84e122a 100644
--- a/data/blogs/0.md
+++ b/data/blogs/0.md
@@ -1,3 +1,13 @@
+---
+title: "beta0.2: The Visual Update is Out!"
+description: "No description provided."
+date: "Wed, 26 July 2023"
+author: "altaf-creator"
+tags:
+ - "simpliCity"
+ - "Devlog"
+---
+
+=+=+=
# Introduction
diff --git a/data/blogs/1.md b/data/blogs/1.md
index a8e00c7..f1168ee 100644
--- a/data/blogs/1.md
+++ b/data/blogs/1.md
@@ -1,3 +1,13 @@
+---
+title: "Well that was dumb. (33nd Week of 2023)"
+description: "No description provided."
+date: "Wed, 16 August 2023"
+author: "altaf-creator"
+tags:
+ - "simpliCity"
+ - "Devlog"
+---
+
+=+=+=
# Opening
diff --git a/data/blogs/altaf-devlog-0.md b/data/blogs/altaf-devlog-0.md
index b614e65..7c7fbf0 100644
--- a/data/blogs/altaf-devlog-0.md
+++ b/data/blogs/altaf-devlog-0.md
@@ -1,3 +1,14 @@
+---
+title: "altaf-devlog[0]: Hello, world! And I'm sorry."
+description: "No description provided."
+date: "May 2026"
+author: "altaf-creator"
+tags:
+ - "simpliCity"
+ - "Devlog"
+ - "Personal"
+---
+
+=+=+=
# Work in Progress.
diff --git a/data/blogs/ass.md b/data/blogs/ass.md
index 456b4ee..b6f12c9 100644
--- a/data/blogs/ass.md
+++ b/data/blogs/ass.md
@@ -1,3 +1,12 @@
+---
+title: "Catatan Publik — Zoom Fisika untuk ASS"
+description: "ASS means Asesmen Sumatif Sekolah (Summative School Assesment)"
+date: "Wed, 1 May 2024"
+author: "altaf-creator"
+tags:
+ - "School"
+---
+
+=+=+=
# Final Zoom Meeting Untuk ASS
diff --git a/data/blogs/urban0.md b/data/blogs/urban0.md
new file mode 100644
index 0000000..3ab7917
--- /dev/null
+++ b/data/blogs/urban0.md
@@ -0,0 +1,32 @@
+---
+title: Design Thinking and our Urban Environment
+description: Work in progress
+date: Jun 2026
+author: altaf-creator
+tags:
+ - Blog
+ - Urbanism
+---
+
++=+=+=
+
+This blog is a work-in-progress.
+# Outline
+* STEM >< Humanities. Overlap.
+* **Urban design** often viewed as engineering, but it's also something human. (What is urban design)
+* What is **Design Thinking**
+ * STEAM more human, because overlap
+* Importance of design thinking in shaping our urban environment.
+ * Singapore strengths, HDB, placemaking.
+ * Singapore negatives, roadway car-centric.
+* In my school, design thinking. MOE pushes for this.
+* So, should be applied more, especially for our urban roads and hence environment.
+* Hi! Who am I?
+
+-+-+-+
+
++=+=+=
+
+Engineering and humanities are often represented as total counterparts. In universities, diplomas awarded are categorised into two distinct fields, usually sciences and arts.
+
+-+-+-+ \ No newline at end of file
diff --git a/pages.py b/pages.py
index fcde18e..163b7c7 100644
--- a/pages.py
+++ b/pages.py
@@ -24,6 +24,7 @@ BLOGPOST_INDEX = {}
EVENT_INDEX = {}
VIDEO_INDEX = {}
+# ## INITIALISATION ## #
with open(PATH_HTML_PROJECT_TEMPLATE) as f:
HTML_PROJECT_TEMPLATE = f.read()
@@ -43,6 +44,19 @@ with open(PATH_EVENT_INDEX) as f:
with open(PATH_VIDEO_INDEX) as f:
VIDEO_INDEX = json.load(f)
+for idx in range(len(BLOGPOST_INDEX["posts"])):
+ metadata_json = BLOGPOST_INDEX["posts"][idx]
+
+ with open("." + metadata_json["path"], "r") as f:
+ source = f.read()
+
+ metadata, _ = markdown_renderer.md_to_html(source)
+ BLOGPOST_INDEX["posts"][idx] = BLOGPOST_INDEX["posts"][idx] | metadata
+
+ print(BLOGPOST_INDEX)
+
+# #### #
+
def render_project_details(project_name: str) -> tuple:
html = HTML_PROJECT_TEMPLATE
diff --git a/www/scripts/blog.js b/www/scripts/blog.js
index 5c5ad67..c7c64f2 100644
--- a/www/scripts/blog.js
+++ b/www/scripts/blog.js
@@ -18,13 +18,13 @@ function postList(n = 0) {
// i ❤ for loops
for (var i = data.posts.length - 1; i >= 0; i--) {
if (i >= data.posts.length - n) {
- postCard(data.posts[i]);
+ postCard(data.posts[i], i);
}
}
});
}
-function postCard(post) {
+function postCard(post, id) {
var blogContainer = document.getElementById("blog-container");
var title = post.title;
@@ -32,7 +32,6 @@ function postCard(post) {
var author = post.author;
var tags = post.tags;
var thumbnail = post.thumbnail;
- var id = post.id;
evaluatedTags = "";
tags.forEach(createTags)
diff --git a/www/scripts/constants.js b/www/scripts/constants.js
index 1c2812e..b2b7894 100644
--- a/www/scripts/constants.js
+++ b/www/scripts/constants.js
@@ -1,2 +1,2 @@
-const API_URL = "https://altafcreator.com/api"
-//const API_URL = "http://localhost:9091/api"
+//const API_URL = "https://altafcreator.com/api"
+const API_URL = "http://localhost:9091/api"