diff options
| author | altaf-creator <dev@altafcreator.com> | 2026-06-07 18:57:29 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2026-06-07 18:57:29 +0800 |
| commit | 902c56d00a8662733b0a79fc8c5952ddf7004de8 (patch) | |
| tree | eccafd8f15a4f5632c6a9f3ee3e1cc2e8faa58dd /www/scripts | |
| parent | 5cd9f8c27d069e83058400289fcae17cd96c777c (diff) | |
fix blog
Diffstat (limited to 'www/scripts')
| -rw-r--r-- | www/scripts/blog.js | 5 | ||||
| -rw-r--r-- | www/scripts/constants.js | 4 |
2 files changed, 4 insertions, 5 deletions
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" |
