From b10a2303bb542d151c7d2e1976dfc5b7cdf22154 Mon Sep 17 00:00:00 2001 From: Ken Kahn Date: Mon, 2 Sep 2024 16:12:22 +0100 Subject: [PATCH] Testing free version of ChatGPT to make apps --- apps/jokes by free chatgpt version/index.html | 20 +++++++++ apps/jokes by free chatgpt version/script.js | 13 ++++++ apps/jokes by free chatgpt version/styles.css | 42 +++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 apps/jokes by free chatgpt version/index.html create mode 100644 apps/jokes by free chatgpt version/script.js create mode 100644 apps/jokes by free chatgpt version/styles.css diff --git a/apps/jokes by free chatgpt version/index.html b/apps/jokes by free chatgpt version/index.html new file mode 100644 index 0000000..38f1d15 --- /dev/null +++ b/apps/jokes by free chatgpt version/index.html @@ -0,0 +1,20 @@ + + + + + + Joke Teller + + + +
+

Random Joke Generator

+
+ Click the button to hear a joke! +
+ +
+ + + + diff --git a/apps/jokes by free chatgpt version/script.js b/apps/jokes by free chatgpt version/script.js new file mode 100644 index 0000000..a66814b --- /dev/null +++ b/apps/jokes by free chatgpt version/script.js @@ -0,0 +1,13 @@ +const jokes = [ + "Why don't scientists trust atoms? Because they make up everything!", + "I told my wife she was drawing her eyebrows too high. She looked surprised.", + "Why don't skeletons fight each other? They don't have the guts.", + "What do you call fake spaghetti? An impasta!", + "Why was the math book sad? Because it had too many problems." +]; + +function tellJoke() { + const randomIndex = Math.floor(Math.random() * jokes.length); + const joke = jokes[randomIndex]; + document.getElementById('joke').innerText = joke; +} diff --git a/apps/jokes by free chatgpt version/styles.css b/apps/jokes by free chatgpt version/styles.css new file mode 100644 index 0000000..beda6c6 --- /dev/null +++ b/apps/jokes by free chatgpt version/styles.css @@ -0,0 +1,42 @@ +body { + font-family: Arial, sans-serif; + background-color: #f4f4f4; + margin: 0; + padding: 0; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; +} + +.container { + text-align: center; + background-color: white; + padding: 20px; + border-radius: 10px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); +} + +h1 { + color: #333; +} + +.joke-container { + margin: 20px 0; + font-size: 1.2em; + color: #555; +} + +button { + background-color: #007BFF; + color: white; + padding: 10px 20px; + border: none; + border-radius: 5px; + cursor: pointer; + font-size: 1em; +} + +button:hover { + background-color: #0056b3; +}