From 0d945f601504bda4595914c53d87fb589bd439d2 Mon Sep 17 00:00:00 2001 From: Miller W <59322226+cremechese@users.noreply.github.com> Date: Thu, 22 Oct 2026 16:49:37 +1100 Subject: [PATCH 001/151] Build Cellife homepage foundation with brand styling --- .github/workflows/ci.yml | 20 +-- PROJECT_PLAN.md | 230 +++++++++++++++++++++++++++++++ README.md | 9 +- assets/section-cellife-home.css | 57 ++++++++ docs/BRAND.md | 62 +++++++++ docs/DEVELOPMENT.md | 82 +++++++++++ docs/HOMEPAGE.md | 72 ++++++++++ scripts/check-theme-json.py | 28 ++++ sections/cellife-hero.liquid | 112 +++++++++++++++ sections/cellife-pathways.liquid | 97 +++++++++++++ templates/index.json | 79 ++++++----- 11 files changed, 803 insertions(+), 45 deletions(-) create mode 100644 PROJECT_PLAN.md create mode 100644 assets/section-cellife-home.css create mode 100644 docs/BRAND.md create mode 100644 docs/DEVELOPMENT.md create mode 100644 docs/HOMEPAGE.md create mode 100644 scripts/check-theme-json.py create mode 100644 sections/cellife-hero.liquid create mode 100644 sections/cellife-pathways.liquid diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3066b6a0d82..7cbed26df2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,20 +1,14 @@ -name: CI -on: [push] +name: Theme checks +on: [push, pull_request] +permissions: + contents: read jobs: - lhci: - name: Lighthouse + structure: + name: JSON and section schemas runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Lighthouse - uses: shopify/lighthouse-ci-action@v1 - with: - store: ${{ secrets.SHOP_STORE_OS2 }} - password: ${{ secrets.SHOP_PASSWORD_OS2 }} - access_token: ${{ secrets.SHOP_ACCESS_TOKEN }} - collection_handle: all - lhci_github_app_token: ${{ secrets.LHCI_GITHUB_TOKEN }} - pull_theme: ${{ secrets.SHOP_PULL_THEME }} + - run: python3 scripts/check-theme-json.py theme-check: name: Theme Check runs-on: ubuntu-latest diff --git a/PROJECT_PLAN.md b/PROJECT_PLAN.md new file mode 100644 index 00000000000..62b53dc7d10 --- /dev/null +++ b/PROJECT_PLAN.md @@ -0,0 +1,230 @@ +# Cellife storefront rebuild — project plan + +Date: 22 October 2026 (Australia/Sydney) +Status: Discovery and proposal only; approval required before implementation. + +Implementation update: the first development-baseline task was approved on +22 October 2026. CI now runs store-independent checks; see `docs/DEVELOPMENT.md` +for recorded source provenance, local commands and remaining verification gates. +The public release commit differs from the local version-labelled baseline; +exact upstream comparison and local Shopify Theme Check remain pending because +workspace package/Git network access is unavailable. No storefront code changed. + +Subsequent homepage approval: the owner supplied the current store URL and asked +to proceed with placeholders. The first visual slice now adds an editable hero, +shopping pathways and homepage composition; see `docs/HOMEPAGE.md`. No live theme +was changed. Baseline verification gates above remain open before release. + +## 1. Recommendation and scope + +Retain Shopify as the commerce platform and build an original Cellife identity on Dawn's server-rendered Online Store 2.0 architecture. Preserve product IDs, handles, variants, customers, orders, checkout, subscriptions and existing integrations. This is a theme rebuild, not a data migration or headless project. + +Keep Dawn's working commerce primitives. Add a restrained design system, a few purpose-built editorial sections, and product templates driven by structured content. Use app blocks for subscriptions and reviews. Do not build billing, a diagnostic results portal, customer eligibility enforcement, or an independent checkout in the theme. + +Only this document was added during discovery. No store connection, theme upload, live-theme modification, app installation, or publication was performed. Approval of this plan would authorize agreed development work; publishing the live theme still requires explicit authorization. + +## 2. Repository audit: verified facts + +Inspected repository: `/workspace/cellife-shopify-theme`; origin: `https://github.com/cremechese/cellife-shopify-theme.git`. + +- HEAD is `258f00f`, titled `Dawn 16.0.0 (#3946)`; `config/settings_schema.json` declares Dawn 16.0.0. The worktree was clean before this document. No applicable AGENTS.md was found in the inspected workspace. +- Standard Shopify directories are present: `assets`, `config`, `layout`, `locales`, `sections`, `snippets`, and `templates`. No package manifest or custom bundler was found. +- `layout/theme.liquid` provides the shared shell, Shopify's `content_for_header`, deferred scripts, conditional feature assets, and CSS generated from theme settings. Preserve Shopify injection points. +- Templates are predominantly OS 2.0 JSON. `templates/index.json` currently composes a generic image banner and featured collection. `templates/product.json` composes `main-product`, disclosures and related products. The gift-card template remains Liquid, as expected. +- Header/footer section groups already exist. Reusable sections include image banner, image with text, collection list, featured collection, multicolumn, collapsible content, video, contact form and apps. +- `sections/main-product.liquid` supports `@app` blocks. `snippets/buy-buttons.liquid`, variant-picker/media snippets, `assets/product-form.js` and `assets/product-info.js` provide the product foundation. The AJAX product form serializes FormData; any subscription integration must submit the correct `selling_plan` in that form. +- Cart page and drawer already render selling-plan names. This is useful baseline support, not proof that a particular subscription app is compatible. +- `snippets/product-disclosures.liquid` consumes `product.metafields.shopify.disclosure`; retain that native capability rather than replacing it with an unrelated custom disclosure model. +- Theme Check and Lighthouse CI exist in `.github/workflows/ci.yml`. Lighthouse depends on store secrets that have not been verified. Inherited CLA and stale-issue workflows are upstream project administration, not Cellife requirements; review before enabling them on this repository. +- `.theme-check.yml` disables MatchingTranslations and TemplateLength. Record baseline findings before deciding whether to change these exceptions. + +The repository appears to be an upstream Dawn starting point, not an export of Cellife's current live theme. Local inspection cannot establish installed apps, actual product content, current checkout customizations, store plan, shipping rules, analytics, or integration behavior. No authenticated Shopify access was available in this audit. Runtime tests and performance measurements were not run for this documentation-only change. + +**Version decision:** use this tagged release lineage as the candidate baseline, then verify the current stable Dawn release, relevant fixes and compatibility before implementation. The version string alone does not establish current support. Pin the approved upstream commit/version, retain its license, and document targeted upgrades; do not automatically merge Dawn's unreleased main branch. A customized Dawn fork needs deliberate upgrade testing. + +## 3. Reference research and evidence limits + +Public homepage text/navigation was accessible on 22 October 2026 through web retrieval. This supports information-architecture observations only; no rendered screenshot, colour, typography, animation, mobile layout or measured performance was verified. + +| Reference | Observed structure | Cellife interpretation | +| --- | --- | --- | +| [qore8](https://qore8health.com/) | Shopping categories, science/ingredient navigation, product listings and community content | Connect shopping with optional supporting education; keep proof near relevant products | +| [For Youth](https://foryouth.co/) | Goal-based shopping, bundles, best sellers and a staged product-system explanation | Offer clear routes into the range and explain relationships between products | +| [Elevate](https://elevatevitality.com/) | Focused product story, quality information, FAQs and testimonials | Use a calm editorial sequence with progressive detail and clear purchase actions | + +These are structural lessons, not endorsements of reference-site claims. Do not reuse their copy, reviews, regulatory statements, photography or brand assets. + +Before visual sign-off, inspect rendered pages or obtain: each homepage's first viewport and full page at approximately 390px and 1440px; one collection and product page per site; mobile navigation; subscription selector; and cart/drawer states. Ask the brand owner to mark the specific qualities they like. If direct visual access remains unavailable, supplied screenshots are required for reference-specific styling observations. The design below is an original proposal, not a description of those sites. + +## 4. Maintainable theme structure + +Use standard Shopify directories, with flat filenames and a `cellife-` prefix for new components. Avoid a frontend framework, global DOM-rewriting scripts, a large override stylesheet, and duplicated commerce implementations. + +```text +assets/ + cellife-tokens.css # small semantic token layer + section-cellife-hero.css # section-specific styling + section-cellife-pathways.css + cellife-category-dialog.js # only if approved +sections/ + cellife-hero.liquid + cellife-pathways.liquid + cellife-proof-grid.liquid # only if native multicolumn is insufficient + cellife-testimonials.liquid # consented editorial video; reviews use app +snippets/ + cellife-product-badge.liquid + cellife-export-notice.liquid +templates/ + product.supplement.json + product.diagnostic.json + product.export-enquiry.json + page.international-enquiry.json +docs/ + content-model.md + app-compatibility.md + release-checklist.md +``` + +These filenames are proposed, not implemented. Keep `main-product`, price formatting, product cards, variant logic, cart, localization and facets shared. Add small explicit hooks when needed rather than copying entire sections into three competing product implementations. JSON templates select content and blocks; they do not enforce sales restrictions. + +Map semantic tokens to Dawn colour schemes and typography settings so the Theme Editor remains the source of truth. Use component-scoped selectors and a documented cascade. New sections expose meaningful image, heading, copy, link, colour scheme and layout settings with sensible presets, translation keys, and blank-content fallbacks. Avoid arbitrary per-element controls. + +JavaScript should use native elements or small guarded custom elements, work with multiple section instances, initialize after Theme Editor section loads, and clean up listeners when removed. Render useful content and navigation without JavaScript. Load feature scripts only where needed. Preserve `block.shopify_attributes`, section groups and app extension points. + +### Reuse and section inventory + +| Need | Starting point / proposed extension | +| --- | --- | +| Header, navigation, search, localization | Existing header, menu snippets and predictive search; simplify navigation to Supplements, Test kits, Learn, About | +| Product photographic hero | Evaluate existing image-banner first; create Cellife hero only for missing mobile art direction/layout controls | +| Two shopping pathways | Collection-list if sufficient; otherwise two configurable collection cards in Cellife pathways | +| Best sellers and collection listings | Featured-collection, main-collection-product-grid, card-product and native filters | +| Editorial product education | Image-with-text, rich-text, multicolumn and collapsible-content | +| Product gallery and purchase area | Main-product, existing media, price, variant and buy-button snippets; subscription app block | +| Evidence, FAQs, disclosures | Existing disclosures and collapsible sections; approved structured content | +| Reviews and video | Review app blocks plus optional lightweight editorial video section; no invented ratings | +| Export recognition and enquiry | Shared badge/notice snippets and enquiry page; platform enforcement separately | +| Footer and newsletter | Existing footer group and newsletter; retain approved consent wording | + +### Content model + +Define merchant-owned `cellife` metafields with types, validation, descriptions and migration ownership before populating them. Prefer references and dynamic sources over copied content. Proposed fields: `product_family` (validated supplement/diagnostic value), `purchase_mode` (standard/export_enquiry), `short_summary`, approved directions/warnings, and references to FAQ/evidence content. Region-specific policy needs an explicit approved market/country model, not a single export flag. + +Use metaobjects for reusable FAQs (question/answer), approved evidence (title, citation, URL, reviewed date), diagnostic steps (title, copy, media), and consented video testimonials (video, poster, caption, transcript and attribution). Store consent records in an appropriate private system, not publicly exposed storefront fields. Expose only approved publishable data. Use existing Shopify review rating definitions where supported by the chosen app; do not maintain a competing ratings database. + +Keep price, inventory, variants, subscription plans and availability in Shopify/app systems. Preserve native `shopify.disclosure`. Missing content should omit optional sections cleanly. Regulatory credentials must be product-specific and verified. Never collect diagnostic results, symptoms or other sensitive health information in theme forms, analytics events or browser storage. + +## 5. Proposed premium visual system + +Direction: warm, precise and quietly confident. Combine natural daylight product photography with clear clinical information hierarchy. Supplements and diagnostics share one identity; distinguish them through labels, imagery and content structure rather than separate visual brands. + +| Element | Proposed rule | +| --- | --- | +| Palette | Brand-book blue (provisional swatch sample `#3E2B62`), restrained red (`#8F2C26`), dark ink (`#262125`), white and platinum `#F4F4F5`; see `docs/BRAND.md` for source inconsistencies | +| Colour use | Blue headings/actions/focus states, white button labels, dark body text, neutral surfaces; red limited to small decorative accents. Validate actual text/control pairings against WCAG AA | +| Typography | Broadacre headings/tagline and Inter body copy per brand book p24; use existing Dawn fallbacks until licensed webfont assets are supplied, with no external font service | +| Scale | Body 16–18px; fluid hero heading about 36–72px; section headings 28–48px; readable copy width about 60–70 characters | +| Layout | Approximately 1280px content maximum, 20px mobile gutters/40px desktop; 4/8px spacing rhythm; section spacing roughly 48–96px | +| Shapes | Mostly crisp layouts, modest 8–12px card corners and minimal shadows; pill badges used sparingly | +| Controls | Clear filled and outlined actions; minimum 44px touch targets; visible focus, loading, error and disabled states | +| Imagery | Consistent packshot scale and backgrounds; separate mobile hero crop/focal point; authentic lifestyle and kit photography; product labels remain readable | +| Motion | Short opacity/transform feedback only; respect reduced motion; no automatic hero carousel, parallax or autoplay video | + +Homepage sequence: concise announcement/header → single photographic hero → Supplements/Test kits pathways → curated products → approved educational story → diagnostic process → real reviews/video → FAQs → footer. Omit empty proof modules rather than filling them with unsupported claims. Keep the two pathways visible without the optional category dialog. + +Product pages prioritize gallery, approved summary, price, variant selection, purchase options and clear delivery information. Supplement pages add ingredients/directions/warnings; diagnostic pages add what's included, collection process, supported locations and approved turnaround information. Export enquiry pages explain availability and next steps without misleading purchase buttons. + +Collection pages use useful introductions, consistent cards, native sorting/filtering and product-family-appropriate filters. On mobile, use a readable grid and accessible filter drawer. Reserve card image and price space to avoid shifts. + +## 6. Feature ownership and commerce constraints + +| Feature | Shopify configuration / established app | Theme responsibility | Checkout or enforcement dependency | +| --- | --- | --- | --- | +| Hero and shopping pathways | Collections, navigation, approved photography | Responsive editable sections and links | None | +| Product/collection pages | Product data, template assignments; Search & Discovery filters/recommendations | Shared cards, gallery, forms, facets, structured content | Shopify prices/inventory remain authoritative | +| Export-only recognition | Markets/catalog availability where supported, shipping destinations, approved restriction policy; validation app if necessary | Badges, notices, enquiry CTA on PDP/cards/search/cart | Enforce applicable destination/product rules outside theme; Markets visibility alone may be insufficient | +| International enquiry | Native Shopify contact form initially; Shopify Forms or existing CRM only if routing/spam/structured fields require it | Product identifier, country, contact details, escaped fields, confirmation and privacy copy | Not a checkout; do not request health data; verify recipient/routing | +| Subscription offers | Shopify Subscriptions or compatible established app; configure 15% off every 30 days and 20% off every 90 days as selling plans | App block styling and correct selling-plan submission/display | App/Shopify own contracts, billing, retries, cancellation and customer portal | +| Reviews | Existing review app first; compare a supported app such as Judge.me only if replacement is needed | App blocks, consistent spacing and deferred loading | No custom verification or fabricated review content | +| Video testimonials | Shopify-hosted video and approved consented content | Poster-first playback, captions/transcript and reserved media space | Third-party embeds only after appropriate consent where required | +| First-order offer | Native eligible-customer discount configuration where sufficient, or established discount app/Function-backed implementation | Explain offer and exclusions accurately | Eligibility and discount apply server-side; cookie, popup or Liquid customer checks are insufficient | +| Category overlay | No app needed | Optional dismissible accessible dialog, remember non-sensitive preference where appropriate | Never an eligibility or export restriction mechanism | +| Future quiz | Prefer established recommendation app; static editorial navigation if enough | Lazy entry point, accessible results linking to products | No medical diagnosis; assess privacy and consent before collecting data | +| Future infographics | Approved content and Shopify media/metaobjects | Responsive images with dimensions, text equivalents and optional HTML explanation | No unsupported clinical interpretation | + +### Subscription decisions and compatibility tests + +First identify any existing subscription provider and contracts; retain them unless an explicit migration is separately approved. No provider is selected by this plan. Confirm payment gateway/country eligibility, Shopify Markets/currency behavior, customer account portal, variant coverage, stock handling, fulfilment/integration compatibility, cancellation terms and total app/script cost. + +Clarify whether 90-day means one unit delivered every 90 days or a three-unit supply; billing and delivery intervals must match approved business terms. Thirty/ninety days must not silently become calendar month/quarter. Confirm discount duration, base price, shipping, taxes, renewal disclosures, first-order discount combination, and excluded/export-only products. Derive displayed amounts from actual selling-plan allocations, not theme arithmetic or hard-coded plan IDs. + +Test one-time and both plans across variant changes, product form, cart drawer/page, same variant with different plans, quantity changes, discounts, sold-out state and checkout. Disable quick-add for subscription-required products unless it supports valid plan selection. Verify accelerated checkout and alternative purchase entry points with the chosen app. Styling must not break app initialization or Theme Editor behavior. Prove sandbox renewal and cancellation through the app; a successful initial checkout alone is insufficient. + +### Checkout limitations + +Liquid themes do not control hosted checkout. Do not plan `checkout.liquid`, checkout DOM manipulation, or theme JavaScript as a checkout solution. Use supported Checkout Extensibility and Shopify capabilities only where needed. Information/shipping/payment-step UI extensions generally require Shopify Plus; other targets, branding, Functions and validation capabilities depend on plan, app distribution, API and account eligibility. Confirm current Shopify documentation and the store's entitlements before promising a customization. + +For export products, define whether the rule concerns visibility, shipping destination, billing country, enquiry-only sale, or another legal criterion. Geolocation, country selectors, hidden buttons and cart attributes can be bypassed. Test direct cart requests, accelerated checkout, mixed carts, destination changes and other sales channels against the authoritative controls. Shipping profiles alone may prevent shipping without implementing the whole policy. If the available platform/app controls cannot meet the approved restriction, keep affected products unavailable for purchase until a suitable enforceable solution is proven. + +For first-order eligibility, define the discount amount, prior paid/cancelled/refunded order treatment, guest/returning customer behavior, subscription renewal applicability, minimum spend, market exclusions and stacking. “One use per customer” does not by itself establish “first order only.” Email capture and a new browser do not establish eligibility. Treat abuse resistance and guest identity as explicit platform constraints. + +## 7. Performance, accessibility and maintenance acceptance + +- Target field Core Web Vitals at the 75th percentile: LCP ≤2.5s, INP ≤200ms and CLS ≤0.1. These are targets, not results or launch guarantees; field validation needs sufficient real traffic. +- Establish repeatable mobile lab baselines for homepage, representative collection and both product families, with the real app stack. Use median of three comparable runs and compare to approved baseline. Aim for Lighthouse performance ≥90 in the controlled setup, documenting any third-party exceptions. +- Provisional budgets: mobile hero ≤250KB, desktop hero ≤400KB at delivered size; incremental first-party Cellife JS ≤20KB gzip and CSS ≤30KB gzip beyond Dawn; fonts ≤100KB total transfer. Measure real output before locking these budgets. +- Render the LCP image in HTML using Shopify image transforms, accurate `sizes`/`srcset`, explicit dimensions, eager loading and high fetch priority only when it is actually above the fold. Lazy-load lower media. Do not preload both desktop and mobile hero downloads. Avoid CSS background heroes that delay discovery. +- Reserve space for images, app widgets, video and purchase controls; avoid late injected banners. Audit app embeds, marketing pixels and consent behavior before adding scripts. Use native analytics/pixels rather than duplicate trackers. +- WCAG 2.2 AA target: keyboard navigation, focus visibility/restoration, accessible dialog names/Escape handling, screen-reader form errors and cart announcements, captions, contrast, 200% zoom, reflow and reduced motion. Test Safari/iOS, Chrome/Android and desktop Safari/Chrome/Firefox/Edge. +- The category dialog must have a visible dismiss option, never block navigation permanently, avoid showing on every page, and remain disabled in editor/design review by default. Test storage unavailable and JavaScript disabled; no medical preference storage. +- Run Theme Check and schema/JSON validation for implementation changes. Add focused browser tests for consequential commerce behavior, not tests that merely mirror CSS. Document extension contracts, content ownership, app versions, rollback and future Dawn update procedure. + +## 8. Phased plan with testable milestones + +| Phase | Deliverables | Exit criteria | +| --- | --- | --- | +| 0 — Discovery and agreement | This plan, rendered reference review, existing live-theme/app/integration inventory, store-plan and policy confirmation, assets/content checklist | Owner approves direction and scope; unknowns assigned; no live changes | +| 1 — Safe baseline | Approved stable Dawn version, pinned provenance, project-specific tooling/CI, local theme checks, authorized development/unpublished theme, baseline screenshots/performance | Theme renders with representative products; existing commerce smoke checks pass; CI cannot publish live; existing live theme backed up before later release | +| 2 — Design foundation and homepage | Approved tokens, header/footer treatment, photographic hero, two pathways and curated products | 390px/1440px review accepted; editor reordering/empty images work; keyboard checks and hero budget pass | +| 3 — Catalog and product families | Shared cards/collections, three product templates, typed content definitions, diagnostic process and disclosures, enquiry form | Representative multi-variant/sold-out/long-title/missing-content products pass; enquiry recipient and privacy behavior verified; handles and SEO retained | +| 4 — Commerce integrations | Subscription app integration, export enforcement, first-order offer and reviews | Signed-off test matrix covers direct-cart/accelerated checkout bypass attempts, plan allocation/prices, eligible/ineligible discounts and app renewal/cancellation sandbox evidence | +| 5 — Proof and optional enhancements | Approved video/testimonials and optional category dialog; quiz/infographics remain separate future scope | Caption/focus/consent tests pass; no unapproved claims; app and media budgets pass | +| 6 — Release readiness | Cross-browser/accessibility review, lab comparisons, SEO/analytics/integration regression, merchant handover and rollback rehearsal | No unresolved critical commerce/accessibility defects; content approved; preview accepted; explicit live publication authorization obtained | +| 7 — Authorized launch and observation | Publish only after authorization; monitor conversion, errors, fulfilment and field vitals | Smoke tests pass; subscription/discount/export rules verified; agreed observation window and rollback owner active | + +Development occurs in a branch and an explicitly identified development/unpublished theme. No push to the current live theme and no automatic publication. Review inherited CI's store-writing behavior before running it with credentials; changing to a draft theme does not isolate shared products, discounts, Markets or app configuration. Use a development store/sandbox for those changes where possible and obtain authorization for production configuration changes. + +Release tests include variant/deep links, search and filters, pagination, cart updates, gift cards if used, discount combinations, Markets, tax/shipping display, account links, transactional flows, analytics consent, reviews and existing fulfilment/lab integrations. Retain the previous published theme and document republishing it as rollback; platform/app configuration needs its own recorded rollback because switching themes does not restore it. + +## 9. Risks and unresolved inputs + +| Risk / missing input | Mitigation / decision gate | +| --- | --- | +| Current live implementation unknown | Inventory theme/app embeds, scripts, custom tracking, metafields, templates and integration touchpoints before replacing behavior | +| Dawn current support unverified | Check official stable release and upgrade notes; pin and test approved version | +| Shopify plan/checkout entitlements unknown | Confirm store plan and required extension targets before estimating checkout work | +| Subscription provider/contracts unknown | Audit provider and contracts first; sandbox compatibility proof before visual customization | +| Export policy ambiguous | Obtain destination/product rules and validate authoritative controls before enabling purchase | +| First-order policy incomplete | Approve precise eligibility, amount and stacking rules; test guest and returning customers server-side | +| Diagnostic-specific fulfilment/privacy | Confirm supported locations, kit registration, sample returns, lab notifications and result access; keep sensitive workflows in existing secure systems | +| Claims, credentials and testimonials | Brand/regulatory owner supplies approved product-specific copy, evidence, usage rights and review provenance; no placeholders presented as facts | +| Photography absent or inconsistent | Obtain logo/vector assets, packaging/kit imagery and desktop/mobile hero crops before final design acceptance | +| Third-party performance regressions | Inventory scripts, establish app-on baselines, limit embeds and verify vendor load behavior | +| Store content/editor drift | Agree code-versus-merchant ownership of JSON/settings; capture approved configuration and review diffs before deployment | +| Theme replacement affects SEO/integrations | Preserve handles, canonical/structured data and integration selectors where required; audit redirects only where URLs actually change | + +Inputs needed for the next stages: store URL and plan; authorized draft/dev access when development begins; existing app/provider list; live-theme integration inventory; representative products and variants; approved export policy; subscription supply/interval terms; discount amount and eligibility; approved brand assets and copy. These are implementation gates, not reasons to invent the missing details. + +## 10. Smallest first implementation task + +After plan approval, establish the **verified Dawn development baseline** as one small reviewable change: confirm and record the approved stable Dawn version/commit, document local Shopify CLI and Theme Check commands, and adjust inherited CI so checks cannot target or publish the live theme. Record baseline check results and any pre-existing warnings. This task needs no storefront redesign or production configuration changes. + +Acceptance: reproducible checks, documented provenance and safe preview workflow; only intended documentation/tooling files changed. Do not fetch store credentials or run store-writing CI merely to complete local setup. Once authorized dev access exists, confirm a development preview and baseline measurements separately. + +The first visual implementation after that should be a single editor-configurable photographic hero, reusing image-banner where feasible. Review its mobile crop, accessible heading/CTA, missing-image behavior and LCP before extending the design across pages. + +## 11. Verification sources + +Repository evidence: `config/settings_schema.json`, `layout/theme.liquid`, `templates/index.json`, `templates/product.json`, `sections/main-product.liquid`, `snippets/buy-buttons.liquid`, `snippets/product-disclosures.liquid`, `snippets/cart-drawer.liquid`, `sections/main-cart-items.liquid`, `assets/product-form.js`, `README.md`, `.theme-check.yml`, and `.github/workflows/`. + +Official sources to verify during implementation: [Dawn releases](https://github.com/Shopify/dawn/releases), [Shopify theme architecture](https://shopify.dev/docs/storefronts/themes/architecture), [subscriptions](https://shopify.dev/docs/apps/build/purchase-options/subscriptions), [Checkout UI extensions](https://shopify.dev/docs/api/checkout-ui-extensions), [Shopify Functions](https://shopify.dev/docs/api/functions), and [Shopify discounts](https://help.shopify.com/en/manual/discounts). These are verification pointers: current documentation retrieval was unsuccessful in this session, so store-specific entitlement and compatibility claims remain conditional. diff --git a/README.md b/README.md index 3dea7f613e0..52c0f5bbd48 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,11 @@ -# Dawn +# Cellife Shopify theme + +Start with [the project plan](PROJECT_PLAN.md) and [the Cellife development guide](docs/DEVELOPMENT.md) +for baseline provenance, local checks and the safe preview workflow. The upstream +Dawn documentation follows for reference; the Cellife guide takes precedence for +project workflow and release safety. + +## Upstream Dawn [![Build status](https://github.com/shopify/dawn/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Shopify/dawn/actions/workflows/ci.yml?query=branch%3Amain) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?color=informational)](/.github/CONTRIBUTING.md) diff --git a/assets/section-cellife-home.css b/assets/section-cellife-home.css new file mode 100644 index 00000000000..f9d5acaf052 --- /dev/null +++ b/assets/section-cellife-home.css @@ -0,0 +1,57 @@ +/* Scoped Cellife editorial foundation; no changes to Dawn commerce controls. */ +/* Provisional screen values sampled from brand book p23 swatches; see docs/BRAND.md. */ +.cellife-home { + --cellife-blue: #3e2b62; + --cellife-red: #8f2c26; + --cellife-ink: #262125; + --cellife-surface: #f4f4f5; + --cellife-white: #fff; + --cellife-media-surface: #e9e6ee; + --cellife-font-heading: 'Broadacre', var(--font-heading-family), sans-serif; + --cellife-font-body: 'Inter', var(--font-body-family), sans-serif; + color: var(--cellife-ink); + background: var(--cellife-surface); + font-family: var(--cellife-font-body); +} +.cellife-home h1, .cellife-home h2, .cellife-home h3 { color: var(--cellife-blue); font-family: var(--cellife-font-heading); font-weight: 500; letter-spacing: -.025em; margin: 0; overflow-wrap: anywhere; } +.cellife-home a { color: inherit; } +.cellife-hero { display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); } +.cellife-hero__copy { padding: clamp(32px, 5vw, 96px); align-self: center; } +/* Red is a single small accent, never a competing action colour. */ +.cellife-eyebrow::before { content: ''; display: inline-block; width: 20px; height: 2px; margin-right: 10px; vertical-align: middle; background: var(--cellife-red); } +.cellife-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .16em; line-height: 1.5; margin: 0 0 24px; } +.cellife-hero h1 { font-size: clamp(36px, 4.6vw, 72px); line-height: 1.06; max-width: 12ch; } +.cellife-copy { font-size: 18px; line-height: 1.65; max-width: 36ch; margin: 24px 0 0; } +.cellife-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; } +.cellife-home .cellife-action { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 48px; padding: 12px 20px; border: 1px solid var(--cellife-blue); border-radius: 4px; background: var(--cellife-blue); color: var(--cellife-white); font-size: 14px; text-decoration: none; line-height: 1.5; } +.cellife-home .cellife-action--outline { color: var(--cellife-blue); background: transparent; } +.cellife-home a:hover { text-decoration: underline; text-underline-offset: 4px; } +.cellife-home a:focus-visible { outline: 3px solid var(--cellife-blue); outline-offset: 5px; } +.cellife-hero__media { min-width: 0; min-height: 620px; position: relative; background: var(--cellife-media-surface); } +.cellife-hero__media picture { display: block; position: absolute; inset: 0; } +.cellife-hero__image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--cellife-desktop-focus); } +.cellife-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: inherit; padding: 32px; background: radial-gradient(ellipse at 65% 30%, var(--cellife-surface), var(--cellife-media-surface) 75%); color: var(--cellife-blue); text-align: center; } +.cellife-placeholder__symbol { font-size: clamp(80px, 12vw, 180px); font-weight: 400; line-height: 1; letter-spacing: -.08em; opacity: .45; } +.cellife-placeholder p { margin: 24px 0 0; font-size: 12px; letter-spacing: .08em; } +.cellife-pathways { padding: clamp(48px, 6vw, 96px) max(20px, calc((100% - 1280px) / 2)); } +.cellife-pathways__heading { margin-bottom: 32px; } +.cellife-pathways h2 { font-size: clamp(30px, 3.2vw, 48px); line-height: 1.15; } +.cellife-pathways__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } +.cellife-pathway { min-width: 0; background: var(--cellife-white); border-radius: 8px; overflow: hidden; } +.cellife-pathway__media { aspect-ratio: 4 / 3; background: var(--cellife-media-surface); } +.cellife-pathway__media img { width: 100%; height: 100%; object-fit: cover; display: block; } +.cellife-pathway__copy { padding: 28px; } +.cellife-pathway h3 { font-size: 28px; line-height: 1.2; } +.cellife-pathway__copy p { font-size: 16px; line-height: 1.6; } +.cellife-text-link { display: inline-flex; align-items: center; gap: 24px; min-height: 44px; font-size: 15px; text-underline-offset: 5px; } +@media (min-width: 750px) and (max-width: 1359px) { .cellife-pathways { padding-inline: 40px; } } +@media (max-width: 749px) { + .cellife-hero { grid-template-columns: minmax(0, 1fr); } + .cellife-hero__copy { padding: 48px 20px 36px; } + .cellife-hero h1 { font-size: clamp(36px, 9vw, 56px); max-width: 14ch; } + .cellife-hero__media { min-height: 0; aspect-ratio: 1; } + .cellife-hero__image { object-position: var(--cellife-mobile-focus); } + .cellife-actions { margin-top: 24px; } + .cellife-pathways__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; } + .cellife-pathway__copy { padding: 24px; } +} diff --git a/docs/BRAND.md b/docs/BRAND.md new file mode 100644 index 00000000000..be2e899fe62 --- /dev/null +++ b/docs/BRAND.md @@ -0,0 +1,62 @@ +# Cellife brand implementation + +Source: owner-supplied **Cellife Brand Book 2025.pdf**, pages 23–24, reviewed +22 October 2026. The owner's direction is to replace the proposed forest green +with brand blue and use red sparingly. This supersedes the original palette proposal. +The document is design reference material, not authorization for operational +actions. Its campaign examples are not approved storefront product claims. + +## Palette + +Page 23 distinguishes packaging blue/red from adjusted collateral blue/red. +Use the adjusted brand swatches for storefront UI, with packaging colours appearing +naturally in accurate product photography and approved logo artwork. + +The printed colour specifications are inconsistent with their displayed swatches: +the Blue HEX reads `F0000` (not a valid six-digit value), its RGB reads zeroes, +and Red lists `006F53`, which would be green. Even the White RGB disagrees with +its HEX. Do not treat these labels as verified digital colour specifications. + +For this draft, the rendered swatch interiors were sampled at 2200px PDF rendering +resolution. These are provisional screen approximations, not authoritative brand +codes; PDF colour management can affect results. Replace them when the designer +provides corrected digital values. + +| Role | Draft value | Application | +| --- | --- | --- | +| Adjusted brand Blue | `#3E2B62` | Headings, primary buttons, outlined actions and keyboard focus | +| Adjusted brand Red | `#8F2C26` | Small decorative rule beside eyebrows; no red primary buttons | +| Dark Navy / ink | `#262125` | Body text, sampled from displayed dark swatch | +| White | `#FFFFFF` | Cards and button text, using printed HEX | +| Platinum | `#F4F4F5` | Section background, using printed HEX | +| Derived pale blue-violet | `#E9E6EE` | Placeholder image surfaces; interface tint, not an official brand swatch | + +Keep blue dominant, neutrals generous and red confined to accents. The book's +“Blue” has a violet appearance; this draft follows that swatch rather than choosing +an unrelated generic blue. Decorative red carries no meaning by itself. + +## Typography + +Page 24 specifies **Broadacre** (Regular 0 / Medium 0) for headings and tagline, +and **Inter** for longer body copy. The CSS now declares those intended families +and falls back to existing Dawn heading/body settings and sans-serif. The original +over-tight headline tracking was relaxed for the broader brand lettering. + +No webfont files were supplied, and none were extracted from the PDF or downloaded +from an unverified source. Declaring a family does not install it: current rendering +will use fallbacks unless the font is available. Obtain licensed Broadacre WOFF2 +assets and the exact CSS family/weight mapping, plus Inter WOFF2 and its license, +before claiming final typography. Then add local `@font-face` declarations with +`font-display: swap`, only the necessary weights, and remeasure font transfer and +layout shift. Avoid an external font service. + +## Scope and verification + +These tokens currently apply to the new Cellife homepage sections only. Existing +Dawn header/footer, collection cards and commerce components retain their theme +settings; a later global design pass should map the same palette/type into Dawn +colour schemes and typography without accumulating overrides. + +Check contrast for blue/white, blue/platinum and ink/platinum. Red is decorative, +so it is not used as small copy or as the sole signal for an interactive state. +Actual browser, final-webfont and Shopify Theme Editor checks remain pending. diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md new file mode 100644 index 00000000000..4ba0f6a14f6 --- /dev/null +++ b/docs/DEVELOPMENT.md @@ -0,0 +1,82 @@ +# Cellife development baseline + +## Provenance + +Recorded 22 October 2026. Local source baseline: Dawn version label `16.0.0`, commit +`258f00f64365e2018ca4c62778a6bf55a5d3cd18`. Keep this immutable commit as the +comparison point for Cellife changes. Shopify's license remains in `LICENSE.md`. + +The [official releases page](https://github.com/Shopify/dawn/releases) currently +lists v16.0.0 as latest, pointing to `bc39a7d`. This differs from the local source +commit despite the same version label. The upstream release notes require stores +using legacy customer accounts to upgrade before publishing that release. +**This source has not been verified byte-for-byte against the release tag.** +Do not describe it as a verified exact release or publish it based on its label. + +Before visual implementation, fetch the official tag in a network-enabled environment, +compare it with the recorded baseline, inspect release changes and confirm Cellife's +customer-account setup. Then deliberately adopt the release or document why the +existing commit is retained. Never merge upstream main automatically. + +```sh +git fetch https://github.com/Shopify/dawn.git tag v16.0.0 +git rev-parse v16.0.0^{commit} +git diff --stat 258f00f64365e2018ca4c62778a6bf55a5d3cd18 v16.0.0 +``` + +## Local checks + +No frontend build step is required. Python 3 runs the dependency-free JSON syntax +check; Shopify CLI supplies Liquid and schema checks. Install a supported Shopify +CLI version following its official instructions, record `shopify version` with +results, and use the same version across developers when establishing the baseline. + +```sh +python3 scripts/check-theme-json.py +shopify theme check +git diff --check +``` + +JSON validation is not a substitute for Theme Check or storefront testing. +The inherited Theme Check exceptions for MatchingTranslations and TemplateLength +remain unchanged until a real baseline report is available. + +CI runs JSON validation and the existing Shopify Theme Check action on pushes and +pull requests with read-only repository permissions. It has no store credentials, +theme upload, Lighthouse deployment, or publication step. The inherited Lighthouse +job was removed because it used store credentials and could write a preview theme. +CLA and stale-issue workflows remain separate inherited repository administration; +they are not deployment workflows. + +## Preview workflow + +After a development store and its access are authorized, substitute its actual +hostname in the following command. It creates/updates a development theme and +requires authentication; local checking above does not. + +```sh +shopify theme dev --store YOUR-DEVELOPMENT-STORE.myshopify.com +``` + +Use a development store with representative, non-sensitive sample data first. +If an existing store must be used, verify the destination and development theme ID. +Do not use `--allow-live`, `theme publish`, or push to the live theme. Theme +development does not isolate shared discounts, apps, products or Markets settings. +Production configuration and live publication require separate authorization. + +Once access exists, capture homepage, collection and product screenshots at mobile +and desktop sizes and record three comparable mobile Lighthouse runs with the real +app stack. Record the store/theme, date, tool version, device/network settings and +median metrics. Until then there is no rendered or performance baseline. + +## Initial check record + +- Runtime: Node 24.19.0; npm 11.9.0; Python 3 available. +- Shopify CLI and Ruby Theme Check were not installed in this workspace. +- Direct Git access failed because the configured proxy was unreachable. npm + metadata access also failed to return, so no CLI package/version was installed. +- Release notes were readable through public web retrieval; full tag verification + remains pending. No upstream code was changed or fetched into the worktree. +- JSON validation and whitespace results are recorded in the completion report. +- Shopify Theme Check, GitHub Actions execution, browser, commerce and performance + checks remain unrun; no passing result is implied. diff --git a/docs/HOMEPAGE.md b/docs/HOMEPAGE.md new file mode 100644 index 00000000000..ec359e31f0f --- /dev/null +++ b/docs/HOMEPAGE.md @@ -0,0 +1,72 @@ +# Cellife homepage: first visual slice + +The homepage now composes a Cellife hero, shopping pathways and Dawn's existing +featured collection. This is local theme code only; it has not been uploaded. + +## Editing + +In an authorized development theme's Customize screen, open Home page: + +1. **Cellife photographic hero:** replace the marked placeholder using Desktop + image; add Mobile image for a separate crop. Edit the eyebrow, heading, + description and two links. Desktop photography occupies the right-hand panel; + mobile photography sits below the copy so text contrast does not depend on art. +2. **Cellife shopping pathways:** replace each category image and edit its heading, + description and destination. Reorder up to four cards. The section is limited + to one homepage instance so its hero navigation anchor stays unique. +3. **Featured collection:** choose a curated collection and its display settings + using Dawn's existing controls. Prices, images and availability come from real + Shopify product data; no fake catalog entries were added. + +The hero's second link scrolls to the pathways. It must be updated if that section +is removed. Empty button destinations omit the button rather than create dead links. +An absent desktop image falls back to the mobile image; absent imagery renders an +explicit placeholder. Final image alt text is managed in Shopify's image settings. + +## Image brief + +- Hero desktop: approximately 1800 × 1600px, product-focused still life with natural + daylight and platinum/neutral surroundings with brand-blue cues. Product sits in the image panel; + leave text out of the artwork. Target delivered desktop transfer ≤400KB. +- Hero mobile: approximately 900 × 900px, a tighter composition with readable + packaging; target delivered transfer ≤250KB. +- Category images: 4:3, approximately 1200 × 900px, consistent lighting and product + scale. Supplements, respiratory tests, drug/alcohol tests and women’s/urinary + tests should be visually distinct without inventing packaging or credentials. +- Use real final packaging. Keep labels, ingredient details and regulatory marks + accurate. Do not bake benefit claims or text into the image. + +These are art-direction suggestions; Shopify generates responsive image sizes. + +## Sources and boundaries + +The current public homepage and category destinations were inspected through web +text retrieval on 22 October 2026. The four category links in the template match +those observed destinations, including the existing `respiratory-tests-copy` +handle for Drug & Alcohol Tests. That handle was preserved deliberately. +The heading “Science for better everyday health.” comes from the current homepage. +It remains subject to brand review; no new efficacy claims, ratings or testimonials +were added. No rendered current-site layout observations are claimed. + +The Cellife CSS is scoped to these sections. Brand-book palette and typography +decisions are recorded in `docs/BRAND.md`. There is no added JavaScript, font +download, app, popup, subscription logic or checkout change. Images reserve their +space and the first hero receives eager/high-priority loading only in first position. + +## Verification and remaining gates + +Local JSON/embedded schema syntax validation passes (107 documents); whitespace +checks pass. Shopify CLI is unavailable locally, and package +access fails because the configured proxy is unreachable. A static layout browser +check was attempted with installed Playwright/Chromium, but Chromium exited before +rendering because sandbox socket operations were denied. Theme Check, actual +Liquid rendering, screenshot review, keyboard/screen-reader checks, Theme Editor +interaction and Lighthouse remain pending. This is an implementation ready for +development-theme verification, not a verified release-ready storefront. + +Before release, compare the pinned local source against the official Dawn release, +confirm customer-account compatibility, and run Theme Check. In a development +preview check 390px and 1440px widths, 200% zoom, long headings, all images missing, +mobile-only image, both image crops, blank links, section reordering and image +replacements. Verify each category link, hero anchor, keyboard focus, collection +cards and unchanged cart behavior. Measure LCP/CLS with real final photography. diff --git a/scripts/check-theme-json.py b/scripts/check-theme-json.py new file mode 100644 index 00000000000..1c8f37621b8 --- /dev/null +++ b/scripts/check-theme-json.py @@ -0,0 +1,28 @@ +"""Validate theme JSON syntax, including embedded Liquid section schemas. + +Shopify Theme Check remains responsible for Liquid and schema semantics. +Run from any directory; no dependencies or store access required. +""" + +import json +import re +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[1] +count = 0 +for directory in ("config", "locales", "templates", "sections"): + for path in sorted((ROOT / directory).rglob("*")): + if path.suffix == ".json": + # Shopify may prepend a generated-file block comment to JSON files. + source = re.sub(r"\A\s*/\*.*?\*/", "", path.read_text(), count=1, flags=re.S) + json.loads(source) + count += 1 + elif path.suffix == ".liquid": + for schema in re.findall(r"{%\s*schema\s*%}(.*?){%\s*endschema\s*%}", path.read_text(), re.S): + try: + json.loads(schema) + except json.JSONDecodeError as error: + raise ValueError(f"Invalid schema in {path.relative_to(ROOT)}: {error}") from error + count += 1 + +print(f"Validated {count} theme JSON documents and section schemas.") diff --git a/sections/cellife-hero.liquid b/sections/cellife-hero.liquid new file mode 100644 index 00000000000..074b10ca5fc --- /dev/null +++ b/sections/cellife-hero.liquid @@ -0,0 +1,112 @@ +{{ 'section-cellife-home.css' | asset_url | stylesheet_tag }} +{%- liquid + assign hero_image = section.settings.image | default: section.settings.mobile_image + assign priority = 'auto' + assign image_loading = 'lazy' + if section.index == 1 + assign priority = 'high' + assign image_loading = 'eager' + endif +-%} +
+
+ {% if section.settings.eyebrow != blank %}

{{ section.settings.eyebrow | escape }}

{% endif %} +

{{ section.settings.heading | escape }}

+ {% if section.settings.text != blank %}
{{ section.settings.text }}
{% endif %} +
+ {% if section.settings.button_label != blank and section.settings.button_link != blank %}{{ section.settings.button_label | escape }} {% endif %} + {% if section.settings.secondary_label != blank and section.settings.secondary_link != blank %}{{ section.settings.secondary_label | escape }} {% endif %} +
+
+
+ {% if hero_image != blank %} + + {% if section.settings.mobile_image != blank %} + + {% endif %} + {{ hero_image | image_url: width: 1800 | image_tag: widths: '400, 600, 900, 1200, 1500, 1800', sizes: '(min-width: 750px) 55vw, 100vw', loading: image_loading, fetchpriority: priority, class: 'cellife-hero__image' }} + + {% else %} +

{{ section.settings.placeholder_label | escape }}

+ {% endif %} +
+
+ +{% schema %} +{ + "name": "Cellife photographic hero", + "tag": "div", + "class": "cellife-hero-section", + "limit": 1, + "enabled_on": { + "templates": [ + "index" + ] + }, + "settings": [ + { + "type": "text", + "id": "eyebrow", + "label": "Eyebrow", + "default": "CELLIFE HEALTHCARE" + }, + { + "type": "text", + "id": "heading", + "label": "Heading", + "default": "Science for better everyday health." + }, + { + "type": "richtext", + "id": "text", + "label": "Description", + "default": "

Explore Cellife supplements and diagnostic tests.

" + }, + { + "type": "image_picker", + "id": "image", + "label": "Desktop image", + "info": "Recommended: 1800 \u00d7 1600px. Use the image focal point to set the crop." + }, + { + "type": "image_picker", + "id": "mobile_image", + "label": "Mobile image", + "info": "Optional separate crop, approximately 900 \u00d7 900px." + }, + { + "type": "text", + "id": "placeholder_label", + "label": "Placeholder label", + "default": "Product photography placeholder" + }, + { + "type": "text", + "id": "button_label", + "label": "Primary button label", + "default": "Explore supplements" + }, + { + "type": "url", + "id": "button_link", + "label": "Primary button link" + }, + { + "type": "text", + "id": "secondary_label", + "label": "Secondary button label", + "default": "Explore test kits" + }, + { + "type": "url", + "id": "secondary_link", + "label": "Secondary button link" + } + ], + "presets": [ + { + "name": "Cellife photographic hero" + } + ] +} +{% endschema %} diff --git a/sections/cellife-pathways.liquid b/sections/cellife-pathways.liquid new file mode 100644 index 00000000000..d202c948282 --- /dev/null +++ b/sections/cellife-pathways.liquid @@ -0,0 +1,97 @@ +{{ 'section-cellife-home.css' | asset_url | stylesheet_tag }} +
+
+

{{ section.settings.eyebrow | escape }}

+

{{ section.settings.heading | escape }}

+
+
+ {% for block in section.blocks %} +
+
+ {% if block.settings.image != blank %} + {{ block.settings.image | image_url: width: 1200 | image_tag: widths: '400, 600, 900, 1200', sizes: '(min-width: 750px) 45vw, 100vw', loading: 'lazy' }} + {% else %} +

Image placeholder — {{ block.settings.heading | escape }}

+ {% endif %} +
+
+

{{ block.settings.heading | escape }}

+ {% if block.settings.text != blank %}

{{ block.settings.text | escape }}

{% endif %} + {% if block.settings.link != blank and block.settings.link_label != blank %}{{ block.settings.link_label | escape }} {% endif %} +
+
+ {% endfor %} +
+
+ +{% schema %} +{ + "name": "Cellife shopping pathways", + "tag": "div", + "limit": 1, + "enabled_on": { "templates": ["index"] }, + "max_blocks": 4, + "settings": [ + { + "type": "text", + "id": "eyebrow", + "label": "Eyebrow", + "default": "EXPLORE CELLIFE" + }, + { + "type": "text", + "id": "heading", + "label": "Heading", + "default": "Find your starting point." + } + ], + "blocks": [ + { + "type": "pathway", + "name": "Shopping pathway", + "settings": [ + { + "type": "image_picker", + "id": "image", + "label": "Image" + }, + { + "type": "text", + "id": "heading", + "label": "Heading", + "default": "Supplements" + }, + { + "type": "text", + "id": "text", + "label": "Description" + }, + { + "type": "text", + "id": "link_label", + "label": "Link label", + "default": "Explore range" + }, + { + "type": "url", + "id": "link", + "label": "Destination" + } + ] + } + ], + "presets": [ + { + "name": "Cellife shopping pathways", + "blocks": [ + { + "type": "pathway" + }, + { + "type": "pathway" + } + ] + } + ] +} +{% endschema %} diff --git a/templates/index.json b/templates/index.json index f5b6ea329d9..4a7bc774469 100644 --- a/templates/index.json +++ b/templates/index.json @@ -1,54 +1,70 @@ { "sections": { - "image_banner": { - "type": "image-banner", + "cellife_hero": { + "type": "cellife-hero", + "settings": { + "button_link": "/collections/supplements", + "secondary_link": "#cellife-shopping-pathways" + } + }, + "cellife_pathways": { + "type": "cellife-pathways", "blocks": { - "heading": { - "type": "heading", + "pathway_0": { + "type": "pathway", + "settings": { + "heading": "Supplements", + "text": "Explore the supplement range.", + "link_label": "Explore range", + "link": "/collections/supplements" + } + }, + "pathway_1": { + "type": "pathway", "settings": { - "heading": "Browse our latest products", - "heading_size": "h0" + "heading": "Respiratory tests", + "text": "Explore respiratory test kits.", + "link_label": "Explore range", + "link": "/collections/respiratory-tests" } }, - "button": { - "type": "buttons", + "pathway_2": { + "type": "pathway", "settings": { - "button_label_1": "Shop all", - "button_link_1": "shopify://collections/all", - "button_style_secondary_1": true, - "button_label_2": "", - "button_link_2": "", - "button_style_secondary_2": false + "heading": "Drug & alcohol tests", + "text": "Explore drug and alcohol test kits.", + "link_label": "Explore range", + "link": "/collections/respiratory-tests-copy" + } + }, + "pathway_3": { + "type": "pathway", + "settings": { + "heading": "Women\u2019s & urinary health", + "text": "Explore women\u2019s and urinary health tests.", + "link_label": "Explore range", + "link": "/collections/womens-urinary-health" } } }, "block_order": [ - "heading", - "button" + "pathway_0", + "pathway_1", + "pathway_2", + "pathway_3" ], - "settings": { - "image_overlay_opacity": 40, - "image_height": "large", - "desktop_content_position": "bottom-center", - "show_text_box": false, - "image_behavior": "none", - "desktop_content_alignment": "center", - "color_scheme": "scheme-3", - "mobile_content_alignment": "center", - "stack_images_on_mobile": false, - "show_text_below": false - } + "settings": {} }, "featured_collection": { "type": "featured-collection", "settings": { - "title": "Featured products", + "title": "Explore the Cellife range", "heading_size": "h2", "description": "", "show_description": false, "description_style": "body", "collection": "all", - "products_to_show": 8, + "products_to_show": 4, "columns_desktop": 4, "color_scheme": "scheme-1", "full_width": false, @@ -69,7 +85,8 @@ } }, "order": [ - "image_banner", + "cellife_hero", + "cellife_pathways", "featured_collection" ] } From e7bda78fe2ef3801abbcafc0e176addb4233621d Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Fri, 23 Oct 2026 00:16:33 +0000 Subject: [PATCH 002/151] Update from Shopify for theme cellife-shopify-theme/cellife-rebuild by Xing Mao Committed from shop: Cellife Health Care Australia Changed by: Xing Mao Files: - modified config/settings_data.json (Xing Mao) --- config/settings_data.json | 204 +++++++++++++++++++++++++++++++++++++- 1 file changed, 203 insertions(+), 1 deletion(-) diff --git a/config/settings_data.json b/config/settings_data.json index 911ad493e29..081f5f869dd 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -1,5 +1,207 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ { - "current": "Dawn", + "current": { + "logo": "shopify://shop_images/cellife-health-logo.png", + "logo_width": 160, + "favicon": "shopify://shop_images/cellife-favicon.png", + "type_header_font": "assistant_n4", + "heading_scale": 100, + "type_body_font": "assistant_n4", + "body_scale": 100, + "page_width": 1200, + "spacing_sections": 0, + "spacing_grid_horizontal": 8, + "spacing_grid_vertical": 8, + "animations_reveal_on_scroll": true, + "animations_hover_elements": "none", + "buttons_border_thickness": 1, + "buttons_border_opacity": 100, + "buttons_radius": 0, + "buttons_shadow_opacity": 0, + "buttons_shadow_horizontal_offset": 0, + "buttons_shadow_vertical_offset": 4, + "buttons_shadow_blur": 5, + "variant_pills_border_thickness": 1, + "variant_pills_border_opacity": 55, + "variant_pills_radius": 40, + "variant_pills_shadow_opacity": 0, + "variant_pills_shadow_horizontal_offset": 0, + "variant_pills_shadow_vertical_offset": 4, + "variant_pills_shadow_blur": 5, + "inputs_border_thickness": 1, + "inputs_border_opacity": 55, + "inputs_radius": 0, + "inputs_shadow_opacity": 0, + "inputs_shadow_horizontal_offset": 0, + "inputs_shadow_vertical_offset": 4, + "inputs_shadow_blur": 5, + "card_style": "standard", + "card_image_padding": 0, + "card_text_alignment": "left", + "card_color_scheme": "scheme-2", + "card_border_thickness": 0, + "card_border_opacity": 10, + "card_corner_radius": 0, + "card_shadow_opacity": 0, + "card_shadow_horizontal_offset": 0, + "card_shadow_vertical_offset": 4, + "card_shadow_blur": 5, + "collection_card_style": "standard", + "collection_card_image_padding": 0, + "collection_card_text_alignment": "left", + "collection_card_color_scheme": "scheme-2", + "collection_card_border_thickness": 0, + "collection_card_border_opacity": 10, + "collection_card_corner_radius": 0, + "collection_card_shadow_opacity": 0, + "collection_card_shadow_horizontal_offset": 0, + "collection_card_shadow_vertical_offset": 4, + "collection_card_shadow_blur": 5, + "blog_card_style": "standard", + "blog_card_image_padding": 0, + "blog_card_text_alignment": "left", + "blog_card_color_scheme": "scheme-2", + "blog_card_border_thickness": 0, + "blog_card_border_opacity": 10, + "blog_card_corner_radius": 0, + "blog_card_shadow_opacity": 0, + "blog_card_shadow_horizontal_offset": 0, + "blog_card_shadow_vertical_offset": 4, + "blog_card_shadow_blur": 5, + "text_boxes_border_thickness": 0, + "text_boxes_border_opacity": 10, + "text_boxes_radius": 0, + "text_boxes_shadow_opacity": 0, + "text_boxes_shadow_horizontal_offset": 0, + "text_boxes_shadow_vertical_offset": 4, + "text_boxes_shadow_blur": 5, + "media_border_thickness": 1, + "media_border_opacity": 5, + "media_radius": 0, + "media_shadow_opacity": 0, + "media_shadow_horizontal_offset": 0, + "media_shadow_vertical_offset": 4, + "media_shadow_blur": 5, + "popup_border_thickness": 1, + "popup_border_opacity": 10, + "popup_corner_radius": 0, + "popup_shadow_opacity": 5, + "popup_shadow_horizontal_offset": 0, + "popup_shadow_vertical_offset": 4, + "popup_shadow_blur": 5, + "drawer_border_thickness": 1, + "drawer_border_opacity": 10, + "drawer_shadow_opacity": 0, + "drawer_shadow_horizontal_offset": 0, + "drawer_shadow_vertical_offset": 4, + "drawer_shadow_blur": 5, + "badge_position": "bottom left", + "badge_corner_radius": 40, + "sale_badge_color_scheme": "scheme-4", + "sold_out_badge_color_scheme": "scheme-3", + "brand_headline": "", + "brand_description": "

", + "brand_image_width": 100, + "social_facebook_link": "", + "social_instagram_link": "", + "social_youtube_link": "", + "social_tiktok_link": "", + "social_twitter_link": "", + "social_snapchat_link": "", + "social_pinterest_link": "", + "social_tumblr_link": "", + "social_vimeo_link": "", + "predictive_search_enabled": true, + "predictive_search_show_vendor": false, + "predictive_search_show_price": false, + "currency_code_enabled": true, + "cart_type": "notification", + "show_vendor": false, + "show_cart_note": false, + "cart_drawer_collection": "", + "cart_color_scheme": "scheme-1", + "customer_account_menu": "customer-account-main-menu", + "sections": { + "main-password-header": { + "type": "main-password-header", + "settings": { + "color_scheme": "scheme-1" + } + }, + "main-password-footer": { + "type": "main-password-footer", + "settings": { + "color_scheme": "scheme-1" + } + } + }, + "content_for_index": [], + "color_schemes": { + "scheme-1": { + "settings": { + "background": "#ffffff", + "background_gradient": "", + "text": "#121212", + "button": "#121212", + "button_label": "#ffffff", + "secondary_button_label": "#121212", + "shadow": "#121212" + } + }, + "scheme-2": { + "settings": { + "background": "#f3f3f3", + "background_gradient": "", + "text": "#121212", + "button": "#121212", + "button_label": "#f3f3f3", + "secondary_button_label": "#121212", + "shadow": "#121212" + } + }, + "scheme-3": { + "settings": { + "background": "#242833", + "background_gradient": "", + "text": "#ffffff", + "button": "#ffffff", + "button_label": "#000000", + "secondary_button_label": "#ffffff", + "shadow": "#121212" + } + }, + "scheme-4": { + "settings": { + "background": "#121212", + "background_gradient": "", + "text": "#ffffff", + "button": "#ffffff", + "button_label": "#121212", + "secondary_button_label": "#ffffff", + "shadow": "#121212" + } + }, + "scheme-5": { + "settings": { + "background": "#334fb4", + "background_gradient": "", + "text": "#ffffff", + "button": "#ffffff", + "button_label": "#334fb4", + "secondary_button_label": "#ffffff", + "shadow": "#121212" + } + } + } + }, "presets": { "Dawn": { "logo_width": 90, From 7c22062be3701d51c25de32099b626d904b222fe Mon Sep 17 00:00:00 2001 From: Miller W <59322226+cremechese@users.noreply.github.com> Date: Fri, 23 Oct 2026 11:30:54 +1100 Subject: [PATCH 003/151] Make homepage hero full width with frosted text overlay --- assets/section-cellife-home.css | 18 ++++++++++++------ docs/HOMEPAGE.md | 14 ++++++++------ sections/cellife-hero.liquid | 6 +++--- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/assets/section-cellife-home.css b/assets/section-cellife-home.css index f9d5acaf052..3ccefa0dfb8 100644 --- a/assets/section-cellife-home.css +++ b/assets/section-cellife-home.css @@ -15,8 +15,14 @@ } .cellife-home h1, .cellife-home h2, .cellife-home h3 { color: var(--cellife-blue); font-family: var(--cellife-font-heading); font-weight: 500; letter-spacing: -.025em; margin: 0; overflow-wrap: anywhere; } .cellife-home a { color: inherit; } -.cellife-hero { display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); } -.cellife-hero__copy { padding: clamp(32px, 5vw, 96px); align-self: center; } +.cellife-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr); min-height: 680px; padding: clamp(32px, 5vw, 80px); } +.cellife-hero__copy { position: relative; z-index: 1; width: 100%; max-width: 620px; min-width: 0; padding: clamp(28px, 3.5vw, 56px); align-self: center; background: rgba(244, 244, 245, .96); border: 1px solid rgba(255, 255, 255, .7); border-radius: 12px; } +@supports ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) { + .cellife-hero__copy { background: rgba(244, 244, 245, .88); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); } +} +@media (prefers-reduced-transparency: reduce) { + .cellife-hero__copy { background: var(--cellife-surface); -webkit-backdrop-filter: none; backdrop-filter: none; } +} /* Red is a single small accent, never a competing action colour. */ .cellife-eyebrow::before { content: ''; display: inline-block; width: 20px; height: 2px; margin-right: 10px; vertical-align: middle; background: var(--cellife-red); } .cellife-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .16em; line-height: 1.5; margin: 0 0 24px; } @@ -27,7 +33,8 @@ .cellife-home .cellife-action--outline { color: var(--cellife-blue); background: transparent; } .cellife-home a:hover { text-decoration: underline; text-underline-offset: 4px; } .cellife-home a:focus-visible { outline: 3px solid var(--cellife-blue); outline-offset: 5px; } -.cellife-hero__media { min-width: 0; min-height: 620px; position: relative; background: var(--cellife-media-surface); } +.cellife-hero__media { position: absolute; inset: 0; z-index: 0; min-width: 0; background: var(--cellife-media-surface); } +.cellife-hero__media > .cellife-placeholder { align-items: flex-end; justify-content: flex-start; padding: 32px; } .cellife-hero__media picture { display: block; position: absolute; inset: 0; } .cellife-hero__image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--cellife-desktop-focus); } .cellife-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: inherit; padding: 32px; background: radial-gradient(ellipse at 65% 30%, var(--cellife-surface), var(--cellife-media-surface) 75%); color: var(--cellife-blue); text-align: center; } @@ -46,10 +53,9 @@ .cellife-text-link { display: inline-flex; align-items: center; gap: 24px; min-height: 44px; font-size: 15px; text-underline-offset: 5px; } @media (min-width: 750px) and (max-width: 1359px) { .cellife-pathways { padding-inline: 40px; } } @media (max-width: 749px) { - .cellife-hero { grid-template-columns: minmax(0, 1fr); } - .cellife-hero__copy { padding: 48px 20px 36px; } + .cellife-hero { min-height: 680px; padding: 160px 20px 24px; } + .cellife-hero__copy { align-self: end; padding: 28px 24px; } .cellife-hero h1 { font-size: clamp(36px, 9vw, 56px); max-width: 14ch; } - .cellife-hero__media { min-height: 0; aspect-ratio: 1; } .cellife-hero__image { object-position: var(--cellife-mobile-focus); } .cellife-actions { margin-top: 24px; } .cellife-pathways__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; } diff --git a/docs/HOMEPAGE.md b/docs/HOMEPAGE.md index ec359e31f0f..ec9fceb073e 100644 --- a/docs/HOMEPAGE.md +++ b/docs/HOMEPAGE.md @@ -9,8 +9,10 @@ In an authorized development theme's Customize screen, open Home page: 1. **Cellife photographic hero:** replace the marked placeholder using Desktop image; add Mobile image for a separate crop. Edit the eyebrow, heading, - description and two links. Desktop photography occupies the right-hand panel; - mobile photography sits below the copy so text contrast does not depend on art. + description and two links. Photography spans the full hero width behind a translucent text panel. The + panel uses backdrop blur where supported, a more opaque fallback otherwise, + and a solid background when reduced transparency is requested. On mobile it + sits toward the bottom; long copy grows the hero rather than being clipped. 2. **Cellife shopping pathways:** replace each category image and edit its heading, description and destination. Reorder up to four cards. The section is limited to one homepage instance so its hero navigation anchor stays unique. @@ -25,11 +27,11 @@ explicit placeholder. Final image alt text is managed in Shopify's image setting ## Image brief -- Hero desktop: approximately 1800 × 1600px, product-focused still life with natural - daylight and platinum/neutral surroundings with brand-blue cues. Product sits in the image panel; +- Hero desktop: approximately 2400 × 1400px, product-focused still life with natural + daylight and platinum/neutral surroundings with brand-blue cues. Keep the product toward the right, clear of the overlaid text panel; leave text out of the artwork. Target delivered desktop transfer ≤400KB. -- Hero mobile: approximately 900 × 900px, a tighter composition with readable - packaging; target delivered transfer ≤250KB. +- Hero mobile: approximately 900 × 1400px, a portrait composition with readable + packaging above the lower text panel; target delivered transfer ≤250KB. - Category images: 4:3, approximately 1200 × 900px, consistent lighting and product scale. Supplements, respiratory tests, drug/alcohol tests and women’s/urinary tests should be visually distinct without inventing packaging or credentials. diff --git a/sections/cellife-hero.liquid b/sections/cellife-hero.liquid index 074b10ca5fc..7665884b1d3 100644 --- a/sections/cellife-hero.liquid +++ b/sections/cellife-hero.liquid @@ -24,7 +24,7 @@ {% if section.settings.mobile_image != blank %} {% endif %} - {{ hero_image | image_url: width: 1800 | image_tag: widths: '400, 600, 900, 1200, 1500, 1800', sizes: '(min-width: 750px) 55vw, 100vw', loading: image_loading, fetchpriority: priority, class: 'cellife-hero__image' }} + {{ hero_image | image_url: width: 2400 | image_tag: widths: '400, 600, 900, 1200, 1500, 1800, 2400', sizes: '100vw', loading: image_loading, fetchpriority: priority, class: 'cellife-hero__image' }} {% else %}

{{ section.settings.placeholder_label | escape }}

@@ -66,13 +66,13 @@ "type": "image_picker", "id": "image", "label": "Desktop image", - "info": "Recommended: 1800 \u00d7 1600px. Use the image focal point to set the crop." + "info": "Recommended: 2400 \u00d7 1400px. Full-width image; keep the subject right of the text panel and set the focal point." }, { "type": "image_picker", "id": "mobile_image", "label": "Mobile image", - "info": "Optional separate crop, approximately 900 \u00d7 900px." + "info": "Optional portrait crop, approximately 900 \u00d7 1400px. Text overlays the lower part of the image." }, { "type": "text", From 4b234baa13bc42895a39603a287370d18d8f022a Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Fri, 23 Oct 2026 00:32:09 +0000 Subject: [PATCH 004/151] Update from Shopify for theme cellife-shopify-theme/cellife-rebuild by Xing Mao Committed from shop: Cellife Health Care Australia Changed by: Xing Mao Files: - modified assets/section-cellife-home.css (editor not recorded) - modified sections/cellife-hero.liquid (editor not recorded) - modified templates/index.json (Xing Mao) --- templates/index.json | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/templates/index.json b/templates/index.json index 4a7bc774469..dfbb1022a1c 100644 --- a/templates/index.json +++ b/templates/index.json @@ -1,9 +1,25 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ { "sections": { "cellife_hero": { "type": "cellife-hero", "settings": { + "eyebrow": "CELLIFE HEALTHCARE", + "heading": "Science for better everyday health.", + "text": "

Explore Cellife supplements and diagnostic tests.

", + "image": "shopify://shop_images/Cellife_Supplement_Bottles_in_Motion_a32a4e6f-472b-464f-8045-d5156ec92ede.png", + "placeholder_label": "Product photography placeholder", + "button_label": "Explore supplements", "button_link": "/collections/supplements", + "secondary_label": "Explore test kits", "secondary_link": "#cellife-shopping-pathways" } }, @@ -40,8 +56,8 @@ "pathway_3": { "type": "pathway", "settings": { - "heading": "Women\u2019s & urinary health", - "text": "Explore women\u2019s and urinary health tests.", + "heading": "Women’s & urinary health", + "text": "Explore women’s and urinary health tests.", "link_label": "Explore range", "link": "/collections/womens-urinary-health" } @@ -53,25 +69,27 @@ "pathway_2", "pathway_3" ], - "settings": {} + "settings": { + "eyebrow": "EXPLORE CELLIFE", + "heading": "Find your starting point." + } }, "featured_collection": { "type": "featured-collection", "settings": { + "collection": "all", + "products_to_show": 4, "title": "Explore the Cellife range", "heading_size": "h2", "description": "", "show_description": false, "description_style": "body", - "collection": "all", - "products_to_show": 4, "columns_desktop": 4, - "color_scheme": "scheme-1", + "enable_desktop_slider": false, "full_width": false, "show_view_all": true, "view_all_style": "solid", - "enable_desktop_slider": false, - "swipe_on_mobile": false, + "color_scheme": "scheme-1", "image_ratio": "adapt", "image_shape": "default", "show_secondary_image": true, @@ -79,6 +97,7 @@ "show_rating": false, "quick_add": "none", "columns_mobile": "2", + "swipe_on_mobile": false, "padding_top": 44, "padding_bottom": 36 } From ee25063600783302f8bbf29e577add13d81acc74 Mon Sep 17 00:00:00 2001 From: Miller W <59322226+cremechese@users.noreply.github.com> Date: Fri, 23 Oct 2026 11:36:25 +1100 Subject: [PATCH 005/151] Make hero glass panel more transparent --- assets/section-cellife-home.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/section-cellife-home.css b/assets/section-cellife-home.css index 3ccefa0dfb8..15dc3920a66 100644 --- a/assets/section-cellife-home.css +++ b/assets/section-cellife-home.css @@ -16,9 +16,9 @@ .cellife-home h1, .cellife-home h2, .cellife-home h3 { color: var(--cellife-blue); font-family: var(--cellife-font-heading); font-weight: 500; letter-spacing: -.025em; margin: 0; overflow-wrap: anywhere; } .cellife-home a { color: inherit; } .cellife-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr); min-height: 680px; padding: clamp(32px, 5vw, 80px); } -.cellife-hero__copy { position: relative; z-index: 1; width: 100%; max-width: 620px; min-width: 0; padding: clamp(28px, 3.5vw, 56px); align-self: center; background: rgba(244, 244, 245, .96); border: 1px solid rgba(255, 255, 255, .7); border-radius: 12px; } +.cellife-hero__copy { position: relative; z-index: 1; width: 100%; max-width: 620px; min-width: 0; padding: clamp(28px, 3.5vw, 56px); align-self: center; background: rgba(244, 244, 245, .96); border: 1px solid rgba(255, 255, 255, .3); border-radius: 12px; } @supports ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) { - .cellife-hero__copy { background: rgba(244, 244, 245, .88); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); } + .cellife-hero__copy { background: rgba(244, 244, 245, .4); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); } } @media (prefers-reduced-transparency: reduce) { .cellife-hero__copy { background: var(--cellife-surface); -webkit-backdrop-filter: none; backdrop-filter: none; } From c270cfa66bb14158a0fdbae2270e96236ffeabb2 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Fri, 23 Oct 2026 00:38:23 +0000 Subject: [PATCH 006/151] Update from Shopify for theme cellife-shopify-theme/cellife-rebuild by Xing Mao Committed from shop: Cellife Health Care Australia Changed by: Xing Mao Files: - modified assets/section-cellife-home.css (editor not recorded) - modified templates/index.json (Xing Mao) --- templates/index.json | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/index.json b/templates/index.json index dfbb1022a1c..c9b8496ce8c 100644 --- a/templates/index.json +++ b/templates/index.json @@ -16,6 +16,7 @@ "heading": "Science for better everyday health.", "text": "

Explore Cellife supplements and diagnostic tests.

", "image": "shopify://shop_images/Cellife_Supplement_Bottles_in_Motion_a32a4e6f-472b-464f-8045-d5156ec92ede.png", + "mobile_image": "shopify://shop_images/Cellife_Supplement_Bottles_in_Motion.png", "placeholder_label": "Product photography placeholder", "button_label": "Explore supplements", "button_link": "/collections/supplements", From 15233c9714626ad83cd223d49adcb52887812760 Mon Sep 17 00:00:00 2001 From: Miller W <59322226+cremechese@users.noreply.github.com> Date: Fri, 23 Oct 2026 11:54:25 +1100 Subject: [PATCH 007/151] Add isolated supplement and diagnostic shopping journeys --- assets/cellife-journeys.css | 45 ++++++ assets/cellife-journeys.js | 98 +++++++++++++ config/settings_schema.json | 17 +++ docs/DUAL_PATH_MILESTONE.md | 118 ++++++++++++++++ sections/cellife-journey-collections.liquid | 80 +++++++++++ sections/cellife-journey-gateway.liquid | 133 ++++++++++++++++++ sections/cellife-journey-nav.liquid | 45 ++++++ sections/cellife-landing-intro.liquid | 46 ++++++ sections/header-group.json | 7 +- snippets/cellife-journey-card.liquid | 14 ++ snippets/cellife-journey-url.liquid | 15 ++ templates/index.json | 7 + templates/page.diagnostic-test-kits.json | 52 +++++++ templates/page.supplements.json | 30 ++++ tests/dual-path.cjs | 146 ++++++++++++++++++++ 15 files changed, 852 insertions(+), 1 deletion(-) create mode 100644 assets/cellife-journeys.css create mode 100644 assets/cellife-journeys.js create mode 100644 docs/DUAL_PATH_MILESTONE.md create mode 100644 sections/cellife-journey-collections.liquid create mode 100644 sections/cellife-journey-gateway.liquid create mode 100644 sections/cellife-journey-nav.liquid create mode 100644 sections/cellife-landing-intro.liquid create mode 100644 snippets/cellife-journey-card.liquid create mode 100644 snippets/cellife-journey-url.liquid create mode 100644 templates/page.diagnostic-test-kits.json create mode 100644 templates/page.supplements.json create mode 100644 tests/dual-path.cjs diff --git a/assets/cellife-journeys.css b/assets/cellife-journeys.css new file mode 100644 index 00000000000..c257c3c20fe --- /dev/null +++ b/assets/cellife-journeys.css @@ -0,0 +1,45 @@ +/* Isolated shopping architecture. No overrides of the existing hero or cards. */ +.cellife-journeys, .cellife-journey-nav, .cellife-journey-dialog { + --journey-blue: #3e2b62; + --journey-ink: #262125; + --journey-surface: #f4f4f5; + color: var(--journey-ink); + font-family: 'Inter', var(--font-body-family, sans-serif); +} +.cellife-journeys { padding: 56px max(20px, calc((100% - 1280px) / 2)); background: var(--journey-surface); } +.cellife-journeys h1, .cellife-journeys h2, .cellife-journeys h3, .cellife-journey-dialog h2 { color: var(--journey-blue); font-family: 'Broadacre', var(--font-heading-family, sans-serif); font-weight: 500; letter-spacing: -.025em; overflow-wrap: anywhere; } +.cellife-journeys__intro { max-width: 64ch; margin-bottom: 32px; } +.cellife-journeys__eyebrow { font-size: 12px; letter-spacing: .14em; } +.cellife-journeys h1 { font-size: clamp(36px, 4vw, 60px); line-height: 1.1; } +.cellife-journeys h2, .cellife-journey-dialog h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.2; margin: 0 0 16px; } +.cellife-journeys p, .cellife-journey-dialog p { line-height: 1.6; } +.cellife-journeys__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } +.cellife-journeys__grid > div, .cellife-journey-card { min-width: 0; } +.cellife-journey-card { height: 100%; background: white; border: 1px solid #e9e6ee; border-radius: 12px; overflow: hidden; } +.cellife-journey-card__media { aspect-ratio: 16 / 9; background: #e9e6ee; } +.cellife-journey-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; } +.cellife-journey-placeholder { height: 100%; display: grid; place-items: center; color: var(--journey-blue); background: linear-gradient(135deg, #f4f4f5, #e9e6ee); } +.cellife-journey-placeholder span { font-size: 72px; opacity: .5; } +.cellife-journey-card__copy { padding: 28px; } +.cellife-journey-card h3 { font-size: 28px; line-height: 1.2; margin: 0 0 16px; } +.cellife-journey-link { display: inline-flex; align-items: center; gap: 20px; min-height: 44px; color: var(--journey-blue); text-underline-offset: 5px; } +.cellife-journey-nav { display: flex; justify-content: center; gap: 12px 32px; flex-wrap: wrap; padding: 8px 20px; border-bottom: 1px solid #e9e6ee; background: white; } +.cellife-journey-nav a { display: flex; align-items: center; min-height: 44px; color: var(--journey-blue); text-decoration: none; font-size: 15px; } +.cellife-journey-nav a:hover, .cellife-journey-nav a[aria-current] { text-decoration: underline; text-underline-offset: 5px; } +.cellife-landing-intro > .rte { max-width: 64ch; } +.cellife-landing-intro > img { display: block; width: 100%; height: auto; margin-top: 32px; border-radius: 12px; } +.cellife-journey-dialog { width: min(640px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 1px solid #e9e6ee; border-radius: 16px; background: white; } +.cellife-journey-dialog::backdrop { background: rgba(38, 33, 37, .5); } +.cellife-journey-dialog__panel { padding: 24px 32px 32px; } +.cellife-journey-dialog__close { display: flex; align-items: center; gap: 16px; min-height: 44px; margin: 0 0 24px auto; padding: 8px; border: 0; color: var(--journey-blue); background: transparent; font: inherit; cursor: pointer; } +.cellife-journey-dialog__choices { display: grid; gap: 12px; margin-top: 24px; } +.cellife-journey-dialog__choices a { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 56px; padding: 16px; color: var(--journey-blue); border: 1px solid #3e2b62; border-radius: 6px; text-decoration: none; } +.cellife-journeys a:focus-visible, .cellife-journey-nav a:focus-visible, .cellife-journey-dialog :focus-visible { outline: 3px solid #3e2b62; outline-offset: 4px; } +html.cellife-journey-modal-open { overflow: hidden; } +@media (min-width: 750px) and (max-width: 1359px) { .cellife-journeys { padding-inline: 40px; } } +@media (max-width: 749px) { + .cellife-journeys { padding-block: 40px; } + .cellife-journeys__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; } + .cellife-journey-card__copy { padding: 24px; } + .cellife-journey-dialog__panel { padding: 20px; } +} diff --git a/assets/cellife-journeys.js b/assets/cellife-journeys.js new file mode 100644 index 00000000000..0b29f2db388 --- /dev/null +++ b/assets/cellife-journeys.js @@ -0,0 +1,98 @@ +/* Category preference only. No inferred destination, redirects or commerce rules. */ +(() => { + if (window.cellifeJourneysInitialized) return; + window.cellifeJourneysInitialized = true; + + const preferenceKey = 'cellife:journey:v1'; + const entryKey = 'cellife:journey-entry:v1'; + let firstEntry = false; + // If storage is unavailable, keep ordinary navigation and skip interruptions. + try { + firstEntry = sessionStorage.getItem(entryKey) === null; + sessionStorage.setItem(entryKey, 'visited'); + firstEntry = firstEntry && localStorage.getItem(preferenceKey) === null; + } catch { + firstEntry = false; + } + + const remember = (choice) => { + try { localStorage.setItem(preferenceKey, choice); } catch { /* Navigation still works. */ } + }; + + // Listen globally so selection via persistent links or the gateway also settles it. + document.addEventListener('click', (event) => { + const link = event.target.closest('a[data-cellife-choice]'); + if (link) remember(link.dataset.cellifeChoice); + }); + + if (customElements.get('cellife-journey-dialog')) return; + customElements.define('cellife-journey-dialog', class extends HTMLElement { + connectedCallback() { + if (this.controller) return; + this.controller = new AbortController(); + const options = { signal: this.controller.signal }; + this.dialog = this.querySelector('dialog'); + if (!this.dialog || typeof this.dialog.showModal !== 'function') return; + + const close = () => { + if (this.dialog.open) { + remember(this.selectedChoice || 'dismissed'); + this.dialog.close(); + } + document.documentElement.classList.remove('cellife-journey-modal-open'); + }; + this.closeDialog = close; + this.dialog.addEventListener('close', () => { + remember(this.selectedChoice || 'dismissed'); + document.documentElement.classList.remove('cellife-journey-modal-open'); + if (this.previousFocus?.isConnected) this.previousFocus.focus({ preventScroll: true }); + }, options); + // Native Escape closes the dialog and fires close, recording dismissal. + this.dialog.addEventListener('cancel', () => remember('dismissed'), options); + this.querySelector('[data-cellife-dismiss]').addEventListener('click', close, options); + this.dialog.addEventListener('keydown', (event) => { + if (event.key !== 'Tab') return; + const controls = [...this.dialog.querySelectorAll('a[href], button:not([disabled])')]; + const first = controls[0]; + const last = controls[controls.length - 1]; + if (event.shiftKey && document.activeElement === first) { + event.preventDefault(); + last.focus(); + } else if (!event.shiftKey && document.activeElement === last) { + event.preventDefault(); + first.focus(); + } + }, options); + this.dialog.addEventListener('click', (event) => { + if (event.target.closest('a[data-cellife-choice]')) { + // Do not prevent default or alter normal/modified-link navigation. + const choice = event.target.closest('a[data-cellife-choice]').dataset.cellifeChoice; + this.selectedChoice = choice; + close(); + } + if (event.target === this.dialog) close(); + }, options); + window.addEventListener('pagehide', close, options); + window.addEventListener('pageshow', (event) => { if (event.persisted) close(); }, options); + window.addEventListener('storage', (event) => { + if (event.key === preferenceKey && event.newValue !== null) close(); + }, options); + + let internalReferrer = false; + try { internalReferrer = Boolean(document.referrer) && new URL(document.referrer).origin === location.origin; } catch { /* No usable referrer. */ } + const navigation = performance.getEntriesByType('navigation')[0]; + if (!firstEntry || internalReferrer || (navigation && navigation.type !== 'navigate') || window.Shopify?.designMode) return; + // Consume once even if the editor or another script reconnects the element. + firstEntry = false; + this.previousFocus = document.activeElement; + this.dialog.showModal(); + document.documentElement.classList.add('cellife-journey-modal-open'); + } + + disconnectedCallback() { + this.closeDialog?.(); + this.controller?.abort(); + this.controller = null; + } + }); +})(); diff --git a/config/settings_schema.json b/config/settings_schema.json index 7a7740cd097..3d5f890a434 100644 --- a/config/settings_schema.json +++ b/config/settings_schema.json @@ -1466,5 +1466,22 @@ "label": "t:settings_schema.customer_accounts.settings.customer_account_menu.label" } ] + }, + { + "name": "Cellife shopping journeys", + "settings": [ + { + "type": "page", + "id": "cellife_supplements_page", + "label": "Supplements landing page", + "info": "Assign a page using the page.supplements template. Unset defaults to /pages/supplements." + }, + { + "type": "page", + "id": "cellife_diagnostics_page", + "label": "Diagnostic Test Kits landing page", + "info": "Assign a page using page.diagnostic-test-kits. Unset defaults to /pages/diagnostic-test-kits." + } + ] } ] diff --git a/docs/DUAL_PATH_MILESTONE.md b/docs/DUAL_PATH_MILESTONE.md new file mode 100644 index 00000000000..7abe55bc117 --- /dev/null +++ b/docs/DUAL_PATH_MILESTONE.md @@ -0,0 +1,118 @@ +# Dual-path shopping milestone + +## Implementation plan + +Preserve the current Shopify-connected branch's homepage settings, hero, category +cards and product grid. Work only on `milestone/dual-path-shopping`; do not update +`cellife-rebuild`, upload a theme, change store menus/pages, or publish. + +1. Add an editable two-choice homepage gateway without replacing existing sections. +2. Add reusable landing introduction and collection-card sections, composed through + `page.supplements.json` and `page.diagnostic-test-kits.json`. +3. Add a persistent secondary shopping navigation to the existing header group; + use shared theme settings for both landing-page destinations. +4. Add a default-off homepage selection dialog. Use native dialog semantics, + keyboard dismissal/focus restoration and ordinary navigation links. Remember + selection/dismissal; never infer a destination or redirect automatically. +5. Validate desktop/mobile interactions, first/direct/return entries, Back, + disabled storage, no JavaScript, and missing media. Record limits honestly. + +## Resource evidence + +The public store navigation was inspected on 23 October 2026. Existing collection +destinations are `/collections/supplements`, `/collections/respiratory-tests`, +`/collections/respiratory-tests-copy` (Drug & Alcohol Tests), and +`/collections/womens-urinary-health`. These are retained exactly. No combined +diagnostics collection or new collection handle is assumed. + +New page URLs `/pages/supplements` and `/pages/diagnostic-test-kits` are proposed +page records, not claims that pages already exist. Templates alone do not create +Shopify page records. Before a future authorized preview, create those records +in a development store and assign the matching templates, or select other page +records under Theme settings → Cellife shopping journeys. No live records are +created in this milestone. + +## What was built + +- `cellife-journey-gateway`: two editable image/copy cards added after the existing + hero. Existing homepage section settings, content and relative order are retained. +- `cellife-landing-intro` and `cellife-journey-collections`: reusable OS 2.0 sections. + The Supplements page uses Dawn's existing featured collection with quick-add off; + Diagnostics uses the three existing diagnostic collection references. +- `cellife-journey-nav`: persistent secondary navigation in the header group, + visible on mobile and desktop without opening a menu. Existing menu entries stay + intact. Both navigation and gateway resolve through shared destination settings. +- A homepage-only native dialog, controlled by the gateway's **Enable first-visit + homepage overlay** checkbox. It defaults off and is suppressed in Theme Editor. + Copy, labels and imagery are editable. Buttons are ordinary links, not redirects. + +## Entry and persistence rules + +The navigation's deferred script records the first page in each browser tab using +session storage. The dialog is rendered only on the homepage, and opens only for +an initial homepage navigation with no same-site referrer, no saved choice/dismissal, +and an enabled setting. Product/collection entries followed by a Home click skip +the dialog, as do reloads and browser Back/Forward navigations. + +An explicit category selection is saved as `supplements` or `diagnostics` under +`cellife:journey:v1` in local storage; a dismissal is saved as `dismissed`. No health +answers, product details, identity or analytics are recorded. This preference stays +in that browser until storage is cleared. Another tab's saved preference closes an +open dialog. Clearing browser data can make the optional prompt eligible again. +No route changes occur without clicking a link; a saved preference never redirects. + +If local/session storage is unavailable, skip the overlay. With JavaScript disabled +the dialog stays hidden and gateway/navigation links remain functional. Unsupported +native dialog browsers also keep the normal links. Escape, visible dismissal and +backdrop dismissal are supported; Tab/Shift+Tab wrap within the dialog. Page exit +closes it, and browser Back does not restore an open modal or locked scrolling. +Event listeners are removed when the custom element is disconnected. + +## Isolated preview setup — not performed on the live store + +1. Connect **a new unpublished theme** to `milestone/dual-path-shopping` in an + authorized development store. Do not switch the existing live-connected branch. +2. Create page records for Supplements and Diagnostic Test Kits with the proposed + handles (or choose different handles). Assign the `supplements` and + `diagnostic-test-kits` page templates respectively. Shopify may only list custom + templates from its published theme; use a development store where this theme + can be published safely, or an authorized page template-assignment workflow. + Do not publish the production theme to make a template selectable. +3. Under **Theme settings → Cellife shopping journeys**, select those two pages. + Both the persistent navigation and gateway use these settings. Default links + require the proposed page records; they will be 404s until the records exist. +4. Verify/reselect the existing collections in the landing-page editor. The source + store's handles need matching collections in a separate development store. +5. Optionally enable the first-visit overlay in the homepage gateway. Test outside + the editor in a fresh browser context. Leave it off if the overlay is not desired. + +Theme code and schema are ready for those assignments; this milestone does not +pretend a JSON template creates a Shopify page or change shared store resources. + +## Validation record + +- Dependency-free JSON/embedded-schema validation: **113 documents passed**. +- JavaScript syntax check and whitespace check: passed. +- Structural comparison against the captured Shopify baseline: existing homepage + sections/settings and relative order are unchanged; only the gateway is added. + Both landing templates' section references resolve to repository files. +- Chromium interaction suite at **390px and 1440px**: initial homepage prompt, + focus wrapping, Escape dismissal, visible dismissal, selection, browser Back, + route switching, returning/new-tab visits, no automatic redirect, direct product + and collection entry, disabled overlay, and blocked storage. No runtime errors. +- **320px** reflow and no-JavaScript navigation checked. Missing-media placeholders + were used throughout. Desktop/mobile fixture screenshots were visually reviewed. + +Run the local interaction harness with Node and Playwright available: + +```sh +node tests/dual-path.cjs +``` + +If Playwright is provided outside this repository, set NODE_PATH to that installation. +The harness serves a local fixture using the production JavaScript, CSS, card and +dialog markup. It is **not a Shopify Liquid renderer**: its route responses stand +in for page records, and it does not validate real catalog output or checkout. +Actual Shopify Theme Check, server-side rendering, Theme Editor updates, real page +assignments and Safari/iOS testing remain pending authorized development-store +access. No live-theme upload, publication, menu edit or page creation was performed. diff --git a/sections/cellife-journey-collections.liquid b/sections/cellife-journey-collections.liquid new file mode 100644 index 00000000000..66955e1a17b --- /dev/null +++ b/sections/cellife-journey-collections.liquid @@ -0,0 +1,80 @@ +{{ 'cellife-journeys.css' | asset_url | stylesheet_tag }} +
+

{{ section.settings.heading | escape }}

+
+ {% for block in section.blocks %} + {% assign collection = block.settings.collection %} + {% if collection != blank %} + {% assign card_heading = block.settings.heading | default: collection.title %} + {% assign card_image = block.settings.image | default: collection.image %} +
{% render 'cellife-journey-card', image: card_image, number: forloop.index, heading: card_heading, text: block.settings.text, url: collection.url, label: block.settings.label %}
+ {% elsif request.design_mode %} +

Select an existing collection for this card.

+ {% endif %} + {% endfor %} +
+
+ +{% schema %} +{ + "name": "Cellife collection cards", + "enabled_on": { + "templates": [ + "page" + ] + }, + "settings": [ + { + "type": "text", + "id": "heading", + "label": "Heading", + "default": "Shop by category" + } + ], + "max_blocks": 6, + "blocks": [ + { + "type": "collection", + "name": "Collection card", + "settings": [ + { + "type": "collection", + "id": "collection", + "label": "Existing collection" + }, + { + "type": "image_picker", + "id": "image", + "label": "Optional image override" + }, + { + "type": "text", + "id": "heading", + "label": "Optional heading override" + }, + { + "type": "text", + "id": "text", + "label": "Description" + }, + { + "type": "text", + "id": "label", + "label": "Link label", + "default": "Explore range" + } + ] + } + ], + "presets": [ + { + "name": "Cellife collection cards", + "blocks": [ + { + "type": "collection" + } + ] + } + ] +} +{% endschema %} diff --git a/sections/cellife-journey-gateway.liquid b/sections/cellife-journey-gateway.liquid new file mode 100644 index 00000000000..76f8ea9fed8 --- /dev/null +++ b/sections/cellife-journey-gateway.liquid @@ -0,0 +1,133 @@ +{{ 'cellife-journeys.css' | asset_url | stylesheet_tag }} +{%- capture supplements_url -%}{%- render 'cellife-journey-url', journey: 'supplements' -%}{%- endcapture -%} +{%- capture diagnostics_url -%}{%- render 'cellife-journey-url', journey: 'diagnostics' -%}{%- endcapture -%} +
+

{{ section.settings.eyebrow | escape }}

{{ section.settings.heading | escape }}

{{ section.settings.text | escape }}

+
+ {% render 'cellife-journey-card', image: section.settings.supplements_image, number: '01', heading: section.settings.supplements_title, text: section.settings.supplements_text, url: supplements_url, label: section.settings.supplements_label, journey: 'supplements' %} + {% render 'cellife-journey-card', image: section.settings.diagnostics_image, number: '02', heading: section.settings.diagnostics_title, text: section.settings.diagnostics_text, url: diagnostics_url, label: section.settings.diagnostics_label, journey: 'diagnostics' %} +
+
+{% if section.settings.overlay_enabled and request.page_type == 'index' and request.design_mode == false %} + + +
+ +

{{ section.settings.overlay_heading | escape }}

+

{{ section.settings.overlay_text | escape }}

+ +
+
+
+{% endif %} + +{% schema %} +{ + "name": "Cellife journey gateway", + "limit": 1, + "enabled_on": { + "templates": [ + "index" + ] + }, + "settings": [ + { + "type": "text", + "id": "eyebrow", + "label": "Eyebrow", + "default": "TWO WAYS TO EXPLORE" + }, + { + "type": "text", + "id": "heading", + "label": "Heading", + "default": "What brings you to Cellife?" + }, + { + "type": "text", + "id": "text", + "label": "Introduction", + "default": "Choose a starting point. Both ranges are always available to explore." + }, + { + "type": "image_picker", + "id": "supplements_image", + "label": "Supplements image" + }, + { + "type": "text", + "id": "supplements_title", + "label": "Supplements heading", + "default": "Supplements" + }, + { + "type": "text", + "id": "supplements_text", + "label": "Supplements description", + "default": "Explore the Cellife supplement range." + }, + { + "type": "text", + "id": "supplements_label", + "label": "Supplements link label", + "default": "Explore supplements" + }, + { + "type": "image_picker", + "id": "diagnostics_image", + "label": "Diagnostic Test Kits image" + }, + { + "type": "text", + "id": "diagnostics_title", + "label": "Diagnostic Test Kits heading", + "default": "Diagnostic Test Kits" + }, + { + "type": "text", + "id": "diagnostics_text", + "label": "Diagnostic Test Kits description", + "default": "Browse respiratory, drug and alcohol, and women\u2019s and urinary health tests." + }, + { + "type": "text", + "id": "diagnostics_label", + "label": "Diagnostic Test Kits link label", + "default": "Explore diagnostic test kits" + }, + { + "type": "checkbox", + "id": "overlay_enabled", + "label": "Enable first-visit homepage overlay", + "info": "Only new homepage entries. Disabled in the Theme Editor. Choice or dismissal is remembered in this browser. Both pathways remain available below.", + "default": false + }, + { + "type": "text", + "id": "overlay_heading", + "label": "Overlay heading", + "default": "Where would you like to start?" + }, + { + "type": "text", + "id": "overlay_text", + "label": "Overlay description", + "default": "Explore supplements or diagnostic test kits. You can switch at any time." + }, + { + "type": "text", + "id": "dismiss_label", + "label": "Dismiss label", + "default": "Continue browsing" + } + ], + "presets": [ + { + "name": "Cellife journey gateway" + } + ] +} +{% endschema %} diff --git a/sections/cellife-journey-nav.liquid b/sections/cellife-journey-nav.liquid new file mode 100644 index 00000000000..a1d4e41803f --- /dev/null +++ b/sections/cellife-journey-nav.liquid @@ -0,0 +1,45 @@ +{{ 'cellife-journeys.css' | asset_url | stylesheet_tag }} + +{%- capture supplements_url -%}{%- render 'cellife-journey-url', journey: 'supplements' -%}{%- endcapture -%} +{%- capture diagnostics_url -%}{%- render 'cellife-journey-url', journey: 'diagnostics' -%}{%- endcapture -%} + + +{% schema %} +{ + "name": "Cellife journey navigation", + "limit": 1, + "enabled_on": { + "groups": [ + "header" + ] + }, + "settings": [ + { + "type": "text", + "id": "label", + "label": "Navigation label", + "default": "Shopping pathways" + }, + { + "type": "text", + "id": "supplements_label", + "label": "Supplements label", + "default": "Supplements" + }, + { + "type": "text", + "id": "diagnostics_label", + "label": "Diagnostics label", + "default": "Diagnostic Test Kits" + } + ], + "presets": [ + { + "name": "Cellife journey navigation" + } + ] +} +{% endschema %} diff --git a/sections/cellife-landing-intro.liquid b/sections/cellife-landing-intro.liquid new file mode 100644 index 00000000000..bbb2148c90c --- /dev/null +++ b/sections/cellife-landing-intro.liquid @@ -0,0 +1,46 @@ +{{ 'cellife-journeys.css' | asset_url | stylesheet_tag }} +
+

{{ section.settings.eyebrow | escape }}

+

{{ section.settings.heading | default: page.title | escape }}

+
{{ section.settings.text }}
+ {% if section.settings.image != blank %}{{ section.settings.image | image_url: width: 1800 | image_tag: widths: '600, 900, 1200, 1800', sizes: '100vw', loading: 'eager' }}{% endif %} +
+ +{% schema %} +{ + "name": "Cellife landing intro", + "enabled_on": { + "templates": [ + "page" + ] + }, + "settings": [ + { + "type": "text", + "id": "eyebrow", + "label": "Eyebrow", + "default": "EXPLORE CELLIFE" + }, + { + "type": "text", + "id": "heading", + "label": "Heading" + }, + { + "type": "richtext", + "id": "text", + "label": "Introduction" + }, + { + "type": "image_picker", + "id": "image", + "label": "Optional introductory image" + } + ], + "presets": [ + { + "name": "Cellife landing intro" + } + ] +} +{% endschema %} diff --git a/sections/header-group.json b/sections/header-group.json index d20087eb398..9d8ddac6ca8 100644 --- a/sections/header-group.json +++ b/sections/header-group.json @@ -45,10 +45,15 @@ "padding_top": 20, "padding_bottom": 20 } + }, + "cellife_journey_nav": { + "type": "cellife-journey-nav", + "settings": {} } }, "order": [ "announcement-bar", - "header" + "header", + "cellife_journey_nav" ] } diff --git a/snippets/cellife-journey-card.liquid b/snippets/cellife-journey-card.liquid new file mode 100644 index 00000000000..d74583ef2c2 --- /dev/null +++ b/snippets/cellife-journey-card.liquid @@ -0,0 +1,14 @@ +
+
+ {% if image != blank %} + {{ image | image_url: width: 1200 | image_tag: widths: '400, 600, 900, 1200', sizes: '(min-width: 750px) 45vw, 100vw', loading: 'lazy' }} + {% else %} + + {% endif %} +
+
+

{{ heading | escape }}

+ {% if text != blank %}

{{ text | escape }}

{% endif %} + {% if url != blank %}{{ label | escape }} {% endif %} +
+
diff --git a/snippets/cellife-journey-url.liquid b/snippets/cellife-journey-url.liquid new file mode 100644 index 00000000000..6ad2f299020 --- /dev/null +++ b/snippets/cellife-journey-url.liquid @@ -0,0 +1,15 @@ +{%- liquid + if journey == 'supplements' + if settings.cellife_supplements_page != blank + echo settings.cellife_supplements_page.url + else + echo routes.root_url | append: '/pages/supplements' | replace: '//', '/' + endif + else + if settings.cellife_diagnostics_page != blank + echo settings.cellife_diagnostics_page.url + else + echo routes.root_url | append: '/pages/diagnostic-test-kits' | replace: '//', '/' + endif + endif +-%} diff --git a/templates/index.json b/templates/index.json index c9b8496ce8c..b7b86ba9697 100644 --- a/templates/index.json +++ b/templates/index.json @@ -102,10 +102,17 @@ "padding_top": 44, "padding_bottom": 36 } + }, + "cellife_gateway": { + "type": "cellife-journey-gateway", + "settings": { + "overlay_enabled": false + } } }, "order": [ "cellife_hero", + "cellife_gateway", "cellife_pathways", "featured_collection" ] diff --git a/templates/page.diagnostic-test-kits.json b/templates/page.diagnostic-test-kits.json new file mode 100644 index 00000000000..1b9c22650d8 --- /dev/null +++ b/templates/page.diagnostic-test-kits.json @@ -0,0 +1,52 @@ +{ + "sections": { + "intro": { + "type": "cellife-landing-intro", + "settings": { + "heading": "Diagnostic Test Kits", + "text": "

Explore test kits by category. Read the intended use, instructions and limitations on each product page.

" + } + }, + "categories": { + "type": "cellife-journey-collections", + "blocks": { + "category_0": { + "type": "collection", + "settings": { + "collection": "respiratory-tests", + "heading": "Respiratory tests", + "label": "Explore range" + } + }, + "category_1": { + "type": "collection", + "settings": { + "collection": "respiratory-tests-copy", + "heading": "Drug & alcohol tests", + "label": "Explore range" + } + }, + "category_2": { + "type": "collection", + "settings": { + "collection": "womens-urinary-health", + "heading": "Women\u2019s & urinary health", + "label": "Explore range" + } + } + }, + "block_order": [ + "category_0", + "category_1", + "category_2" + ], + "settings": { + "heading": "Find your test category" + } + } + }, + "order": [ + "intro", + "categories" + ] +} diff --git a/templates/page.supplements.json b/templates/page.supplements.json new file mode 100644 index 00000000000..f1e246f1536 --- /dev/null +++ b/templates/page.supplements.json @@ -0,0 +1,30 @@ +{ + "sections": { + "intro": { + "type": "cellife-landing-intro", + "settings": { + "heading": "Supplements", + "text": "

Explore the Cellife supplement range. Find product details and directions on each product page.

" + } + }, + "products": { + "type": "featured-collection", + "settings": { + "title": "Explore supplements", + "collection": "supplements", + "products_to_show": 8, + "columns_desktop": 4, + "columns_mobile": "2", + "show_view_all": true, + "show_vendor": false, + "quick_add": "none", + "padding_top": 32, + "padding_bottom": 48 + } + } + }, + "order": [ + "intro", + "products" + ] +} diff --git a/tests/dual-path.cjs b/tests/dual-path.cjs new file mode 100644 index 00000000000..f385bf08aa9 --- /dev/null +++ b/tests/dual-path.cjs @@ -0,0 +1,146 @@ +/* Interaction harness for production JS/CSS and dialog markup. Not a Liquid renderer. + Run: NODE_PATH= node tests/dual-path.cjs + Shopify rendering and Theme Editor tests require an unpublished development theme. */ +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); +const http = require('node:http'); +const { chromium } = require('playwright'); +const root = path.resolve(__dirname, '..'); +const read = (p) => fs.readFileSync(path.join(root, p), 'utf8'); +const gateway = read('sections/cellife-journey-gateway.liquid'); +const schema = JSON.parse(gateway.split('{% schema %}')[1].split('{% endschema %}')[0]); +const defaults = Object.fromEntries(schema.settings.map(s => [s.id, s.default || ''])); +const supplements = '/pages/supplements'; +const diagnostics = '/pages/diagnostic-test-kits'; +function substitute(html, values = {}) { + return html.replace(/{{\s*(.*?)\s*}}/g, (_, key) => { + key = key.split('|')[0].trim(); + if (key.startsWith('section.settings.')) return defaults[key.slice(17)]; + return ({'section.id':'test', supplements_url:supplements, diagnostics_url:diagnostics, ...values})[key] || ''; + }); +} +const dialog = substitute(gateway.slice(gateway.indexOf(''), gateway.indexOf('') + ''.length)); +function card(title, href, choice, number) { + let source = read('snippets/cellife-journey-card.liquid'); + source = source.replace(/{% if image != blank %}[\s\S]*?{% else %}([\s\S]*?){% endif %}/, '$1'); + source = source.replace(/{%[^%]*%}/g, ''); + return substitute(source, {heading:title, url:href, journey:choice, number, text:defaults[choice === 'supplements' ? 'supplements_text' : 'diagnostics_text'], label:`Explore ${title.toLowerCase()}`}); +} +function fixture(url) { + const isHome = url.pathname === '/'; + const isSupplements = url.pathname === supplements; + const isDiagnostics = url.pathname === diagnostics; + let nav = read('sections/cellife-journey-nav.liquid'); + nav = nav.slice(nav.indexOf('') + 6); + nav = nav.replace(/{% if request.path == (\w+) %}([\s\S]*?){% endif %}/g, (_, name, content) => url.pathname === (name === 'supplements_url' ? supplements : diagnostics) ? content : ''); + nav = substitute(nav, {'section.settings.label':'Shopping pathways'}).replace('aria-label=""', 'aria-label="Shopping pathways"'); + // Nav defaults come from its own schema, not the gateway schema. + nav = nav.replace(/>Explore supplementsSupplements<').replace(/>Explore diagnostic test kitsDiagnostic Test Kits<'); + const heading = isHome ? 'Cellife homepage' : isSupplements ? 'Supplements' : isDiagnostics ? 'Diagnostic Test Kits' : 'Direct catalog visit'; + const content = isHome ? `

${defaults.eyebrow}

${defaults.heading}

${defaults.text}

${card('Supplements', supplements, 'supplements', '01')}${card('Diagnostic Test Kits', diagnostics, 'diagnostics', '02')}
` : `

${heading}

HomeExplore range
`; + return `${heading}${nav}
${content}
${isHome && url.searchParams.get('overlay') !== 'off' ? dialog : ''}`; +} +const server = http.createServer((req, res) => { + const url = new URL(req.url, 'http://localhost'); + if (['/assets/cellife-journeys.css','/assets/cellife-journeys.js'].includes(url.pathname)) { + res.setHeader('Content-Type', url.pathname.endsWith('.js') ? 'text/javascript' : 'text/css'); + return res.end(read(url.pathname.slice(1))); + } + res.setHeader('Content-Type', 'text/html'); + res.end(fixture(url)); +}); +(async () => { + await new Promise(resolve => server.listen(0, '127.0.0.1', resolve)); + const base = `http://127.0.0.1:${server.address().port}`; + const browser = await chromium.launch({executablePath:process.env.CHROMIUM_PATH || '/usr/bin/chromium', args:['--no-sandbox']}); + const errors = []; + const newPage = async (width, options = {}) => { + const context = await browser.newContext({viewport:{width,height:900}, ...options}); + const page = await context.newPage(); + page.on('pageerror', error => errors.push(error.message)); + return page; + }; + const open = async page => page.locator('dialog').evaluate(d => d.open); + try { + for (const width of [390,1440]) { + let page = await newPage(width); + await page.goto(base); + await page.waitForSelector('dialog[open]'); + if (process.env.SCREENSHOT_DIR) { fs.mkdirSync(process.env.SCREENSHOT_DIR, {recursive:true}); await page.screenshot({path:path.join(process.env.SCREENSHOT_DIR, `dialog-${width}.png`), fullPage:true}); } + assert(await open(page), 'first homepage entry opens enabled dialog'); + await page.keyboard.press('Shift+Tab'); + assert(await page.evaluate(() => Boolean(document.activeElement.closest('dialog'))), 'native focus trap'); + await page.keyboard.press('Escape'); + await page.waitForFunction(() => !document.querySelector('dialog').open); + assert.equal(await page.evaluate(() => localStorage.getItem('cellife:journey:v1')), 'dismissed'); + await page.reload(); + assert.equal(await open(page), false, 'return/reload does not interrupt'); + if (process.env.SCREENSHOT_DIR) await page.screenshot({path:path.join(process.env.SCREENSHOT_DIR, `gateway-${width}.png`), fullPage:true}); + await page.context().close(); + + page = await newPage(width); + await page.goto(base); + await page.waitForSelector('dialog[open]'); + await page.locator('dialog a[data-cellife-choice="supplements"]').click(); + await page.waitForURL(base+supplements); + assert.equal(await page.evaluate(() => localStorage.getItem('cellife:journey:v1')), 'supplements'); + assert.equal(await page.locator('nav a[aria-current="page"]').count(), 1); + const returningTab = await page.context().newPage(); + await returningTab.goto(base); + assert.equal(await open(returningTab), false, 'saved choice suppresses a new-tab homepage visit'); + assert.equal(new URL(returningTab.url()).pathname, '/', 'saved preference never redirects'); + await returningTab.close(); + await page.goBack(); + assert.equal(await open(page), false, 'Back does not reopen dialog'); + await page.locator('.cellife-journeys a[data-cellife-choice="diagnostics"]').click(); + await page.waitForURL(base+diagnostics); + assert.equal(await page.locator('h1').innerText(), 'Diagnostic Test Kits'); + assert.equal(await page.locator('nav a').count(),2); + await page.context().close(); + + for (const direct of ['/products/sample','/collections/supplements']) { + page = await newPage(width); + await page.goto(base+direct); + assert.equal(await page.locator('dialog').count(),0); + await page.getByRole('link',{name:'Home',exact:true}).click(); + assert.equal(await open(page), false, 'internal homepage visit skips overlay'); + await page.context().close(); + } + page = await newPage(width); + await page.goto(base); + await page.waitForSelector('dialog[open]'); + await page.locator('[data-cellife-dismiss]').click(); + assert.equal(await open(page), false, 'visible dismiss button works'); + assert.equal(await page.evaluate(() => document.documentElement.classList.contains('cellife-journey-modal-open')), false, 'dismiss restores scrolling'); + await page.context().close(); + + page = await newPage(width); + await page.goto(base+'/?overlay=off'); + assert.equal(await page.locator('dialog').count(),0,'disabled overlay absent'); + assert(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth),'no horizontal overflow'); + await page.context().close(); + + page = await newPage(width); + await page.addInitScript(() => { Storage.prototype.getItem = () => { throw Error('Storage unavailable'); }; }); + await page.goto(base); + assert.equal(await open(page),false,'blocked storage skips dialog'); + await page.locator('nav a').first().click(); + await page.waitForURL(base+supplements); + await page.context().close(); + console.log(`PASS ${width}px: first/return/direct visits, focus, Escape, choice, Back, switching, disabled overlay, blocked storage`); + } + const page = await newPage(320,{javaScriptEnabled:false}); + await page.goto(base); + assert.equal(await open(page),false,'no-JS dialog hidden'); + assert(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth),'320px reflow'); + await page.locator('nav a').last().click(); + await page.waitForURL(base+diagnostics); + await page.context().close(); + assert.deepEqual(errors,[],'no JavaScript errors'); + console.log('PASS no JavaScript: native navigation; PASS 320px reflow; no runtime errors'); + } finally { + await browser.close(); + server.close(); + } +})().catch(error => { console.error(error); server.close(); process.exitCode=1; }); From 504b6af2e5ec4b73f7b9d37e114ba122ec6056d5 Mon Sep 17 00:00:00 2001 From: Miller W <59322226+cremechese@users.noreply.github.com> Date: Fri, 23 Oct 2026 11:59:59 +1100 Subject: [PATCH 008/151] Enable first-visit homepage pathway selection overlay --- templates/index.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/index.json b/templates/index.json index b7b86ba9697..52a2d24af3b 100644 --- a/templates/index.json +++ b/templates/index.json @@ -106,7 +106,7 @@ "cellife_gateway": { "type": "cellife-journey-gateway", "settings": { - "overlay_enabled": false + "overlay_enabled": true } } }, From 6ca5b590ba563567e4e448be9c4749cd3ea56b50 Mon Sep 17 00:00:00 2001 From: Miller W <59322226+cremechese@users.noreply.github.com> Date: Fri, 23 Oct 2026 12:04:56 +1100 Subject: [PATCH 009/151] Load journey overlay script independently of header section settings --- layout/theme.liquid | 1 + sections/cellife-journey-nav.liquid | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/theme.liquid b/layout/theme.liquid index 43aeb6ddb6d..248d7121ea8 100644 --- a/layout/theme.liquid +++ b/layout/theme.liquid @@ -319,6 +319,7 @@ document.documentElement.classList.add('shopify-design-mode'); } + diff --git a/sections/cellife-journey-nav.liquid b/sections/cellife-journey-nav.liquid index a1d4e41803f..a9fdc7330dc 100644 --- a/sections/cellife-journey-nav.liquid +++ b/sections/cellife-journey-nav.liquid @@ -1,5 +1,4 @@ {{ 'cellife-journeys.css' | asset_url | stylesheet_tag }} - {%- capture supplements_url -%}{%- render 'cellife-journey-url', journey: 'supplements' -%}{%- endcapture -%} {%- capture diagnostics_url -%}{%- render 'cellife-journey-url', journey: 'diagnostics' -%}{%- endcapture -%}