WishGPT - O Poder Dos Desejos
About this app
WishGPT é um aplicativo divertido que permite aos usuários criar e compartilhar seus desejos.
WishGPT - O Poder Dos Desejos WishGPT - O Poder Dos Desejos Adicionar
Related apps
Put this on your site
Source
<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>WishGPT - O Poder Dos Desejos</title>
<meta name="description" content="WishGPT é um aplicativo divertido que permite aos usuários criar e compartilhar seus desejos.">
<meta name="keywords" content="WishGPT, desejos, aplicativo, compartilhar">
<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.
const wishes = [];
function addWish() {
const wishInput = document.getElementById("wish-input");
const wish = wishInput.value.trim();
if (wish !== "") {
wishes.push(wish);
wishInput.value = "";
renderWishes();
}
}
function renderWishes() {
const wishesContainer = document.getElementById("wishes-container");
wishesContainer.innerHTML = "";
for (let i = 0; i < wishes.length; i++) {
const wishItem = document.createElement("div");
wishItem.classList.add("wish-item");
const wishText = document.createElement("p");
wishText.innerHTML = wishes[i];
const deleteButton = document.createElement("i");
deleteButton.classList.add("fa", "fa-trash");
deleteButton.addEventListener("click", function() {
deleteWish(i);
});
wishItem.appendChild(wishText);
wishItem.appendChild(deleteButton);
wishesContainer.appendChild(wishItem);
}
}
function deleteWish(index) {
wishes.splice(index, 1);
renderWishes();
}
// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
const addButton = document.getElementById("add-button");
addButton.addEventListener("click", addWish);
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
<style>
/* App CSS Goes Here */
body {
font-family: 'Roboto', sans-serif;
background-color: #f5f5f5;
}
.container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
}
h1 {
text-align: center;
color: #333;
margin-bottom: 20px;
}
.wish-form {
display: flex;
justify-content: space-between;
margin-bottom: 20px;
}
.wish-input {
flex-grow: 1;
padding: 10px;
font-size: 16px;
}
.add-button {
background-color: #333;
color: #fff;
padding: 10px 20px;
border: none;
font-size: 16px;
cursor: pointer;
}
.wish-item {
display: flex;
align-items: center;
justify-content: space-between;
background-color: #fff;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
}
.wish-item p {
flex-grow: 1;
}
.wish-item i {
color: #ff0000;
cursor: pointer;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>WishGPT - O Poder Dos Desejos</h1>
<div class="wish-form">
<input id="wish-input" class="wish-input" type="text" placeholder="Digite seu desejo...">
<button id="add-button" class="add-button">Adicionar</button>
</div>
<div id="wishes-container"></div>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!