at master 2.1 kB view raw
1--- 2import Label from "../Label.astro" 3--- 4<script> 5 interface Quote { 6 quote: string, 7 quotee: string, 8 } 9 const quoteElement = document.getElementById("quote") as HTMLElement 10 const quoteeElement = document.getElementById("quotee") as HTMLElement 11 12 const quotes: Quote[] = [ 13 { quote: "America is a nation that can be defined in a single word: asufutimaehaehfutbw", quotee: "Joseph Robinette Biden Jr."}, 14 { quote: "What if they- what if anything- what if a bomb drops on your head right now?", quotee: "Donald John Trump"}, 15 { quote: "This is a tough hurricane. One of the wettest we've ever seen from the standpoint of water.", quotee: "Donald John Trump"}, 16 { quote: "Heh heh heh, oh it's focused. I say it's err- I think it's- I- I- I haven't-- look.", quotee: "Joseph Robinette Biden Jr."}, 17 { quote: "the color orange is named after the fruit", quotee: "Elon Reeve Musk" }, 18 { quote: "I'm excited about electric school busses, I love electric school busses, I just love them..", quotee: "Kamala Devi Harris"}, 19 { quote: "How dare we speak marry christmas! How dare we!", quotee: "Kamala Devi Harris"}, 20 { quote: "One thing that really encourages me is AI. I love AI. I love ChatGPT. I love it. ChatGPT is frankly fantastic.", quotee: "Alexander Boris de Pfeffel Johnson" }, 21 { quote: "I am a fighter and not a quitter!", quotee: "Elizabeth Mary Truss" }, 22 { quote: "I call again for an immediate ceasefire in Gaza, the return of the sausages- the hostages..", quotee: "Keir Rodney Starmer" }, 23 ] 24 const quote: Quote = quotes[Math.floor(Math.random()*quotes.length)] 25 26 quoteElement.textContent = '"' + quote.quote + '"' 27 quoteeElement.textContent = "- " + quote.quotee 28</script> 29<span class="relative p-3 -mt-px border border-ctp-surface0 text-sm w-full"> 30 <Label name="Quote"/> 31 <div class="flex flex-col text-sm gap-1"> 32 <span id="quote" class="italic"></span> 33 <span id="quotee" class="w-full text-right"></span> 34 </div> 35</span>