- Add compact donut mode for landscape phones (<=850px, landscape): wider radii (56%/93%/100%), no outside labels, bolder fonts - Refine landscape CSS: smaller header (h1:20px), 55/45 chart/details split, compact month previews (22px), tighter spacing - Add PWA standalone support: manifest.json, apple-mobile-web-app meta tags, viewport-fit=cover - Add safe-area-inset padding for Dynamic Island and home indicator Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
86 lines
4.1 KiB
HTML
86 lines
4.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
|
<meta name="apple-mobile-web-app-title" content="Траты">
|
|
<link rel="manifest" href="manifest.json">
|
|
<title>Spending Visualization</title>
|
|
<link rel="stylesheet" href="styles.css">
|
|
<script src="https://cdn.jsdelivr.net/npm/echarts@5.6.0/dist/echarts.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinycolor/1.4.2/tinycolor.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="header">
|
|
<h1>Семейные траты</h1>
|
|
<div class="view-switcher" id="view-switcher">
|
|
<button class="view-switcher-btn active" data-view="month">месяц</button>
|
|
<button class="view-switcher-btn" data-view="timeline">таймлайн</button>
|
|
</div>
|
|
<div class="month-navigator">
|
|
<button class="nav-arrow nav-prev" id="prev-month">‹</button>
|
|
<div class="month-list" id="month-list"></div>
|
|
<button class="nav-arrow nav-next" id="next-month">›</button>
|
|
</div>
|
|
<select id="month-select" style="display: none;"></select>
|
|
</div>
|
|
<div class="content-wrapper">
|
|
<div class="chart-wrapper">
|
|
<div id="chart-container"></div>
|
|
<div id="center-label" class="center-label">
|
|
<div class="center-home" title="Back to overview">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
|
|
<polyline points="9 22 9 12 15 12 15 22"/>
|
|
</svg>
|
|
</div>
|
|
<div class="center-month"></div>
|
|
<div class="center-category"></div>
|
|
<div class="center-amount"><span class="center-amount-num"></span><span class="center-rub"></span></div>
|
|
</div>
|
|
<button id="chart-eye-btn" class="chart-eye-btn" title="View transactions">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
|
|
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/>
|
|
<circle cx="12" cy="12" r="3"/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
<div id="details-box" class="details-box">
|
|
<div id="details-header" class="details-header">
|
|
<span class="hover-name">Hover over a segment to see details</span>
|
|
<span class="hover-amount"></span>
|
|
</div>
|
|
<h4>Top Items:</h4>
|
|
<div id="top-items"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="transaction-modal" class="modal-overlay" style="display: none;">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h2 id="modal-title">Transaction Details</h2>
|
|
<button class="modal-close" id="modal-close">×</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="modal-table-container">
|
|
<table id="modal-table" class="transaction-table">
|
|
<thead id="modal-thead"></thead>
|
|
<tbody id="modal-tbody"></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="row-detail-modal" class="modal-overlay" style="display: none;">
|
|
<div class="row-detail-content">
|
|
<button class="modal-close" id="row-detail-close">×</button>
|
|
<h3 id="row-detail-title">Transaction Details</h3>
|
|
<div id="row-detail-body"></div>
|
|
</div>
|
|
</div>
|
|
<script src="app.js"></script>
|
|
</body>
|
|
</html> |