Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

<title>Silly Story Generator</title> <style> body { font-family: Arial; text-align: center; padding: 20px; background-color: #ced1d4; } h1 { color: #333; } #story { margin: 20px auto; padding: 15px; width: 80%; max-width: 600px; background-color: #fffae6; border: 2px dashed #e76e35; border-radius: 9px; font-size: 18px; } button { padding: 10px 20px; font-size: 16px; background-color: #ffa500; color: white; border: none; border-radius: 5px; cursor: pointer; } button:hover { background-color: #ff8c00; } input { padding: 8px; font-size: 16px; margin-bottom: 10px; width: 200px; text-align: center; border-radius: 5px; border: 1px solid #ccc; } </style>

Silly Story Generator

Enter a name (optional) and click the button to generate a random silly story!

Your silly story will appear here!
Generate Story <script> const characters = ['a talking banana', 'a sleepy dragon', 'a dancing robot', 'a mischievous cat', 'a clumsy wizard']; const actions = ['won a dance competition', 'ate 100 pancakes', 'invented a flying car', 'fell into a mud puddle', 'tried to juggle flamingos']; const locations = ['on the moon', 'in a magical forest', 'at the bottom of the ocean', 'inside a volcano', 'at a spooky haunted house']; function getRandomElement(arr) { return arr[Math.floor(Math.random() * arr.length)]; } function generateStory() { const nameInput = document.getElementById("nameInput").value.trim(); const name = nameInput || "Ashiq"; const character = getRandomElement(characters); const action = getRandomElement(actions); const location = getRandomElement(locations); document.getElementById("story").innerText = `${name} met ${character} who ${action} ${location}!`; } </script>

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors