Repository navigation
Expand file tree
/
Copy pathspreview.html
More file actions
55 lines (49 loc) · 2.15 KB
/
Copy pathspreview.html
File metadata and controls
55 lines (49 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="WDD 131 - Web Fundamentals by Kim Brown, Web Development, JavaScript, CSS, HTML">
<meta name="author" content="Kim Brown">
<title>Review Confirmation</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles/spform.css">
<script src="scripts/spinalflow.js" defer></script>
</head>
<body>
<header class="title-container">
<h1>Review Confirmation</h1>
</header>
<main class="container">
<h2>Thank you for your review!</h2>
<p>Your review has been submitted successfully.</p>
<p>Reviews Submitted: <span id="review-count">0</span></p>
</main>
<footer>
<p>© <span id="currentyear"></span> 🏴 Kim Brown 🏴 Edinburgh, Scotland
🏴</p>
<p id="lastModified"></p>
</footer>
<script>
// Dynamically update the review count using localStorage
document.addEventListener("DOMContentLoaded", () => {
let reviewCount = localStorage.getItem("reviewCount") || 0;
reviewCount++;
localStorage.setItem("reviewCount", reviewCount);
document.getElementById("review-count").textContent = reviewCount;
});
// Dynamically set the current year in the footer
const currentYearElement = document.getElementById("currentyear");
if (currentYearElement) {
currentYearElement.textContent = new Date().getFullYear();
}
// Display the last modified date in the footer
const lastModifiedElement = document.getElementById("lastModified");
if (lastModifiedElement) {
lastModifiedElement.textContent = `Last Modified: ${document.lastModified}`;
}
</script>
</body>
</html>