Added initial content on top of standard pages

This commit is contained in:
GeekOfWires 2025-07-15 13:19:34 -04:00
parent 612e564b31
commit 36d001c589
6 changed files with 100 additions and 29 deletions

12
static/js/site.js Normal file
View file

@ -0,0 +1,12 @@
const quotesForPage = {
getQuoteData: async function() {
return (await axios.get('/static/json/quotes.json')).data;
},
getRandomQuoteAsync: async function() {
let quotes = (await quotesForPage.getQuoteData()).christmasQuotes;
let indexChoice = Math.floor(Math.random() * quotes.length);
return quotes[indexChoice];
}
}