diff --git a/source/_examples/pricing.html.twig b/source/_examples/pricing.html.twig new file mode 100644 index 0000000..6c4a090 --- /dev/null +++ b/source/_examples/pricing.html.twig @@ -0,0 +1,80 @@ +--- +title: Pricing +prices: + - name: Full + price: 0 + features: + - 10 users included + - 2 GB of storage + - Email support + - Help center access + button: + text: Sign up for free + inverted: true + - name: Pro + price: 15 + features: + - 20 users included + - 10 GB of storage + - Priority email support + - Help center access + button: + text: Get started + - name: Enterprise + price: 29 + features: + - 30 users included + - 15 GB of storage + - Phone and email support + - Help center access + button: + text: Contact us +--- + +
+
+

{{ page.title }}

+ +

Quickly build an effective pricing table for your potential customers with this Bootstrap example. It's built with default Bootstrap components and utilities with little customization.

+
+
+ +
+ {% for price in page.prices %} +
+

+ {{ price.name }} +

+ +
+

+ {{ price.price }} + + / month + +

+ +
+

Features

+ +
    + {% for feature in price.features %} +
  • {{ feature }}
  • + {% endfor %} +
+
+ +
+ {% include 'button' with { + inverted: price.button.inverted, + shape: 'rounded', + size: 'large', + text: price.button.text, + type: 'primary' + } only %} +
+
+
+ {% endfor %} +
+ diff --git a/source/_includes/button.html.twig b/source/_includes/button.html.twig new file mode 100644 index 0000000..4813298 --- /dev/null +++ b/source/_includes/button.html.twig @@ -0,0 +1,11 @@ +{% set classes = [ + 'block border transition-colors ease-in-out duration-200', + shape == "rounded" ? "rounded-md", + shape == "square" ? "rounded-none", + size == 'large' ? "py-3 px-5 text-xl" : "py-2 px-5 text-lg", + type == "primary" and not inverted ? "bg-blue-500 border-blue-500 text-white hocus:bg-blue-600 hocus:text-white", + type == "primary" and inverted ? "bg-white border-blue-500 text-blue-600 hocus:bg-blue-600 hocus:text-white", + type == "secondary" ? "bg-gray-500 text-white hocus:bg-gray-600 hocus:text-white", +] %} + +{{ text }}