24 lines
1.2 KiB
JavaScript
Executable File
24 lines
1.2 KiB
JavaScript
Executable File
document.addEventListener('DOMContentLoaded', function () {
|
|
const haikus = [
|
|
"missed sunset's last glow\n city lights beneath night's veil \n beauty shared hearts slow",
|
|
"through winding trails home\n songs weave stories, hearts roam free\n in tune we find home",
|
|
"sea lions play, waves crash\n smoke swirls, words flow, time's slow dash\n cove whispers, bonds flash",
|
|
"ramen bowls steam bright\n little tokyo in sight\n shared hearts, culture's light",
|
|
"a freckled face gleams\n under streetlights when a cat\n meows further away",
|
|
"miles stretch wide and vast\n yet in heartbeats ur so near\n stars bridging our gap",
|
|
"waves of longing surge,\n tonights flood, a deep sorrow\n drowning in your absence",
|
|
];
|
|
|
|
function getRandomHaiku() {
|
|
const index = Math.floor(Math.random() * haikus.length);
|
|
return haikus[index];
|
|
}
|
|
|
|
function displayHaiku() {
|
|
const quoteElement = document.getElementById('haiku');
|
|
quoteElement.innerText = getRandomHaiku();
|
|
}
|
|
|
|
displayHaiku();
|
|
});
|