___________
1. Вы можете разместить статус клиента в любом месте сайта, используя шорткод:
___________
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Калькулятор стоимости маски</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #121212;
font-family: Arial, sans-serif;
color: #ffffff;
margin: 0;
}
.calculator-container {
background-color: #1e1e1e;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
max-width: 300px;
width: 100%;
}
h1 {
font-size: 1.5em;
text-align: center;
margin-bottom: 20px;
color: #e0e0e0;
}
label {
display: block;
font-size: 1em;
margin-bottom: 10px;
}
input[type="number"] {
width: 100%;
padding: 10px;
font-size: 1em;
border-radius: 5px;
border: 1px solid #333;
background-color: #333;
color: #fff;
margin-bottom: 20px;
}
button {
width: 100%;
padding: 10px;
font-size: 1em;
border-radius: 5px;
border: none;
background-color: #6200ea;
color: #fff;
cursor: pointer;
transition: background-color 0.3s ease;
}
button:hover {
background-color: #3700b3;
}
.result {
margin-top: 20px;
font-size: 1.2em;
text-align: center;
color: #bdbdbd;
}
</style>
</head>
<body>
<div class="calculator-container">
<h1>Стоимость маски в день</h1>
<label for="workDays">Введите количество рабочих дней в неделю:</label>
<input type="number" id="workDays" min="1" max="7" placeholder="Например, 5">
<button onclick="calculateCost()">Рассчитать</button>
<div id="result" class="result"></div>
</div>
<script>
function calculateCost() {
const maskCost = 2890;
const months = 6;
const workDays = parseFloat(document.getElementById('workDays').value);
if (isNaN(workDays) || workDays < 1 || workDays > 7) {
document.getElementById('result').innerText = "Введите корректное количество рабочих дней";
return;
}
const totalWorkDays = (workDays * 4 * months);
const dailyCost = (maskCost / totalWorkDays).toFixed(2);
document.getElementById('result').innerText = `Стоимость маски в день: ${dailyCost} руб.`;
}
</script>
</body>
</html>