<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sloppa Generator</title>
<style>
body, html {
height: 100%;
margin: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-family: Arial, sans-serif;
}
.emoji {
font-size: 48pt;
}
.generated-text {
margin-top: 20px;
font-size: 24pt;
}
button {
margin-top: 20px;
font-size: 18pt;
padding: 10px 20px;
cursor: pointer;
}
</style>
</head>
<body>
<div class="emoji" id="emojiOutput">π€</div>
<div class="generated-text" id="textOutput">...</div>
<button onclick="generateSloppa()">Generate Sloppa</button>
<script>
const tendencies = [
{name: 'clear and yellow', emoji: 'π‘'},
{name: 'abang,', emoji: 'πͺ'},
{name: 'maoist', emoji: 'π¨π³'},
{name: 'democrat', emoji: 'πΊπΈ'},
{name: 'Thomist', emoji: 'π»π¦'},
{name: 'Heideggerian', emoji: 'π©πͺ'},
{name: 'Pharr away', emoji: 'βοΈ'},
{name: 'PY1011-themed', emoji: 'π'},
{name: 'Swiss', emoji: 'π¨π'},
];
const foods = [
{name: 'pizza', emoji: 'π'},
{name: 'turkey', emoji: 'π¦'},
{name: 'burger', emoji: 'π'},
{name: 'chicken nugget', emoji: 'π'},
{name: 'shawarma', emoji: 'π―'},
];
const characteristics = [
{name: 'the ocky way', emoji: 'π½'},
{name: 'with floppa characteristics', emoji: 'π±'},
{name: 'with bingus characteristics', emoji: 'π§ '},
{name: 'with InΓ©s characteristics', emoji: 'π«π·'},
{name: 'at the hawker centre', emoji: 'πΈπ¬'},
{name: 'to fool the unwise', emoji: 'π΄'},
{name: 'with based NATO', emoji: 'πͺ'},
{name: 'from Blackpool', emoji: 'π¬π§'},
{name: 'in cider town', emoji: 'π»'}
];
function getRandomInt(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function generateSloppa() {
let sloppaText = '';
let sloppaEmoji = '';
let include = getRandomInt(1, 3);
if (include === 1 || include === 3) {
let tendency = tendencies[getRandomInt(0, tendencies.length - 1)];
sloppaText += tendency.name + ' ';
sloppaEmoji += tendency.emoji;
}
if (include === 2 || include === 3) {
let foodSegment = '';
let foodEmojiSegment = '';
let foodCount = getRandomInt(2, 4);
let chosenFoods = new Set();
while(chosenFoods.size < foodCount) {
let randomIndex = getRandomInt(0, foods.length - 1);
if (!chosenFoods.has(randomIndex)) {
chosenFoods.add(randomIndex);
let food = foods[randomIndex];
foodSegment += foodSegment ? ' ' + food.name : food.name;
foodEmojiSegment += food.emoji;
}
}
sloppaText += foodSegment;
sloppaEmoji += foodEmojiSegment;
}
if (include === 1 || include === 2) {
let characteristic = characteristics[getRandomInt(0, characteristics.length - 1)];
sloppaText += ' ' + characteristic.name;
sloppaEmoji += characteristic.emoji;
}
document.getElementById('textOutput').textContent = sloppaText.trim();
document.getElementById('emojiOutput').textContent = sloppaEmoji;
}
</script>
</body>
</html>