Remove demo_pages/tasks.html
This commit is contained in:
@@ -1,807 +0,0 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Задачи после занятия</title>
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--bg: #f5f7fc;
|
||||
--surface: #ffffff;
|
||||
--text: #19233e;
|
||||
--muted: #7b849c;
|
||||
--blue: #5278f8;
|
||||
--red: #e74750;
|
||||
--green: #2eae83;
|
||||
--border: #e8ebf4;
|
||||
--shadow: 0 8px 30px rgba(43, 64, 130, .06);
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 24px;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font: 14px/1.5 Inter, system-ui, sans-serif;
|
||||
}
|
||||
|
||||
.tasks-widget {
|
||||
max-width: 1500px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.panel {
|
||||
padding: 26px;
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 20px;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
/* HEADER */
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
background: linear-gradient(135deg, #668aff, #4f4df3);
|
||||
border-radius: 14px;
|
||||
box-shadow: 0 7px 18px #6275f333;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-size: 24px;
|
||||
letter-spacing: -.6px;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.summary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
flex-wrap: wrap;
|
||||
margin-left: auto;
|
||||
padding: 10px 14px;
|
||||
background: #f6f8ff;
|
||||
border-radius: 30px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.summary-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.blue { background: var(--blue); }
|
||||
.red { background: var(--red); }
|
||||
.green { background: var(--green); }
|
||||
.gray { background: #9ba4ba; }
|
||||
|
||||
/* FILTERS */
|
||||
|
||||
.filters {
|
||||
display: flex;
|
||||
align-items: end;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
min-width: 130px;
|
||||
}
|
||||
|
||||
.field.search {
|
||||
flex: 1;
|
||||
min-width: 240px;
|
||||
max-width: 360px;
|
||||
}
|
||||
|
||||
.field label {
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
input,
|
||||
select {
|
||||
height: 42px;
|
||||
padding: 0 13px;
|
||||
border: 1px solid #e1e6f4;
|
||||
border-radius: 11px;
|
||||
background: white;
|
||||
color: var(--text);
|
||||
font: inherit;
|
||||
outline: none;
|
||||
transition: .2s;
|
||||
}
|
||||
|
||||
input:focus,
|
||||
select:focus {
|
||||
border-color: #8ea4ff;
|
||||
box-shadow: 0 0 0 3px #5578ff17;
|
||||
}
|
||||
|
||||
.search input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.switch-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 9px;
|
||||
height: 42px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
width: 42px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.switch input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.switch-track {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: #d7dce8;
|
||||
border-radius: 30px;
|
||||
cursor: pointer;
|
||||
transition: .2s;
|
||||
}
|
||||
|
||||
.switch-track::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
top: 3px;
|
||||
left: 3px;
|
||||
background: white;
|
||||
border-radius: 50%;
|
||||
transition: .2s;
|
||||
}
|
||||
|
||||
.switch input:checked + .switch-track {
|
||||
background: var(--blue);
|
||||
}
|
||||
|
||||
.switch input:checked + .switch-track::before {
|
||||
transform: translateX(18px);
|
||||
}
|
||||
|
||||
/* TASKS */
|
||||
|
||||
.list-meta {
|
||||
margin-bottom: 12px;
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.task-list {
|
||||
display: grid;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.task-card {
|
||||
display: grid;
|
||||
grid-template-columns: 48px minmax(0, 1fr) auto;
|
||||
gap: 16px;
|
||||
padding: 20px;
|
||||
border: 1px solid var(--border);
|
||||
border-left: 4px solid var(--blue);
|
||||
border-radius: 16px;
|
||||
background: white;
|
||||
transition: .2s;
|
||||
}
|
||||
|
||||
.task-card:hover {
|
||||
box-shadow: 0 8px 24px #23366a0b;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.task-card.overdue {
|
||||
background: #fff8f8;
|
||||
border-left-color: var(--red);
|
||||
}
|
||||
|
||||
.task-card.done {
|
||||
background: #f5fcf9;
|
||||
border-left-color: var(--green);
|
||||
}
|
||||
|
||||
.task-symbol {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border-radius: 50%;
|
||||
background: #edf1ff;
|
||||
color: var(--blue);
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.overdue .task-symbol {
|
||||
background: #ffe1e4;
|
||||
color: var(--red);
|
||||
}
|
||||
|
||||
.done .task-symbol {
|
||||
background: #d9f5e9;
|
||||
color: var(--green);
|
||||
}
|
||||
|
||||
.task-main {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.task-title {
|
||||
margin: 0;
|
||||
font-size: 17px;
|
||||
font-weight: 750;
|
||||
}
|
||||
|
||||
.task-sub {
|
||||
margin-top: 3px;
|
||||
color: var(--muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/* TAGS */
|
||||
|
||||
.chips {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 30px;
|
||||
font-size: 12px;
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
.chip.complete {
|
||||
color: #27966f;
|
||||
background: #e2f6ee;
|
||||
}
|
||||
|
||||
.chip.pending {
|
||||
color: #a95412;
|
||||
background: #ffecd8;
|
||||
}
|
||||
|
||||
/* BUTTONS */
|
||||
|
||||
.task-footer {
|
||||
display: flex;
|
||||
gap: 9px;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 14px;
|
||||
padding-top: 13px;
|
||||
border-top: 1px solid #e9edf5;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 7px;
|
||||
min-height: 36px;
|
||||
padding: 0 14px;
|
||||
border: 1px solid #e0e6f4;
|
||||
border-radius: 11px;
|
||||
background: white;
|
||||
color: var(--text);
|
||||
font: inherit;
|
||||
font-weight: 650;
|
||||
cursor: pointer;
|
||||
transition: .15s;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background: #f6f8ff;
|
||||
}
|
||||
|
||||
.btn.primary {
|
||||
background: var(--blue);
|
||||
border-color: var(--blue);
|
||||
color: white;
|
||||
box-shadow: 0 5px 12px #4d73f82b;
|
||||
}
|
||||
|
||||
.btn.primary:hover {
|
||||
background: #4166e8;
|
||||
}
|
||||
|
||||
.task-side {
|
||||
display: flex;
|
||||
align-items: start;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.status {
|
||||
padding: 7px 11px;
|
||||
border-radius: 30px;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.status.red {
|
||||
color: #c92f3a;
|
||||
background: #ffe5e7;
|
||||
}
|
||||
|
||||
.status.green {
|
||||
color: #20845f;
|
||||
background: #def5eb;
|
||||
}
|
||||
|
||||
.progress {
|
||||
color: var(--blue);
|
||||
font-size: 19px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
/* DETAILS */
|
||||
|
||||
.details {
|
||||
display: none;
|
||||
margin-top: 12px;
|
||||
padding: 12px 14px;
|
||||
background: #f7f8fc;
|
||||
border-radius: 11px;
|
||||
color: #68738d;
|
||||
}
|
||||
|
||||
.task-card.expanded .details {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.empty {
|
||||
display: none;
|
||||
padding: 35px;
|
||||
text-align: center;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* RESPONSIVE */
|
||||
|
||||
@media (max-width: 900px) {
|
||||
body {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.panel {
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.summary {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.panel {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 21px;
|
||||
}
|
||||
|
||||
.field.search {
|
||||
min-width: 100%;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.field {
|
||||
flex: 1;
|
||||
min-width: calc(50% - 8px);
|
||||
}
|
||||
|
||||
.task-card {
|
||||
grid-template-columns: 38px minmax(0, 1fr);
|
||||
gap: 11px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.task-symbol {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.task-title {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.task-side {
|
||||
grid-column: 2;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.summary {
|
||||
border-radius: 14px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<main class="tasks-widget">
|
||||
<section class="panel">
|
||||
|
||||
<header class="header">
|
||||
<div class="logo">✓</div>
|
||||
|
||||
<h1>Задачи после занятия</h1>
|
||||
|
||||
<div class="subtitle">
|
||||
Полный список задач по занятиям за выбранный период
|
||||
</div>
|
||||
|
||||
<div class="summary">
|
||||
<span class="summary-item">
|
||||
<i class="dot blue"></i>
|
||||
Всего: <strong id="total">2</strong>
|
||||
</span>
|
||||
|
||||
<span class="summary-item">
|
||||
<i class="dot green"></i>
|
||||
Выполненных: <strong id="completed">1</strong>
|
||||
</span>
|
||||
|
||||
<span class="summary-item">
|
||||
<i class="dot red"></i>
|
||||
Просроченных: <strong id="overdueCount">1</strong>
|
||||
</span>
|
||||
|
||||
<span class="summary-item">
|
||||
<i class="dot gray"></i>
|
||||
Закрытых: <strong>81</strong>
|
||||
</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="filters">
|
||||
|
||||
<div class="field search">
|
||||
<label for="search">Поиск</label>
|
||||
<input id="search" type="search"
|
||||
placeholder="Поиск по задачам или группе…">
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="statusFilter">Статус</label>
|
||||
<select id="statusFilter">
|
||||
<option value="all">Все</option>
|
||||
<option value="overdue">Просроченные</option>
|
||||
<option value="done">Выполненные</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="period">Период</label>
|
||||
<select id="period">
|
||||
<option>30 дней</option>
|
||||
<option>7 дней</option>
|
||||
<option>90 дней</option>
|
||||
<option>Все время</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="perPage">На странице</label>
|
||||
<select id="perPage">
|
||||
<option>20</option>
|
||||
<option>10</option>
|
||||
<option>50</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="switch-wrap">
|
||||
<label class="switch">
|
||||
<input id="showClosed" type="checkbox">
|
||||
<span class="switch-track"></span>
|
||||
</label>
|
||||
<span>Закрытые</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="list-meta" id="listMeta">
|
||||
Показано 2 задачи · 1 требует внимания
|
||||
</div>
|
||||
|
||||
<div class="task-list" id="taskList">
|
||||
|
||||
<!-- ПРОСРОЧЕННАЯ ЗАДАЧА -->
|
||||
|
||||
<article class="task-card overdue"
|
||||
data-state="overdue"
|
||||
data-search="среда 15:30 2026-11-04 николай доп обратная связь отчет короткое сообщение">
|
||||
|
||||
<div class="task-symbol">!</div>
|
||||
|
||||
<div class="task-main">
|
||||
|
||||
<h2 class="task-title">
|
||||
Среда 15:30 · 2026-11-04
|
||||
</h2>
|
||||
|
||||
<div class="task-sub">
|
||||
15:20–17:50 · Николай · доп
|
||||
</div>
|
||||
|
||||
<div class="chips">
|
||||
<span class="chip complete">✓ Отчёт о занятии</span>
|
||||
<span class="chip complete">✓ Короткое сообщение</span>
|
||||
<span class="chip pending">◉ Обратная связь</span>
|
||||
</div>
|
||||
|
||||
<div class="task-footer">
|
||||
|
||||
<button class="btn primary close-task">
|
||||
✓ Закрыть
|
||||
</button>
|
||||
|
||||
<button class="btn details-toggle">
|
||||
◉ Подробнее
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="details">
|
||||
Осталось подготовить и отправить обратную связь по занятию.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="task-side">
|
||||
<span class="status red">◷ Просрочена</span>
|
||||
<span class="progress">2/3</span>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
||||
<!-- ВЫПОЛНЕННАЯ ЗАДАЧА -->
|
||||
|
||||
<article class="task-card done"
|
||||
data-state="done"
|
||||
data-search="среда 18:00 2026-11-04 николай отчет короткое сообщение обратная связь">
|
||||
|
||||
<div class="task-symbol">✓</div>
|
||||
|
||||
<div class="task-main">
|
||||
|
||||
<h2 class="task-title">
|
||||
Среда 18:00 · 2026-11-04
|
||||
</h2>
|
||||
|
||||
<div class="task-sub">
|
||||
17:50–20:20 · Николай
|
||||
</div>
|
||||
|
||||
<div class="chips">
|
||||
<span class="chip complete">✓ Отчёт о занятии</span>
|
||||
<span class="chip complete">✓ Короткое сообщение</span>
|
||||
<span class="chip complete">✓ Обратная связь (вернул)</span>
|
||||
</div>
|
||||
|
||||
<div class="task-footer">
|
||||
|
||||
<button class="btn reopen-task">
|
||||
↻ Открыть
|
||||
</button>
|
||||
|
||||
<button class="btn details-toggle">
|
||||
◉ Подробнее
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="details">
|
||||
Все этапы по занятию завершены. Обратная связь получена.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="task-side">
|
||||
<span class="status green">✓ Выполнено</span>
|
||||
<span class="progress">3/3</span>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="empty" id="empty">
|
||||
Ничего не найдено. Измените параметры поиска или фильтры.
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
(() => {
|
||||
const $ = (selector, root = document) =>
|
||||
root.querySelector(selector);
|
||||
|
||||
const $$ = (selector, root = document) =>
|
||||
[...root.querySelectorAll(selector)];
|
||||
|
||||
const cards = $$('.task-card');
|
||||
const search = $('#search');
|
||||
const status = $('#statusFilter');
|
||||
const showClosed = $('#showClosed');
|
||||
const empty = $('#empty');
|
||||
|
||||
function update() {
|
||||
const term = search.value.trim().toLowerCase();
|
||||
|
||||
let visible = 0;
|
||||
let done = 0;
|
||||
let overdue = 0;
|
||||
|
||||
cards.forEach(card => {
|
||||
const state = card.dataset.state;
|
||||
|
||||
const matchesTerm =
|
||||
card.dataset.search.toLowerCase().includes(term);
|
||||
|
||||
const matchesStatus =
|
||||
status.value === 'all' ||
|
||||
status.value === state;
|
||||
|
||||
const matchesClosed =
|
||||
showClosed.checked ||
|
||||
state !== 'done';
|
||||
|
||||
const show =
|
||||
matchesTerm &&
|
||||
matchesStatus &&
|
||||
matchesClosed;
|
||||
|
||||
card.hidden = !show;
|
||||
|
||||
if (show) {
|
||||
visible++;
|
||||
|
||||
if (state === 'done') done++;
|
||||
if (state === 'overdue') overdue++;
|
||||
}
|
||||
});
|
||||
|
||||
empty.style.display = visible ? 'none' : 'block';
|
||||
|
||||
$('#listMeta').textContent =
|
||||
`Показано ${visible} задач · ${overdue} требуют внимания`;
|
||||
|
||||
$('#total').textContent = visible;
|
||||
$('#completed').textContent = done;
|
||||
$('#overdueCount').textContent = overdue;
|
||||
}
|
||||
|
||||
search.addEventListener('input', update);
|
||||
status.addEventListener('change', update);
|
||||
showClosed.addEventListener('change', update);
|
||||
|
||||
// Подробнее
|
||||
|
||||
$$('.details-toggle').forEach(button => {
|
||||
button.addEventListener('click', () => {
|
||||
const card = button.closest('.task-card');
|
||||
|
||||
card.classList.toggle('expanded');
|
||||
|
||||
button.textContent =
|
||||
card.classList.contains('expanded')
|
||||
? 'Скрыть детали'
|
||||
: '◉ Подробнее';
|
||||
});
|
||||
});
|
||||
|
||||
// Закрытие задачи
|
||||
|
||||
function closeTask(card) {
|
||||
card.dataset.state = 'done';
|
||||
|
||||
card.classList.remove('overdue');
|
||||
card.classList.add('done');
|
||||
|
||||
card.querySelector('.status').className = 'status green';
|
||||
card.querySelector('.status').textContent = '✓ Выполнено';
|
||||
|
||||
card.querySelector('.progress').textContent = '3/3';
|
||||
|
||||
const button = card.querySelector('.close-task');
|
||||
|
||||
button.className = 'btn reopen-task';
|
||||
button.textContent = '↻ Открыть';
|
||||
|
||||
button.onclick = () => reopenTask(card);
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
// Повторное открытие
|
||||
|
||||
function reopenTask(card) {
|
||||
card.dataset.state = 'overdue';
|
||||
|
||||
card.classList.remove('done');
|
||||
card.classList.add('overdue');
|
||||
|
||||
card.querySelector('.status').className = 'status red';
|
||||
card.querySelector('.status').textContent = '◷ Просрочена';
|
||||
|
||||
card.querySelector('.progress').textContent = '2/3';
|
||||
|
||||
const button = card.querySelector('.reopen-task');
|
||||
|
||||
button.className = 'btn primary close-task';
|
||||
button.textContent = '✓ Закрыть';
|
||||
|
||||
button.onclick = () => closeTask(card);
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
$$('.close-task').forEach(button => {
|
||||
button.addEventListener('click', () => {
|
||||
closeTask(button.closest('.task-card'));
|
||||
});
|
||||
});
|
||||
|
||||
$$('.reopen-task').forEach(button => {
|
||||
button.addEventListener('click', () => {
|
||||
reopenTask(button.closest('.task-card'));
|
||||
});
|
||||
});
|
||||
|
||||
update();
|
||||
})();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user