Files
iro-1425-2025-2026-lecture/habbit-manager.html
2025-10-30 14:07:33 +03:00

251 lines
6.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Трекер привычек - Лабораторная работа</title>
<style>
/* Базовые стили */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
line-height: 1.6;
color: #333;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
/* Блок container */
.container {
max-width: 1200px;
margin: 0 auto;
}
/* Блок page-header */
.page-header {
background: white;
border-radius: 20px;
padding: 40px;
margin-bottom: 30px;
text-align: center;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.page-header__title {
color: #4CAF50;
font-size: 2.5em;
margin-bottom: 10px;
}
.page-header__subtitle {
color: #666;
font-size: 1.2em;
margin-bottom: 30px;
}
/* Блок stats-panel */
.stats-panel {
display: flex;
gap: 20px;
justify-content: center;
flex-wrap: wrap;
}
.stats-panel__item {
background: #f8f9fa;
padding: 15px 25px;
border-radius: 10px;
text-align: center;
}
.stats-panel__value {
font-size: 2em;
font-weight: bold;
color: #4CAF50;
}
.stats-panel__label {
color: #666;
font-size: 0.9em;
}
/* Блок habits-grid */
.habits-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 25px;
margin-bottom: 40px;
}
/* Блок habit-card - ОСНОВНОЙ БЛОК ДЛЯ РАБОТЫ */
.habit-card {
background: white;
border-radius: 15px;
padding: 25px;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.habit-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.habit-card__header {
display: flex;
align-items: center;
margin-bottom: 15px;
}
.habit-card__icon {
font-size: 2.5em;
margin-right: 15px;
}
.habit-card__title {
color: #2c3e50;
font-size: 1.4em;
margin: 0;
}
.habit-card__description {
color: #666;
margin-bottom: 20px;
line-height: 1.5;
}
.habit-card__progress {
margin-bottom: 20px;
}
.habit-card__progress-info {
display: flex;
justify-content: space-between;
margin-bottom: 8px;
font-size: 0.9em;
color: #666;
}
.habit-card__progress-bar {
background: #e0e0e0;
border-radius: 10px;
height: 8px;
overflow: hidden;
}
.habit-card__progress-fill {
background: #4CAF50;
height: 100%;
width: 0%;
transition: width 0.5s ease;
}
.habit-card__actions {
display: flex;
gap: 10px;
}
/* Блок button */
.button {
padding: 10px 20px;
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 0.9em;
transition: all 0.3s ease;
flex: 1;
}
.button--primary {
background: #4CAF50;
color: white;
}
.button--primary:hover {
background: #45a049;
}
.button--secondary {
background: #f0f0f0;
color: #333;
}
.button--secondary:hover {
background: #e0e0e0;
}
/* Модификаторы для habit-card */
.habit-card--important {
border-left: 5px solid #ff6b6b;
}
.habit-card--completed {
opacity: 0.8;
}
.habit-card--new {
border: 2px dashed #4CAF50;
}
/* Блок new-habit-form */
.new-habit-form {
background: white;
border-radius: 15px;
padding: 30px;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.new-habit-form__title {
color: #2c3e50;
margin-bottom: 20px;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<!-- Шапка страницы -->
<header class="page-header">
<h1 class="page-header__title">🚀 Трекер полезных привычек</h1>
<p class="page-header__subtitle">Отслеживайте свой прогресс и становитесь лучше каждый день</p>
<!-- Панель статистики -->
<div class="stats-panel">
<div class="stats-panel__item">
<div class="stats-panel__value">7</div>
<div class="stats-panel__label">Привычек</div>
</div>
<div class="stats-panel__item">
<div class="stats-panel__value">64%</div>
<div class="stats-panel__label">Общий прогресс</div>
</div>
<div class="stats-panel__item">
<div class="stats-panel__value">21</div>
<div class="stats-panel__label">День подряд</div>
</div>
</div>
</header>
<!-- Сетка карточек привычек -->
<div class="habits-grid" id="habits-grid">
</div>
<!-- Форма добавления новой привычки -->
<div class="new-habit-form" id="new-habit-form">
<h2 class="new-habit-form__title" id="add-habbit-button"> Добавить новую привычку</h2>
</div>
</div>
<script src="app.js"></script>
<script src="habit-manager.js"></script>
</body>
</html>