From 01f3de7f3b57c5f864e880b1988c287f08ad41f4 Mon Sep 17 00:00:00 2001 From: rattatwinko Date: Mon, 21 Jul 2025 17:00:04 +0200 Subject: [PATCH] html --- html/dir/index.html | 14 ++++++++++++++ html/index.html | 20 ++++++++++++++++++++ html/script.js | 22 ++++++++++++++++++++++ html/styles.css | 3 +++ 4 files changed, 59 insertions(+) create mode 100644 html/dir/index.html create mode 100644 html/index.html create mode 100644 html/script.js create mode 100644 html/styles.css diff --git a/html/dir/index.html b/html/dir/index.html new file mode 100644 index 0000000..bc2efb7 --- /dev/null +++ b/html/dir/index.html @@ -0,0 +1,14 @@ + + + + + + + RSTTP2 + + +

This is a Page in a SubFolder!

+ Go back + + + diff --git a/html/index.html b/html/index.html new file mode 100644 index 0000000..cc80df3 --- /dev/null +++ b/html/index.html @@ -0,0 +1,20 @@ + + + + + + + Rust HTTP + + + + +

Hello from RSTTP

+

+

+ + + Go to the second Page + + + diff --git a/html/script.js b/html/script.js new file mode 100644 index 0000000..189d452 --- /dev/null +++ b/html/script.js @@ -0,0 +1,22 @@ +document.addEventListener("DOMContentLoaded", () => { + const dateElement = document.getElementById("javascriptdate"); + + function updateDateTime() { + const now = new Date(); + dateElement.textContent = `Current date and time: ${now.toLocaleString()}`; + } + + // Update once on load + updateDateTime(); + + // Optional: Update every second + setInterval(updateDateTime, 1000); + + // Fun interaction: click the title to change color + const header = document.querySelector(".specialboi"); + header.addEventListener("click", () => { + header.style.color = header.style.color === "teal" ? "crimson" : "teal"; + }); +}); + +console.log("shit happened"); diff --git a/html/styles.css b/html/styles.css new file mode 100644 index 0000000..835365e --- /dev/null +++ b/html/styles.css @@ -0,0 +1,3 @@ +h1.specialboi { + font-style: italic; +}