first commit

This commit is contained in:
2025-10-16 17:05:26 +03:00
commit ca8cc5a986
6 changed files with 811 additions and 0 deletions

321
habbit-manager.html Normal file
View File

@@ -0,0 +1,321 @@
<!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">
<!-- Карточка 1 -->
<div class="habit-card">
<div class="habit-card__header">
<div class="habit-card__icon">💧</div>
<h3 class="habit-card__title">Пить воду</h3>
</div>
<p class="habit-card__description">8 стаканов воды в день для поддержания водного баланса организма</p>
<div class="habit-card__progress">
<div class="habit-card__progress-info">
<span>Прогресс</span>
<span>75%</span>
</div>
<div class="habit-card__progress-bar">
<div class="habit-card__progress-fill" style="width: 75%"></div>
</div>
</div>
<div class="habit-card__actions">
<button class="button button--primary">Отметить выполнение</button>
<button class="button button--secondary">Подробнее</button>
</div>
</div>
<!-- Карточка 2 -->
<div class="habit-card habit-card--important">
<div class="habit-card__header">
<div class="habit-card__icon">📚</div>
<h3 class="habit-card__title">Читать книги</h3>
</div>
<p class="habit-card__description">20 минут чтения развивающей литературы каждый вечер</p>
<div class="habit-card__progress">
<div class="habit-card__progress-info">
<span>Прогресс</span>
<span>45%</span>
</div>
<div class="habit-card__progress-bar">
<div class="habit-card__progress-fill" style="width: 45%"></div>
</div>
</div>
<div class="habit-card__actions">
<button class="button button--primary">Отметить выполнение</button>
<button class="button button--secondary">Подробнее</button>
</div>
</div>
<!-- Карточка 3 -->
<div class="habit-card habit-card--completed">
<div class="habit-card__header">
<div class="habit-card__icon">🏃</div>
<h3 class="habit-card__title">Утренняя зарядка</h3>
</div>
<p class="habit-card__description">15 минут физических упражнений каждое утро</p>
<div class="habit-card__progress">
<div class="habit-card__progress-info">
<span>Прогресс</span>
<span>100%</span>
</div>
<div class="habit-card__progress-bar">
<div class="habit-card__progress-fill" style="width: 100%"></div>
</div>
</div>
<div class="habit-card__actions">
<button class="button button--primary" disabled>Выполнено</button>
<button class="button button--secondary">Подробнее</button>
</div>
</div>
</div>
<!-- Форма добавления новой привычки -->
<div class="new-habit-form">
<h2 class="new-habit-form__title"> Добавить новую привычку</h2>
<!-- Здесь студенты будут добавлять форму -->
</div>
</div>
<script src="app.js"></script>
<script src="habit-manager.js"></script>
</body>
</html>