diff --git a/assets/modern/calendar.rcss b/assets/modern/calendar.rcss index ea1e8ad..bd0bf72 100644 --- a/assets/modern/calendar.rcss +++ b/assets/modern/calendar.rcss @@ -48,3 +48,67 @@ body.silver .calendar-day.valid-target .calendar-event-mark, body.silver .calendar-day.rescheduled-date .calendar-event-mark {background-color:#256a4f;} body.silver .calendar-day .calendar-outline.source-outline {border-color:#256a4f;} body.silver .postpone-layout .postpone-summary small.valid {color:#256a4f;} + +/* --- The season calendar: twelve months, and a month opened as a sheet. --- */ +@keyframes cal-zoom-in {from {transform:scale(0.25);opacity:0;} to {transform:scale(1);opacity:1;}} +@keyframes cal-zoom-out {from {transform:scale(3.2);opacity:0;} to {transform:scale(1);opacity:1;}} +.cal-months.zoom-out {animation:0.3s cubic-out cal-zoom-out;} +.cal-sheet.zoom-in {animation:0.3s cubic-out cal-zoom-in;} +.cal-head {position:absolute;left:0;top:0;width:2612dp;height:120dp;display:flex;align-items:center;gap:24dp;border-bottom:4dp #9a7a3a;} +.cal-head h2 {display:block;margin:0;font-family:Display;font-size:64dp;line-height:76dp;font-weight:normal;} +.cal-head p {display:block;margin:0 0 0 auto;font-size:30dp;color:var(--muted);} +.cal-back,.cal-step {height:72dp;padding:0 30dp;border:2dp var(--rule);border-radius:36dp;background-color:transparent;decorator:none;font-size:32dp;display:flex;align-items:center;justify-content:center;} +.cal-step {width:72dp;padding:0;font-size:44dp;} +.cal-months {position:absolute;left:0;top:150dp;width:2612dp;height:1584dp;} +.cal-month {position:absolute;display:block;padding:22dp 28dp;border:2dp var(--rule);border-radius:10dp;background-color:var(--panel);decorator:none;text-align:left;transition:transform 0.12s cubic-out;} +.cal-month:hover {transform:scale(1.03);border-color:#25617a;background-color:#fffdf6;} +.cal-month.current {border:4dp #9a7a3a;} +.cal-month-name {display:block;position:absolute;left:28dp;top:18dp;font-family:Display;font-size:52dp;line-height:64dp;} +.cal-month-year {display:block;position:absolute;right:28dp;top:34dp;font-size:30dp;line-height:40dp;color:var(--muted);} +.cal-mini-grid {display:flex;flex-wrap:wrap;position:absolute;left:28dp;top:104dp;width:581dp;height:340dp;} +.cal-mini {display:flex;align-items:center;justify-content:center;width:83dp;height:48dp;font-size:28dp;color:var(--text);} +.cal-mini span {display:block;width:44dp;height:44dp;line-height:44dp;text-align:center;border-radius:22dp;} +.cal-mini.head {color:var(--muted);font-size:24dp;} +.cal-mini.match span {background-color:#25617a;color:#ffffff;font-weight:bold;} +.cal-mini.event span {border:2dp #9a7a3a;line-height:40dp;} +.cal-mini.today span {border:4dp #b24a4f;line-height:36dp;} +.cal-month-foot {display:block;position:absolute;left:28dp;right:28dp;bottom:16dp;height:40dp;line-height:40dp;font-size:28dp;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;} +.cal-legend {position:absolute;left:0;bottom:0;height:50dp;display:flex;align-items:center;font-size:28dp;color:var(--muted);} +.cal-legend span {display:block;flex-shrink:0;} +.cal-legend .key {width:34dp;height:34dp;border-radius:17dp;margin:0 12dp 0 36dp;} +.cal-legend .key.match {background-color:#25617a;margin-left:0;} +.cal-legend .key.event {border:2dp #9a7a3a;} +.cal-legend .key.today {border:4dp #b24a4f;} +.cal-sheet {position:absolute;left:0;top:140dp;width:2612dp;height:1590dp;} +.cal-weekdays {position:absolute;left:0;top:0;width:2612dp;height:70dp;display:flex;border-radius:8dp;background-color:#9a7a3a;} +.cal-weekdays span {display:block;flex:1;line-height:70dp;text-align:center;font-size:32dp;color:#ffffff;} +.cal-day {position:absolute;display:block;padding:0;border:2dp var(--rule);border-radius:8dp;background-color:var(--panel);decorator:none;overflow:hidden;} +.cal-day:hover {border-color:#25617a;} +.cal-day.weekend {background-color:#f3ead2b0;} +.cal-day.today {border:5dp #b24a4f;} +.cal-day.chosen {border:5dp #25617a;background-color:#fffdf6;} +.cal-day-number {display:block;position:absolute;right:16dp;top:6dp;font-family:Display;font-size:50dp;line-height:60dp;font-weight:bold;color:var(--muted);} +.cal-day.match .cal-day-number {color:var(--text);} +.cal-day-crest {display:block;position:absolute;left:16dp;top:14dp;width:104dp;height:104dp;} +.cal-day-name {display:block;position:absolute;left:16dp;right:12dp;bottom:50dp;height:38dp;line-height:38dp;font-size:28dp;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;} +.cal-day-note {display:block;position:absolute;left:16dp;right:12dp;bottom:10dp;height:38dp;line-height:38dp;font-size:28dp;text-align:left;color:var(--muted);white-space:nowrap;} +.cal-day-note.won {color:var(--win);font-weight:bold;} +.cal-day-note.lost {color:var(--loss);font-weight:bold;} +.cal-day-note.drawn {color:var(--text);font-weight:bold;} +.cal-day-event {display:block;position:absolute;left:16dp;right:12dp;bottom:12dp;line-height:36dp;font-size:27dp;text-align:left;color:#7d5f22;} +.cal-info {bottom:0;height:60dp;line-height:60dp;font-size:34dp;} +body.calm .cal-month:hover {transform:none;} +/* text never stands on the bare picture: lines of text get a framed field */ +.cal-head p,.cal-legend,.cal-info {padding:0 28dp;border:2dp var(--rule);border-radius:30dp;background-color:#fffbf2e6;color:var(--text);} +.cal-head p {height:60dp;line-height:60dp;font-size:32dp;} +.cal-legend {height:60dp;font-size:32dp;} +.cal-info {left:auto;right:0;width:auto;max-width:1900dp;text-align:right;} +.cal-month-foot {font-size:30dp;color:var(--text);} +.cal-mini {font-size:30dp;} +.cal-day-name,.cal-day-note {font-size:30dp;} +.cal-day-event {font-size:30dp;} +.cal-mini-grid {top:92dp;height:330dp;} +.cal-mini {height:46dp;flex-shrink:0;} +.cal-mini.head span {font-size:26dp;color:var(--muted);} +.cal-day-event {padding:0 14dp;right:auto;border:2dp #9a7a3a66;border-radius:18dp;background-color:#fffbf2;} +.cal-day-crest {width:120dp;height:120dp;} diff --git a/assets/modern/theme.rcss b/assets/modern/theme.rcss index 73fac25..a6e6a0e 100644 --- a/assets/modern/theme.rcss +++ b/assets/modern/theme.rcss @@ -171,7 +171,7 @@ body.silver {--paper-top:#fdfaf2;--paper-bottom:#f3ecdd;--paper-edge:#7b6a4a66;- --win:#3f7d63;--draw:#6c7780;--loss:#a23f45;--club:#25617a;--club-ink:#f7fcff;} body.matchday {--paper-top:#333237;--paper-bottom:#252428;--paper-edge:#00000090;--paper-under:#2c2b30;--paper-shadow:#000000a8;--rule:#f0e2e42a; --win:#9fd0a8;--draw:#c8c4c8;--loss:#f0a6a7;--club:#efb2aa;--club-ink:#2a2022;} -body.silver .window {--text:#262b31;--muted:#666d74;--border:#7d76664d;--soft:#5c513a0d;--panel:#ffffff70;--input:#ffffffd0;--hover:#b89a5a24;--selected:#e3d3a878;--strong:#f6f3ecfc;} +body.silver .window {--text:#262b31;--muted:#666d74;--border:#7d76664d;--soft:#5c513a0d;--panel:#fffbf2cc;--input:#ffffffd0;--hover:#b89a5a24;--selected:#e3d3a878;--strong:#f6f3ecfc;} /* paper buttons: a warm sheet with a darker foot; the main action carries the accent */ body.silver .window button.primary,body.silver .live-stage button.primary {background-color:#25617a;border-color:#1b4a5e;color:#f7fcff;decorator:none;} body.silver .window button.primary:hover,body.silver .live-stage button.primary:hover {background-color:#2f7592;} @@ -201,3 +201,24 @@ body.calm .desktop-app:hover .app-tile,body.calm .desktop-card[data-action]:hove .titlebar-club {margin-left:auto;width:68dp;height:68dp;flex-shrink:0;} /* a faint picture of the sheet's subject, under the content and under a veil of the paper's own tone */ .window-art {position:absolute;left:0;top:108dp;width:2720dp;height:1932dp;overflow:hidden;opacity:.85;pointer-events:none;} + +/* --- The training camps: a map on paper, the chosen camp as a card. --- */ +body.silver .camp-map {border:2dp var(--paper-edge);} +body.silver .camp-map-art {filter:invert(1) sepia(1) saturate(0.55) brightness(1.04);} +.camp-regions button {height:76dp;padding:0 36dp;border-radius:38dp;font-size:34dp;} +body.silver .camp-regions button.primary {background-color:#9a7a3a;border-color:#9a7a3a;color:#ffffff;decorator:none;} +.camp-pin,.camp-pin:hover {padding:0;border:0dp;border-radius:40dp;background-color:transparent;decorator:none;display:flex;align-items:center;justify-content:center;} +.camp-pin-dot {display:block;width:34dp;height:34dp;border:5dp #fffbf2;border-radius:22dp;background-color:#25617a;} +.camp-pin:hover .camp-pin-dot {background-color:#9a7a3a;} +.camp-pin.chosen .camp-pin-dot {width:50dp;height:50dp;border-radius:30dp;background-color:#b24a4f;} +.camp-pin-label {position:absolute;width:0;height:0;pointer-events:none;} +.camp-pin-label>span {display:block;position:absolute;left:-220dp;top:0;width:440dp;height:40dp;line-height:40dp;text-align:center;font-size:28dp;color:#3d362a;white-space:nowrap;} +.camp-pin-label.chosen>span {top:6dp;font-size:32dp;font-weight:bold;} +.camp-card {border:2dp var(--rule);border-radius:10dp;background-color:var(--panel);padding:36dp;} +.camp-card h2 {font-family:Display;font-size:60dp;line-height:72dp;} +.camp-card .small {font-size:32dp;color:var(--muted);} +.camp-card .field-row {font-size:36dp;} +.camp-card .field-row.camp-price strong {font-family:Display;font-size:52dp;} +.camp-card input {height:56dp;} +.camp-book-row button {width:100%;height:110dp;font-size:42dp;display:flex;align-items:center;justify-content:center;} +.camp-note {font-size:32dp;line-height:44dp;color:var(--text);} diff --git a/src/modern/ui/calendar_screen.inc b/src/modern/ui/calendar_screen.inc index 33f9c61..fb9a655 100644 --- a/src/modern/ui/calendar_screen.inc +++ b/src/modern/ui/calendar_screen.inc @@ -87,7 +87,7 @@ std::string App::calendar_grid(const Json &calendar, double top, double height, std::string App::render_calendar() { const auto calendar = engine_mode_ ? engine_calendar_view() : snap().state.at("calendar"); - if (engine_mode_) return "
" + esc(calendar_day_info(calendar)) + "
" + engine_calendar_footer(calendar) + "" + esc(calendar_day_info(calendar)) +
diff --git a/src/modern/ui/calendar_year.inc b/src/modern/ui/calendar_year.inc
new file mode 100644
index 0000000..e5ef0e4
--- /dev/null
+++ b/src/modern/ui/calendar_year.inc
@@ -0,0 +1,119 @@
+// SPDX-License-Identifier: GPL-3.0-only
+// The season calendar of a career: the twelve months as small sheets; a click opens a month
+// as a large sheet with a field per day (the own matches with crest and result, other
+// dates as a line), the right mouse button returns to the year. The change is a zoom from
+// and to the month's place among the twelve.
+namespace {
+constexpr std::array Einen Monat anklicken, um seine Tage zu sehen. Rechte Maustaste: zurück zur Saison " + esc(calendar_day_info(view)) + "Saison " + esc(season) + "
" + calendar_month_names[size_t(month - 1)] + " " + std::to_string(days[size_t(begin)].year) + "
" +
+ btn("calendar-month", "›", "cal-step", "id=\"calendar-next\" data-id=\"" + std::to_string(panel + 1) + "\" aria-label=\"Nächster Monat\" " + (panel + 1 < months ? "" : "disabled")) +
+ "
" +
@@ -131,14 +128,14 @@ std::string App::render_camp() {
const int q = chosen->at("quality")[i].get " + esc(engine_busy_ ? engine_operation_ : (booking_note.empty() ? engine_notice_ : booking_note)) + "
" + esc(engine_busy_ ? engine_operation_ : (booking_note.empty() ? engine_notice_ : booking_note)) + "
" : "") + ""; return body; } std::string App::render_menu(const std::string &key) { diff --git a/src/modern/ui/view.cpp b/src/modern/ui/view.cpp index d25c0b0..191aeef 100644 --- a/src/modern/ui/view.cpp +++ b/src/modern/ui/view.cpp @@ -634,8 +634,9 @@ class App final : public Rml::EventListener { // gradient stay on top of the picture's; without such pictures the sheet is plain. std::string window_art() { static const std::map