Доделал подвал, добавил дисклеймер, доделал красивости.

This commit is contained in:
dr_domi
2026-05-03 00:07:27 +03:00
parent 1e5ab12d89
commit b4d042b041
+20 -5
View File
@@ -123,7 +123,12 @@
</aside> </aside>
<footer> <footer>
<p>&copy; 2025 Калькулятор BMI. Все права защищены.</p> <p>
&copy; 2026 Калькулятор BMI. Автор: <strong>Александр Захаров</strong>.<br>
<small style="color: #555; font-style: italic;">
Инструмент для оценки массы тела. Не является медицинским диагнозом.
</small>
</p>
</footer> </footer>
<script> <script>
@@ -165,7 +170,7 @@
// Определение категории // Определение категории
let category = ''; let category = '';
let textColor = '#003366'; // по умолчанию let textColor = '#003366';
if (bmi < 18.5) { if (bmi < 18.5) {
category = 'Дефицит массы тела'; category = 'Дефицит массы тела';
@@ -184,12 +189,22 @@
textColor = '#cc0000'; textColor = '#cc0000';
} }
// Вывод результата с цветом // Вывод результата + категория + дисклеймер
resultDiv.style.display = 'block'; resultDiv.style.display = 'block';
resultDiv.style.color = textColor; resultDiv.style.color = textColor;
resultDiv.style.fontSize = '16px';
resultDiv.style.lineHeight = '1.5';
resultDiv.innerHTML = ` resultDiv.innerHTML = `
<div>Ваш BMI: <strong>${roundedBmi}</strong></div> <div><strong>Ваш BMI:</strong> ${roundedBmi}</div>
<div style="margin-top: 5px; font-size: 16px;">${category}</div> <div style="margin-top: 5px;">${category}</div>
<div style="margin-top: 15px; font-size: 14px; color: #555; font-style: italic; border-top: 1px dashed #999; padding-top: 10px;">
<small>
<strong>Важно:</strong> ИМТ — скрининговый, а не диагностический инструмент.
Он не учитывает пол, возраст, распределение жира, мышечную массу и плотность костей.
Например, у спортсменов ИМТ может быть завышен, а у пожилых людей — занижен.
Для точной оценки состояния здоровья обратитесь к врачу.
</small>
</div>
`; `;
}); });
</script> </script>