summaryrefslogtreecommitdiff
path: root/examples/ssr/src/pages/index.astro
blob: 8eb04ffa62104d70663e6d1da1a4543fb34667fd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
import Header from '../components/Header.astro';
import Container from '../components/Container.astro';
import ProductListing from '../components/ProductListing.astro';
import { getProducts } from '../api';
import '../styles/common.css';

const products = await getProducts(Astro.request);
---
<html>
<head>
	<title>Online Store</title>
	<style>
		h1 {
			font-size: 36px;
		}

		.product-listing-title {
			text-align: center;
		}

		.product-listing {

		}
	</style>
</head>
<body>
	<Header />

	<Container tag="main">
		<ProductListing products={products} class="product-listing">
			<h2 class="product-listing-title" slot="title">Product Listing</h2>
		</ProductListing>
	</Container>
</body>
</html>