Игорь Надеин 0932bcb599 refactor: Extract base-app and ios-components CSS
- Created static/css/components/base-app.css (280 lines)
  * Layout system (sidebar, navbar, rightbar)
  * Base typography and form controls
  * Notification bell, mobile FAB
  * Feed elements and ghost buttons
  * Alpha headers and action buttons

- Created static/css/components/ios-components.css (440 lines)
  * iOS-style cards, lists, and cells
  * Avatars, badges, chips
  * Collapse triggers and accordions
  * Department inline editor
  * Skills UI, activity block
  * Icon button variants

- Removed 380 lines of inline styles from base.html
- All tests passing (17 OK)
2025-10-28 09:50:39 +03:00

279 lines
9.1 KiB
CSS
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.

/**
* base-app.css
* Базовые стили приложения: layout, navbar, sidebar, кнопки, feed-элементы
*/
:root {
--sidebar-w: 190px;
--rightbar-w: 350px;
--navbar-h: 60px;
--bs-primary: #007AFF;
--bs-link-color: var(--bs-primary);
--bs-link-hover-color: #0062CC;
/* feed tokens */
--feed-radius: 18px;
--feed-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .08);
--feed-shadow-hover: 0 4px 10px rgba(0, 0, 0, .06), 0 16px 40px rgba(0, 0, 0, .12);
}
[data-bs-theme="dark"] {
--bs-body-bg: #1C1C1E;
--bs-body-color: #F2F2F7;
--bs-border-color: #3A3A3C;
--bs-tertiary-bg: #2C2C2E;
--bs-primary: #0A84FF;
--bs-link-color: var(--bs-primary);
--bs-link-hover-color: #59AFFF;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
font-size: 17px;
padding-top: var(--navbar-h);
overflow-x: hidden;
background-color: var(--bs-body-bg);
}
@supports(padding-top: env(safe-area-inset-top)) {
body {
padding-top: calc(var(--navbar-h) + env(safe-area-inset-top));
}
}
.btn {
border-radius: 10px;
min-height: 44px;
transition: background-color .3s, transform .1s;
}
.btn:hover {
transform: scale(1.02);
}
.form-control {
border-radius: 10px;
height: 44px;
font-size: 17px;
}
.form-control:focus {
box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), .25);
border-color: var(--bs-primary);
}
.dropdown-menu {
border-radius: 13px;
box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
}
/* ─────────────────────────────────────────────────────────────
NAVBAR
────────────────────────────────────────────────────────────── */
.app-navbar {
position: fixed;
inset: 0 0 auto 0;
z-index: 1030;
border-bottom: .5px solid var(--bs-border-color);
}
/* ─────────────────────────────────────────────────────────────
LAYOUT
────────────────────────────────────────────────────────────── */
.app-layout {
display: block;
}
@media (min-width: 992px) {
.app-layout.with-sidebar.with-rightbar {
display: grid;
grid-template-columns: var(--sidebar-w) 1fr var(--rightbar-w);
align-items: start;
}
.app-layout.with-sidebar:not(.with-rightbar) {
display: grid;
grid-template-columns: var(--sidebar-w) 1fr;
align-items: start;
}
}
/* ─────────────────────────────────────────────────────────────
SIDEBAR
────────────────────────────────────────────────────────────── */
#sidebar {
--bs-offcanvas-width: var(--sidebar-w);
border-radius: 0 13px 13px 0;
}
@media (min-width: 992px) {
#sidebar.offcanvas-lg {
position: sticky;
top: var(--navbar-h);
height: calc(100dvh - var(--navbar-h));
align-self: start;
overflow: auto;
border-right: .5px solid var(--bs-border-color);
background: var(--bs-body-bg);
transform: none !important;
visibility: visible !important;
}
}
/* ─────────────────────────────────────────────────────────────
NOTIFICATION BELL
────────────────────────────────────────────────────────────── */
.bell-wrapper {
position: relative;
line-height: 1;
display: inline-block;
}
.bell-dot {
position: absolute;
top: -2px;
right: -2px;
width: 9px;
height: 9px;
border-radius: 999px;
background: var(--bs-danger);
color: #fff;
font-size: 7px;
line-height: 9px;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 0 0 1px rgba(255, 255, 255, .65);
}
/* ─────────────────────────────────────────────────────────────
MOBILE FAB
────────────────────────────────────────────────────────────── */
.calendar-fab {
position: fixed;
right: 1rem;
bottom: 1rem;
z-index: 1060;
width: 52px;
height: 52px;
border-radius: 9999px;
box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
/* ─────────────────────────────────────────────────────────────
BUTTONS & GHOST BUTTONS
────────────────────────────────────────────────────────────── */
.btn-ghost {
background: color-mix(in srgb, var(--bs-body-bg) 94%, transparent);
color: var(--bs-body-color);
padding: .35rem .6rem;
border-radius: 999px;
font-size: .9rem;
}
.btn-ghost:hover {
background: color-mix(in srgb, var(--bs-body-bg) 88%, transparent);
}
.btn-ghost .bi {
font-size: 1rem;
margin-right: .35rem;
vertical-align: -2px;
}
/* ─────────────────────────────────────────────────────────────
FEED ELEMENTS
────────────────────────────────────────────────────────────── */
/* «Новые сотрудники» */
.feed-new {
border-radius: var(--feed-radius);
border: 1px solid color-mix(in srgb, var(--bs-border-color), transparent 10%);
background: var(--bs-body-bg);
box-shadow: var(--feed-shadow);
padding: .9rem 1rem;
}
/* stretched-link не перекрывает футер/формы */
.feed-body .stretched-link::after,
.feed-img .stretched-link::after {
z-index: 1;
}
.collapse {
position: relative;
z-index: 2;
}
/* подпись «Скрыть/число» у кнопки комментариев по aria-expanded */
.btn-ghost .txt-close {
display: none;
}
.btn-ghost[aria-expanded="true"] .txt-open {
display: none;
}
.btn-ghost[aria-expanded="true"] .txt-close {
display: inline;
}
/* ─────────────────────────────────────────────────────────────
ALPHA HEADERS (буквенные разделители)
────────────────────────────────────────────────────────────── */
.alpha-header {
position: sticky;
top: calc(var(--navbar-h) + 8px);
z-index: 1;
background: color-mix(in srgb, var(--bs-body-bg) 92%, transparent);
backdrop-filter: blur(6px);
border: 1px solid color-mix(in srgb, var(--bs-border-color), transparent 30%);
color: var(--bs-secondary-color);
display: inline-flex;
align-items: center;
gap: .5rem;
padding: .2rem .6rem;
border-radius: 999px;
font-weight: 700;
font-size: .85rem;
margin: .25rem 0 .5rem .25rem;
}
.alpha-dot {
width: 6px;
height: 6px;
border-radius: 999px;
background: var(--bs-primary);
opacity: .6;
}
/* ─────────────────────────────────────────────────────────────
ACTION BUTTONS
────────────────────────────────────────────────────────────── */
.action-btn {
min-height: unset;
padding: .35rem .6rem;
}
.action-btn .bi {
font-size: 1rem;
}
/* ─────────────────────────────────────────────────────────────
TEXT UTILITIES
────────────────────────────────────────────────────────────── */
/* Переносим длинные слова/ссылки, сохраняем переносы строк */
.feed-text,
.feed-full {
overflow-wrap: anywhere;
width: 100%;
margin-right: 0;
padding-right: 0;
}
/* чтобы кнопка «Подробнее» не была перекрыта stretched-link */
.readmore-toggle {
position: relative;
z-index: 2;
}