Calculator Tools Calculator Tools
Create

Coffee Shop Rating

Oct 24, 2023

About this app

A fun and intuitive application to rate the taste, color, aroma, price, and service of a coffee shop.

Coffee Shop Rating ☕ Coffee Shop Rating ☕ ['Taste', 'Color', 'Aroma', 'Price', 'Service'].map((item, index) => ( ${item} [1, 2, 3, 4, 5].map(i => ( ⭐ )) ))

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>Coffee Shop Rating</title>
<meta name="description" content="A fun and intuitive application to rate the taste, color, aroma, price, and service of a coffee shop.">
<meta name="keywords" content="coffee, rating, taste, color, aroma, price, service">

<link href="https://fonts.googleapis.com/css2?family=Amatic+SC&display=swap" rel="stylesheet">

<style>
/* App CSS Goes Here */
body {
font-family: 'Amatic SC', cursive;
background: #f4f4f4;
}

.rating-container {
display: flex;
justify-content: space-around;
align-items: center;
padding: 20px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
margin: 20px auto;
}

.rating-item {
text-align: center;
}

.rating-item input {
display: none;
}

.rating-item label {
font-size: 2em;
color: #ccc;
}

.rating-item input:checked ~ label {
color: #f5a623;
}
</style>

<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.

// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
const ratingItems = Array.from(document.querySelectorAll('.rating-item input[type="radio"]'));
ratingItems.forEach(item => {
item.addEventListener('change', function() {
const ratingValue = this.value;
const ratingCategory = this.name;
// Display ratingValue in the console for now. You can replace this with your own functionality.
console.log(`Rating for ${ratingCategory}: ${ratingValue}`);
});
});
});

} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
</head>
<body>
<div id="main-container" class="container">
<!-- App HTML Goes Here -->
<h1 style="text-align: center; color: #333;">☕ Coffee Shop Rating ☕</h1>
<div class="rating-container">
['Taste', 'Color', 'Aroma', 'Price', 'Service'].map((item, index) => (
<div class="rating-item">
<h2>${item}</h2>
[1, 2, 3, 4, 5].map(i => (
<div>
<input type="radio" id="${item.toLowerCase() + i}" name="${item.toLowerCase()}" value="${i}">
<label for="${item.toLowerCase() + i}">⭐</label>
</div>
))
</div>
))
</div>
</div>
</body>
</html>