Skip to content

Commit

Permalink
Testing free version of ChatGPT to make apps
Browse files Browse the repository at this point in the history
  • Loading branch information
ToonTalk committed Sep 2, 2024
1 parent 11e3588 commit b10a230
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
20 changes: 20 additions & 0 deletions apps/jokes by free chatgpt version/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Joke Teller</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<h1>Random Joke Generator</h1>
<div id="joke" class="joke-container">
Click the button to hear a joke!
</div>
<button onclick="tellJoke()">Tell Me a Joke</button>
</div>

<script src="script.js"></script>
</body>
</html>
13 changes: 13 additions & 0 deletions apps/jokes by free chatgpt version/script.js
Original file line number Diff line number Diff line change
@@ -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;
}
42 changes: 42 additions & 0 deletions apps/jokes by free chatgpt version/styles.css
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit b10a230

Please sign in to comment.