From 6531f82c71274d616468b96ba6534a403ae1ed88 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 02:33:57 +0000 Subject: [PATCH 01/11] Add skipit beverage selector page with pickup flow Recreates the skipit pickup UI: product selection (Mis productos) with selectable beers, swipe-to-confirm Retiro screen, loading splash with frog logo, and success screen. Deployed via GitHub Pages. --- .github/workflows/deploy-pages.yml | 40 +++++ css/styles.css | 267 +++++++++++++++++++++++++++++ index.html | 172 +++++++++++++++++++ js/app.js | 120 +++++++++++++ 4 files changed, 599 insertions(+) create mode 100644 .github/workflows/deploy-pages.yml create mode 100644 css/styles.css create mode 100644 index.html create mode 100644 js/app.js diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml new file mode 100644 index 0000000..26dc508 --- /dev/null +++ b/.github/workflows/deploy-pages.yml @@ -0,0 +1,40 @@ +name: Deploy beverage selector to GitHub Pages + +on: + push: + branches: + - claude/beverage-selector-page-an4lgw + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: true + +jobs: + deploy: + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Pages + uses: actions/configure-pages@v5 + with: + enablement: true + + - name: Upload site artifact + uses: actions/upload-pages-artifact@v3 + with: + path: . + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/css/styles.css b/css/styles.css new file mode 100644 index 0000000..21fd8bb --- /dev/null +++ b/css/styles.css @@ -0,0 +1,267 @@ +:root{ + --bg:#f6f6f6; + --card:#ffffff; + --ink:#1b1d1f; + --muted:#8a8f96; + --line:#ececec; + --green:#34cc73; + --green-strong:#2fc56c; + --orange:#f3a85b; + --red:#f1574c; + --slate:#3a4a4a; + --track:#cfeac4; +} + +*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;} +html,body{margin:0;padding:0;height:100%;} +body{ + font-family:'Poppins',system-ui,-apple-system,Segoe UI,Roboto,sans-serif; + background:#e9e9ec; + color:var(--ink); + overflow:hidden; +} + +.app{ + position:relative; + width:100%; + max-width:480px; + height:100vh; + height:100dvh; + margin:0 auto; + background:var(--bg); + overflow:hidden; + box-shadow:0 0 40px rgba(0,0,0,.08); +} + +/* ---------- screens ---------- */ +.screen{ + position:absolute; + inset:0; + display:flex; + flex-direction:column; + opacity:0; + visibility:hidden; + transform:translateX(24px); + transition:opacity .42s ease, transform .42s ease, visibility .42s; + padding-top:env(safe-area-inset-top); +} +.screen.is-active{opacity:1;visibility:visible;transform:translateX(0);} +.screen.is-leaving{opacity:0;transform:translateX(-24px);} + +.page-head{padding:18px 22px 6px;} +.page-title{font-size:28px;font-weight:700;margin:0;letter-spacing:-.5px;} + +.content{flex:1;overflow-y:auto;padding:10px 16px 16px;} + +/* ---------- info card ---------- */ +.info-card{ + background:var(--card); + border-radius:16px; + padding:16px 16px; + display:flex; + align-items:center; + justify-content:space-between; + gap:12px; + box-shadow:0 1px 2px rgba(0,0,0,.04); +} +.info-card__title{margin:0;font-weight:600;font-size:15px;} +.info-card__sub{margin:2px 0 0;font-size:12.5px;color:var(--muted);} +.chip-btn{ + border:1px solid #e2e2e2; + background:#fff; + border-radius:12px; + padding:12px 26px; + font-family:inherit; + font-size:14px; + font-weight:500; + color:var(--ink); + cursor:pointer; + white-space:nowrap; +} + +/* ---------- product list ---------- */ +.product-list{list-style:none;margin:16px 0 0;padding:0;display:flex;flex-direction:column;gap:14px;} +.product{ + background:var(--card); + border:1.5px solid #efefef; + border-radius:16px; + padding:14px 16px; + display:flex; + align-items:center; + gap:14px; + cursor:pointer; + transition:border-color .25s ease, box-shadow .25s ease, transform .25s ease; +} +.product:active{transform:scale(.99);} +.product.is-selected{ + border-color:#2a2f33; + box-shadow:0 2px 8px rgba(0,0,0,.06); +} +.product__icon{ + width:42px;height:42px; + display:flex;align-items:center;justify-content:center; + flex:0 0 auto; +} +.product.is-selected .product__icon{animation:pickPop .45s cubic-bezier(.34,1.56,.64,1);} +@keyframes pickPop{ + 0%{transform:scale(1) rotate(0);} + 35%{transform:scale(1.22) rotate(-8deg);} + 70%{transform:scale(.95) rotate(4deg);} + 100%{transform:scale(1) rotate(0);} +} +.product__name{flex:1;font-weight:600;font-size:16px;} + +.checkbox{ + width:24px;height:24px;flex:0 0 auto; + border:2px solid #cfd3d8; + border-radius:7px; + display:flex;align-items:center;justify-content:center; + background:#fff; + transition:background .2s ease, border-color .2s ease, transform .2s ease; +} +.checkbox__tick{opacity:0;transform:scale(.3);transition:opacity .2s ease, transform .25s cubic-bezier(.34,1.56,.64,1);} +.product.is-selected .checkbox{background:#1f2a2e;border-color:#1f2a2e;} +.product.is-selected .checkbox__tick{opacity:1;transform:scale(1);} + +/* ---------- action bar ---------- */ +.action-bar{ + display:flex;align-items:center;gap:14px; + padding:14px 18px; + background:#f1f1f1; + border-top:1px solid #e3e3e3; +} +.action-bar__count{font-weight:600;font-size:15px;color:#2a2f33;min-width:84px;} +.confirm-btn{ + flex:1; + border:none; + border-radius:24px; + padding:15px 18px; + font-family:inherit; + font-size:16px; + font-weight:600; + color:#9aa0a6; + background:#d9dadc; + cursor:not-allowed; + transition:background .3s ease, color .3s ease, transform .15s ease; +} +.confirm-btn:not([disabled]){ + background:var(--green); + color:#fff; + cursor:pointer; + box-shadow:0 6px 16px rgba(52,204,115,.35); +} +.confirm-btn:not([disabled]):active{transform:scale(.98);} + +/* ---------- bottom nav ---------- */ +.bottom-nav{ + display:flex;justify-content:space-around;align-items:center; + padding:10px 8px calc(10px + env(safe-area-inset-bottom)); + background:#fff; + border-top:1px solid #eee; +} +.nav-item{ + background:none;border:none;padding:8px 14px;cursor:pointer; + color:#1b1d1f;display:flex;align-items:center;justify-content:center; +} +.nav-item--active{color:var(--green);} + +/* ================= RETIRO ================= */ +.screen--retiro{background:var(--orange);} +.screen--retiro .page-title{color:#1b1d1f;} +.alert-banner{ + background:var(--red); + color:#fff; + font-weight:600; + font-size:15px; + text-align:center; + padding:18px 16px; + border-radius:16px; + margin-top:6px; + box-shadow:0 6px 18px rgba(241,87,76,.3); +} +.ticket-card{ + background:#fff; + border-radius:18px; + padding:18px 18px 22px; + margin-top:18px; + box-shadow:0 8px 24px rgba(0,0,0,.08); +} +.ticket-card__head{display:flex;align-items:center;gap:12px;} +.avatar{ + width:40px;height:40px;border-radius:50%;flex:0 0 auto; + background:radial-gradient(circle at 35% 30%,#e8b9a0,#c98f7a); + filter:blur(1px); +} +.ticket-card__who{flex:1;min-width:0;} +.ticket-card__name{margin:0;font-weight:700;font-size:16px;} +.ticket-card__meta{margin:2px 0 0;font-size:12.5px;color:var(--muted);} +.ticket-card__hour{font-size:13.5px;font-weight:600;color:#1b1d1f;white-space:nowrap;} +.ticket-card__rule{border:none;border-top:1px solid #eee;margin:16px 0;} +.ticket-card__row{display:flex;justify-content:space-between;align-items:center;} +.ticket-card__label{font-weight:700;font-size:16px;} +.ticket-card__total{font-size:14px;color:#3a3f44;} +.ticket-card__item{display:flex;gap:14px;align-items:center;margin-top:14px;font-size:15px;} +.ticket-card__qty{font-weight:600;} + +/* swipe */ +.swipe-wrap{padding:0 22px calc(26px + env(safe-area-inset-bottom));} +.swipe{ + position:relative; + height:64px; + border-radius:32px; + background:var(--track); + display:flex;align-items:center;justify-content:center; + overflow:hidden; + user-select:none; + touch-action:none; +} +.swipe__label{font-weight:600;font-size:16px;color:#2f7d4f;pointer-events:none;} +.swipe__knob{ + position:absolute;left:6px;top:6px; + width:52px;height:52px;border-radius:50%; + background:var(--slate); + display:flex;align-items:center;justify-content:center; + cursor:grab; + box-shadow:0 4px 10px rgba(0,0,0,.25); + touch-action:none; +} +.swipe__knob:active{cursor:grabbing;} +.swipe__hint{text-align:center;font-size:12.5px;color:#7a4f1e;margin:14px 0 0;font-weight:500;} + +/* ================= LOADING ================= */ +.screen--loading{background:var(--bg);align-items:center;justify-content:center;} +.loader-card{ + background:#fff; + width:200px;height:200px; + border-radius:28px; + box-shadow:0 18px 40px rgba(0,0,0,.12); + display:flex;flex-direction:column;align-items:center;justify-content:center;gap:26px; +} +.brand{display:flex;align-items:center;gap:8px;} +.brand__name{font-weight:700;font-size:30px;letter-spacing:-1px;color:#16181a;} +.spinner{ + width:54px;height:54px;border-radius:50%; + border:6px solid #e9f7ee; + border-top-color:var(--green); + border-right-color:var(--green); + animation:spin .8s linear infinite; +} +@keyframes spin{to{transform:rotate(360deg);}} + +/* ================= SUCCESS ================= */ +.screen--success{background:var(--orange);} +.success-body{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;transform:translateY(-6%);} +.success-circle{ + width:150px;height:150px;border-radius:50%; + background:#ededed; + display:flex;align-items:center;justify-content:center; + animation:popIn .5s cubic-bezier(.34,1.56,.64,1); +} +.success-text{font-weight:700;font-size:21px;color:#1b1d1f;margin:0;} +@keyframes popIn{0%{transform:scale(.4);opacity:0;}100%{transform:scale(1);opacity:1;}} +.success-tick{ + stroke-dasharray:80;stroke-dashoffset:80; + animation:drawTick .5s ease .25s forwards; +} +.success-tick path{stroke-dasharray:80;stroke-dashoffset:80;animation:drawTick .5s ease .3s forwards;} +@keyframes drawTick{to{stroke-dashoffset:0;}} diff --git a/index.html b/index.html new file mode 100644 index 0000000..83ef609 --- /dev/null +++ b/index.html @@ -0,0 +1,172 @@ + + + + + + + skipit · Mis productos + + + + + + +
+ + +
+
+

Mis productos

+
+ +
+
+
+

Seleccioná tus productos.

+

Retiralos por el mostrador.

+
+ +
+ +
    +
  • + + + + Pinta ingreso + + + +
  • + +
  • + + + + Pinta ingreso + + + +
  • +
+
+ +
+ 0 Productos + +
+ + +
+ + +
+
+

Retiro

+
+ +
+
¡NO hagas swipe antes de retirar!
+ +
+
+ +
+

Rabieta Palermo

+

Ingreso - .

+
+ Hora 22:32:02 +
+
+
+ Estas retirando + Total:1 +
+
+ 1 + Pinta ingreso +
+
+
+ +
+
+
+ +
+ Retirado +
+

Deslizá para confirmar que retiraste tus productos

+
+
+ + +
+
+
+ + skipit +
+
+
+
+ + +
+
+

Retiro

+
+
+
+ +
+

¡Retiraste tus productos!

+
+
+ +
+ + + + diff --git a/js/app.js b/js/app.js new file mode 100644 index 0000000..96719da --- /dev/null +++ b/js/app.js @@ -0,0 +1,120 @@ +(function () { + "use strict"; + + var selected = new Set(); + + /* ---------- screen navigation ---------- */ + function show(id) { + var screens = document.querySelectorAll(".screen"); + screens.forEach(function (s) { + if (s.id === id) { + s.classList.remove("is-leaving"); + s.classList.add("is-active"); + } else if (s.classList.contains("is-active")) { + s.classList.remove("is-active"); + s.classList.add("is-leaving"); + setTimeout(function () { s.classList.remove("is-leaving"); }, 450); + } + }); + } + + /* ---------- product selection ---------- */ + var products = document.querySelectorAll(".product"); + var countLabel = document.getElementById("count-label"); + var confirmBtn = document.getElementById("confirm-btn"); + + function refresh() { + var n = selected.size; + countLabel.textContent = n + (n === 1 ? " Producto" : " Productos"); + confirmBtn.disabled = n === 0; + } + + function toggle(li) { + var id = li.getAttribute("data-id"); + var box = li.querySelector(".checkbox"); + if (selected.has(id)) { + selected.delete(id); + li.classList.remove("is-selected"); + box.setAttribute("aria-checked", "false"); + } else { + selected.add(id); + li.classList.add("is-selected"); + box.setAttribute("aria-checked", "true"); + } + refresh(); + } + + products.forEach(function (li) { + li.addEventListener("click", function () { toggle(li); }); + var box = li.querySelector(".checkbox"); + box.addEventListener("keydown", function (e) { + if (e.key === "Enter" || e.key === " ") { e.preventDefault(); toggle(li); } + }); + }); + + confirmBtn.addEventListener("click", function () { + if (confirmBtn.disabled) return; + show("screen-retiro"); + resetSwipe(); + }); + + /* ---------- swipe to confirm ---------- */ + var swipe = document.getElementById("swipe"); + var knob = document.getElementById("swipe-knob"); + var dragging = false, startX = 0, currentX = 0, maxX = 0, done = false; + + function resetSwipe() { + done = false; + knob.style.transition = "left .25s ease"; + knob.style.left = "6px"; + } + + function knobX(px) { + maxX = swipe.clientWidth - knob.offsetWidth - 12; + var x = Math.max(0, Math.min(px, maxX)); + knob.style.left = (6 + x) + "px"; + return x; + } + + function pointerDown(e) { + if (done) return; + dragging = true; + knob.style.transition = "none"; + startX = (e.touches ? e.touches[0].clientX : e.clientX) - currentX; + } + function pointerMove(e) { + if (!dragging) return; + var px = (e.touches ? e.touches[0].clientX : e.clientX) - startX; + currentX = knobX(px); + if (e.cancelable) e.preventDefault(); + } + function pointerUp() { + if (!dragging) return; + dragging = false; + if (currentX >= maxX * 0.82) { + done = true; + knob.style.transition = "left .18s ease"; + knob.style.left = (6 + maxX) + "px"; + currentX = maxX; + finish(); + } else { + knob.style.transition = "left .25s ease"; + knob.style.left = "6px"; + currentX = 0; + } + } + + knob.addEventListener("mousedown", pointerDown); + window.addEventListener("mousemove", pointerMove); + window.addEventListener("mouseup", pointerUp); + knob.addEventListener("touchstart", pointerDown, { passive: true }); + window.addEventListener("touchmove", pointerMove, { passive: false }); + window.addEventListener("touchend", pointerUp); + + function finish() { + show("screen-loading"); + setTimeout(function () { + show("screen-success"); + }, 2200); + } +})(); From bcbf8e76817c44754e76cf0027400bab7f426530 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 02:35:07 +0000 Subject: [PATCH 02/11] Switch to branch-based GitHub Pages deploy Remove Actions workflow (integration token cannot enable Pages on a fork) and add .nojekyll so the static site is served as-is. --- .github/workflows/deploy-pages.yml | 40 ------------------------------ .nojekyll | 0 2 files changed, 40 deletions(-) delete mode 100644 .github/workflows/deploy-pages.yml create mode 100644 .nojekyll diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml deleted file mode 100644 index 26dc508..0000000 --- a/.github/workflows/deploy-pages.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Deploy beverage selector to GitHub Pages - -on: - push: - branches: - - claude/beverage-selector-page-an4lgw - workflow_dispatch: - -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: pages - cancel-in-progress: true - -jobs: - deploy: - runs-on: ubuntu-latest - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Pages - uses: actions/configure-pages@v5 - with: - enablement: true - - - name: Upload site artifact - uses: actions/upload-pages-artifact@v3 - with: - path: . - - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 From 03a432e75e9a2c3f4588a10f17a984adb13d1819 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 02:50:53 +0000 Subject: [PATCH 03/11] Refine UI to match screenshots pixel-for-pixel - Two-line wrap for info card text, wider Todos chip - Exact colors for borders, buttons, checkbox, nav (selected row black border) - Swipe: light-green track, navy fill that trails the white knob with dark chevron - Loading: thick rounded green arc spinner, cleaner frog logo - Success: smaller circle and thinner checkmark, matching proportions - Hour shown with bold time, taller ticket card --- css/styles.css | 184 +++++++++++++++++++++++++------------------------ index.html | 29 ++++---- js/app.js | 22 ++++-- 3 files changed, 124 insertions(+), 111 deletions(-) diff --git a/css/styles.css b/css/styles.css index 21fd8bb..533282e 100644 --- a/css/styles.css +++ b/css/styles.css @@ -1,15 +1,17 @@ :root{ - --bg:#f6f6f6; + --bg:#f5f5f5; --card:#ffffff; - --ink:#1b1d1f; - --muted:#8a8f96; - --line:#ececec; - --green:#34cc73; - --green-strong:#2fc56c; - --orange:#f3a85b; - --red:#f1574c; - --slate:#3a4a4a; - --track:#cfeac4; + --ink:#191b1d; + --muted:#8c9197; + --line:#ededed; + --green:#33c75e; + --green-strong:#2ecf71; + --green-text:#2f7d4f; + --orange:#f4a85c; + --red:#f15a4f; + --navy:#13242b; + --track:#cdeac2; + --chip-border:#e4e4e4; } *{box-sizing:border-box;-webkit-tap-highlight-color:transparent;} @@ -24,7 +26,7 @@ body{ .app{ position:relative; width:100%; - max-width:480px; + max-width:440px; height:100vh; height:100dvh; margin:0 auto; @@ -48,43 +50,43 @@ body{ .screen.is-active{opacity:1;visibility:visible;transform:translateX(0);} .screen.is-leaving{opacity:0;transform:translateX(-24px);} -.page-head{padding:18px 22px 6px;} -.page-title{font-size:28px;font-weight:700;margin:0;letter-spacing:-.5px;} +.page-head{padding:16px 20px 4px;} +.page-title{font-size:27px;font-weight:700;margin:0;letter-spacing:-.4px;color:#191b1d;} -.content{flex:1;overflow-y:auto;padding:10px 16px 16px;} +.content{flex:1;overflow-y:auto;padding:12px 16px 14px;} /* ---------- info card ---------- */ .info-card{ background:var(--card); border-radius:16px; - padding:16px 16px; + padding:16px 14px 16px 18px; display:flex; align-items:center; justify-content:space-between; - gap:12px; - box-shadow:0 1px 2px rgba(0,0,0,.04); + gap:10px; } -.info-card__title{margin:0;font-weight:600;font-size:15px;} -.info-card__sub{margin:2px 0 0;font-size:12.5px;color:var(--muted);} +.info-card__text{max-width:150px;} +.info-card__title{margin:0;font-weight:600;font-size:16px;line-height:1.2;color:#191b1d;} +.info-card__sub{margin:6px 0 0;font-size:12px;font-weight:400;color:var(--muted);} .chip-btn{ - border:1px solid #e2e2e2; + border:1px solid var(--chip-border); background:#fff; - border-radius:12px; - padding:12px 26px; + border-radius:13px; + padding:18px 30px; font-family:inherit; - font-size:14px; + font-size:15px; font-weight:500; - color:var(--ink); + color:#191b1d; cursor:pointer; white-space:nowrap; } /* ---------- product list ---------- */ -.product-list{list-style:none;margin:16px 0 0;padding:0;display:flex;flex-direction:column;gap:14px;} +.product-list{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-direction:column;gap:14px;} .product{ background:var(--card); - border:1.5px solid #efefef; - border-radius:16px; + border:1px solid #eaeaea; + border-radius:15px; padding:14px 16px; display:flex; align-items:center; @@ -94,11 +96,11 @@ body{ } .product:active{transform:scale(.99);} .product.is-selected{ - border-color:#2a2f33; - box-shadow:0 2px 8px rgba(0,0,0,.06); + border-color:#1b1d1f; + border-width:1.5px; } .product__icon{ - width:42px;height:42px; + width:40px;height:44px; display:flex;align-items:center;justify-content:center; flex:0 0 auto; } @@ -109,33 +111,33 @@ body{ 70%{transform:scale(.95) rotate(4deg);} 100%{transform:scale(1) rotate(0);} } -.product__name{flex:1;font-weight:600;font-size:16px;} +.product__name{flex:1;font-weight:600;font-size:16px;color:#191b1d;} .checkbox{ - width:24px;height:24px;flex:0 0 auto; - border:2px solid #cfd3d8; + width:23px;height:23px;flex:0 0 auto; + border:2px solid #d2d6db; border-radius:7px; display:flex;align-items:center;justify-content:center; background:#fff; - transition:background .2s ease, border-color .2s ease, transform .2s ease; + transition:background .2s ease, border-color .2s ease; } .checkbox__tick{opacity:0;transform:scale(.3);transition:opacity .2s ease, transform .25s cubic-bezier(.34,1.56,.64,1);} -.product.is-selected .checkbox{background:#1f2a2e;border-color:#1f2a2e;} +.product.is-selected .checkbox{background:#16262c;border-color:#16262c;} .product.is-selected .checkbox__tick{opacity:1;transform:scale(1);} /* ---------- action bar ---------- */ .action-bar{ display:flex;align-items:center;gap:14px; - padding:14px 18px; - background:#f1f1f1; - border-top:1px solid #e3e3e3; + padding:14px 16px; + background:#f0f0f0; + border-top:1px solid #e2e2e2; } -.action-bar__count{font-weight:600;font-size:15px;color:#2a2f33;min-width:84px;} +.action-bar__count{font-weight:600;font-size:15px;color:#26292c;min-width:78px;} .confirm-btn{ flex:1; border:none; border-radius:24px; - padding:15px 18px; + padding:14px 18px; font-family:inherit; font-size:16px; font-weight:600; @@ -148,120 +150,120 @@ body{ background:var(--green); color:#fff; cursor:pointer; - box-shadow:0 6px 16px rgba(52,204,115,.35); } .confirm-btn:not([disabled]):active{transform:scale(.98);} /* ---------- bottom nav ---------- */ .bottom-nav{ display:flex;justify-content:space-around;align-items:center; - padding:10px 8px calc(10px + env(safe-area-inset-bottom)); + padding:11px 8px calc(11px + env(safe-area-inset-bottom)); background:#fff; border-top:1px solid #eee; } .nav-item{ - background:none;border:none;padding:8px 14px;cursor:pointer; + background:none;border:none;padding:6px 14px;cursor:pointer; color:#1b1d1f;display:flex;align-items:center;justify-content:center; } .nav-item--active{color:var(--green);} /* ================= RETIRO ================= */ .screen--retiro{background:var(--orange);} -.screen--retiro .page-title{color:#1b1d1f;} +.screen--retiro .page-title{color:#191b1d;} .alert-banner{ background:var(--red); color:#fff; font-weight:600; font-size:15px; text-align:center; - padding:18px 16px; - border-radius:16px; - margin-top:6px; - box-shadow:0 6px 18px rgba(241,87,76,.3); + padding:17px 16px; + border-radius:15px; + margin-top:4px; } .ticket-card{ background:#fff; border-radius:18px; padding:18px 18px 22px; - margin-top:18px; - box-shadow:0 8px 24px rgba(0,0,0,.08); + margin-top:16px; + min-height:260px; } -.ticket-card__head{display:flex;align-items:center;gap:12px;} +.ticket-card__head{display:flex;align-items:center;gap:11px;} .avatar{ - width:40px;height:40px;border-radius:50%;flex:0 0 auto; - background:radial-gradient(circle at 35% 30%,#e8b9a0,#c98f7a); - filter:blur(1px); + width:38px;height:38px;border-radius:50%;flex:0 0 auto; + border:1px solid #eee; + background:radial-gradient(circle at 50% 45%,#e7625a,#b83b3b); + filter:blur(1.5px); } .ticket-card__who{flex:1;min-width:0;} -.ticket-card__name{margin:0;font-weight:700;font-size:16px;} -.ticket-card__meta{margin:2px 0 0;font-size:12.5px;color:var(--muted);} -.ticket-card__hour{font-size:13.5px;font-weight:600;color:#1b1d1f;white-space:nowrap;} -.ticket-card__rule{border:none;border-top:1px solid #eee;margin:16px 0;} -.ticket-card__row{display:flex;justify-content:space-between;align-items:center;} -.ticket-card__label{font-weight:700;font-size:16px;} -.ticket-card__total{font-size:14px;color:#3a3f44;} -.ticket-card__item{display:flex;gap:14px;align-items:center;margin-top:14px;font-size:15px;} -.ticket-card__qty{font-weight:600;} +.ticket-card__name{margin:0;font-weight:700;font-size:16px;color:#191b1d;} +.ticket-card__meta{margin:1px 0 0;font-size:12px;color:var(--muted);} +.ticket-card__hour{font-size:14px;font-weight:400;color:#191b1d;white-space:nowrap;} +.ticket-card__hour b{font-weight:700;} +.ticket-card__rule{border:none;border-top:1px solid #eee;margin:15px 0;} +.ticket-card__row{display:flex;justify-content:space-between;align-items:baseline;} +.ticket-card__label{font-weight:700;font-size:16px;color:#191b1d;} +.ticket-card__total{font-size:14px;font-weight:400;color:#191b1d;} +.ticket-card__item{display:flex;gap:16px;align-items:center;margin-top:14px;font-size:15px;color:#191b1d;} +.ticket-card__qty{font-weight:400;} /* swipe */ -.swipe-wrap{padding:0 22px calc(26px + env(safe-area-inset-bottom));} +.swipe-wrap{padding:0 20px calc(22px + env(safe-area-inset-bottom));} .swipe{ position:relative; - height:64px; - border-radius:32px; + height:60px; + border-radius:30px; background:var(--track); display:flex;align-items:center;justify-content:center; overflow:hidden; user-select:none; touch-action:none; } -.swipe__label{font-weight:600;font-size:16px;color:#2f7d4f;pointer-events:none;} +.swipe__fill{ + position:absolute;left:0;top:0;height:100%; + width:54px; + background:var(--navy); + border-radius:30px; + z-index:1; +} +.swipe__label{ + position:relative;z-index:0; + font-weight:600;font-size:16px;color:var(--green-text);pointer-events:none; +} .swipe__knob{ - position:absolute;left:6px;top:6px; - width:52px;height:52px;border-radius:50%; - background:var(--slate); + position:absolute;left:6px;top:6px;z-index:2; + width:48px;height:48px;border-radius:50%; + background:#fff; display:flex;align-items:center;justify-content:center; cursor:grab; - box-shadow:0 4px 10px rgba(0,0,0,.25); + box-shadow:0 2px 6px rgba(0,0,0,.2); touch-action:none; } .swipe__knob:active{cursor:grabbing;} -.swipe__hint{text-align:center;font-size:12.5px;color:#7a4f1e;margin:14px 0 0;font-weight:500;} +.swipe__hint{text-align:center;font-size:12px;color:#7a4f1e;margin:13px 0 0;font-weight:500;} /* ================= LOADING ================= */ .screen--loading{background:var(--bg);align-items:center;justify-content:center;} .loader-card{ background:#fff; - width:200px;height:200px; + width:198px;height:198px; border-radius:28px; - box-shadow:0 18px 40px rgba(0,0,0,.12); - display:flex;flex-direction:column;align-items:center;justify-content:center;gap:26px; -} -.brand{display:flex;align-items:center;gap:8px;} -.brand__name{font-weight:700;font-size:30px;letter-spacing:-1px;color:#16181a;} -.spinner{ - width:54px;height:54px;border-radius:50%; - border:6px solid #e9f7ee; - border-top-color:var(--green); - border-right-color:var(--green); - animation:spin .8s linear infinite; + box-shadow:0 18px 44px rgba(0,0,0,.13); + display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px; } +.brand{display:flex;align-items:center;gap:6px;} +.brand__name{font-weight:700;font-size:30px;letter-spacing:-1px;color:#14171a;} +.spinner{animation:spin .85s linear infinite;} @keyframes spin{to{transform:rotate(360deg);}} /* ================= SUCCESS ================= */ .screen--success{background:var(--orange);} -.success-body{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;transform:translateY(-6%);} +.success-body{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;transform:translateY(-4%);} .success-circle{ - width:150px;height:150px;border-radius:50%; + width:116px;height:116px;border-radius:50%; background:#ededed; display:flex;align-items:center;justify-content:center; animation:popIn .5s cubic-bezier(.34,1.56,.64,1); } -.success-text{font-weight:700;font-size:21px;color:#1b1d1f;margin:0;} +.success-text{font-weight:700;font-size:20px;color:#191b1d;margin:0;} @keyframes popIn{0%{transform:scale(.4);opacity:0;}100%{transform:scale(1);opacity:1;}} -.success-tick{ - stroke-dasharray:80;stroke-dashoffset:80; - animation:drawTick .5s ease .25s forwards; -} .success-tick path{stroke-dasharray:80;stroke-dashoffset:80;animation:drawTick .5s ease .3s forwards;} @keyframes drawTick{to{stroke-dashoffset:0;}} diff --git a/index.html b/index.html index 83ef609..1f55b3e 100644 --- a/index.html +++ b/index.html @@ -107,7 +107,7 @@

Retiro

Rabieta Palermo

Ingreso - .

- Hora 22:32:02 + Hora 22:32:02
@@ -123,10 +123,11 @@

Retiro

+
+ Retirado
- +
- Retirado

Deslizá para confirmar que retiraste tus productos

@@ -136,19 +137,21 @@

Retiro

- skipit
-
+
@@ -159,7 +162,7 @@

Retiro

- +

¡Retiraste tus productos!

diff --git a/js/app.js b/js/app.js index 96719da..93c4585 100644 --- a/js/app.js +++ b/js/app.js @@ -61,18 +61,28 @@ /* ---------- swipe to confirm ---------- */ var swipe = document.getElementById("swipe"); var knob = document.getElementById("swipe-knob"); + var fill = document.getElementById("swipe-fill"); var dragging = false, startX = 0, currentX = 0, maxX = 0, done = false; + function paint(x, anim) { + var t = anim ? "left .25s ease" : "none"; + var tf = anim ? "width .25s ease" : "none"; + knob.style.transition = t; + fill.style.transition = tf; + knob.style.left = (6 + x) + "px"; + fill.style.width = (6 + x + knob.offsetWidth / 2) + "px"; + } + function resetSwipe() { done = false; - knob.style.transition = "left .25s ease"; - knob.style.left = "6px"; + currentX = 0; + paint(0, true); } function knobX(px) { maxX = swipe.clientWidth - knob.offsetWidth - 12; var x = Math.max(0, Math.min(px, maxX)); - knob.style.left = (6 + x) + "px"; + paint(x, false); return x; } @@ -93,14 +103,12 @@ dragging = false; if (currentX >= maxX * 0.82) { done = true; - knob.style.transition = "left .18s ease"; - knob.style.left = (6 + maxX) + "px"; currentX = maxX; + paint(maxX, true); finish(); } else { - knob.style.transition = "left .25s ease"; - knob.style.left = "6px"; currentX = 0; + paint(0, true); } } From edb677e14f52b5138db1fdeec69531dcd37aa58d Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 02:54:53 +0000 Subject: [PATCH 04/11] Match swipe states and frog logo to screenshots - Swipe: no dark fill at rest (white knob on mint track); navy fill appears and trails the knob the moment you start sliding (4153/4154) - Muted green Retirado label - Redraw frog logo: leaping pose, head up-right with eye + highlight - Unify spinner green with logo --- css/styles.css | 2 +- index.html | 20 +++++++++++--------- js/app.js | 3 ++- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/css/styles.css b/css/styles.css index 533282e..f749795 100644 --- a/css/styles.css +++ b/css/styles.css @@ -6,7 +6,7 @@ --line:#ededed; --green:#33c75e; --green-strong:#2ecf71; - --green-text:#2f7d4f; + --green-text:#5c7d65; --orange:#f4a85c; --red:#f15a4f; --navy:#13242b; diff --git a/index.html b/index.html index 1f55b3e..078c37a 100644 --- a/index.html +++ b/index.html @@ -137,20 +137,22 @@

Retiro

- skipit
diff --git a/js/app.js b/js/app.js index 93c4585..88a5d65 100644 --- a/js/app.js +++ b/js/app.js @@ -70,7 +70,8 @@ knob.style.transition = t; fill.style.transition = tf; knob.style.left = (6 + x) + "px"; - fill.style.width = (6 + x + knob.offsetWidth / 2) + "px"; + // No dark fill at rest; it appears and trails the knob as soon as you slide. + fill.style.width = (x <= 0 ? 0 : 6 + x + knob.offsetWidth / 2) + "px"; } function resetSwipe() { From c2a54d5a49a9548578c58435e6340c059973dad4 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 03:11:05 +0000 Subject: [PATCH 05/11] Ticket card: live clock, bigger bold name, brewery badge, refined frog - Hour now shows the real current time (HH:MM:SS), updating every second - Larger, bolder 'Rabieta Palermo' name with clearer separator rule - Recreate the brewery roundel (curved text + maroon horseshoe) as the avatar - Redraw skipit frog facing left with eye-bump on top, matching the logo --- css/styles.css | 16 ++++++++-------- index.html | 42 ++++++++++++++++++++++++++++++------------ js/app.js | 10 ++++++++++ 3 files changed, 48 insertions(+), 20 deletions(-) diff --git a/css/styles.css b/css/styles.css index f749795..9d93e5a 100644 --- a/css/styles.css +++ b/css/styles.css @@ -186,19 +186,19 @@ body{ margin-top:16px; min-height:260px; } -.ticket-card__head{display:flex;align-items:center;gap:11px;} +.ticket-card__head{display:flex;align-items:center;gap:12px;} .avatar{ - width:38px;height:38px;border-radius:50%;flex:0 0 auto; - border:1px solid #eee; - background:radial-gradient(circle at 50% 45%,#e7625a,#b83b3b); - filter:blur(1.5px); + width:46px;height:46px;border-radius:50%;flex:0 0 auto; + overflow:hidden; + display:flex;align-items:center;justify-content:center; } +.avatar svg{display:block;} .ticket-card__who{flex:1;min-width:0;} -.ticket-card__name{margin:0;font-weight:700;font-size:16px;color:#191b1d;} -.ticket-card__meta{margin:1px 0 0;font-size:12px;color:var(--muted);} +.ticket-card__name{margin:0;font-weight:700;font-size:19px;line-height:1.1;color:#191b1d;letter-spacing:-.3px;} +.ticket-card__meta{margin:3px 0 0;font-size:12px;color:var(--muted);} .ticket-card__hour{font-size:14px;font-weight:400;color:#191b1d;white-space:nowrap;} .ticket-card__hour b{font-weight:700;} -.ticket-card__rule{border:none;border-top:1px solid #eee;margin:15px 0;} +.ticket-card__rule{border:none;border-top:1px solid #e8e8e8;margin:14px 0;} .ticket-card__row{display:flex;justify-content:space-between;align-items:baseline;} .ticket-card__label{font-weight:700;font-size:16px;color:#191b1d;} .ticket-card__total{font-size:14px;font-weight:400;color:#191b1d;} diff --git a/index.html b/index.html index 078c37a..0599be6 100644 --- a/index.html +++ b/index.html @@ -102,12 +102,30 @@

Retiro

- + + +

Rabieta Palermo

Ingreso - .

- Hora 22:32:02 + Hora 00:00:00

@@ -137,17 +155,17 @@

Retiro

- skipit
diff --git a/js/app.js b/js/app.js index 88a5d65..babe923 100644 --- a/js/app.js +++ b/js/app.js @@ -3,6 +3,16 @@ var selected = new Set(); + /* ---------- live clock (real current time, HH:MM:SS) ---------- */ + var hora = document.getElementById("hora-time"); + function pad(n) { return n < 10 ? "0" + n : "" + n; } + function tick() { + var d = new Date(); + hora.textContent = pad(d.getHours()) + ":" + pad(d.getMinutes()) + ":" + pad(d.getSeconds()); + } + tick(); + setInterval(tick, 1000); + /* ---------- screen navigation ---------- */ function show(id) { var screens = document.querySelectorAll(".screen"); From 293d9bb2d17bab444f436c2abb32f25328a6adfc Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 03:25:10 +0000 Subject: [PATCH 06/11] Match Retiro page to real site HTML Use exact values from the live site: orange #fdba74, text #0a1112, letter-spacing -0.02rem, real brewery logo image (50px, SVG badge fallback), Hora 16px/800 #425052, 18px/700 name and items, Total: at 16px/500, dark progress #04252b, white thumb with the site's chevron icon, hint 14px/500 #0a1112. --- css/styles.css | 48 +++++++++++++++++++++++++----------------------- index.html | 11 +++++------ js/app.js | 2 +- 3 files changed, 31 insertions(+), 30 deletions(-) diff --git a/css/styles.css b/css/styles.css index 9d93e5a..b8699f4 100644 --- a/css/styles.css +++ b/css/styles.css @@ -7,9 +7,10 @@ --green:#33c75e; --green-strong:#2ecf71; --green-text:#5c7d65; - --orange:#f4a85c; + --orange:#fdba74; --red:#f15a4f; - --navy:#13242b; + --navy:#04252b; + --ink2:#0a1112; --track:#cdeac2; --chip-border:#e4e4e4; } @@ -51,7 +52,7 @@ body{ .screen.is-leaving{opacity:0;transform:translateX(-24px);} .page-head{padding:16px 20px 4px;} -.page-title{font-size:27px;font-weight:700;margin:0;letter-spacing:-.4px;color:#191b1d;} +.page-title{font-size:26px;font-weight:700;margin:0;letter-spacing:-.02rem;color:var(--ink2);} .content{flex:1;overflow-y:auto;padding:12px 16px 14px;} @@ -167,15 +168,15 @@ body{ .nav-item--active{color:var(--green);} /* ================= RETIRO ================= */ -.screen--retiro{background:var(--orange);} -.screen--retiro .page-title{color:#191b1d;} +.screen--retiro{background:var(--orange);letter-spacing:-.02rem;} +.screen--retiro .page-title{color:var(--ink2);} .alert-banner{ background:var(--red); - color:#fff; - font-weight:600; - font-size:15px; + color:#f2f2f2; + font-weight:700; + font-size:18px; text-align:center; - padding:17px 16px; + padding:16px 16px; border-radius:15px; margin-top:4px; } @@ -188,22 +189,23 @@ body{ } .ticket-card__head{display:flex;align-items:center;gap:12px;} .avatar{ - width:46px;height:46px;border-radius:50%;flex:0 0 auto; + width:50px;height:50px;border-radius:50%;flex:0 0 auto; overflow:hidden; display:flex;align-items:center;justify-content:center; } -.avatar svg{display:block;} +.avatar__img{width:50px;height:50px;object-fit:cover;border-radius:50%;display:block;} +.avatar__fallback{display:none;} .ticket-card__who{flex:1;min-width:0;} -.ticket-card__name{margin:0;font-weight:700;font-size:19px;line-height:1.1;color:#191b1d;letter-spacing:-.3px;} -.ticket-card__meta{margin:3px 0 0;font-size:12px;color:var(--muted);} -.ticket-card__hour{font-size:14px;font-weight:400;color:#191b1d;white-space:nowrap;} -.ticket-card__hour b{font-weight:700;} -.ticket-card__rule{border:none;border-top:1px solid #e8e8e8;margin:14px 0;} -.ticket-card__row{display:flex;justify-content:space-between;align-items:baseline;} -.ticket-card__label{font-weight:700;font-size:16px;color:#191b1d;} -.ticket-card__total{font-size:14px;font-weight:400;color:#191b1d;} -.ticket-card__item{display:flex;gap:16px;align-items:center;margin-top:14px;font-size:15px;color:#191b1d;} -.ticket-card__qty{font-weight:400;} +.ticket-card__name{margin:0;font-weight:700;font-size:18px;line-height:1.15;color:var(--ink2);} +.ticket-card__meta{margin:2px 0 0;font-size:12px;font-weight:500;color:var(--ink2);} +.ticket-card__hour{font-size:16px;font-weight:800;color:#425052;white-space:nowrap;align-self:flex-start;} +.ticket-card__rule{border:none;border-top:1px solid #e0e0e0;margin:8px 0;} +.ticket-card__row{display:flex;justify-content:space-between;align-items:baseline;padding:10px 8px;} +.ticket-card__label{font-weight:700;font-size:18px;color:var(--ink2);} +.ticket-card__total{font-size:18px;font-weight:700;color:var(--ink2);} +.ticket-card__total .t-label{font-size:16px;font-weight:500;} +.ticket-card__item{display:flex;gap:16px;align-items:center;margin-top:6px;padding:0 8px;font-size:18px;font-weight:700;color:var(--ink2);} +.ticket-card__qty{font-weight:700;} /* swipe */ .swipe-wrap{padding:0 20px calc(22px + env(safe-area-inset-bottom));} @@ -231,14 +233,14 @@ body{ .swipe__knob{ position:absolute;left:6px;top:6px;z-index:2; width:48px;height:48px;border-radius:50%; - background:#fff; + background:#fdfdfd; display:flex;align-items:center;justify-content:center; cursor:grab; box-shadow:0 2px 6px rgba(0,0,0,.2); touch-action:none; } .swipe__knob:active{cursor:grabbing;} -.swipe__hint{text-align:center;font-size:12px;color:#7a4f1e;margin:13px 0 0;font-weight:500;} +.swipe__hint{text-align:center;font-size:14px;color:var(--ink2);margin:13px 0 0;font-weight:500;letter-spacing:-.02rem;} /* ================= LOADING ================= */ .screen--loading{background:var(--bg);align-items:center;justify-content:center;} diff --git a/index.html b/index.html index 0599be6..5f989c7 100644 --- a/index.html +++ b/index.html @@ -103,7 +103,8 @@

Retiro

- +

Retiro

- - @@ -125,12 +124,12 @@

Retiro

Rabieta Palermo

Ingreso - .

- Hora 00:00:00 + Hora 00:00:00

Estas retirando - Total:1 + Total:1
1 @@ -144,7 +143,7 @@

Retiro

Retirado
- +

Deslizá para confirmar que retiraste tus productos

diff --git a/js/app.js b/js/app.js index babe923..750b53c 100644 --- a/js/app.js +++ b/js/app.js @@ -8,7 +8,7 @@ function pad(n) { return n < 10 ? "0" + n : "" + n; } function tick() { var d = new Date(); - hora.textContent = pad(d.getHours()) + ":" + pad(d.getMinutes()) + ":" + pad(d.getSeconds()); + hora.textContent = "Hora " + pad(d.getHours()) + ":" + pad(d.getMinutes()) + ":" + pad(d.getSeconds()); } tick(); setInterval(tick, 1000); From 6fa0c89ded6c66704650dab7adaad679f3e06d44 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 03:30:26 +0000 Subject: [PATCH 07/11] Use official skipit logo SVG on the loading screen Replace the hand-drawn frog with the exact skipit wordmark+frog SVG (frog #3BD58B, text #0A1112) and match the spinner to the brand green. --- css/styles.css | 4 ++-- index.html | 23 +++++++++++------------ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/css/styles.css b/css/styles.css index b8699f4..57736b5 100644 --- a/css/styles.css +++ b/css/styles.css @@ -251,8 +251,8 @@ body{ box-shadow:0 18px 44px rgba(0,0,0,.13); display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px; } -.brand{display:flex;align-items:center;gap:6px;} -.brand__name{font-weight:700;font-size:30px;letter-spacing:-1px;color:#14171a;} +.brand{display:flex;align-items:center;justify-content:center;} +.brand__logo{display:block;width:158px;height:auto;} .spinner{animation:spin .85s linear infinite;} @keyframes spin{to{transform:rotate(360deg);}} diff --git a/index.html b/index.html index 5f989c7..c575dc0 100644 --- a/index.html +++ b/index.html @@ -154,22 +154,21 @@

Retiro

- skipit
From ed63823d53dc982b1a459f028072513c7c9de403 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 03:58:36 +0000 Subject: [PATCH 08/11] Step 2: Todos toggles product set (bottles + trago), dynamic Retiro, red page - Todos button switches the list between beers and the drinks set (3x Bebida sin alcohol ingreso with a bottle, 1x Trago ingreso with a cocktail glass), replaying the entry animation - Products are data-driven; Retiro ticket now lists the selected items with a live total - Retiro/success background changed from orange to coral red --- css/styles.css | 4 +- index.html | 48 +--------------- js/app.js | 146 ++++++++++++++++++++++++++++++++++--------------- 3 files changed, 109 insertions(+), 89 deletions(-) diff --git a/css/styles.css b/css/styles.css index 57736b5..757a4c5 100644 --- a/css/styles.css +++ b/css/styles.css @@ -7,7 +7,7 @@ --green:#33c75e; --green-strong:#2ecf71; --green-text:#5c7d65; - --orange:#fdba74; + --orange:#e07d70; --red:#f15a4f; --navy:#04252b; --ink2:#0a1112; @@ -94,7 +94,9 @@ body{ gap:14px; cursor:pointer; transition:border-color .25s ease, box-shadow .25s ease, transform .25s ease; + animation:itemIn .45s cubic-bezier(.22,1,.36,1) both; } +@keyframes itemIn{0%{opacity:0;transform:translateY(14px) scale(.97);}100%{opacity:1;transform:translateY(0) scale(1);}} .product:active{transform:scale(.99);} .product.is-selected{ border-color:#1b1d1f; diff --git a/index.html b/index.html index c575dc0..2f6d97b 100644 --- a/index.html +++ b/index.html @@ -28,46 +28,7 @@

Mis productos

-
    -
  • - - - - Pinta ingreso - - - -
  • - -
  • - - - - Pinta ingreso - - - -
  • -
+
    @@ -129,12 +90,9 @@

    Retiro


    Estas retirando - Total:1 -
    -
    - 1 - Pinta ingreso + Total:1
    +
    diff --git a/js/app.js b/js/app.js index 750b53c..e7f8f8b 100644 --- a/js/app.js +++ b/js/app.js @@ -1,8 +1,6 @@ (function () { "use strict"; - var selected = new Set(); - /* ---------- live clock (real current time, HH:MM:SS) ---------- */ var hora = document.getElementById("hora-time"); function pad(n) { return n < 10 ? "0" + n : "" + n; } @@ -13,57 +11,123 @@ tick(); setInterval(tick, 1000); - /* ---------- screen navigation ---------- */ - function show(id) { - var screens = document.querySelectorAll(".screen"); - screens.forEach(function (s) { - if (s.id === id) { - s.classList.remove("is-leaving"); - s.classList.add("is-active"); - } else if (s.classList.contains("is-active")) { - s.classList.remove("is-active"); - s.classList.add("is-leaving"); - setTimeout(function () { s.classList.remove("is-leaving"); }, 450); - } - }); - } + /* ---------- product icons (SVG) ---------- */ + var ICONS = { + beer: + '', + bottle: + '', + cocktail: + '' + }; - /* ---------- product selection ---------- */ - var products = document.querySelectorAll(".product"); + /* ---------- product datasets (Todos toggles between them) ---------- */ + var SETS = [ + [ + { name: "Pinta ingreso", icon: "beer" }, + { name: "Pinta ingreso", icon: "beer" } + ], + [ + { name: "Bebida sin alcohol ingreso", icon: "bottle" }, + { name: "Bebida sin alcohol ingreso", icon: "bottle" }, + { name: "Bebida sin alcohol ingreso", icon: "bottle" }, + { name: "Trago ingreso", icon: "cocktail" } + ] + ]; + var setIndex = 0; + + var listEl = document.getElementById("product-list"); var countLabel = document.getElementById("count-label"); var confirmBtn = document.getElementById("confirm-btn"); function refresh() { - var n = selected.size; + var n = listEl.querySelectorAll(".product.is-selected").length; countLabel.textContent = n + (n === 1 ? " Producto" : " Productos"); confirmBtn.disabled = n === 0; } - function toggle(li) { - var id = li.getAttribute("data-id"); - var box = li.querySelector(".checkbox"); - if (selected.has(id)) { - selected.delete(id); - li.classList.remove("is-selected"); - box.setAttribute("aria-checked", "false"); - } else { - selected.add(id); - li.classList.add("is-selected"); - box.setAttribute("aria-checked", "true"); + function buildProduct(item, i) { + var li = document.createElement("li"); + li.className = "product"; + li.style.animationDelay = (i * 0.07) + "s"; + li.innerHTML = + '' + ICONS[item.icon] + "" + + '' + item.name + "" + + '' + + '' + + ""; + + function toggle() { + var box = li.querySelector(".checkbox"); + var sel = li.classList.toggle("is-selected"); + box.setAttribute("aria-checked", sel ? "true" : "false"); + refresh(); } - refresh(); + li.addEventListener("click", toggle); + li.querySelector(".checkbox").addEventListener("keydown", function (e) { + if (e.key === "Enter" || e.key === " ") { e.preventDefault(); toggle(); } + }); + return li; } - products.forEach(function (li) { - li.addEventListener("click", function () { toggle(li); }); - var box = li.querySelector(".checkbox"); - box.addEventListener("keydown", function (e) { - if (e.key === "Enter" || e.key === " ") { e.preventDefault(); toggle(li); } + function renderProducts() { + listEl.innerHTML = ""; + SETS[setIndex].forEach(function (item, i) { + listEl.appendChild(buildProduct(item, i)); }); + refresh(); + } + + document.querySelector(".chip-btn").addEventListener("click", function () { + setIndex = (setIndex + 1) % SETS.length; + renderProducts(); }); + renderProducts(); + + /* ---------- screen navigation ---------- */ + function show(id) { + document.querySelectorAll(".screen").forEach(function (s) { + if (s.id === id) { + s.classList.remove("is-leaving"); + s.classList.add("is-active"); + } else if (s.classList.contains("is-active")) { + s.classList.remove("is-active"); + s.classList.add("is-leaving"); + setTimeout(function () { s.classList.remove("is-leaving"); }, 450); + } + }); + } + + /* ---------- confirm -> build Retiro ticket from selection ---------- */ + var retiroItems = document.getElementById("retiro-items"); + var retiroTotal = document.getElementById("retiro-total"); + confirmBtn.addEventListener("click", function () { if (confirmBtn.disabled) return; + var sels = listEl.querySelectorAll(".product.is-selected"); + retiroItems.innerHTML = ""; + sels.forEach(function (li) { + var name = li.querySelector(".product__name").textContent; + var row = document.createElement("div"); + row.className = "ticket-card__item"; + row.innerHTML = '1' + name + ""; + retiroItems.appendChild(row); + }); + retiroTotal.textContent = sels.length; show("screen-retiro"); resetSwipe(); }); @@ -75,10 +139,8 @@ var dragging = false, startX = 0, currentX = 0, maxX = 0, done = false; function paint(x, anim) { - var t = anim ? "left .25s ease" : "none"; - var tf = anim ? "width .25s ease" : "none"; - knob.style.transition = t; - fill.style.transition = tf; + knob.style.transition = anim ? "left .25s ease" : "none"; + fill.style.transition = anim ? "width .25s ease" : "none"; knob.style.left = (6 + x) + "px"; // No dark fill at rest; it appears and trails the knob as soon as you slide. fill.style.width = (x <= 0 ? 0 : 6 + x + knob.offsetWidth / 2) + "px"; @@ -132,8 +194,6 @@ function finish() { show("screen-loading"); - setTimeout(function () { - show("screen-success"); - }, 2200); + setTimeout(function () { show("screen-success"); }, 2200); } })(); From a16423cf1b9a9a2ab94cff5ee4bcdd87c78e740f Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 04:03:25 +0000 Subject: [PATCH 09/11] Trago set is a single Trago ingreso; exact red #f87171; image support - Todos now toggles between the two beers and a single Trago ingreso - Add per-product real-image support (img URL) with SVG balloon-glass fallback - Use the exact background red rgb(248,113,113) --- css/styles.css | 3 ++- js/app.js | 38 ++++++++++++++++++-------------------- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/css/styles.css b/css/styles.css index 757a4c5..007b1be 100644 --- a/css/styles.css +++ b/css/styles.css @@ -7,7 +7,7 @@ --green:#33c75e; --green-strong:#2ecf71; --green-text:#5c7d65; - --orange:#e07d70; + --orange:#f87171; --red:#f15a4f; --navy:#04252b; --ink2:#0a1112; @@ -107,6 +107,7 @@ body{ display:flex;align-items:center;justify-content:center; flex:0 0 auto; } +.product__img{width:42px;height:44px;object-fit:contain;display:block;} .product.is-selected .product__icon{animation:pickPop .45s cubic-bezier(.34,1.56,.64,1);} @keyframes pickPop{ 0%{transform:scale(1) rotate(0);} diff --git a/js/app.js b/js/app.js index e7f8f8b..4e91a89 100644 --- a/js/app.js +++ b/js/app.js @@ -18,33 +18,28 @@ '' + '' + '', - bottle: - '', - cocktail: - '' + trago: + '' }; - /* ---------- product datasets (Todos toggles between them) ---------- */ + /* ---------- product datasets (Todos toggles between them) ---------- + A product can use an SVG icon (icon: "...") or a real image (img: "URL"). */ var SETS = [ [ { name: "Pinta ingreso", icon: "beer" }, { name: "Pinta ingreso", icon: "beer" } ], [ - { name: "Bebida sin alcohol ingreso", icon: "bottle" }, - { name: "Bebida sin alcohol ingreso", icon: "bottle" }, - { name: "Bebida sin alcohol ingreso", icon: "bottle" }, - { name: "Trago ingreso", icon: "cocktail" } + { name: "Trago ingreso", icon: "trago" } ] ]; var setIndex = 0; @@ -63,8 +58,11 @@ var li = document.createElement("li"); li.className = "product"; li.style.animationDelay = (i * 0.07) + "s"; + var iconHtml = item.img + ? '' + : ICONS[item.icon]; li.innerHTML = - '' + ICONS[item.icon] + "" + + '' + iconHtml + "" + '' + item.name + "" + '' + '' + From fb196ec4d1bc0ecf931ef371417b050d602afb8d Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 04:09:21 +0000 Subject: [PATCH 10/11] Use the provided Gin Tonic photo for Trago ingreso --- images/trago-gintonic.jpeg | Bin 0 -> 12329 bytes js/app.js | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 images/trago-gintonic.jpeg diff --git a/images/trago-gintonic.jpeg b/images/trago-gintonic.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..22f704771cfac0f9e3f5ad477b0a87d147741408 GIT binary patch literal 12329 zcmbWc1y~%-(m%S3ySoQ>cPF^J1b25QI0T1a0fM``OOW8Mi#tn@5FkJTEdD3&dCz;k z^W1yC=l|T=>FL^xandpkQ7PL^xQuf8_ty%*)oR&G0W@0hkD{5p#eB zQUahbfzX)1mm%P*;Xv5G4E)nwf6=R*uZF=RAR-}S0HA=-&`>bYu&?&Mwha6ebQnxn ztT!AIaMCqXV<{s(D2CU*!aW(XmM$IWp!&{+s=(oN#hM&wxH_o0sWs*w1Et-4b z=!O~jW{>JG>rWi6D8@l_Dc^}<-^$K;)&*KZ>K%KX+In1E2XjASyMXv{A1||>Xd71j z80ID}aT&x~api@4w2pMR+H2H*3{s`)y35@=$KD+c_7Uj_jAZP0EKj&y-8GV4q=@Du zF6tJlUNQ~f?Qj`!q2Ev?k3I{Q=pJvA`GN*>)IZ#Bt46D=^G|N&7%#heJ4_ZIuMNjf zI+z_y>hOwS#e!M7{r7%!Eb9>|*8pKgevCdM$}qlrbSd13pRiQ_*lUm^hEdk1Ew?Ac z$kcE1RN9NU=9{Q|kylv1v0-wuf^27lQtqHCDWc-%1n6$a5M}=rV2nX;( zyml+lR>m)OU?`$%Oz;FG$6G(MY2H$YBAO*)jgG!pG-5lhU^XF4M5? zl*i)ti37H#rugr0Y;ddz~1=r}2~ zD%Yi~V>}$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V gTI9(}@_Bp Date: Thu, 11 Jun 2026 16:00:39 +0000 Subject: [PATCH 11/11] Restyle products screen to match Skipit reference UI - Product items now use real CDN image (assets.skipit.com.ar) with image wrapper + info div + circular radio/checkbox layout - Bottom nav updated with exact SVG icons from reference (home, cart, bag/products active, profile) and icon-wrapper structure - Typography aligned to reference: info card title 14px fw600, sub 12px fw500, product name 16px fw800, action bar 18px fw700/fw500 - Chip "Todos" button resized to match reference (14px, compact padding) - Disabled confirm button uses dark text on muted background matching reference style - Nav active state uses green color on icon wrapper https://claude.ai/code/session_01GtoEmRJjk4R1NttkVV3sGX --- css/styles.css | 126 ++++++++++++++++++++++++++++++++++++------------- index.html | 50 +++++++++++++++----- js/app.js | 64 ++++++++++++++++++------- 3 files changed, 177 insertions(+), 63 deletions(-) diff --git a/css/styles.css b/css/styles.css index 007b1be..1664c46 100644 --- a/css/styles.css +++ b/css/styles.css @@ -66,35 +66,39 @@ body{ justify-content:space-between; gap:10px; } -.info-card__text{max-width:150px;} -.info-card__title{margin:0;font-weight:600;font-size:16px;line-height:1.2;color:#191b1d;} -.info-card__sub{margin:6px 0 0;font-size:12px;font-weight:400;color:var(--muted);} +.info-card__text{max-width:160px;} +.info-card__title{margin:0;font-weight:600;font-size:14px;line-height:1.25;color:var(--ink2);letter-spacing:-.02rem;} +.info-card__sub{margin:4px 0 0;font-size:12px;font-weight:500;color:var(--ink2);letter-spacing:-.02rem;} .chip-btn{ border:1px solid var(--chip-border); background:#fff; border-radius:13px; - padding:18px 30px; + padding:12px 22px; font-family:inherit; - font-size:15px; + font-size:14px; font-weight:500; - color:#191b1d; + color:var(--ink2); cursor:pointer; white-space:nowrap; + letter-spacing:-.02rem; + transition:background .18s ease; } +.chip-btn:active{background:#f4f4f4;} /* ---------- product list ---------- */ -.product-list{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-direction:column;gap:14px;} +.product-list{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-direction:column;gap:10px;} .product{ background:var(--card); border:1px solid #eaeaea; border-radius:15px; - padding:14px 16px; + padding:10px 16px 10px 10px; display:flex; align-items:center; - gap:14px; + gap:12px; cursor:pointer; transition:border-color .25s ease, box-shadow .25s ease, transform .25s ease; animation:itemIn .45s cubic-bezier(.22,1,.36,1) both; + overflow:hidden; } @keyframes itemIn{0%{opacity:0;transform:translateY(14px) scale(.97);}100%{opacity:1;transform:translateY(0) scale(1);}} .product:active{transform:scale(.99);} @@ -102,32 +106,63 @@ body{ border-color:#1b1d1f; border-width:1.5px; } -.product__icon{ - width:40px;height:44px; + +/* product image */ +.product__img-wrap{ + width:64px;height:64px;flex:0 0 64px; + border-radius:10px; + overflow:hidden; + background:#f0f0f0; +} +.product__img{width:100%;height:100%;object-fit:cover;display:block;} + +/* product icon fallback (SVG) */ +.product__icon-wrap{ + width:64px;height:64px;flex:0 0 64px; + border-radius:10px; + background:#f6f6f6; display:flex;align-items:center;justify-content:center; - flex:0 0 auto; } -.product__img{width:42px;height:44px;object-fit:contain;display:block;} -.product.is-selected .product__icon{animation:pickPop .45s cubic-bezier(.34,1.56,.64,1);} +.product.is-selected .product__img-wrap, +.product.is-selected .product__icon-wrap{animation:pickPop .45s cubic-bezier(.34,1.56,.64,1);} @keyframes pickPop{ 0%{transform:scale(1) rotate(0);} 35%{transform:scale(1.22) rotate(-8deg);} 70%{transform:scale(.95) rotate(4deg);} 100%{transform:scale(1) rotate(0);} } -.product__name{flex:1;font-weight:600;font-size:16px;color:#191b1d;} -.checkbox{ - width:23px;height:23px;flex:0 0 auto; +/* product info */ +.product__info{flex:1;min-width:0;} +.product__name{ + margin:0; + font-weight:800; + font-size:16px; + color:var(--ink2); + letter-spacing:-.02rem; + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; +} + +/* product radio */ +.product__radio{flex:0 0 auto;} +.product__radio input[type="checkbox"]{ + position:absolute;opacity:0;width:0;height:0;pointer-events:none; +} +.product__radio span{ + display:block; + width:24px;height:24px; + border-radius:50%; border:2px solid #d2d6db; - border-radius:7px; - display:flex;align-items:center;justify-content:center; background:#fff; - transition:background .2s ease, border-color .2s ease; + transition:background .2s ease, border-color .2s ease, box-shadow .2s ease; +} +.product.is-selected .product__radio span{ + background:var(--ink2); + border-color:var(--ink2); + box-shadow:0 0 0 2px rgba(10,17,18,.12); } -.checkbox__tick{opacity:0;transform:scale(.3);transition:opacity .2s ease, transform .25s cubic-bezier(.34,1.56,.64,1);} -.product.is-selected .checkbox{background:#16262c;border-color:#16262c;} -.product.is-selected .checkbox__tick{opacity:1;transform:scale(1);} /* ---------- action bar ---------- */ .action-bar{ @@ -136,17 +171,23 @@ body{ background:#f0f0f0; border-top:1px solid #e2e2e2; } -.action-bar__count{font-weight:600;font-size:15px;color:#26292c;min-width:78px;} +.action-bar__count{ + font-weight:700;font-size:18px; + color:var(--ink2); + min-width:100px; + letter-spacing:-.02rem; +} .confirm-btn{ flex:1; border:none; border-radius:24px; padding:14px 18px; font-family:inherit; - font-size:16px; - font-weight:600; - color:#9aa0a6; - background:#d9dadc; + font-size:18px; + font-weight:500; + letter-spacing:-.02rem; + color:rgba(10,17,18,.45); + background:#dde0e5; cursor:not-allowed; transition:background .3s ease, color .3s ease, transform .15s ease; } @@ -159,16 +200,35 @@ body{ /* ---------- bottom nav ---------- */ .bottom-nav{ - display:flex;justify-content:space-around;align-items:center; - padding:11px 8px calc(11px + env(safe-area-inset-bottom)); + display:flex;align-items:stretch; + padding-bottom:env(safe-area-inset-bottom); background:#fff; border-top:1px solid #eee; + min-height:60px; +} +.nav-inner{ + display:flex; + justify-content:space-around; + align-items:center; + width:100%; + padding:8px 0; } .nav-item{ - background:none;border:none;padding:6px 14px;cursor:pointer; - color:#1b1d1f;display:flex;align-items:center;justify-content:center; + background:none;border:none; + padding:4px 12px; + cursor:pointer; + display:flex;align-items:center;justify-content:center; + flex:1; +} +.nav-icon-wrap{ + color:#1b1d1f; + display:flex;align-items:center;justify-content:center; + padding:4px; + border-radius:10px; + transition:background .15s ease; } -.nav-item--active{color:var(--green);} +.nav-item:active .nav-icon-wrap{background:#f0f0f0;} +.nav-icon-wrap--active{color:var(--green);} /* ================= RETIRO ================= */ .screen--retiro{background:var(--orange);letter-spacing:-.02rem;} diff --git a/index.html b/index.html index 2f6d97b..7791ce6 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,7 @@ skipit · Mis productos + @@ -37,18 +38,43 @@

    Mis productos

    diff --git a/js/app.js b/js/app.js index 7ef2eb3..2550ae3 100644 --- a/js/app.js +++ b/js/app.js @@ -11,7 +11,7 @@ tick(); setInterval(tick, 1000); - /* ---------- product icons (SVG) ---------- */ + /* ---------- product icon fallbacks (SVG) ---------- */ var ICONS = { beer: '' }; - /* ---------- product datasets (Todos toggles between them) ---------- - A product can use an SVG icon (icon: "...") or a real image (img: "URL"). */ + /* ---------- product datasets ---------- */ var SETS = [ [ - { name: "Pinta ingreso", icon: "beer" }, - { name: "Pinta ingreso", icon: "beer" } + { name: "Pinta ingreso", img: "https://assets.skipit.com.ar/60/cropped_1768234365786.webp" }, + { name: "Pinta ingreso", img: "https://assets.skipit.com.ar/60/cropped_1768234365786.webp" } ], [ { name: "Trago ingreso", img: "images/trago-gintonic.jpeg" } @@ -58,26 +57,56 @@ var li = document.createElement("li"); li.className = "product"; li.style.animationDelay = (i * 0.07) + "s"; - var iconHtml = item.img - ? '' - : ICONS[item.icon]; + + var mediaHtml; + if (item.img) { + mediaHtml = + '
    ' + + '' + item.name + '' + + '
    '; + } else { + mediaHtml = + '
    ' + ICONS[item.icon] + '
    '; + } + li.innerHTML = - '' + iconHtml + "" + - '' + item.name + "" + - '' + - '' + - ""; + mediaHtml + + '
    ' + + '

    ' + item.name + '

    ' + + '
    ' + + '
    ' + + '' + + '' + + '
    '; + + var radioInput = li.querySelector('.product__radio input'); function toggle() { - var box = li.querySelector(".checkbox"); var sel = li.classList.toggle("is-selected"); - box.setAttribute("aria-checked", sel ? "true" : "false"); + radioInput.checked = sel; refresh(); } li.addEventListener("click", toggle); - li.querySelector(".checkbox").addEventListener("keydown", function (e) { + li.addEventListener("keydown", function (e) { + if (e.key === "Enter" || e.key === " ") { e.preventDefault(); toggle(); } + }); + li.setAttribute("tabindex", "0"); + li.setAttribute("role", "checkbox"); + li.setAttribute("aria-checked", "false"); + + var origToggle = toggle; + toggle = function () { + var sel = li.classList.toggle("is-selected"); + radioInput.checked = sel; + li.setAttribute("aria-checked", sel ? "true" : "false"); + refresh(); + }; + li.removeEventListener("click", origToggle); + li.addEventListener("click", toggle); + li.addEventListener("keydown", function (e) { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); toggle(); } }); + return li; } @@ -110,7 +139,7 @@ }); } - /* ---------- confirm -> build Retiro ticket from selection ---------- */ + /* ---------- confirm -> build Retiro ticket ---------- */ var retiroItems = document.getElementById("retiro-items"); var retiroTotal = document.getElementById("retiro-total"); @@ -140,7 +169,6 @@ knob.style.transition = anim ? "left .25s ease" : "none"; fill.style.transition = anim ? "width .25s ease" : "none"; knob.style.left = (6 + x) + "px"; - // No dark fill at rest; it appears and trails the knob as soon as you slide. fill.style.width = (x <= 0 ? 0 : 6 + x + knob.offsetWidth / 2) + "px"; }