Skip to content
HTML Templates For Developers

Documentation

Greenbasket — Grocery Store Template

Version 1.0.0 · Vanilla HTML · 11 files · 77 KB

Back to the template

Getting started

  1. Unzip the download and open index.html in a browser. No server, installation or build step is needed.
  2. Edit the text directly in the HTML files.
  3. Change colours, fonts and spacing through the CSS custom properties at the top of assets/css/style.css.
  4. Replace the artwork in assets/images/ with your own images.
  5. Upload the whole folder to any static host.

File structure

The download contains these 11 files:

  • LICENSE.txt1.7 KB
  • README.md2.7 KB
  • assets/css/style.css22 KB
  • assets/fonts/nunito-LICENSE.txt4.4 KB
  • assets/fonts/nunito-latin-wght-normal.woff238 KB
  • assets/images/favicon.svg329 B
  • assets/js/main.js18 KB
  • documentation/index.html11 KB
  • documentation/licenses/lucide-LICENSE.txt3.1 KB
  • index.html32 KB
  • shop.html58 KB

Colours

These custom properties are defined at the top of the stylesheet. Change a value once and it updates everywhere it is used.

  • --green#2b8a3e
  • --green-deep#1b4332
  • --green-soft#d3f9d8
  • --yellow#ffd43b
  • --yellow-soft#fff3bf
  • --cream#fffbea
  • --tomato#c92a2a
  • --ink#1b4332
  • --muted#4d6558
  • --line#1b4332

Interactive features

Catalogue

Edit the PRODUCTS array at the top of assets/js/main.js, then duplicate or edit the matching article.gcard in index.html and shop.html (the data-id must match). Product art lives in the SVG sprite at the top of each page.

Free delivery and fees

Set FREE_DELIVERY and DELIVERY_FEE at the top of main.js. The meter, subtotal and totals all read from these values.

Delivery slots

Edit SLOT_TIMES for the windows and isFull() to decide which are full. In production, replace isFull() with availability from your server.

Recipe button

The data-recipe attribute holds a comma-separated list of product ids. Change it to build a different recipe.

Customisation notes

Change the palette

Edit the green, yellow, cream and tomato tokens at the top of assets/css/style.css. Aisle tile colours are the .tile--veg to .tile--drinks rules.

Add an aisle

Add a key to AISLES in main.js, a button in the #aisles list on shop.html and a matching .tile--key background colour.

Basket storage

The basket and chosen slot are saved in localStorage under greenbasket-cart and greenbasket-slot, with an in-memory fallback if storage is blocked.

What is front-end only

This is a front-end template. The behaviours below are demonstrations that run in the browser; connect them to your own server or service before relying on them.

  • Checkout is a demonstration: it confirms the basket and slot but takes no payment and places no order.
  • The postcode check accepts any valid-looking postcode and stores nothing.
  • Slot availability is generated from the current date; every fourth window is marked full.
  • Products, prices and stock are fictional.

Bundled components and licences

Everything the template needs is inside the download; nothing is loaded from the network.

  • Nunito typeface — OFL-1.1 (assets/fonts/nunito-LICENSE.txt)
  • Lucide icons (inlined SVG) — ISC (documentation/licenses/lucide-LICENSE.txt)

Changelog

Version 1.0.0 · Nov 24, 2026

  • Initial release.