aex/style/_header.scss
yaroslav k 1f3184baf6 undo: header buttons, shortcuts, wiring
- App provides HistoryHandle as context (both build modes; stacks stay
  empty on the server) and passes it to persist::init_hydrated
- persist: init_hydrated starts undo tracking after the localStorage
  load (first captured state = saved state, not mock); clear_all and
  apply_import call undo::before_replace so they are undoable
- header: Отменить/Вернуть buttons with disabled states driven by the
  reactive stack depths; Ctrl+Z / Ctrl+Shift+Z / Ctrl+Y via a window
  keydown listener that skips editable targets (browser owns those)
- SCSS: disabled control buttons dim out
2026-08-16 12:31:22 +03:00

100 lines
1.8 KiB
SCSS

@use 'mixins';
header {
grid-row: 1/2;
grid-column: 1/3;
display: flex;
.campaign-image {
width: 120px;
img {
width: 100%;
height: 100%;
object-fit: cover; /* or contain, or fill */
}
overflow: hidden;
}
section {
width: 100%;
display: grid;
grid-template-columns: 3fr 1fr;
grid-template-rows: 2fr 1fr 1fr;
padding-left: 20px;
}
.campaign-name {
font-size: 2em;
grid-row: 1/2;
grid-column: 1/2;
align-self: last baseline;
padding-bottom: 3px;
}
.version {
font-size: 0.6em;
text-transform: lowercase;
grid-row: 1/2;
grid-column: 2/3;
align-self: start;
justify-self: end;
padding: 3px;
color: #888;
}
.controls {
grid-row: 2/4;
grid-column: 2/3;
padding: 3px;
display: flex;
justify-content: flex-end;
align-items: flex-end;
button {
padding: 3px 5px;
text-transform: lowercase;
font-size: 0.66em;
line-height: 1em;
margin: 2px 5px;
@include mixins.button;
&:disabled {
opacity: 0.45;
cursor: default;
}
}
}
.game-date, .session-number {
display: flex;
align-items: center;
:first-child {
width: 120px;
}
.adjust {
margin: 0 1px;
width: 20px;
&:hover {
cursor: pointer;
}
@include mixins.button;
}
}
.session-number {
grid-row: 2/3;
grid-column: 1/2;
font-weight: 300;
}
.game-date {
grid-row: 3/4;
grid-column: 1/2;
}
}