-
Notifications
You must be signed in to change notification settings - Fork 1
/
lotr-memes.html
144 lines (114 loc) · 5.47 KB
/
lotr-memes.html
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!DOCTYPE html>
<html>
<head>
<title>Today's LOTR Meme</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LOTR Memes</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="assets/favicon.png" type="image/png">
<link rel="stylesheet" type="text/css" href="styles.css">
<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=Noto+Sans+JP:wght@300&family=Roboto+Mono:wght@300&display=swap"
rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/ua-parser-js/dist/ua-parser.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script type="text/javascript">
(function (c, l, a, r, i, t, y) {
c[a] = c[a] || function () { (c[a].q = c[a].q || []).push(arguments) };
t = l.createElement(r); t.async = 1; t.src = "https://www.clarity.ms/tag/" + i;
y = l.getElementsByTagName(r)[0]; y.parentNode.insertBefore(t, y);
})(window, document, "clarity", "script", "ly8bu4nldl");
</script>
</head>
<body>
<header>
<!-- header content -->
</header>
<main>
<!-- page content -->
<body>
</div>
<div class="percentage_container">
<p class="percentage" id="percentage">year percentage loading...</p>
<script src="meme-script.js" defer></script>
</div>
<div>
<div class="loader" id="memeLoader"></div>
<img class="meme" src="" alt="lord of the rings meme for today" style="display: none;">
</div>
<script> // Get the current date, insert image and replace title
// Get the current date.
var date = new Date();
// Get the date in the format "YYYY-MM-DD".
var formattedDate = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
// Set the page title to the formatted date.
document.title = "LOTR Meme | " + formattedDate;
// Get the image URL.
var imageUrl = "https://findirfin.dev/lotr-memes/images/" + formattedDate + ".png";
// Create an image element.
var image = document.createElement("img");
// Set the image's src attribute to the image URL.
image.src = imageUrl;
console.log(image);
// Replace the existing image with the new image.
document.querySelector(".meme").src = imageUrl;
</script>
<div class="caption">
I do not own any of these images, they are sourced from all over the information super highway.
</div>
<div class="button-container">
<button id="shareButton" class="share-button">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="18" cy="5" r="3"></circle>
<circle cx="6" cy="12" r="3"></circle>
<circle cx="18" cy="19" r="3"></circle>
<line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line>
<line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line>
</svg>
Share Meme
</button>
</div>
<div class="donation-space">
<button type="button" class="collapsible">Comments</button>
<div class="content">
<div class="comments">
<p class="disclaimer">
Comments are reset for every meme. Check <a
href="https://github.com/findirfin/findirfin.dev-interactions/issues">github</a> for
previous
comments.
</p>
<script src="https://utteranc.es/client.js" repo="findirfin/findirfin.dev-interactions"
issue-term="title" label="💬interaction" theme="dark-blue" crossorigin="anonymous" async>
</script>
</div>
</div>
<div class="upload">
<a href="https://forms.gle/mdJVKnBrcrFN3Cm37">
<p>Submit a Meme</p>
</a>
</div>
<script>
var coll = document.getElementsByClassName("collapsible");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function () {
this.classList.toggle("active");
var content = this.nextElementSibling;
if (content.style.display === "block") {
content.style.display = "none";
} else {
content.style.display = "block";
}
});
}
</script>
</main>
<footer>
<p><a href="https://findirfin.dev/privacy">Privacy</a>
</footer>
</body>
</html>