diff --git a/docs/mockup/redesign/a-febe/aste.html b/docs/mockup/redesign/a-febe/aste.html new file mode 100644 index 0000000..647e39d --- /dev/null +++ b/docs/mockup/redesign/a-febe/aste.html @@ -0,0 +1,12 @@ + + + + + +Mimante — Aste (proposta A) + + + + + + diff --git a/docs/mockup/redesign/a-febe/impostazioni.html b/docs/mockup/redesign/a-febe/impostazioni.html new file mode 100644 index 0000000..b862dce --- /dev/null +++ b/docs/mockup/redesign/a-febe/impostazioni.html @@ -0,0 +1,12 @@ + + + + + +Mimante — Impostazioni (proposta A) + + + + + + diff --git a/docs/mockup/redesign/a-febe/puntate-gratis.html b/docs/mockup/redesign/a-febe/puntate-gratis.html new file mode 100644 index 0000000..83a5dd9 --- /dev/null +++ b/docs/mockup/redesign/a-febe/puntate-gratis.html @@ -0,0 +1,12 @@ + + + + + +Mimante — Puntate gratis (proposta A) + + + + + + diff --git a/docs/mockup/redesign/a-febe/stile.css b/docs/mockup/redesign/a-febe/stile.css new file mode 100644 index 0000000..5928ff8 --- /dev/null +++ b/docs/mockup/redesign/a-febe/stile.css @@ -0,0 +1,60 @@ +/* Proposta A — sulla linea di Febe: grigio caldo, carte bianche, barra laterale con lo stato in fondo, + Archivo, accento blu petrolio. Ariosa, righe da 40 px. */ +@import url(../comune/base.css); +@font-face{font-family:"Archivo";src:url(../caratteri/archivo-latin-standard-normal.woff2) format("woff2");font-weight:100 900;font-stretch:62% 125%;font-display:block} +@font-face{font-family:"Archivo";src:url(../caratteri/archivo-latin-ext-standard-normal.woff2) format("woff2");font-weight:100 900;font-stretch:62% 125%;font-display:block;unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF} + +:root,:root[data-theme="light"]{ + color-scheme:light; + --bg:#F4F4F4; --surface:#FFFFFF; --surface-2:#FAFAFA; --surface-3:#ECECEC; + --line:#E1E1E1; --line-soft:#ECECEC; --line-strong:#CCCCCC; + --text:#1A1A1A; --muted:#555555; --faint:#6A6A6A; + --accent:#0F5C8C; --accent-ink:#FFFFFF; --accent-text:#0B4A72; --accent-soft:#E3EEF5; --accent-line:#B5D0E2; + --ok:#1E7B4F; --ok-text:#1E7B4F; --ok-soft:#E3F2EA; + --warn-fill:#E0A021; --warn-text:#9A5B00; --warn-soft:#FBF0DA; + --bad-text:#B42318; --bad-soft:#FBE9E7; + --gold-text:#7D5A00; --gold-soft:#F5ECD2; --muted-soft:#EEEEEE; + --logo-bg:#0F5C8C; --logo-fg:#FFFFFF; +} +:root[data-theme="dark"]{ + color-scheme:dark; + --bg:#1B1B1B; --surface:#242424; --surface-2:#2B2B2B; --surface-3:#151515; + --line:#363636; --line-soft:#2F2F2F; --line-strong:#4A4A4A; + --text:#EDEDED; --muted:#B0B0B0; --faint:#959595; + --accent:#62B1E0; --accent-ink:#0C2230; --accent-text:#8AC6EA; --accent-soft:#1B3342; --accent-line:#2C5068; + --ok:#5CC08D; --ok-text:#5CC08D; --ok-soft:#1A3326; + --warn-fill:#E0A021; --warn-text:#E7B04C; --warn-soft:#3A2E14; + --bad-text:#F0776C; --bad-soft:#3F1E1B; + --gold-text:#E2BD5A; --gold-soft:#3A3115; --muted-soft:#2F2F2F; + --logo-bg:#62B1E0; --logo-fg:#0C2230; +} +:root{ + --font:"Archivo",system-ui,sans-serif; --mono:"Cascadia Mono",ui-monospace,monospace; + --fs:14px; --fs-small:12.5px; --ctl-h:34px; --row-h:40px; --th-h:36px; + --r:7px; --r-lg:10px; --r-badge:4px; --gap:16px; --det-w:384px; --imp-min:440px; +} +.num,.n{font-stretch:92%} + +.guscio{grid-template-columns:228px 1fr} +.laterale{background:var(--surface-3);border-right:1px solid var(--line);padding:16px 12px 12px} +.laterale .marchio{padding:2px 8px 18px} +.laterale .marchio b{font-size:17px;font-weight:650;font-stretch:108%} +.nav a{height:36px;padding:0 10px;border-radius:var(--r);font-weight:500} +.nav a.qui{background:var(--surface);border-color:var(--line);color:var(--text);font-weight:600} +.nav a.qui svg{color:var(--accent)} +.stato-lat{border:1px solid var(--line);background:var(--surface);border-radius:var(--r-lg);padding:12px} +.stato-lat .riga b{font-weight:600} + +.testa{padding:20px 28px 14px} +.testa .titoli{display:flex;align-items:baseline;gap:14px} +.testa h1{font-size:22px;font-weight:650;font-stretch:104%;letter-spacing:-.005em} +.testa .sotto{font-size:13.5px} +.indicatori{gap:8px;padding:0 28px 14px} +.ind{height:30px;padding:0 12px;border-radius:15px;border:1px solid var(--line);background:var(--surface);font-size:13px} +.corpo{padding:0 28px 24px} + +.tabella th{background:var(--surface);font-weight:500;font-size:12.5px} +.tabella td{border-bottom-color:var(--line-soft)} +.schede{padding:0 16px} +.pannello{box-shadow:none} +.kpi b{font-stretch:96%} diff --git a/docs/mockup/redesign/b-khaemhat/aste.html b/docs/mockup/redesign/b-khaemhat/aste.html new file mode 100644 index 0000000..a75f9d7 --- /dev/null +++ b/docs/mockup/redesign/b-khaemhat/aste.html @@ -0,0 +1,12 @@ + + + + + +Mimante — Aste (proposta B) + + + + + + diff --git a/docs/mockup/redesign/b-khaemhat/impostazioni.html b/docs/mockup/redesign/b-khaemhat/impostazioni.html new file mode 100644 index 0000000..10bb3a5 --- /dev/null +++ b/docs/mockup/redesign/b-khaemhat/impostazioni.html @@ -0,0 +1,12 @@ + + + + + +Mimante — Impostazioni (proposta B) + + + + + + diff --git a/docs/mockup/redesign/b-khaemhat/puntate-gratis.html b/docs/mockup/redesign/b-khaemhat/puntate-gratis.html new file mode 100644 index 0000000..6e27b6d --- /dev/null +++ b/docs/mockup/redesign/b-khaemhat/puntate-gratis.html @@ -0,0 +1,12 @@ + + + + + +Mimante — Puntate gratis (proposta B) + + + + + + diff --git a/docs/mockup/redesign/b-khaemhat/stile.css b/docs/mockup/redesign/b-khaemhat/stile.css new file mode 100644 index 0000000..a78dd78 --- /dev/null +++ b/docs/mockup/redesign/b-khaemhat/stile.css @@ -0,0 +1,85 @@ +/* Proposta B — sulla linea di Khaemhat: barra alta blu notte con ricerca e indicatori, barra laterale + bianca a gruppi, schede delle pagine aperte, barra di stato in fondo. Densa, 13 px, righe da 30 px. */ +@import url(../comune/base.css); + +:root,:root[data-theme="light"]{ + color-scheme:light; + --bg:#F3F5F8; --surface:#FFFFFF; --surface-2:#F8FAFC; --surface-3:#EEF2F6; + --line:#DDE3EA; --line-soft:#EBEFF4; --line-strong:#C5CDD7; + --text:#1E2733; --muted:#5B6776; --faint:#6F7A88; + --accent:#1F5FA8; --accent-ink:#FFFFFF; --accent-text:#174A85; --accent-soft:#E3ECF8; --accent-line:#BFD2EC; + --ok:#1E8E5A; --ok-text:#1A7A4D; --ok-soft:#DDF3E6; + --warn-fill:#C27A1A; --warn-text:#9A6013; --warn-soft:#FBEFD9; + --bad-text:#B53B31; --bad-soft:#FADEDC; + --gold-text:#8B6318; --gold-soft:#F1E6C8; --muted-soft:#EEF2F6; + --topbar:#17243A; --topbar-text:#E8EDF5; --topbar-muted:#9FB0C8; --topbar-field:#22324D; + --sidebar:#FFFFFF; + --logo-bg:#C8962E; --logo-fg:#17243A; +} +:root[data-theme="dark"]{ + color-scheme:dark; + --bg:#12161C; --surface:#1B2028; --surface-2:#20262F; --surface-3:#262D37; + --line:#2E3744; --line-soft:#252C36; --line-strong:#3C4756; + --text:#E7ECF2; --muted:#A5B0BD; --faint:#8A96A5; + --accent:#4C8EDB; --accent-ink:#0E131A; --accent-text:#8DB8EE; --accent-soft:#1C2F4A; --accent-line:#2B4A72; + --ok:#3DBB7E; --ok-text:#8ADBB1; --ok-soft:#163B2A; + --warn-fill:#E09A3A; --warn-text:#F0C27A; --warn-soft:#3E2E13; + --bad-text:#F0A39B; --bad-soft:#44201D; + --gold-text:#E0B860; --gold-soft:#3A2F17; --muted-soft:#262D37; + --topbar:#0E131A; --topbar-text:#E7ECF2; --topbar-muted:#8391A3; --topbar-field:#1B2330; + --sidebar:#171C23; + --logo-bg:#C8962E; --logo-fg:#0E131A; +} +:root{ + --font:"Inter","Segoe UI",system-ui,sans-serif; --mono:"Cascadia Mono",ui-monospace,monospace; + --fs:13px; --fs-small:11.5px; --ctl-h:30px; --row-h:30px; --th-h:32px; + --r:6px; --r-lg:10px; --r-badge:10px; --gap:12px; --det-w:372px; --imp-min:420px; +} + +.guscio{grid-template-columns:228px 1fr;grid-template-rows:46px 1fr 24px;grid-template-areas:"alta alta" "lat cont" "piede piede"} +.barra-alta{display:flex;align-items:center;gap:16px;grid-area:alta;background:var(--topbar);color:var(--topbar-text);padding:0 12px 0 14px} +.barra-alta .marchio{width:202px} +.barra-alta .marchio b{font-size:15px;font-weight:650} +.barra-alta .marchio small{color:var(--topbar-muted)} +.ricerca-alta{display:flex;align-items:center;gap:8px;width:420px;height:30px;padding:0 10px;border-radius:6px;background:var(--topbar-field);color:var(--topbar-muted);border:1px solid rgba(255,255,255,.08)} +.ricerca-alta svg.ic{width:15px;height:15px} +.ricerca-alta kbd{margin-left:auto;font:11px var(--mono);padding:1px 6px;border-radius:4px;background:rgba(255,255,255,.08)} +.barra-alta .indicatori{gap:4px} +.barra-alta .ind{height:28px;padding:0 9px;border-radius:5px;font-size:12px} +.barra-alta .ind em{color:var(--topbar-muted)} +.barra-alta .ind b{color:var(--topbar-text)} +.alta-destra{margin-left:auto;display:flex;align-items:center;gap:6px} +.tondo{width:30px;height:30px;border:0;border-radius:6px;background:transparent;color:var(--topbar-muted);display:inline-flex;align-items:center;justify-content:center} +.barra-alta .avatar{width:30px;height:30px;background:#2D4A75;color:#E8EDF5} + +.laterale{grid-area:lat;background:var(--sidebar);border-right:1px solid var(--line);padding:8px 8px 10px;overflow:auto} +.nav-gruppo{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--faint);padding:12px 8px 6px} +.nav a{height:32px;padding:0 10px;border-radius:6px;gap:10px} +.nav a svg.ic{width:17px;height:17px} +.nav a.qui{background:var(--accent-soft);color:var(--accent-text);font-weight:600} +.lat-piede{margin-top:auto;font-size:11.5px;color:var(--faint);padding:10px 8px 0;border-top:1px solid var(--line)} + +.contenuto{grid-area:cont} +.schede-app{display:flex;align-items:flex-end;gap:2px;height:36px;padding:0 12px;border-bottom:1px solid var(--line);background:var(--surface-2);flex:none} +.schede-app span{height:30px;display:inline-flex;align-items:center;gap:8px;padding:0 14px;color:var(--muted);border:1px solid transparent;border-bottom:0;border-radius:6px 6px 0 0} +.schede-app span.qui{background:var(--bg);border-color:var(--line);color:var(--text);font-weight:500;margin-bottom:-1px;height:31px} +.schede-app .piu svg.ic{width:15px;height:15px} +.testa{padding:10px 14px 10px} +.briciole{font-size:12px;color:var(--muted)} +.testa h1{font-size:20px;font-weight:600} +.corpo{padding:0 14px 12px} + +.piede{grid-area:piede;display:flex;align-items:center;gap:18px;padding:0 12px;font-size:11.5px;color:var(--muted);background:var(--surface);border-top:1px solid var(--line)} +.piede span{display:inline-flex;align-items:center;gap:6px} +.piede .dx{margin-left:auto} +.piede .punto{width:7px;height:7px} + +.pannello{box-shadow:0 1px 2px rgba(16,24,40,.06),0 1px 3px rgba(16,24,40,.08)} +.tabella th{text-transform:none;background:var(--surface-2)} +.tabella tbody tr:nth-child(even) td{background:var(--surface-2)} +.tabella tr.sel td{background:var(--accent-soft)} +.tabella td.nome{color:var(--accent-text)} +.det-testa h2{font-size:15px} +.kpi .k{padding:10px 12px} +.kpi b{font-size:21px} +.imp-campo{padding:8px 16px} diff --git a/docs/mockup/redesign/c-anubis/aste.html b/docs/mockup/redesign/c-anubis/aste.html new file mode 100644 index 0000000..5ed4c13 --- /dev/null +++ b/docs/mockup/redesign/c-anubis/aste.html @@ -0,0 +1,12 @@ + + + + + +Mimante — Aste (proposta C) + + + + + + diff --git a/docs/mockup/redesign/c-anubis/impostazioni.html b/docs/mockup/redesign/c-anubis/impostazioni.html new file mode 100644 index 0000000..ba2ff60 --- /dev/null +++ b/docs/mockup/redesign/c-anubis/impostazioni.html @@ -0,0 +1,12 @@ + + + + + +Mimante — Impostazioni (proposta C) + + + + + + diff --git a/docs/mockup/redesign/c-anubis/puntate-gratis.html b/docs/mockup/redesign/c-anubis/puntate-gratis.html new file mode 100644 index 0000000..1013ec5 --- /dev/null +++ b/docs/mockup/redesign/c-anubis/puntate-gratis.html @@ -0,0 +1,12 @@ + + + + + +Mimante — Puntate gratis (proposta C) + + + + + + diff --git a/docs/mockup/redesign/c-anubis/stile.css b/docs/mockup/redesign/c-anubis/stile.css new file mode 100644 index 0000000..de0323d --- /dev/null +++ b/docs/mockup/redesign/c-anubis/stile.css @@ -0,0 +1,96 @@ +/* Proposta C — sulla linea di Anubis: carta verde salvia, Instrument Sans, filetti al posto delle carte, + cifre grandi e colori di guadagno/perdita come in un quadro finanziario. */ +@import url(../comune/base.css); +@font-face{font-family:"Instrument Sans";src:url(../caratteri/InstrumentSans.ttf) format("truetype");font-weight:400 700;font-stretch:75% 100%;font-display:block} + +:root,:root[data-theme="light"]{ + color-scheme:light; + --bg:#F1F3F0; --surface:#FBFCFA; --surface-2:#E9EDE8; --surface-3:#DFE4DE; + --line:#D9DED8; --line-soft:#E3E7E2; --line-strong:#8A948E; + --text:#141A17; --muted:#46504A; --faint:#5F6963; + --accent:#1C5CAB; --accent-ink:#FFFFFF; --accent-text:#1C5CAB; --accent-soft:#E3EEFB; --accent-line:#B9CFEC; + --ok:#0A6B55; --ok-text:#0A6B55; --ok-soft:#DFF2EA; + --warn-fill:#C98C12; --warn-text:#7A5000; --warn-soft:#FBEFCF; + --bad-text:#B42F1A; --bad-soft:#FBE5DF; + --gold-text:#7A5000; --gold-soft:#FBEFCF; --muted-soft:#E9EDE8; + --logo-bg:#141A17; --logo-fg:#F1F3F0; +} +:root[data-theme="dark"]{ + color-scheme:dark; + --bg:#101412; --surface:#181D1A; --surface-2:#222924; --surface-3:#2C342F; + --line:#2C342F; --line-soft:#262D28; --line-strong:#6C766F; + --text:#F2F5F1; --muted:#C3CBC4; --faint:#9AA39C; + --accent:#86B6EF; --accent-ink:#0C1A2B; --accent-text:#86B6EF; --accent-soft:#17304F; --accent-line:#2A4A70; + --ok:#4CC9A4; --ok-text:#4CC9A4; --ok-soft:#12372D; + --warn-fill:#F2C14E; --warn-text:#F2C14E; --warn-soft:#3D2F0C; + --bad-text:#FF8D78; --bad-soft:#45201A; + --gold-text:#F2C14E; --gold-soft:#3D2F0C; --muted-soft:#222924; + --logo-bg:#F2F5F1; --logo-fg:#101412; +} +:root{ + --font:"Instrument Sans",system-ui,sans-serif; --mono:"Cascadia Mono",ui-monospace,monospace; + --fs:14px; --fs-small:12px; --ctl-h:32px; --row-h:36px; --th-h:34px; + --r:4px; --r-lg:6px; --r-badge:3px; --gap:20px; --det-w:392px; --imp-min:460px; +} + +.guscio{grid-template-columns:220px 1fr} +.laterale{background:var(--bg);border-right:1px solid var(--line);padding:20px 14px 14px} +.laterale .marchio{padding:0 6px 22px} +.laterale .marchio .logo{width:24px;height:24px} +.laterale .marchio b{font-size:18px;font-weight:600;letter-spacing:-.01em} +.nav a{height:34px;padding:0 8px;border-radius:var(--r);font-weight:500} +.nav a.qui{color:var(--text);font-weight:600;background:var(--surface-2)} +.nav a.qui svg{color:var(--text)} +.stato-lat{border-top:1px solid var(--line);padding:12px 6px 0} +.stato-lat .riga b{font-weight:600} + +.testa{padding:24px 32px 6px;align-items:flex-end} +.testa .titoli{display:flex;flex-direction:column;gap:2px} +.testa h1{font-size:28px;font-weight:600;letter-spacing:-.015em;line-height:1.15} +.testa .sotto{font-size:14px} +.indicatori{gap:0;padding:10px 32px 16px;border-bottom:1px solid var(--line);margin:0 32px 18px;padding-left:0;padding-right:0} +.ind{flex-direction:column;align-items:flex-start;gap:0;padding-right:28px;margin-right:28px;border-right:1px solid var(--line-soft)} +.ind:last-child{border-right:0} +.ind em{font-size:12px;order:0} +.ind b{font-size:17px;font-weight:600;order:1} +.ind .punto{display:none} +.corpo{padding:0 32px 24px} + +/* filetti, non carte */ +.pannello{background:transparent;border:0;border-top:2px solid var(--text);border-radius:0} +.griglia-aste,.dettaglio{background:var(--surface);border:1px solid var(--line);border-top:2px solid var(--text)} +.barra-strumenti{padding:10px 0;border-bottom:1px solid var(--line)} +.griglia-aste .barra-strumenti{padding:10px 12px} +.tabella th{background:transparent;color:var(--muted);font-weight:500;font-size:12px;border-bottom:1px solid var(--text)} +.griglia-aste .tabella th{background:var(--surface)} +.tabella td{border-bottom-color:var(--line-soft)} +.tabella td.n,.tabella th.n{font-variant-numeric:tabular-nums lining-nums} +.tabella tr.sel td{background:var(--surface-2)} +.tabella tr.sel td:first-child{box-shadow:inset 3px 0 0 var(--text)} +.stato,.esito{background:transparent!important;padding:0;height:auto;font-size:12.5px;font-weight:600} +.stato::before,.esito::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;margin-right:6px} +.schede{padding:0} +.schede span{padding:10px 0 9px;margin-right:18px} +.dettaglio .schede{padding:0 16px} +.dettaglio .schede span{margin-right:14px} +.schede span.qui{border-bottom-color:var(--text)} +.verdetto{background:transparent;border:0;border-left:3px solid var(--accent);border-radius:0;padding:4px 0 4px 14px} +.v-numeri b{font-size:22px} +.cifre{background:transparent;border:0;border-top:1px solid var(--line);border-radius:0;gap:0} +.cifre div{background:transparent;padding:10px 0;border-bottom:1px solid var(--line-soft)} +.imp-sezione header{padding:12px 0 10px} +.imp-sezione h2{font-size:17px;font-weight:600} +.imp-campo{padding:11px 0} +.kpi{gap:0;border-top:2px solid var(--text);border-bottom:1px solid var(--line)} +.kpi .k{background:transparent;border:0;border-radius:0;border-right:1px solid var(--line-soft);padding:14px 18px 14px 0;margin-right:18px} +.kpi .k:last-child{border-right:0} +.kpi b{font-size:32px;font-weight:600;letter-spacing:-.02em} +.colonna .pannello{padding:12px 0 0} +.incolla{padding:12px 0} +.registro{background:transparent;padding:0} +.btn{border-radius:var(--r)} +.btn.primo{background:var(--text);border-color:var(--text);color:var(--bg)} +.interruttore.acceso{background:var(--ok)} +.ora.si{background:var(--text);color:var(--bg)} +.grafico rect{fill:var(--text);opacity:.55} +.grafico rect:last-child{fill:var(--accent);opacity:1} diff --git a/docs/mockup/redesign/caratteri/Archivo-OFL.txt b/docs/mockup/redesign/caratteri/Archivo-OFL.txt new file mode 100644 index 0000000..78b7453 --- /dev/null +++ b/docs/mockup/redesign/caratteri/Archivo-OFL.txt @@ -0,0 +1,93 @@ +Copyright 2020 The Archivo Project Authors (https://github.com/Omnibus-Type/Archivo) Archivo-Italic[wdth,wght].ttf: Copyright 2020 The Archivo Project Authors (https://github.com/Omnibus-Type/Archivo) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/docs/mockup/redesign/caratteri/InstrumentSans-OFL.txt b/docs/mockup/redesign/caratteri/InstrumentSans-OFL.txt new file mode 100644 index 0000000..26bd2f9 --- /dev/null +++ b/docs/mockup/redesign/caratteri/InstrumentSans-OFL.txt @@ -0,0 +1,93 @@ +Copyright 2022 The Instrument Sans Project Authors (https://github.com/Instrument/instrument-sans) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/docs/mockup/redesign/caratteri/InstrumentSans.ttf b/docs/mockup/redesign/caratteri/InstrumentSans.ttf new file mode 100644 index 0000000..3589b81 Binary files /dev/null and b/docs/mockup/redesign/caratteri/InstrumentSans.ttf differ diff --git a/docs/mockup/redesign/caratteri/archivo-latin-ext-standard-normal.woff2 b/docs/mockup/redesign/caratteri/archivo-latin-ext-standard-normal.woff2 new file mode 100644 index 0000000..c0dbc07 Binary files /dev/null and b/docs/mockup/redesign/caratteri/archivo-latin-ext-standard-normal.woff2 differ diff --git a/docs/mockup/redesign/caratteri/archivo-latin-standard-normal.woff2 b/docs/mockup/redesign/caratteri/archivo-latin-standard-normal.woff2 new file mode 100644 index 0000000..e2448d0 Binary files /dev/null and b/docs/mockup/redesign/caratteri/archivo-latin-standard-normal.woff2 differ diff --git a/docs/mockup/redesign/comune/base.css b/docs/mockup/redesign/comune/base.css new file mode 100644 index 0000000..dfce5bd --- /dev/null +++ b/docs/mockup/redesign/comune/base.css @@ -0,0 +1,172 @@ +/* + Struttura comune delle tre proposte. Ogni variante (a-febe, b-khaemhat, c-anubis) definisce i token + (stessi nomi del tokens.css di oggi, più pochi nuovi) e l'ossatura; qui solo i componenti. +*/ +*{box-sizing:border-box} +html,body{margin:0;height:100%} +body{font:var(--fs)/1.45 var(--font);color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility} +h1,h2,p{margin:0} +.num,.n,td.n,.tabella td{font-variant-numeric:tabular-nums} +.tenue{color:var(--faint)} +.pos{color:var(--ok-text)} .neg{color:var(--bad-text)} +svg.ic{width:18px;height:18px;flex:none} +button{font:inherit;color:inherit;cursor:pointer} + +/* ---------- ossatura ---------- */ +.guscio{display:grid;height:100vh;min-height:0} +.barra-alta{display:none} +.laterale{display:flex;flex-direction:column;min-width:0;min-height:0} +.marchio{display:flex;align-items:center;gap:10px} +.marchio .logo{width:26px;height:26px;flex:none} +.marchio small{color:var(--muted);font-size:11px} +.nav{display:flex;flex-direction:column;gap:2px} +.nav a{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--muted);border:1px solid transparent;white-space:nowrap} +.nav a .conta{margin-left:auto;font-size:12px;color:var(--faint);font-variant-numeric:tabular-nums} +.nav-sep{border:0;border-top:1px solid var(--line);margin:10px 8px;width:auto} +.stato-lat{margin-top:auto} +.stato-lat .riga{display:flex;align-items:center;gap:8px} +.stato-lat p{font-size:12.5px;color:var(--muted);margin:3px 0 10px 16px} +.stato-lat .barra{height:5px;border-radius:3px;background:var(--surface-3);overflow:hidden} +.stato-lat .barra i{display:block;height:100%;background:var(--warn-fill)} +.stato-lat .coppia{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-top:6px} +.stato-lat .chi{display:flex;align-items:center;gap:9px;margin-top:12px;padding-top:11px;border-top:1px solid var(--line)} +.stato-lat .chi b{display:block;font-size:13px} +.stato-lat .chi small{font-size:12px;color:var(--muted)} +.avatar{width:32px;height:32px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--ok-soft);color:var(--ok-text);font-weight:700;font-size:12px;flex:none} +.punto{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none;background:var(--faint)} +.punto.ok{background:var(--ok)} + +.contenuto{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden} +.testa{display:flex;align-items:center;gap:14px;flex:none} +.testa .azioni{margin-left:auto;display:flex;align-items:center;gap:10px} +.testa .sotto{color:var(--muted)} +.corpo{flex:1;min-height:0;overflow:auto} + +/* ---------- indicatori ---------- */ +.indicatori{display:flex;align-items:center;flex-wrap:wrap;flex:none} +.ind{display:inline-flex;align-items:center;gap:6px;white-space:nowrap} +.ind em{font-style:normal;color:var(--muted)} +.ind b{font-weight:600} + +/* ---------- controlli ---------- */ +.btn{display:inline-flex;align-items:center;gap:8px;height:var(--ctl-h);padding:0 13px;border-radius:var(--r);border:1px solid var(--line-strong);background:var(--surface);color:var(--text);font-weight:550;white-space:nowrap} +.btn.primo{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:600} +.btn.piccolo{height:28px;padding:0 10px;font-size:12.5px} +.mini{width:26px;height:26px;border:0;background:transparent;border-radius:var(--r);color:var(--muted);display:inline-flex;align-items:center;justify-content:center;padding:0} +.mini svg.ic{width:16px;height:16px} +.campo{display:flex;align-items:center;gap:8px;height:var(--ctl-h);padding:0 10px;border-radius:var(--r);border:1px solid var(--line-strong);background:var(--surface);color:var(--text);min-width:0;white-space:nowrap} +.campo svg.ic{width:16px;height:16px;color:var(--faint)} +.campo.cerca{width:240px;color:var(--faint)} +.campo.cresce{flex:1;color:var(--faint)} +.campo.n{justify-content:flex-end;font-variant-numeric:tabular-nums;min-width:96px} +.campo.scelta{justify-content:space-between} +.campo .giu{transform:rotate(90deg)} +.gruppo{display:inline-flex;border:1px solid var(--line-strong);border-radius:var(--r);background:var(--surface);padding:2px;gap:2px;flex:none} +.gruppo > span{height:calc(var(--ctl-h) - 6px);padding:0 11px;border-radius:calc(var(--r) - 2px);display:inline-flex;align-items:center;gap:6px;color:var(--muted);white-space:nowrap} +.gruppo > span b{font-weight:600;color:var(--faint)} +.gruppo > span svg.ic{width:15px;height:15px} +.gruppo > .qui{background:var(--accent-soft);color:var(--accent-text);font-weight:600} +.gruppo > .qui b{color:inherit} +.interruttore{width:36px;height:20px;border-radius:10px;background:var(--line-strong);position:relative;display:inline-block;flex:none} +.interruttore i{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.3)} +.interruttore.acceso{background:var(--accent)} +.interruttore.acceso i{left:18px;background:var(--accent-ink)} +.interruttore-et{display:inline-flex;align-items:center;gap:9px;font-weight:550;white-space:nowrap} + +/* ---------- pannelli, schede ---------- */ +.pannello{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);min-width:0} +.schede{display:flex;gap:2px;border-bottom:1px solid var(--line);padding:0 12px} +.schede span{padding:10px 10px 9px;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap} +.schede span.qui{color:var(--text);font-weight:600;border-bottom-color:var(--accent)} +.b-titolo{display:flex;align-items:baseline;gap:8px;margin-bottom:8px} +.b-titolo svg.ic{align-self:center;color:var(--muted)} +.b-titolo small{color:var(--muted);font-size:12px;margin-left:auto} + +/* ---------- tabella ---------- */ +.barra-strumenti{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--line)} +.barra-strumenti .spazio{flex:1} +.tabella-scorre{overflow:auto;flex:1;min-height:0} +.tabella{width:100%;border-collapse:collapse} +.tabella th{position:sticky;top:0;background:var(--surface-2);text-align:left;font-weight:600;color:var(--muted);font-size:var(--fs-small);height:var(--th-h);padding:0 10px;border-bottom:1px solid var(--line);white-space:nowrap} +.tabella td{height:var(--row-h);padding:0 10px;border-bottom:1px solid var(--line-soft);white-space:nowrap} +.tabella .n{text-align:right} +.tabella td.nome{max-width:240px;overflow:hidden;text-overflow:ellipsis;font-weight:500} +.tabella tr.sel td{background:var(--accent-soft)} +.tabella tr.sel td:first-child{box-shadow:inset 3px 0 0 var(--accent)} +.tabella tr[data-chiusa] td{color:var(--muted)} +.tabella td.az{text-align:right;padding-right:6px} +.tabella td.az .mini{width:24px;height:24px} +.tu{color:var(--gold-text)} +.timer.caldo{color:var(--bad-text);font-weight:700} +.stato,.esito{display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:var(--r-badge);font-size:11.5px;font-weight:600;white-space:nowrap} +.s-attiva{background:var(--accent-soft);color:var(--accent-text)} +.s-osserva{background:var(--muted-soft);color:var(--muted)} +.s-vinta{background:var(--gold-soft);color:var(--gold-text)} +.s-persa{background:var(--bad-soft);color:var(--bad-text)} +.e-ok{background:var(--ok-soft);color:var(--ok-text)} +.e-avviso{background:var(--warn-soft);color:var(--warn-text)} +.e-tenue{background:var(--muted-soft);color:var(--muted)} +.e-neg{background:var(--bad-soft);color:var(--bad-text)} +.piede-tabella{display:flex;justify-content:space-between;padding:8px 12px;border-top:1px solid var(--line);color:var(--muted);font-size:var(--fs-small)} + +/* ---------- Aste ---------- */ +.aste-layout{display:grid;grid-template-columns:minmax(0,1fr) var(--det-w);gap:var(--gap);height:100%;min-height:0} +.griglia-aste{display:flex;flex-direction:column;min-height:0;overflow:hidden} +.dettaglio{overflow-y:auto;overflow-x:hidden;min-height:0} +.det-testa{display:flex;align-items:flex-start;gap:12px;padding:14px 16px 12px} +.det-testa > div:first-child{flex:1;min-width:0} +.det-testa h2{font-size:16px;font-weight:650;margin:6px 0 2px} +.det-testa small{color:var(--muted);font-size:12px} +.dettaglio .gruppo.modo > span{padding:0 8px} +.verdetto{margin:14px 16px 0;border:1px solid var(--accent-line);background:var(--accent-soft);border-radius:var(--r);padding:12px} +.v-testa{display:flex;align-items:center;gap:8px;color:var(--accent-text)} +.v-testa b{font-weight:650} +.v-testa span{margin-left:auto;font-size:12px} +.v-numeri{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:10px 0} +.v-numeri em{display:block;font-style:normal;font-size:11.5px;color:var(--muted)} +.v-numeri b{font-size:17px;font-weight:650} +.verdetto p{font-size:12.5px;color:var(--muted)} +.blocco{padding:14px 16px 0} +.grafico{width:100%;height:62px;display:block} +.grafico rect{fill:var(--accent);opacity:.75} +.grafico rect:last-child{opacity:1} +.campi{display:grid;grid-template-columns:1fr 1fr;gap:10px} +.campi label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted)} +.campi .campo{color:var(--text);font-size:var(--fs)} +.riga-btn{margin-top:10px} +.cifre{display:grid;grid-template-columns:1fr 1fr;gap:1px;margin:16px;background:var(--line);border:1px solid var(--line);border-radius:var(--r);overflow:hidden} +.cifre div{background:var(--surface);padding:9px 12px} +.cifre dt{font-size:11.5px;color:var(--muted)} +.cifre dd{margin:0;font-weight:650;font-size:15px} + +/* ---------- Impostazioni ---------- */ +.imp-griglia{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--imp-min),1fr));gap:var(--gap);align-items:start} +.imp-sezione header{padding:14px 16px 10px;border-bottom:1px solid var(--line)} +.imp-sezione h2{font-size:15px;font-weight:650} +.imp-sezione header p{font-size:12.5px;color:var(--muted);margin-top:2px} +.imp-campo{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:10px 16px;border-bottom:1px solid var(--line-soft)} +.imp-campo:last-child{border-bottom:0} +.imp-campo.largo{grid-template-columns:1fr} +.imp-et b{display:block;font-weight:550} +.imp-et small{font-size:12px;color:var(--muted)} +.imp-campo.riavvio .imp-et small{color:var(--warn-text)} +.imp-val{display:flex;align-items:center;gap:8px} +.imp-val em{font-style:normal;color:var(--muted);font-size:12px;min-width:48px} +.ore{display:grid;grid-template-columns:repeat(24,1fr);gap:3px} +.ora{height:26px;border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:11px;background:var(--surface-3);color:var(--muted);font-variant-numeric:tabular-nums} +.ora.si{background:var(--accent);color:var(--accent-ink);font-weight:600} + +/* ---------- Puntate gratis ---------- */ +.kpi{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:var(--gap);margin-bottom:var(--gap)} +.kpi .k{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:12px 14px} +.kpi em{display:block;font-style:normal;color:var(--muted);font-size:12.5px} +.kpi b{display:block;font-size:24px;font-weight:650;line-height:1.25;margin:2px 0} +.kpi small{color:var(--muted);font-size:12px} +.gratis-layout{display:grid;grid-template-columns:minmax(0,1fr) var(--det-w);gap:var(--gap);align-items:start} +.colonna{display:flex;flex-direction:column;gap:var(--gap)} +.colonna .pannello{padding:14px 16px} +.incolla{display:flex;gap:10px;padding:12px} +.vuoto{color:var(--muted);font-size:12.5px;margin-bottom:14px} +.elenco{list-style:none;margin:0;padding:0} +.elenco li{display:flex;justify-content:space-between;padding:6px 0;border-top:1px solid var(--line-soft)} +.registro{margin:0;font:12px/1.55 var(--mono);color:var(--muted);white-space:pre-wrap;background:var(--surface-2);border-radius:var(--r);padding:10px} diff --git a/docs/mockup/redesign/comune/mock.js b/docs/mockup/redesign/comune/mock.js new file mode 100644 index 0000000..e9e6b94 --- /dev/null +++ b/docs/mockup/redesign/comune/mock.js @@ -0,0 +1,305 @@ +// Proposte grafiche di Mimante 2.0.0: lo stesso contenuto (dati finti ma realistici) per le tre +// varianti. Ogni pagina HTML dice variante e pagina in ; lo stile +// della variante decide disposizione, caratteri e colori. Nessuna risorsa esterna. +(function () { + 'use strict'; + var body = document.body; + var variante = body.dataset.variante; // a | b | c + var pagina = body.dataset.pagina; // aste | impostazioni | gratis + var tema = new URLSearchParams(location.search).get('tema'); + if (tema) document.documentElement.dataset.theme = tema; + + // ---- Icone (tratto 1,7, disegnate qui) ---- + var P = { + aste: '', + cerca: '', + prodotti: '', + storico: '', + apprendimento: '', + browser: '', + gratis: '', + impostazioni: '', + piu: '', + occhio: '', + fulmine: '', + stella: '', + x: '', + esporta: '', + gioca: '', + link: '', + forziere: '', + campana: '', + luna: '', + freccia: '', + filtro: '' + }; + function ic(n, cls) { + return ''; + } + var MARCHIO = ''; + + function el(html) { var t = document.createElement('template'); t.innerHTML = html.trim(); return t.content; } + + // ---- Dati finti ---- + var ASTE = [ + { s: 'attiva', n: 'iPhone 16 Pro 256 GB', p: '18,42', t: 3, u: 'lupo88', tu: 14, pi: 38, an: 182, ev: '+0,42', sel: true }, + { s: 'attiva', n: 'Buono Amazon 50 €', p: '4,17', t: 7, u: 'marta_77', tu: 3, pi: 41, an: 176, ev: '+0,18' }, + { s: 'osserva', n: 'PlayStation 5 Slim Digital', p: '22,96', t: 1, u: 'gigi.rm', tu: 0, pi: 37, an: 0, ev: '−0,64' }, + { s: 'osserva', n: 'Dyson V15 Detect Absolute', p: '9,03', t: 9, u: 'nonna_pina', tu: 0, pi: 52, an: 0, ev: '−0,12' }, + { s: 'attiva', n: '100 puntate', p: '0,88', t: 5, u: 'tu', tu: 6, pi: 39, an: 171, ev: '+0,09', mio: true }, + { s: 'osserva', n: 'Bimby TM7', p: '31,50', t: 2, u: 'kappa_92', tu: 0, pi: 40, an: 0, ev: '−1,90' }, + { s: 'attiva', n: 'AirPods Pro 2', p: '6,71', t: 8, u: 'sole_e_mare', tu: 2, pi: 36, an: 188, ev: '+0,05' }, + { s: 'osserva', n: 'Samsung Galaxy S25 Ultra', p: '15,08', t: 4, u: 'ste_fano', tu: 0, pi: 44, an: 0, ev: '−0,31' }, + { s: 'osserva', n: 'Buono carburante 25 €', p: '2,39', t: 10, u: 'bea.84', tu: 0, pi: 38, an: 0, ev: '+0,02' }, + { s: 'attiva', n: 'Nintendo Switch 2', p: '12,64', t: 6, u: 'luca_v', tu: 9, pi: 42, an: 179, ev: '+0,27' }, + { s: 'osserva', n: 'Apple Watch Series 10', p: '8,12', t: 3, u: 'mario.b', tu: 0, pi: 39, an: 0, ev: '−0,08' }, + { s: 'vinta', n: 'Macchina caffè De’Longhi', p: '3,55', t: 0, u: 'tu', tu: 11, pi: 0, an: 0, ev: '+38,40', mio: true }, + { s: 'persa', n: 'Lego Technic 42171', p: '7,90', t: 0, u: 'ale_zeta', tu: 4, pi: 0, an: 0, ev: '−0,60' }, + { s: 'osserva', n: 'Friggitrice ad aria Ninja', p: '1,47', t: 8, u: 'fede.na', tu: 0, pi: 41, an: 0, ev: '−0,02' } + ]; + var NOMI_STATO = { attiva: 'Attiva', osserva: 'Osserva', vinta: 'Vinta', persa: 'Persa' }; + var TITOLI_STATO = { + attiva: 'Attiva: punta quando il modello lo ritiene giusto, dentro paletti e rischio', + osserva: 'Osserva: decisioni virtuali, il modello impara senza puntare', + vinta: 'Chiusa: l’hai vinta tu', persa: 'Chiusa: vinta da un altro utente' + }; + + // ---- Guscio comune ---- + var NAV = [ + ['aste', 'Aste', 'aste.html'], ['cerca', 'Cerca', '#'], ['prodotti', 'Prodotti', '#'], + ['storico', 'Storico', '#'], ['apprendimento', 'Apprendimento', '#'], + ['gratis', 'Puntate gratis', 'puntate-gratis.html'], ['browser', 'Browser', '#'], + ['impostazioni', 'Impostazioni', 'impostazioni.html'] + ]; + var GRUPPI_B = { aste: 'Operativo', storico: 'Analisi', gratis: 'Account', impostazioni: 'Sistema' }; + + function navHtml() { + var h = ''; + NAV.forEach(function (v) { + if (variante === 'b' && GRUPPI_B[v[0]]) h += ''; + if (variante !== 'b' && v[0] === 'impostazioni') h += ''; + var qui = (v[0] === pagina) ? ' class="qui" aria-current="page"' : ''; + var conta = v[0] === 'aste' ? '14' : (v[0] === 'gratis' ? '+12' : ''); + h += '' + ic(v[0]) + '' + v[1] + '' + conta + ''; + }); + return h; + } + + var INDICATORI = + '
' + + 'Bidooalby96' + + 'Puntate1.501' + + 'Credito12,40 €' + + 'Da confermare0' + + 'Ping38 ms' + + 'Databasein pari' + + '
'; + + var STATO_LATERALE = + '
' + + '
Sul sito vero
' + + '

5 aste in Attiva, 9 in Osserva

' + + '
' + + '
Saldo1.501 di 2.000
' + + '
AB
alby96Bidoo collegato
' + + '
'; + + function guscio(titolo, sotto, azioni) { + var h = '
'; + h += '
' + + '
' + MARCHIO + 'Mimante2.0.0
' + + (variante === 'b' ? '' + INDICATORI + + '
AB
' : '') + + '
'; + h += ''; + h += '
'; + if (variante === 'b') h += '
' + titolo + 'Storico' + ic('piu') + '
'; + h += '
' + (variante === 'b' ? '
Operativo › ' + titolo + '
' : '') + + '

' + titolo + '

' + (sotto ? '

' + sotto + '

' : '') + '
' + azioni + '
'; + if (variante !== 'b' && pagina === 'aste') h += INDICATORI; + h += '
'; + if (variante === 'b') h += '
Connesso · 38 msCoda scritture 0Modello v7 · studiato 24/11 03:10Mimante 2.0.0 (9d89624)
'; + h += '
'; + body.appendChild(el(h)); + return document.getElementById('corpo'); + } + + function btn(testo, icona, cls, titolo) { + return ''; + } + + // ---- Pagina Aste ---- + function paginaAste() { + var c = guscio('Aste', variante === 'a' ? '5 in Attiva, 9 in Osserva, 2 chiuse oggi' : '', + btn('Esporta', 'esporta', '', 'Esporta l’elenco in CSV') + btn('Aggiungi asta', 'piu', 'primo', 'Aggiungi un’asta dall’indirizzo o dall’identificativo')); + var righe = ''; + ASTE.forEach(function (a) { + var t = a.t === 0 ? '—' : '' + a.t + ' s'; + var ev = '' + a.ev + ''; + righe += '' + + '' + NOMI_STATO[a.s] + '' + + '' + a.n + '' + + '' + a.p + ' €' + + '' + t + '' + + '' + (a.mio ? 'tu' : a.u) + '' + + '' + (a.tu || '0') + '' + + '' + (a.pi ? a.pi + ' ms' : '—') + '' + + '' + (a.an ? a.an + ' ms' : '—') + '' + + '' + ev + '' + + '' + + ''; + }); + var barre = ''; + [3, 5, 4, 7, 6, 9, 8, 12, 10, 14, 11, 16, 13, 18, 15, 21, 17, 19, 24, 22].forEach(function (v, i) { + barre += ''; + }); + c.innerHTML = + '
' + + '
' + + '
' + + '' + + '
Tutte 14Attiva 5Osserva 9Chiuse 2
' + + '' + + '
' + + '
' + + '' + + '' + righe + '
StatoNomePrezzoTimerUltimoTuePingAnticipoEV €
' + + '
14 aste · aggiornate 0,4 s faLarghezza delle colonne e ordine si salvano da soli
' + + '
' + + '' + + '
'; + } + + // ---- Pagina Impostazioni ---- + function campo(etichetta, valore, unita, aiuto, extra) { + return '
' + etichetta + '' + aiuto + '
' + + '
' + valore + '' + (unita ? '' + unita + '' : '') + '
'; + } + function interruttore(etichetta, acceso, aiuto) { + return '
' + etichetta + '' + aiuto + '
' + + '
'; + } + function paginaImpostazioni() { + var c = guscio('Impostazioni', variante === 'a' ? 'Valgono subito, tranne quelle segnate «al riavvio». Zero vuol dire nessun limite.' : '', + btn('Annulla', '', '') + btn('Salva', '', 'primo')); + var ore = ''; + for (var h = 0; h < 24; h++) ore += '' + h + ''; + var sezioni = [ + ['Paletti dell’utente', 'Fermano una puntata, non la provocano. Valgono per ogni asta che non ne ha di suoi.', + campo('Prezzo massimo', '0,00', '€', 'Oltre questo prezzo nessuna puntata') + + campo('Puntate massime per asta', '0', 'puntate', 'Zero: nessun limite') + + campo('Soglia sul saldo', '2.000', 'puntate', 'Sotto questo saldo il bot non punta') + + '
Fascia orariaOre in cui il bot può puntare (un’ora per casella)
' + ore + '
'], + ['Gestione del rischio', 'Tetti che fermano tutto (HALT) finché non li sblocchi.', + '
RischioQuanto il modello può allontanarsi dal valore atteso
PrudenteMedioAudace
' + + campo('Perdita massima al giorno', '25,00', '€', 'Al superamento: HALT persistente') + + campo('Puntate massime al giorno', '600', 'puntate', 'Somma su tutte le aste')], + ['Puntate e costi', 'Servono al modello per tradurre le puntate in euro.', + campo('Costo di una puntata', '0,15', '€', 'Prezzo medio pagato per pacchetto') + + campo('Spedizione predefinita', '9,90', '€', 'Se la scheda del prodotto non la dice')], + ['Apprendimento', 'Lo studio dell’archivio gira di notte; finché non finisce, le aste non puntano.', + interruttore('Parere del modello in Osserva', true, 'Registra la decisione anche quando un paletto la blocca') + + campo('Aste minime per i paletti calcolati', '5', 'aste', 'Sotto, valgono i predefiniti') + + campo('Ora dello studio notturno', '03:00', '', 'Al riavvio', 'riavvio')], + ['Motore e rete', 'Il percorso caldo: lettura di data.php e invio di bid.php.', + campo('Anticipo obiettivo', '180', 'ms', 'Prima della scadenza') + + campo('Letture al secondo', '8', '', 'Per ogni asta in Attiva') + + campo('Tempo massimo di una richiesta', '1.500', 'ms', 'Poi la lettura si scarta')], + ['Avvisi Telegram', 'Un messaggio per evento, mai ripetuto.', + interruttore('Aste vinte e perse', true, 'Alla chiusura di un’asta su cui hai puntato') + + interruttore('Puntate gratis e forzieri', true, 'Riscatti riusciti e forzieri trovati') + + interruttore('Blocchi del rischio', true, 'Quando scatta un HALT')] + ]; + var h = '
'; + sezioni.forEach(function (s) { + h += '

' + s[0] + '

' + s[1] + '

' + s[2] + '
'; + }); + c.innerHTML = h + '
'; + } + + // ---- Pagina Puntate gratis ---- + var RISCATTI = [ + ['14:05', 'puntateaste.it', 'Bonus pomeriggio', 'ok', '+5', '1.506'], + ['13:35', 'puntateaste.it', 'Flash 13:30', 'visto', '—', '1.501'], + ['12:10', 'puntateaste.it', 'Mezzogiorno', 'scaduto', '—', '1.501'], + ['11:02', 'campanella Bidoo', 'Regalo del giorno', 'ok', '+3', '1.501'], + ['10:30', 'puntateaste.it', 'Buongiorno', 'ok', '+2', '1.498'], + ['09:15', 'incollato a mano', 'promocode WX7…', 'rifiutato', '—', '1.496'], + ['08:01', 'puntateaste.it', 'Colazione', 'ok', '+2', '1.496'], + ['ieri 22:40', 'puntateaste.it', 'Buonanotte', 'ok', '+3', '1.494'] + ]; + var ESITI = { + ok: ['ok', 'Riscattata: il saldo è salito'], visto: ['avviso', 'Già riscattata in precedenza (clicked)'], + scaduto: ['tenue', 'Collegamento scaduto (expired)'], rifiutato: ['neg', 'Codice non valido (403)'] + }; + function paginaGratis() { + var c = guscio('Puntate gratis', variante === 'a' ? 'Riscatto automatico dei collegamenti di puntateaste.it e della campanella di Bidoo' : '', + 'Riscatto automatico' + + btn('Esegui ora', 'gioca', 'primo', 'Fa subito un giro di riscatto')); + var righe = ''; + RISCATTI.forEach(function (r) { + var e = ESITI[r[3]]; + righe += '' + r[0] + '' + r[1] + '' + r[2] + '' + + '' + r[3] + '' + + '' + (r[4] === '—' ? '—' : '' + r[4] + '') + '' + r[5] + ''; + }); + c.innerHTML = + '
' + + '
Oggi+124 riscatti su 7 collegamenti
' + + '
Ultimi 7 giorni+86media 12,3 al giorno
' + + '
Totale+1.240dal 24/11/2026
' + + '
Prossimo giro14:35ogni 30 min, 08–23
' + + '
Forzieri0ultimo controllo 14:02
' + + '
' + + '
' + + '
' + + '
Puntate riscattateForzieri e ricompenseRegistro
' + + '
' + btn('Riscatta', '', '') + '
' + + '' + righe + '
OraFonteCollegamentoEsitoPuntateSaldo
' + + '
' + + '' + + '
'; + } + + if (pagina === 'aste') paginaAste(); + else if (pagina === 'impostazioni') paginaImpostazioni(); + else paginaGratis(); +})(); diff --git a/docs/mockup/redesign/confronto.html b/docs/mockup/redesign/confronto.html new file mode 100644 index 0000000..8e90e06 --- /dev/null +++ b/docs/mockup/redesign/confronto.html @@ -0,0 +1,50 @@ + + + + + +Mimante — tre proposte grafiche a confronto + + + +

Mimante 2.0.0 — tre proposte grafiche

+

Stesso contenuto, tre linguaggi visivi presi dagli altri progetti. Le immagini a piena risoluzione sono in docs/mockup/redesign/immagini; le pagine si aprono anche nel browser.

+
+
+

A — come Febe

+

Grigio caldo e carte bianche, carattere Archivo, barra laterale con lo stato del conto in fondo. Ariosa: righe da 40 px, meno aste a schermo.

+
Aste, chiaro
Proposta A, Aste, tema chiaro
+
Aste, scuro
Proposta A, Aste, tema scuro
+
Impostazioni
Proposta A, Impostazioni
+
Puntate gratis
Proposta A, Puntate gratis
+
+
+

B — come Khaemhat

+

Barra alta blu notte con ricerca e indicatori sempre in vista, menu a gruppi, schede delle pagine aperte, barra di stato. Densa: righe da 30 px, più aste a schermo.

+
Aste, chiaro
Proposta B, Aste, tema chiaro
+
Aste, scuro
Proposta B, Aste, tema scuro
+
Impostazioni
Proposta B, Impostazioni
+
Puntate gratis
Proposta B, Puntate gratis
+
+
+

C — come Anubis

+

Carta verde salvia, Instrument Sans, filetti al posto delle carte, cifre grandi e colori di guadagno e perdita da quadro finanziario. Righe da 36 px.

+
Aste, chiaro
Proposta C, Aste, tema chiaro
+
Aste, scuro
Proposta C, Aste, tema scuro
+
Impostazioni
Proposta C, Impostazioni
+
Puntate gratis
Proposta C, Puntate gratis
+
+
+ + diff --git a/docs/mockup/redesign/immagini/a-febe-aste-chiaro.png b/docs/mockup/redesign/immagini/a-febe-aste-chiaro.png new file mode 100644 index 0000000..a33683e Binary files /dev/null and b/docs/mockup/redesign/immagini/a-febe-aste-chiaro.png differ diff --git a/docs/mockup/redesign/immagini/a-febe-aste-scuro.png b/docs/mockup/redesign/immagini/a-febe-aste-scuro.png new file mode 100644 index 0000000..89c7b27 Binary files /dev/null and b/docs/mockup/redesign/immagini/a-febe-aste-scuro.png differ diff --git a/docs/mockup/redesign/immagini/a-febe-impostazioni-chiaro.png b/docs/mockup/redesign/immagini/a-febe-impostazioni-chiaro.png new file mode 100644 index 0000000..0e6cbcc Binary files /dev/null and b/docs/mockup/redesign/immagini/a-febe-impostazioni-chiaro.png differ diff --git a/docs/mockup/redesign/immagini/a-febe-impostazioni-scuro.png b/docs/mockup/redesign/immagini/a-febe-impostazioni-scuro.png new file mode 100644 index 0000000..fb7da69 Binary files /dev/null and b/docs/mockup/redesign/immagini/a-febe-impostazioni-scuro.png differ diff --git a/docs/mockup/redesign/immagini/a-febe-puntate-gratis-chiaro.png b/docs/mockup/redesign/immagini/a-febe-puntate-gratis-chiaro.png new file mode 100644 index 0000000..06d08a4 Binary files /dev/null and b/docs/mockup/redesign/immagini/a-febe-puntate-gratis-chiaro.png differ diff --git a/docs/mockup/redesign/immagini/a-febe-puntate-gratis-scuro.png b/docs/mockup/redesign/immagini/a-febe-puntate-gratis-scuro.png new file mode 100644 index 0000000..1912965 Binary files /dev/null and b/docs/mockup/redesign/immagini/a-febe-puntate-gratis-scuro.png differ diff --git a/docs/mockup/redesign/immagini/b-khaemhat-aste-chiaro.png b/docs/mockup/redesign/immagini/b-khaemhat-aste-chiaro.png new file mode 100644 index 0000000..d81a336 Binary files /dev/null and b/docs/mockup/redesign/immagini/b-khaemhat-aste-chiaro.png differ diff --git a/docs/mockup/redesign/immagini/b-khaemhat-aste-scuro.png b/docs/mockup/redesign/immagini/b-khaemhat-aste-scuro.png new file mode 100644 index 0000000..d7f63cb Binary files /dev/null and b/docs/mockup/redesign/immagini/b-khaemhat-aste-scuro.png differ diff --git a/docs/mockup/redesign/immagini/b-khaemhat-impostazioni-chiaro.png b/docs/mockup/redesign/immagini/b-khaemhat-impostazioni-chiaro.png new file mode 100644 index 0000000..1a5f2a6 Binary files /dev/null and b/docs/mockup/redesign/immagini/b-khaemhat-impostazioni-chiaro.png differ diff --git a/docs/mockup/redesign/immagini/b-khaemhat-impostazioni-scuro.png b/docs/mockup/redesign/immagini/b-khaemhat-impostazioni-scuro.png new file mode 100644 index 0000000..6a6ce95 Binary files /dev/null and b/docs/mockup/redesign/immagini/b-khaemhat-impostazioni-scuro.png differ diff --git a/docs/mockup/redesign/immagini/b-khaemhat-puntate-gratis-chiaro.png b/docs/mockup/redesign/immagini/b-khaemhat-puntate-gratis-chiaro.png new file mode 100644 index 0000000..f36a03a Binary files /dev/null and b/docs/mockup/redesign/immagini/b-khaemhat-puntate-gratis-chiaro.png differ diff --git a/docs/mockup/redesign/immagini/b-khaemhat-puntate-gratis-scuro.png b/docs/mockup/redesign/immagini/b-khaemhat-puntate-gratis-scuro.png new file mode 100644 index 0000000..fc41ef1 Binary files /dev/null and b/docs/mockup/redesign/immagini/b-khaemhat-puntate-gratis-scuro.png differ diff --git a/docs/mockup/redesign/immagini/c-anubis-aste-chiaro.png b/docs/mockup/redesign/immagini/c-anubis-aste-chiaro.png new file mode 100644 index 0000000..23659c2 Binary files /dev/null and b/docs/mockup/redesign/immagini/c-anubis-aste-chiaro.png differ diff --git a/docs/mockup/redesign/immagini/c-anubis-aste-scuro.png b/docs/mockup/redesign/immagini/c-anubis-aste-scuro.png new file mode 100644 index 0000000..7385600 Binary files /dev/null and b/docs/mockup/redesign/immagini/c-anubis-aste-scuro.png differ diff --git a/docs/mockup/redesign/immagini/c-anubis-impostazioni-chiaro.png b/docs/mockup/redesign/immagini/c-anubis-impostazioni-chiaro.png new file mode 100644 index 0000000..bbc386a Binary files /dev/null and b/docs/mockup/redesign/immagini/c-anubis-impostazioni-chiaro.png differ diff --git a/docs/mockup/redesign/immagini/c-anubis-impostazioni-scuro.png b/docs/mockup/redesign/immagini/c-anubis-impostazioni-scuro.png new file mode 100644 index 0000000..7de794a Binary files /dev/null and b/docs/mockup/redesign/immagini/c-anubis-impostazioni-scuro.png differ diff --git a/docs/mockup/redesign/immagini/c-anubis-puntate-gratis-chiaro.png b/docs/mockup/redesign/immagini/c-anubis-puntate-gratis-chiaro.png new file mode 100644 index 0000000..3002523 Binary files /dev/null and b/docs/mockup/redesign/immagini/c-anubis-puntate-gratis-chiaro.png differ diff --git a/docs/mockup/redesign/immagini/c-anubis-puntate-gratis-scuro.png b/docs/mockup/redesign/immagini/c-anubis-puntate-gratis-scuro.png new file mode 100644 index 0000000..55cd7e2 Binary files /dev/null and b/docs/mockup/redesign/immagini/c-anubis-puntate-gratis-scuro.png differ diff --git a/docs/mockup/redesign/immagini/confronto.png b/docs/mockup/redesign/immagini/confronto.png new file mode 100644 index 0000000..877ff51 Binary files /dev/null and b/docs/mockup/redesign/immagini/confronto.png differ diff --git a/tools/Mimante.Schermate/Program.cs b/tools/Mimante.Schermate/Program.cs index 997aa64..b61b804 100644 --- a/tools/Mimante.Schermate/Program.cs +++ b/tools/Mimante.Schermate/Program.cs @@ -5,17 +5,23 @@ using Mimante.Session.Cdp; // Esempio: dotnet run --project tools/Mimante.Schermate -- http://localhost:8080 dev docs/schermate // Il bot deve girare sul simulatore (--simulatore) per avere aste da fotografare. // Esce con 1 se una pagina ha errori JavaScript. +// +// Proposte grafiche: dotnet run --project tools/Mimante.Schermate -- --mockup [cartella] +// (predefinita docs/mockup/redesign): fotografa ogni /.html in chiaro e in scuro +// in /immagini, poi il foglio di confronto (confronto.html) se c'è. -if (args.Length < 3) +var mockup = args.Length >= 1 && args[0] == "--mockup"; +if (!mockup && args.Length < 3) { - Console.Error.WriteLine("Uso: Screenshots "); + Console.Error.WriteLine("Uso: Mimante.Schermate | --mockup [cartella]"); return 2; } -var baseUrl = args[0].TrimEnd('/'); -var password = args[1]; +var baseUrl = mockup ? "" : args[0].TrimEnd('/'); +var password = mockup ? "" : args[1]; // Un percorso relativo vale dalla radice del repository: `dotnet run` parte nella cartella del progetto. -var outDir = Path.IsPathRooted(args[2]) ? args[2] : Path.GetFullPath(Path.Combine(RepoRoot(), args[2])); +var dirArg = mockup ? (args.Length > 1 ? args[1] : "docs/mockup/redesign") : args[2]; +var outDir = Path.IsPathRooted(dirArg) ? dirArg : Path.GetFullPath(Path.Combine(RepoRoot(), dirArg)); Directory.CreateDirectory(outDir); using var cts = new CancellationTokenSource(TimeSpan.FromMinutes(5)); @@ -82,67 +88,107 @@ async Task Shot(string name, string hash, string? script = null, int waitMs = 25 await Eval(script); await Task.Delay(1500, ct); } - var png = await cdp.SendAsync("Page.captureScreenshot", new { format = "png" }, session, ct); - var file = Path.Combine(outDir, name + ".png"); - await File.WriteAllBytesAsync(file, Convert.FromBase64String(png.GetProperty("data").GetString()!), ct); + await Capture(Path.Combine(outDir, name + ".png")); Console.WriteLine($"{name}.png{(errors.Count > before ? $" ({errors.Count - before} errori)" : "")}"); } -await Viewport(1600, 1000); -await Navigate(baseUrl + "/accesso"); -await Shot("00-accesso-interfaccia", "", null, 500); -await Eval($"document.querySelector('input[type=password]').value = {JsonSerializer.Serialize(password)}; document.querySelector('form').submit();"); -await loaded.WaitAsync(TimeSpan.FromSeconds(20), ct); -await Task.Delay(1500, ct); +async Task Capture(string file) +{ + var png = await cdp.SendAsync("Page.captureScreenshot", new { format = "png" }, session, ct); + await File.WriteAllBytesAsync(file, Convert.FromBase64String(png.GetProperty("data").GetString()!), ct); +} -const string clickFirst = "document.querySelector('.split tbody tr[data-id]')?.click()"; -await Shot("01-aste", "#/aste", clickFirst, 4000); -await Shot("12-aste-registro", "#/aste", "document.querySelector('.panel .panel-mode button[data-mode=registro]')?.click()", 500); -await Shot("14-aste-puntate", "#/aste", "document.querySelector('.panel .tabs button[data-tab=puntate]')?.click()", 500); -await Eval("document.querySelector('.panel .tabs button[data-tab=auto]')?.click()"); -await Shot("02-apprendimento", "#/apprendimento", null, 3500); -await Shot("03-browser", "#/browser"); -if (args.Contains("--accesso-assistito")) +if (mockup) { - // Apre il browser del bot (Chromium dentro il bot) e aspetta il primo fotogramma. - await Eval("document.querySelector('.browser .idle button')?.click()"); - var frame = false; - for (var i = 0; i < 40 && !frame; i++) + var images = Path.Combine(outDir, "immagini"); + Directory.CreateDirectory(images); + await Viewport(1600, 1000); + foreach (var variant in Directory.GetDirectories(outDir).Where(d => File.Exists(Path.Combine(d, "stile.css"))).Order()) { - await Task.Delay(500, ct); - frame = (await Eval("!document.querySelector('.browser canvas').hidden")).ValueKind == JsonValueKind.True; + foreach (var page in new[] { "aste", "impostazioni", "puntate-gratis" }) + { + foreach (var (theme, label) in new[] { ("light", "chiaro"), ("dark", "scuro") }) + { + var before = errors.Count; + await Navigate(new Uri(Path.Combine(variant, page + ".html")).AbsoluteUri + "?tema=" + theme); + await Eval("document.fonts.ready.then(() => true)"); + await Task.Delay(300, ct); + var name = $"{Path.GetFileName(variant)}-{page}-{label}.png"; + await Capture(Path.Combine(images, name)); + Console.WriteLine($"{name}{(errors.Count > before ? $" ({errors.Count - before} errori)" : "")}"); + } + } + } + var sheet = Path.Combine(outDir, "confronto.html"); + if (File.Exists(sheet)) + { + await Navigate(new Uri(sheet).AbsoluteUri); + await Eval("Promise.all([...document.images].map(i => i.decode().catch(() => null))).then(() => true)"); + var height = (await Eval("document.documentElement.scrollHeight")).GetInt32(); + await Viewport(1600, height); + await Task.Delay(300, ct); + await Capture(Path.Combine(images, "confronto.png")); + Console.WriteLine("confronto.png"); } - await Task.Delay(2500, ct); - await Shot("03-browser", "#/browser", null, 200); - Console.WriteLine(frame ? "Browser del bot: fotogrammi ricevuti" : "Browser del bot: nessun fotogramma"); - if (!frame) errors.Add("accesso assistito: nessun fotogramma dal browser del bot"); - await Eval("document.querySelector('.browser .url button[title^=\"Chiudi\"]')?.click()"); } -if (args.Contains("--messaggio")) +else { - // Il messaggio a schermo per un'informazione importante: senza token Telegram il - // messaggio di prova risponde che manca la configurazione. - await Shot("11-messaggio", "#/impostazioni", "[...document.querySelectorAll('.section button')].find(b => b.textContent.startsWith('Invia messaggio'))?.click()"); - if ((await Eval("!!document.querySelector('.modal .notice')")).ValueKind != JsonValueKind.True) - errors.Add("messaggio a schermo: nessun avviso dopo «Invia messaggio di prova»"); - await Eval("document.querySelector('.modal footer .btn')?.click()"); + await Viewport(1600, 1000); + await Navigate(baseUrl + "/accesso"); + await Shot("00-accesso-interfaccia", "", null, 500); + await Eval($"document.querySelector('input[type=password]').value = {JsonSerializer.Serialize(password)}; document.querySelector('form').submit();"); + await loaded.WaitAsync(TimeSpan.FromSeconds(20), ct); + await Task.Delay(1500, ct); + + const string clickFirst = "document.querySelector('.split tbody tr[data-id]')?.click()"; + await Shot("01-aste", "#/aste", clickFirst, 4000); + await Shot("12-aste-registro", "#/aste", "document.querySelector('.panel .panel-mode button[data-mode=registro]')?.click()", 500); + await Shot("14-aste-puntate", "#/aste", "document.querySelector('.panel .tabs button[data-tab=puntate]')?.click()", 500); + await Eval("document.querySelector('.panel .tabs button[data-tab=auto]')?.click()"); + await Shot("02-apprendimento", "#/apprendimento", null, 3500); + await Shot("03-browser", "#/browser"); + if (args.Contains("--accesso-assistito")) + { + // Apre il browser del bot (Chromium dentro il bot) e aspetta il primo fotogramma. + await Eval("document.querySelector('.browser .idle button')?.click()"); + var frame = false; + for (var i = 0; i < 40 && !frame; i++) + { + await Task.Delay(500, ct); + frame = (await Eval("!document.querySelector('.browser canvas').hidden")).ValueKind == JsonValueKind.True; + } + await Task.Delay(2500, ct); + await Shot("03-browser", "#/browser", null, 200); + Console.WriteLine(frame ? "Browser del bot: fotogrammi ricevuti" : "Browser del bot: nessun fotogramma"); + if (!frame) errors.Add("accesso assistito: nessun fotogramma dal browser del bot"); + await Eval("document.querySelector('.browser .url button[title^=\"Chiudi\"]')?.click()"); + } + if (args.Contains("--messaggio")) + { + // Il messaggio a schermo per un'informazione importante: senza token Telegram il + // messaggio di prova risponde che manca la configurazione. + await Shot("11-messaggio", "#/impostazioni", "[...document.querySelectorAll('.section button')].find(b => b.textContent.startsWith('Invia messaggio'))?.click()"); + if ((await Eval("!!document.querySelector('.modal .notice')")).ValueKind != JsonValueKind.True) + errors.Add("messaggio a schermo: nessun avviso dopo «Invia messaggio di prova»"); + await Eval("document.querySelector('.modal footer .btn')?.click()"); + } + await Shot("04-prodotti", "#/prodotti", clickFirst); + await Shot("13-prodotti-statistiche", "#/prodotti", "[...document.querySelectorAll('.panel .tabs button')].find(b => b.textContent === 'Statistiche')?.click()", 500); + await Eval("[...document.querySelectorAll('.panel .tabs button')].find(b => b.textContent === 'Paletti e valore')?.click()"); + await Shot("05-impostazioni", "#/impostazioni"); + await Shot("06-storico", "#/storico", clickFirst); + await Shot("09-cerca", "#/cerca", null, 4000); + await Shot("10-registro", "#/registro"); + await Eval("document.documentElement.dataset.theme = 'light'"); + await Shot("07-aste-tema-chiaro", "#/aste", clickFirst, 2500); + await Eval("document.documentElement.dataset.theme = 'dark'"); + // Una finestra di portatile comune: la colonna Azioni deve restare in vista. + await Viewport(1366, 768); + await Shot("15-aste-1366", "#/aste", clickFirst, 2000); + await Viewport(1000, 900); + await Shot("08-aste-finestra-stretta", "#/aste", clickFirst, 2000); + await Eval("localStorage.removeItem('mimante.theme')"); } -await Shot("04-prodotti", "#/prodotti", clickFirst); -await Shot("13-prodotti-statistiche", "#/prodotti", "[...document.querySelectorAll('.panel .tabs button')].find(b => b.textContent === 'Statistiche')?.click()", 500); -await Eval("[...document.querySelectorAll('.panel .tabs button')].find(b => b.textContent === 'Paletti e valore')?.click()"); -await Shot("05-impostazioni", "#/impostazioni"); -await Shot("06-storico", "#/storico", clickFirst); -await Shot("09-cerca", "#/cerca", null, 4000); -await Shot("10-registro", "#/registro"); -await Eval("document.documentElement.dataset.theme = 'light'"); -await Shot("07-aste-tema-chiaro", "#/aste", clickFirst, 2500); -await Eval("document.documentElement.dataset.theme = 'dark'"); -// Una finestra di portatile comune: la colonna Azioni deve restare in vista. -await Viewport(1366, 768); -await Shot("15-aste-1366", "#/aste", clickFirst, 2000); -await Viewport(1000, 900); -await Shot("08-aste-finestra-stretta", "#/aste", clickFirst, 2000); -await Eval("localStorage.removeItem('mimante.theme')"); try { await cdp.SendAsync("Browser.close", timeout: TimeSpan.FromSeconds(3)); } catch { }