Calculator Tools Calculator Tools
Create

Os Pequerruchos VS Paco o Marinheiro VS JunyTony

Jan 3, 2024

About this app

Uma competição emocionante entre Os Pequerruchos, Paco o Marinheiro e JunyTony para determinar o primeiro, segundo e terceiro lugares.

Os Pequerruchos VS Paco o Marinheiro VS JunyTony

Related apps

Put this on your site

Source

                    <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>Os Pequerruchos VS Paco o Marinheiro VS JunyTony</title>
<meta name="description" content="Uma competição emocionante entre Os Pequerruchos, Paco o Marinheiro e JunyTony para determinar o primeiro, segundo e terceiro lugares.">
<meta name="keywords" content="Os Pequerruchos, Paco o Marinheiro, JunyTony, competição, primeiro lugar, segundo lugar, terceiro lugar, divertido, emocionante">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
document.addEventListener("DOMContentLoaded", function() {
// Define the contestants
const contestants = [
{
name: "Os Pequerruchos",
color: "#FF6F00"
},
{
name: "Paco o Marinheiro",
color: "#00BFA5"
},
{
name: "JunyTony",
color: "#FF4081"
}
];

// Shuffle the contestants randomly
const shuffledContestants = shuffleArray(contestants);

// Display the first, second, and third place winners
displayWinners(shuffledContestants);

// Function to shuffle an array randomly
function shuffleArray(array) {
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
return array;
}

// Function to display the first, second, and third place winners
function displayWinners(contestants) {
const firstPlace = contestants[0];
const secondPlace = contestants[1];
const thirdPlace = contestants[2];

const firstPlaceElement = document.createElement("div");
firstPlaceElement.classList.add("winner");
firstPlaceElement.innerHTML = `
<h3>${firstPlace.name}</h3>
<p>🥇 Primeiro Lugar</p>
`;
firstPlaceElement.style.backgroundColor = firstPlace.color;
document.getElementById("main-container").appendChild(firstPlaceElement);

const secondPlaceElement = document.createElement("div");
secondPlaceElement.classList.add("winner");
secondPlaceElement.innerHTML = `
<h3>${secondPlace.name}</h3>
<p>🥈 Segundo Lugar</p>
`;
secondPlaceElement.style.backgroundColor = secondPlace.color;
document.getElementById("main-container").appendChild(secondPlaceElement);

const thirdPlaceElement = document.createElement("div");
thirdPlaceElement.classList.add("winner");
thirdPlaceElement.innerHTML = `
<h3>${thirdPlace.name}</h3>
<p>🥉 Terceiro Lugar</p>
`;
thirdPlaceElement.style.backgroundColor = thirdPlace.color;
document.getElementById("main-container").appendChild(thirdPlaceElement);
}
});

} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>

<style>
/* App CSS Goes Here */
body {
background-color: #F5F5F5;
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 0;
}

#main-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
}

.winner {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 300px;
height: 300px;
border-radius: 10px;
margin-bottom: 20px;
color: #FFF;
font-weight: bold;
text-align: center;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease;
}

.winner:hover {
transform: scale(1.05);
}

.winner h3 {
font-size: 24px;
margin: 0;
}

.winner p {
font-size: 18px;
margin: 0;
margin-top: 10px;
opacity: 0.8;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<!-- Winners will be displayed here -->
</div>
</body>
</html>