|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | + <title>Ask JD Vance</title> |
| 7 | + <style> |
| 8 | + body { |
| 9 | + font-family: Arial, sans-serif; |
| 10 | + text-align: center; |
| 11 | + margin-top: 50px; |
| 12 | + } |
| 13 | + #jd-vance-image { |
| 14 | + width: 200px; |
| 15 | + border-radius: 10px; |
| 16 | + margin-bottom: 20px; |
| 17 | + } |
| 18 | + #response { |
| 19 | + margin-top: 20px; |
| 20 | + font-weight: bold; |
| 21 | + } |
| 22 | + .image-source { |
| 23 | + font-size: 0.8em; |
| 24 | + color: gray; |
| 25 | + } |
| 26 | + </style> |
| 27 | +</head> |
| 28 | +<body> |
| 29 | + <h1>Ask JD Vance If Your Country is Random</h1> |
| 30 | + <img id="jd-vance-image" src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/83/Senator_Vance_official_portrait._118th_Congress.jpg/640px-Senator_Vance_official_portrait._118th_Congress.jpg" alt="JD Vance"> |
| 31 | + <p class="image-source">Image source: Wikimedia Commons</p> |
| 32 | + <label for="country">Enter your country:</label> |
| 33 | + <input type="text" id="country" placeholder="Type your country here"> |
| 34 | + <button onclick="checkCountry()">Ask JD Vance</button> |
| 35 | + <p id="response"></p> |
| 36 | + |
| 37 | + <script> |
| 38 | + function checkCountry() { |
| 39 | + const country = document.getElementById("country").value.trim().toLowerCase(); |
| 40 | + const randomResponses = [ |
| 41 | + "Oh absolutely, that country is more random than a dice roll in a tornado.", |
| 42 | + "Yeah, that country is as random as pineapple on pizza.", |
| 43 | + "Definitely. That place is so random, even Google Maps gets lost there.", |
| 44 | + "That country is the definition of 'random' in the dictionary.", |
| 45 | + "Random? More like a glitch in the Matrix.", |
| 46 | + "For sure. That country is more random than a cat deciding it likes water.", |
| 47 | + "100%. Even aliens would be like 'where even is that?'.", |
| 48 | + "Absolutely. That country is like a side quest in a video game nobody plays.", |
| 49 | + "No doubt. If randomness had a flag, it would be yours.", |
| 50 | + "Yep. That country is so random, it makes a shuffled playlist look organized." |
| 51 | + ]; |
| 52 | + let response; |
| 53 | + |
| 54 | + if (["usa", "united states", "united states of america", "america", "us"].includes(country)) { |
| 55 | + response = "With respect, I think it's disrespectful that you come here and suggest our country is random...."; |
| 56 | + } else if (country === "russia" || country === "ukraine") { |
| 57 | + response = "Duh, no"; |
| 58 | + } else if (country) { |
| 59 | + response = randomResponses[Math.floor(Math.random() * randomResponses.length)]; |
| 60 | + } else { |
| 61 | + response = "Please enter a valid country."; |
| 62 | + } |
| 63 | + |
| 64 | + document.getElementById("response").textContent = response; |
| 65 | + } |
| 66 | + </script> |
| 67 | +</body> |
| 68 | +</html> |
0 commit comments