diff --git a/views/home.php b/views/home.php new file mode 100644 index 0000000..d0f4cf5 --- /dev/null +++ b/views/home.php @@ -0,0 +1,57 @@ +
+
+
+ Independent goods, fairly priced +

A small shop with a big appetite for good things.

+

Bazaar is a demo storefront running on a hand-rolled PHP microframework - real catalog, session cart, Stripe checkout and an admin back office. Browse the shelves.

+ +
+
+
+ +
+
+
+
+

Fresh on the shelves

+

The latest additions to the catalog.

+
+ View all → +
+ + +
+

No products yet. Seed the database or add one from the admin panel.

+
+ +
+ + renderPartial('partials.productCard', ['product' => $product, 'currency' => $currency]) ?> + +
+ +
+
+ + +
+
+
+

Shop by department

+
+
+ + + + · + + +
+
+
+ diff --git a/views/layout.php b/views/layout.php new file mode 100644 index 0000000..a8307cf --- /dev/null +++ b/views/layout.php @@ -0,0 +1,71 @@ + + + + + + <?= e($title ?? 'Bazaar - a small good shop') ?> + + + + + + + +
+ $message): ?> +
+ +
+ + +
+ +
+ + + + diff --git a/views/partials/productCard.php b/views/partials/productCard.php new file mode 100644 index 0000000..2cfb51b --- /dev/null +++ b/views/partials/productCard.php @@ -0,0 +1,58 @@ + +
+ +
+ + <?= e($product['name']) ?> + + + +
+
+
+ + + + + + 0): ?> +
+ + () +
+ + +
+ + 0 && $priceFromCents !== (int) $product['priceCents']): ?>from + + + + Sold out + + Only left + + In stock + +
+ + +
+ + + +
+ +
+