summaryrefslogtreecommitdiff
path: root/www/scripts
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2026-06-13 19:06:09 +0800
committeraltaf-creator <dev@altafcreator.com>2026-06-13 19:06:09 +0800
commit1b14996290f228a329d83c164e50c27364cc0a22 (patch)
tree14e978e3c17674f36fd36d4d60b278a7e0c788ea /www/scripts
parentb9b627ca77048191577b41f40c352a9ce67ef61b (diff)
blog in progress, NOT READY FOR PRODHEADmaster
Diffstat (limited to 'www/scripts')
-rw-r--r--www/scripts/blog.js5
-rw-r--r--www/scripts/constants.js4
-rw-r--r--www/scripts/iframe.js11
3 files changed, 16 insertions, 4 deletions
diff --git a/www/scripts/blog.js b/www/scripts/blog.js
index c7c64f2..b5ad89c 100644
--- a/www/scripts/blog.js
+++ b/www/scripts/blog.js
@@ -29,7 +29,7 @@ function postCard(post, id) {
var title = post.title;
var date = post.date;
- var author = post.author;
+ var description = post.description;
var tags = post.tags;
var thumbnail = post.thumbnail;
@@ -45,7 +45,8 @@ function postCard(post, id) {
${evaluatedTags}
</div>
<a href="/blog/${id}" class="link"><h2>${title}</h2></a>
- <p>${date}</p>
+ <p class="half-opacity-text"><i class="fa-solid fa-calendar"></i> ${date}</p>
+ <p>${description}</p>
</div>
</div>
`
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"
diff --git a/www/scripts/iframe.js b/www/scripts/iframe.js
new file mode 100644
index 0000000..68eff8d
--- /dev/null
+++ b/www/scripts/iframe.js
@@ -0,0 +1,11 @@
+function iframeLoad(id) {
+ const iframeContainer = document.getElementById(id);
+ const iframes = iframeContainer.querySelectorAll(":scope > iframe"); // this a NodeList
+ const warning = iframeContainer.querySelector(".iframe-manual-warning");
+
+ warning.remove();
+
+ iframes.forEach((frame, _) => {
+ frame.setAttribute("src", frame.getAttribute("data-src"));
+ });
+}