diff options
author | Anthony Wang | 2024-11-24 12:20:49 -0500 |
---|---|---|
committer | Anthony Wang | 2024-11-24 12:20:49 -0500 |
commit | 8dfec4f9e5d6479804daf5818d16cbe6e4e54c63 (patch) | |
tree | 3a1690f4503e92711f4fc0e0c468bb3eefc3dd25 | |
parent | 4e38e9498ae198af896ee8c2a121956b463f6683 (diff) |
Don't include quotes JS code on every page, put it in js/quotes.js the Hugo way™
-rw-r--r-- | assets/js/quotes.js | 53 | ||||
-rw-r--r-- | layouts/partials/footer.html | 59 |
2 files changed, 57 insertions, 55 deletions
diff --git a/assets/js/quotes.js b/assets/js/quotes.js new file mode 100644 index 0000000..d6b0e3b --- /dev/null +++ b/assets/js/quotes.js @@ -0,0 +1,53 @@ +var 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.", + "The kid was deliberately and maliciously watching television at him.", // Douglas Adams + "How anNOYing is it thAT your faVORite mechaNIcal poeTry on whEELS can't even RUN THE SAME GAUGE as the counTRY nextdoor?!", + "We're trying to figure out how to report capital gains from time traveling on our tax returns.", + "The universe tends toward maximum irony. Don't push it.", // Jamie Zawinski + "I bet I just made you refresh the page 110010 times.", // MAKE SURE THIS IS NUM QUOTES + "source ~/.bash_history", // https://www.explainxkcd.com/wiki/index.php/1975:_Right_Click + "echo source ~/.bashrc >> ~/.bashrc", // Same as above + "echo 0 | sudo tee /sys/devices/system/cpu/cpu*/online", + "It tastes like I'm a giraffe.", + "憂鬱的臺灣烏龜", + "If you refuse this task, I'll break the fourth wall again!", + "This quote is intentionally left blank.", + "Nobody actually reads these.", + "It will make you laugh! It will make you cry! It will make you try the mayonnaise-frosted pie!", + "Icicles? Tide pods? No, typos.", + "Today, the universe will cease to exist due to rain.", + "Her mission, if she chose to accept it (which she did, begrudgingly), was to decrease her own IQ.", + "What's next? Pikachu with a buzz cut?", + "A(n, 5) doesn't have a name, but scares children.", // https://web.stanford.edu/class/archive/cs/cs166/cs166.1166/lectures/16/Small16.pdf + "Delivering... Parcel left country of origin... Parcel destroyed", + "I think, therefore I spam.", + "Electrocuted medium rare piano, right there!", + "Sometimes you suck and sometimes life sucks you.", + "Think about how you verb those nouns that you have.", + "Probably want to get vaccinated before time traveling.", + "Imagine what the banana would look like if it could segfault.", + "Whenever something easy does not seem easy, it's probably a typo.", + "Put a parenthesis around the banana!", + "The math is not mathing here.", + "I was thinking before I was thinking.", + "The next time you have a fever, I want you to dynamic program your way out of it!", + "I promised you Saddam Hussein's LinkedIn and all you got was a Chinese Linux distro cartoon rabbit girl mascot.", + "弱电间 Weak Room", + "And from that day onwards Zhou was a little bit better at actually cooking his flashcards like a cool instant noodles (IN) chef.", + "I have to fold myself to solve it.", + "They're compressing ramen with zstd now?", + "I forgot there was a camel on my head.", + "Nerd (nerd enjoying recursive definitions)", + "No proofs, just mouse haircut.", + "Breaking news: MIT researchers have discovered that imaginary numbers don't actually exist!", + "How do you make weapons out of candy canes? You suck.", + "You gargle salt, you gurgle languages.", + "It's as easy as buffalo chicken pizza.", + "I can walk faster than 30 FPS.", + "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("'", "’") + "”"; diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index cd14364..743b6e1 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,59 +1,8 @@ <footer class="footer"> <div class="quote">“To Be Filled By O.E.M.”</div> <div>CC BY-SA 4.0</div> - <script> - var 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.", - "The kid was deliberately and maliciously watching television at him.", // Douglas Adams - "How anNOYing is it thAT your faVORite mechaNIcal poeTry on whEELS can't even RUN THE SAME GAUGE as the counTRY nextdoor?!", - "We're trying to figure out how to report capital gains from time traveling on our tax returns.", - "The universe tends toward maximum irony. Don't push it.", // Jamie Zawinski - "I bet I just made you refresh the page 110010 times.", // MAKE SURE THIS IS NUM QUOTES - "source ~/.bash_history", // https://www.explainxkcd.com/wiki/index.php/1975:_Right_Click - "echo source ~/.bashrc >> ~/.bashrc", // Same as above - "echo 0 | sudo tee /sys/devices/system/cpu/cpu*/online", - "It tastes like I'm a giraffe.", - "憂鬱的臺灣烏龜", - "If you refuse this task, I'll break the fourth wall again!", - "This quote is intentionally left blank.", - "Nobody actually reads these.", - "It will make you laugh! It will make you cry! It will make you try the mayonnaise-frosted pie!", - "Icicles? Tide pods? No, typos.", - "Today, the universe will cease to exist due to rain.", - "Her mission, if she chose to accept it (which she did, begrudgingly), was to decrease her own IQ.", - "What's next? Pikachu with a buzz cut?", - "A(n, 5) doesn't have a name, but scares children.", // https://web.stanford.edu/class/archive/cs/cs166/cs166.1166/lectures/16/Small16.pdf - "Delivering... Parcel left country of origin... Parcel destroyed", - "I think, therefore I spam.", - "Electrocuted medium rare piano, right there!", - "Sometimes you suck and sometimes life sucks you.", - "Think about how you verb those nouns that you have.", - "Probably want to get vaccinated before time traveling.", - "Imagine what the banana would look like if it could segfault.", - "Whenever something easy does not seem easy, it's probably a typo.", - "Put a parenthesis around the banana!", - "The math is not mathing here.", - "I was thinking before I was thinking.", - "The next time you have a fever, I want you to dynamic program your way out of it!", - "I promised you Saddam Hussein's LinkedIn and all you got was a Chinese Linux distro cartoon rabbit girl mascot.", - "弱电间 Weak Room", - "And from that day onwards Zhou was a little bit better at actually cooking his flashcards like a cool instant noodles (IN) chef.", - "I have to fold myself to solve it.", - "They're compressing ramen with zstd now?", - "I forgot there was a camel on my head.", - "Nerd (nerd enjoying recursive definitions)", - "No proofs, just mouse haircut.", - "Breaking news: MIT researchers have discovered that imaginary numbers don't actually exist!", - "How do you make weapons out of candy canes? You suck.", - "You gargle salt, you gurgle languages.", - "It's as easy as buffalo chicken pizza.", - "I can walk faster than 30 FPS.", - "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("'", "’") + "”"; - </script> + {{ with resources.Get "js/quotes.js" | resources.Minify }} + {{ .Publish }} + {{ end }} + <script src="/js/quotes.min.js"></script> </footer> |