42 lines
985 B
Text
42 lines
985 B
Text
---
|
|
layout: ~/layouts/PageLayout.astro
|
|
title: Products and Services
|
|
---
|
|
|
|
import priceFormatter from "~/price-formatter";
|
|
import products from "~/products.yaml";
|
|
|
|
<div class="space-y-12">
|
|
{products.map((product) => (
|
|
<article>
|
|
<h3>
|
|
{product.title} - <> </>
|
|
{product.price
|
|
? (
|
|
<>
|
|
{product.isFrom && (<>from </>)}
|
|
{priceFormatter.format(product.price)}
|
|
{product.perMonth && (<> per month</>)}
|
|
</>
|
|
)
|
|
: 'free!'
|
|
}
|
|
</h3>
|
|
|
|
<div>
|
|
<p>
|
|
{product.description}
|
|
|
|
{product.remainingPlaces
|
|
? (<> <strong>{product.remainingPlaces} places remaining!</strong></>)
|
|
: product.isLimited && (<> <strong>Limited places available!</strong></>)
|
|
}
|
|
</p>
|
|
</div>
|
|
|
|
<footer>
|
|
<a href={product.link.href}>{product.link.text} →</a>
|
|
</footer>
|
|
</article>
|
|
))}
|
|
</div>
|