aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2024-11-24 12:29:30 -0500
committerAnthony Wang2024-11-24 12:29:30 -0500
commit0b3a2522cfef577a1d3baf825f03a2499a51184f (patch)
tree5c55f180b640d1d562fb1e59b1d61cea619be513
parent8dfec4f9e5d6479804daf5818d16cbe6e4e54c63 (diff)
Oh turns out the theme is smarter than me and don't push broken stuff to production to see if it'll work because it won't
-rw-r--r--assets/js/quotes.js9
-rw-r--r--layouts/partials/footer.html5
2 files changed, 7 insertions, 7 deletions
diff --git a/assets/js/quotes.js b/assets/js/quotes.js
index d6b0e3b..8a47070 100644
--- a/assets/js/quotes.js
+++ b/assets/js/quotes.js
@@ -1,4 +1,4 @@
-var quotes = [
+quotes = [
"I'm not young enough to know everything.", // J. M. Barrie
"An ideal french fry is one dimensional.",
"I want to see the universe in debug mode.",
@@ -49,5 +49,8 @@ var quotes = [
"And that brings us to Next House, formerly home to the world's finest oyster crackers before suffering the Great Oyster Cracker Extinction Event.",
"This opens up a whole world of possibilities that I will ignore.",
"HELP I'M TRAPPED IN A CSS FACTORY"
-]
-document.querySelector(".quote").innerHTML = "“" + quotes[Math.floor(Math.random() * quotes.length)].replace("'", "’") + "”";
+];
+
+function setRandomQuote() {
+ document.querySelector(".quote").innerHTML = "“" + quotes[Math.floor(Math.random() * quotes.length)].replace("'", "’") + "”";
+}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 743b6e1..d4b09c4 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,8 +1,5 @@
<footer class="footer">
<div class="quote">&ldquo;To Be Filled By O.E.M.&rdquo;</div>
<div>CC BY-SA 4.0</div>
- {{ with resources.Get "js/quotes.js" | resources.Minify }}
- {{ .Publish }}
- {{ end }}
- <script src="/js/quotes.min.js"></script>
+ <script>setRandomQuote()</script>
</footer>