first commit

This commit is contained in:
Joakim
2026-11-01 16:20:49 +01:00
commit fdeeb26e86
82 changed files with 1528 additions and 0 deletions

6
app/static/css/style.css Normal file
View File

@@ -0,0 +1,6 @@
:root{--orange:#ff5a00;--ink:#17191d;--muted:#68707a;--bg:#f3f4f6}*{box-sizing:border-box;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}html,body{margin:0;width:100%;height:100%;overflow:hidden;touch-action:none;overscroll-behavior:none}body{font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--ink)}button{font:inherit;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation}.hidden{display:none!important}.shop-view{width:100vw;height:100vh;padding:10px}.product-grid{width:100%;height:100%;display:grid;grid-template-columns:repeat(var(--grid-columns,4),minmax(0,1fr));grid-template-rows:repeat(var(--grid-rows,2),minmax(0,1fr));gap:10px}.product-card,.total-card{position:relative;min-width:0;min-height:0;background:#fff;border-radius:18px;box-shadow:0 2px 12px rgba(0,0,0,.08);overflow:hidden}.product-card{padding:10px 10px 9px;display:flex;flex-direction:column}.product-image-wrap{flex:1 1 0;height:0;min-height:0;display:flex;align-items:center;justify-content:center;padding:2px 12px 0;overflow:hidden}.product-image{max-width:100%;max-height:100%;object-fit:contain;-webkit-user-drag:none;user-drag:none;pointer-events:none}.product-canvas{display:block;max-width:100%;max-height:100%;width:auto;height:100%;object-fit:contain;pointer-events:none}.combo-images{position:relative;width:100%;height:100%;display:block;overflow:visible}.combo-canvas{position:absolute;top:50%;left:50%;width:auto;height:100%;max-width:88%;transform:translate(calc(-50% + var(--combo-x, 0px)),-50%)}.combo-canvas:first-child{z-index:3}.combo-canvas:not(:first-child){z-index:2}.product-name{flex:0 0 34px;height:34px;font-size:clamp(16px,1.3vw,23px);font-weight:700;line-height:30px;margin:2px 0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;width:100%}.price{position:absolute;top:8px;right:8px;z-index:100;background:var(--orange);color:#fff;font-weight:800;font-size:clamp(21px,2vw,34px);line-height:1;padding:8px 12px;border-radius:999px;border:4px solid #fff;box-shadow:none;transform:none}.offer-price{border-radius:16px;padding:6px 12px 7px;display:flex;flex-direction:column;align-items:center;gap:1px}.offer-label{font-size:clamp(10px,0.8vw,14px);font-weight:900;letter-spacing:.8px;line-height:1}.offer-value{font-size:clamp(21px,2vw,34px);line-height:1.05}.qty{align-self:center;display:flex;align-items:center;justify-content:center;gap:15px;min-width:132px;height:47px;padding:4px 11px;border-radius:999px;background:#eef0f2;font-size:22px;font-weight:800;transition:.12s ease}.qty.selected{background:var(--orange);color:#fff}.qty button{border:0;background:transparent;color:inherit;cursor:pointer;width:31px;height:39px;font-size:28px;line-height:1}.qty button:active{transform:scale(.88)}.qty-value{min-width:20px;text-align:center}.total-card{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:18px}.total-label{color:var(--muted);font-size:25px;font-weight:700}.total-value{font-size:clamp(40px,4.2vw,66px);font-weight:900;margin:5px 0 18px}.pay-button{width:100%;max-width:340px;min-height:64px;border:0;border-radius:16px;background:var(--orange);color:#fff;font-size:21px;font-weight:900;cursor:pointer}.pay-button:disabled{background:#ffc9a7;cursor:default}.clear-button{margin-top:10px;border:0;background:transparent;text-decoration:underline;color:var(--muted);cursor:pointer;font-size:15px}
.payment-view{width:100vw;height:100vh;display:flex;flex-direction:column;padding:24px 28px 0;background:var(--bg)}.payment-content{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(420px,46vw);gap:28px;align-items:center}.payment-summary-card{height:100%;min-height:0;background:#fff;border-radius:28px;box-shadow:0 2px 15px rgba(0,0,0,.08);display:flex;flex-direction:column;justify-content:center;padding:42px clamp(30px,4vw,70px);overflow:hidden}.payment-heading{font-size:clamp(34px,3vw,52px);font-weight:900;margin-bottom:24px}.summary{width:100%;font-size:clamp(21px,1.8vw,30px);color:#30343a}.summary-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:11px 0;border-bottom:1px solid #e7e9eb}.summary-row strong{font-size:1em;white-space:nowrap}.summary-row span{font-weight:700;text-align:right}.summary-divider{height:2px;background:#eceef0;margin:22px 0 18px}.summary-total-label{font-size:20px;font-weight:700;color:var(--muted)}.payment-total{font-size:clamp(58px,6vw,94px);font-weight:900;color:var(--orange);line-height:1;margin:7px 0 26px}.poster-area{height:100%;min-height:0;display:flex;align-items:center;justify-content:center}.swish-poster{position:relative;height:min(84vh,920px);width:auto;aspect-ratio:625/945;background:url('/static/swish-poster-template.png') center/100% 100% no-repeat;flex:0 1 auto}.poster-qr{position:absolute;left:12.5%;top:7.5%;width:75%;height:auto;aspect-ratio:1;object-fit:contain}.poster-number{position:absolute;left:10%;top:56.0%;width:80%;text-align:center;color:#56575a;font-size:clamp(21px,3.15vh,43px);font-weight:700;letter-spacing:.5px;white-space:nowrap}.poster-name{position:absolute;left:10%;top:61.0%;width:80%;text-align:center;color:#56575a;font-size:clamp(16px,2.2vh,31px);font-weight:700;white-space:nowrap}.poster-amount{position:absolute;left:8%;top:70.5%;width:84%;text-align:center;color:#fff;font-size:clamp(22px,3.25vh,45px);font-weight:900;white-space:nowrap}.timeout-bar-wrap{height:68px;flex:0 0 68px;position:relative;display:flex;align-items:flex-end;justify-content:space-between;background:var(--bg);padding-bottom:8px}.next-customer{order:3;margin:0;border:0;background:var(--orange);color:#fff;font-size:19px;font-weight:800;border-radius:12px;padding:15px 22px;cursor:pointer}.cancel-purchase{order:1;margin:0;border:0;background:#fff;color:var(--ink);font-size:19px;font-weight:800;border-radius:12px;padding:15px 22px;cursor:pointer;box-shadow:0 2px 10px rgba(0,0,0,.08)}.timeout-bar{order:2;position:absolute;left:0;bottom:0;flex:0 0 8px;width:100%;height:8px;background:var(--orange);transform-origin:right center}.thanks-view{width:100vw;height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff}.thanks-icon{width:110px;height:110px;border-radius:50%;background:var(--orange);color:#fff;display:grid;place-items:center;font-size:70px;font-weight:900}.thanks-view h1{font-size:clamp(40px,5vw,72px);margin:24px 0 8px}.thanks-view p{color:var(--muted);font-size:26px;margin:0}
@media(max-width:1050px){.shop-view{padding:7px}.product-grid{gap:7px}.product-card{padding:7px 7px 8px}.price{top:7px;right:7px;font-size:20px;padding:6px 9px;border-width:3px;transform:none;box-shadow:none}.offer-price{padding:5px 8px 6px}.offer-label{font-size:9px}.qty{min-width:116px;height:43px;gap:10px}.product-name{flex-basis:30px;height:30px;font-size:15px;line-height:27px;margin:2px 0 3px}.payment-view{padding:12px 12px 0}.payment-content{grid-template-columns:minmax(0,1fr) minmax(330px,43vw);gap:14px}.payment-summary-card{padding:28px 24px}.payment-heading{margin-bottom:16px}.summary-row{padding:8px 0}.payment-total{margin-bottom:18px}.swish-poster{height:min(82vh,760px)}}
@media(max-width:760px){.payment-content{grid-template-columns:1fr;grid-template-rows:auto 1fr;overflow:hidden}.payment-summary-card{height:auto;min-height:0;padding:16px 20px}.payment-heading{font-size:28px;margin-bottom:8px}.summary{font-size:18px}.summary-row{padding:5px 0}.summary-divider{margin:10px 0 8px}.summary-total-label{font-size:15px}.payment-total{font-size:46px;margin:4px 0 10px}.poster-area{min-height:0}.swish-poster{height:min(57vh,620px)}}