uchet-ovets-a6c94e/index.html

318 lines
16 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>
<!-- Дизайн: Стандартный дизайн. Сохраняй все пять CSS; подробности в design.md. -->
<html lang="ru" data-theme="light">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Учёт овец</title>
<link rel="stylesheet" href="design-system/kt-ai-fonts.css">
<link rel="stylesheet" href="design-system/kt-ai-tokens.css">
<link rel="stylesheet" href="design-system/kt-ai-components.css">
<link rel="stylesheet" href="design-system/kt-ai-page.css">
<link rel="stylesheet" href="design-system/vibe-theme.css">
<link rel="stylesheet" href="style.css">
</head>
<body class="kt-ai-app">
<!-- Кастомные стили, только когда ДС не покрывает -->
<style>
a.kt-ai-btn { text-decoration: none; }
.kt-ai-modal-overlay {
position: fixed; inset: 0; z-index: var(--kt-ai-z-modal);
background: color-mix(in srgb, var(--kt-ai-fg) 40%, transparent);
display: flex; align-items: center; justify-content: center;
padding: var(--kt-ai-space-5);
opacity: 0; visibility: hidden;
transition: opacity .15s ease, visibility .15s ease;
}
.kt-ai-modal-overlay[data-open="true"] { opacity: 1; visibility: visible; }
.kt-ai-modal {
background: var(--kt-ai-bg); border: 1px solid var(--kt-ai-border);
border-radius: var(--kt-ai-radius-xl); padding: var(--kt-ai-space-7);
width: 100%; max-width: var(--kt-ai-modal-max, 600px); max-height: 90dvh; overflow-y: auto;
transform: translateY(8px); transition: transform .15s ease;
}
.kt-ai-modal-overlay[data-open="true"] .kt-ai-modal { transform: translateY(0); }
</style>
<!-- Спрайт иконок ДС (инлайн, чтобы работал и из file://) -->
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" style="position:absolute;width:0;height:0;overflow:hidden">
<symbol id="home" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/>
<path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
</symbol>
<symbol id="chat" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M7.9 20A9 9 0 1 0 4 16.1L2 22z"/>
</symbol>
<symbol id="send" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"/>
<path d="m21.854 2.147-10.94 10.939"/>
</symbol>
<symbol id="feed" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M4 11a9 9 0 0 1 9 9"/>
<path d="M4 4a16 16 0 0 1 16 16"/>
<circle cx="5" cy="19" r="1"/>
</symbol>
<symbol id="lots" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"/>
<circle cx="12" cy="12" r="1"/>
</symbol>
<symbol id="source" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<ellipse cx="12" cy="5" rx="9" ry="3"/>
<path d="M3 5V19A9 3 0 0 0 21 19V5"/>
<path d="M3 12A9 3 0 0 0 21 12"/>
</symbol>
<symbol id="catalog" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 7v14"/>
<path d="M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"/>
</symbol>
<symbol id="search" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="m21 21-4.34-4.34"/>
<circle cx="11" cy="11" r="8"/>
</symbol>
<symbol id="chevronRight" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="m9 18 6-6-6-6"/>
</symbol>
<symbol id="chevronLeft" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="m15 18-6-6 6-6"/>
</symbol>
<symbol id="arrowLeft" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>
</symbol>
<symbol id="arrowRight" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>
</symbol>
<symbol id="x" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M18 6 6 18"/><path d="m6 6 12 12"/>
</symbol>
<symbol id="check" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M20 6 9 17l-5-5"/>
</symbol>
<symbol id="alert" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/>
<path d="M12 9v4"/><path d="M12 17h.01"/>
</symbol>
<symbol id="clock" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/>
</symbol>
<symbol id="calendar" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M8 2v4M16 2v4"/><rect width="18" height="18" x="3" y="4" rx="2"/><path d="M3 10h18"/>
</symbol>
<symbol id="plus" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M5 12h14M12 5v14"/>
</symbol>
<symbol id="pencil" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/><path d="m15 5 4 4"/>
</symbol>
<symbol id="scale" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 3v18"/><path d="m19 8 3 8a5 5 0 0 1-6 0zV7"/><path d="M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1"/><path d="m5 8 3 8a5 5 0 0 1-6 0zV7"/><path d="M7 21h10"/>
</symbol>
<symbol id="refresh" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M3 21v-5h5"/>
</symbol>
<symbol id="user" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>
</symbol>
<symbol id="users" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><path d="M16 3.128a4 4 0 0 1 0 7.744"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><circle cx="9" cy="7" r="4"/>
</symbol>
<symbol id="pin" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"/>
<circle cx="12" cy="10" r="3"/>
</symbol>
<symbol id="file" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/>
<path d="M14 2v5a1 1 0 0 0 1 1h5"/><path d="M10 9H8"/><path d="M16 13H8"/><path d="M16 17H8"/>
</symbol>
<symbol id="book" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 7v14"/><path d="M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"/>
</symbol>
<symbol id="filter" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"/>
</symbol>
<symbol id="table" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>
</symbol>
<symbol id="chart" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<path d="M3 3v16a2 2 0 0 0 2 2h16"/>
<path d="M7 16h8"/><path d="M7 11h12"/><path d="M7 6h3"/>
</symbol>
<symbol id="dashboard" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
<rect width="7" height="9" x="3" y="3" rx="1"/><rect width="7" height="5" x="14" y="3" rx="1"/><rect width="7" height="9" x="14" y="12" rx="1"/><rect width="7" height="5" x="3" y="16" rx="1"/>
</symbol>
</svg>
<header class="ov-head">
<div class="ov-head-in">
<div class="ov-brand">
<span class="ov-app-name">Учёт овец</span>
</div>
<span class="kt-ai-spacer"></span>
<button class="kt-ai-btn" data-variant="ghost" id="btn-reset" type="button" title="Вернуть исходные данные">
<svg class="kt-icon" aria-hidden="true"><use href="#refresh"></use></svg>
Сбросить
</button>
</div>
</header>
<main class="ov-main">
<!-- ЭКРАН: СПИСОК -->
<section id="view-list">
<div class="ov-hero">
<div>
<h1 class="ov-h1">Овцы стада</h1>
<p class="ov-sub">Особи, отары, вес и состояние — в одном списке</p>
</div>
<button class="kt-ai-btn" data-variant="primary" data-size="lg" id="btn-new" type="button">
<svg class="kt-icon" aria-hidden="true"><use href="#plus"></use></svg>
Добавить овцу
</button>
</div>
<div class="kt-ai-kpi-strip" data-cards="true" id="kpi-list"></div>
<div class="kt-ai-filterbar ov-filterbar" id="filter-bar">
<div class="kt-ai-field ov-search">
<label for="search-input">Поиск</label>
<input class="kt-ai-input" id="search-input" placeholder="Кличка, номер, отара…">
</div>
<div class="ov-chips"></div>
</div>
<div class="kt-ai-table-wrap ov-table-wrap" id="table-wrap">
<table class="kt-ai-table">
<thead>
<tr>
<th>Овца</th>
<th>Пол</th>
<th>Отара</th>
<th>Возраст</th>
<th class="kt-ai-td-num">Вес</th>
<th>Состояние</th>
</tr>
</thead>
<tbody id="rows"></tbody>
</table>
</div>
<div class="kt-ai-empty" id="empty" hidden>
<svg class="kt-icon" aria-hidden="true"><use href="#search"></use></svg>
<span class="title">Никого не нашлось</span>
<span>Попробуйте изменить фильтр или запрос.</span>
</div>
<p class="ov-count" id="count"></p>
</section>
<!-- ЭКРАН: КАРТОЧКА -->
<section id="view-card" hidden>
<button class="kt-ai-btn" data-variant="ghost" id="btn-back" type="button">
<svg class="kt-icon" aria-hidden="true"><use href="#arrowLeft"></use></svg>
К списку
</button>
<div class="kt-ai-card ov-card">
<div class="ov-card-head">
<div class="ov-avatar" id="c-avatar">—</div>
<div class="ov-name-row">
<h2 class="ov-h2" id="c-title">—</h2>
<span class="kt-ai-status-pill" id="c-status" data-status="muted">—</span>
</div>
<span class="kt-ai-meta ov-card-meta" id="c-meta"></span>
<span class="kt-ai-spacer"></span>
<button class="kt-ai-btn" id="btn-edit" type="button">
<svg class="kt-icon" aria-hidden="true"><use href="#pencil"></use></svg>
Изменить
</button>
</div>
<div class="kt-ai-kv ov-card-kv" id="c-fields"></div>
<div class="kt-ai-card ov-notes" id="c-notes-block">
<h3 class="kt-ai-label">Заметки</h3>
<p class="ov-notes-text" id="c-notes">—</p>
</div>
</div>
</section>
</main>
<!-- МОДАЛКА: ДОБАВИТЬ / ИЗМЕНИТЬ -->
<div class="kt-ai-modal-overlay" id="modal" data-open="false">
<div class="kt-ai-modal" role="dialog" aria-modal="true">
<h2 class="modal-title" id="modal-title">Новая овца</h2>
<form id="form" novalidate>
<div class="kt-ai-field">
<label for="f-number">Брачный номер</label>
<input class="kt-ai-input" id="f-number" placeholder="OV-1001">
</div>
<div class="ov-modal-cols">
<div class="kt-ai-field">
<label for="f-name">Кличка</label>
<input class="kt-ai-input" id="f-name" placeholder="Кеминай" required>
</div>
<div class="kt-ai-field">
<label for="f-sex">Пол</label>
<select class="kt-ai-select" id="f-sex" required></select>
</div>
</div>
<div class="ov-modal-cols">
<div class="kt-ai-field">
<label for="f-birth">Дата рождения</label>
<input class="kt-ai-input" type="date" id="f-birth" required>
</div>
<div class="kt-ai-field">
<label for="f-group">Отара</label>
<input class="kt-ai-input" id="f-group" placeholder="Северная" required>
</div>
</div>
<div class="kt-ai-field">
<label for="f-sex">Пол</label>
<select class="kt-ai-select" id="f-sex" required></select>
</div>
</div>
<div class="kt-ai-cols">
<div class="kt-ai-field">
<label for="f-birth">Дата рождения</label>
<input class="kt-ai-input" type="date" id="f-birth" required>
</div>
<div class="kt-ai-field">
<label for="f-group">Отара</label>
<input class="kt-ai-input" id="f-group" placeholder="Северная" required>
</div>
</div>
<div class="kt-ai-cols">
<div class="kt-ai-field">
<label for="f-weight">Вес, кг</label>
<input class="kt-ai-input" type="number" min="0" max="200" step="0.1" id="f-weight" required>
</div>
<div class="kt-ai-field">
<label for="f-treatment">Пометка (обработка)</label>
<input class="kt-ai-input" id="f-treatment" placeholder="вакцинация, осмотр">
</div>
</div>
<div class="kt-ai-field">
<label for="f-status">Состояние</label>
<select class="kt-ai-select" id="f-status" required></select>
</div>
<div class="kt-ai-field">
<label for="f-notes">Заметки</label>
<textarea class="kt-ai-textarea" id="f-notes" rows="3"></textarea>
</div>
<div class="modal-actions">
<button type="button" class="kt-ai-btn" data-variant="ghost" id="btn-cancel">Отмена</button>
<button type="submit" class="kt-ai-btn" data-variant="primary">Сохранить</button>
</div>
</form>
</div>
</div>
<footer class="ov-foot">
<span>Учёт овец · <span id="foot-date"></span></span>
</footer>
<script src="script.js"></script>
</body>
</html>