style: update padding for body and add early return in day detail function

- Adjusted the bottom padding in `style.css` to improve layout by incorporating a comfortable offset for safe areas.
- Added an early return in `dayDetail.js` to prevent further processing when there are no duties or event summaries, enhancing performance and preventing unnecessary DOM manipulations.
This commit is contained in:
2026-02-19 16:27:20 +03:00
parent b60111462a
commit dee1d776c3
2 changed files with 4 additions and 1 deletions

View File

@@ -221,6 +221,8 @@ function openDayDetail(cell) {
const duties = /** @type {object[]} */ (parseDataAttr(dutiesRaw || ""));
const eventSummaries = /** @type {string[]} */ (parseDataAttr(eventsRaw || ""));
if (duties.length === 0 && eventSummaries.length === 0) return;
ensurePanelInDom();
if (!panelEl) return;

View File

@@ -246,7 +246,8 @@ body {
padding-top: 12px;
padding-left: 16px;
padding-right: 16px;
padding-bottom: max(16px, env(safe-area-inset-bottom));
/* Комфортный отступ снизу: safe area + дополнительное поле */
padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.day-detail-panel--sheet::before {