From 902c56d00a8662733b0a79fc8c5952ddf7004de8 Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Sun, 7 Jun 2026 18:57:29 +0800 Subject: fix blog --- www/scripts/blog.js | 5 ++--- www/scripts/constants.js | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'www') 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" -- cgit v1.2.3