Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
pajardev authored Jun 22, 2024
1 parent bf88ead commit 834abbc
Showing 1 changed file with 192 additions and 0 deletions.
192 changes: 192 additions & 0 deletions CekSemua.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cek Semua</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
text-align: center;
padding: 20px;
text-transform: uppercase;
}
.container {
background-color: #fff;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
max-width: 500px;
margin: 0 auto;
}
.button {
background-color: #007BFF;
color: white;
border: none;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 10px 5px;
cursor: pointer;
border-radius: 5px;
}
.button:hover {
background-color: #0056b3;
}
.message-container {
margin-top: 20px;
text-align: center;
}
.message {
font-size: 18px;
font-weight: bold;
text-transform: uppercase;
padding: 10px 20px;
background-color: #007BFF;
color: white;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
display: inline-block;
}
.input-container {
margin-bottom: 20px;
}
.input-container input {
padding: 10px;
font-size: 16px;
width: calc(100% - 22px);
border-radius: 5px;
border: 1px solid #ccc;
text-transform: none;
}
</style>
</head>
<body>

<div class="container">
<h1>Cek Apa Aja</h1>
<div class="input-container">
<input type="text" id="fullName" placeholder="Masukkan Nama Lengkap Anda">
</div>
<button class="button" onclick="checkKhodam()">Cek Khodam</button>
<button class="button" onclick="checkSempak()">Cek Warna Sempak</button>
<button class="button" onclick="checkSaldo()">Cek Saldo</button>
<button class="button" onclick="checkFuture()">Cek Masa Depan</button>
<button class="button" onclick="checkPartner('female')">Cek Nama Pasangan Perempuan</button>
<button class="button" onclick="checkPartner('male')">Cek Nama Pasangan Laki-Laki</button>
<div class="message-container">
<div class="message" id="message"></div>
</div>
</div>

<script>
function randomArrayElem(arr) {
return arr[Math.floor(Math.random() * arr.length)];
}

function getName() {
return document.getElementById('fullName').value;
}

function displayMessage(message) {
const messageContainer = document.getElementById('message');
messageContainer.innerText = message.toUpperCase();
}

function checkKhodam() {
const name = getName();
if (!name) {
alert('Masukkan nama lengkap Anda terlebih dahulu.');
return;
}
const messages = [
`${name}, kuda terbang: kamu selalu bermimpi sedang terbang`,
`${name}, janda pirang: kamu akan selalu senang`,
`${name}, sempak bolong: kamu akan selalu tertawa`,
`${name}, ulat sagu: kamu selalu suka bergerak`,
`${name}, cicak salto: kamu selalu merasa pusing`
];
displayMessage(randomArrayElem(messages));
}

function checkSempak() {
const name = getName();
if (!name) {
alert('Masukkan nama lengkap Anda terlebih dahulu.');
return;
}
const colors = [
"Merah",
"Biru",
"Hijau",
"Kuning",
"Hitam",
"Putih",
"Ungu",
"Pink"
];
displayMessage(`${name}, warna sempak anda adalah: ${randomArrayElem(colors)}`);
}

function checkSaldo() {
const name = getName();
if (!name) {
alert('Masukkan nama lengkap Anda terlebih dahulu.');
return;
}
const saldo = Math.floor(Math.random() * 1000000);
displayMessage(`${name}, saldo anda adalah: rp ${saldo.toLocaleString()}`);
}

function checkFuture() {
const name = getName();
if (!name) {
alert('Masukkan nama lengkap Anda terlebih dahulu.');
return;
}
const futures = [
`${name}, kamu akan mendapatkan kejutan menyenangkan.`,
`${name}, karir kamu akan berkembang pesat.`,
`${name}, kamu akan bertemu seseorang yang istimewa.`,
`${name}, kamu akan kaya raya`,
`${name}, kamu akan melakukan perjalanan yang tak terlupakan.`
];
displayMessage(randomArrayElem(futures));
}

function checkPartner(gender) {
const name = getName();
if (!name) {
alert('Masukkan nama lengkap Anda terlebih dahulu.');
return;
}
const femaleNames = [
"Cici",
"Evi",
"Yanti",
"Syifa",
"Indah",
"Yuni",
"Citra",
"Lia"
];
const maleNames = [
"Andika",
"Udin",
"Dedi",
"Fahri",
"Hendra",
"Iqbal",
"Joko",
"Anto"
];
const names = gender === 'female' ? femaleNames : maleNames;
displayMessage(`${name}, nama pasangan anda adalah: ${randomArrayElem(names)}`);
}
</script>

</body>
</html>

0 comments on commit 834abbc

Please sign in to comment.