kloeckner.com.ar

a backup of my entire webpage
Index Commits Files Refs README LICENSE
commit a6dd05a1245eb2a64e9c5d216de486787c7ceed2
parent 32bf392da2da95e7476095bd2a081e11c81d5048
Author: mjkloeckner <martinjkloeckner@gmail.com>
Date:   Sat, 17 Feb 2024 21:55:26 -0300

Add js script snippet to count blog posts

Diffstat:
Mindex.html | 14+++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/index.html b/index.html
@@ -44,7 +44,19 @@
                 <!--#include virtual="/common/latest_uploads.shtml" -->
             </ul>
 
-            <p>See more <a href="/blog">blog entries</a></p>
+            <p id=blog-entries>See all <a href="/blog">blog entries</a></p>
+
+            <script>
+                var file;
+                fetch('/common/blog_index.shtml')
+                    .then(response => response.text())
+                    .then((data) => {
+                        var match = data.match(/\r?\n/g);
+                        // alert(match.length);
+                        var content = document.getElementById('blog-entries');
+                        content.innerHTML += " (" + match.length + ")";
+                    })
+            </script>
             <hr class="article_bottom_bar">
         </article>