File tree Expand file tree Collapse file tree 2 files changed +25
-17
lines changed
Expand file tree Collapse file tree 2 files changed +25
-17
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ <h1 class="ui medium header">
3636
3737 {% call pricing.plan(
3838 name="Advanced plan",
39- price= "$150",
39+ price_details=[( "$150", "per month")] ,
4040 color="violet",
4141 highlight=True,
4242 ) %}
@@ -54,7 +54,7 @@ <h1 class="ui medium header">
5454
5555 {% call pricing.plan(
5656 name="Pro plan",
57- price= "$250",
57+ price_details=[( "$250", "per month")] ,
5858 color="violet",
5959 ) %}
6060 < div class ="ui list relaxed divided ">
@@ -155,7 +155,10 @@ <h2 class="ui small monospace center aligned header">
155155
156156 {% call pricing.plan(
157157 name="Gold membership",
158- price="$5",
158+ price_details=[
159+ ("$5", "per month for individuals"),
160+ ("$50", "per month for companies"),
161+ ],
159162 color="teal",
160163 ) %}
161164 < div class ="ui list relaxed divided ">
Original file line number Diff line number Diff line change 88{#
99 Main plan block for commercial/community plan cards
1010#}
11- {% macro plan(name, price, color="teal", highlight=False) %}
12- < div class ="{% if not price %} computer only {%- endif %} column ">
13- < div class ="ui {%- if price %} raised {{ color }} {%- else %} basic {%- endif %} segment ">
11+ {% macro plan(name, price_details, color="teal", highlight=False) %}
12+ {% set _has_price = price_details | length > 0 %}
13+ < div class ="{% if not _has_price %} computer only {%- endif %} column ">
14+ < div class ="ui {%- if _has_price %} raised {{ color }} {%- else %} basic {%- endif %} segment ">
1415
1516 < h2 class ="ui small monospace center aligned header ">
1617 {{ name }}
1718 </ h2 >
1819
19- {% if price %}
20- < div class ="ui horizontally fitted basic small segment ">
21- < div class ="ui tiny center aligned one statistics ">
22- < div class ="statistic ">
23- < div class ="value ">
24- {{ price }}
25- </ div >
26- < div class ="label ">
27- < span class ="category "> per month</ span >
28- </ div >
20+ {% if price_details %}
21+ {% for value, label in price_details %}
22+ < div class ="ui horizontally fitted basic small segment ">
23+ < div class ="ui tiny center aligned one statistics ">
24+ < div class ="statistic ">
25+ < div class ="value ">
26+ {{ value }}
27+ </ div >
28+ {% if label %}
29+ < div class ="label ">
30+ < span class ="category "> {{ label }}</ span >
31+ </ div >
32+ {% endif %}
33+ </ div >
2934 </ div >
3035 </ div >
31- </ div >
36+ {% endfor %}
3237 {% endif %}
3338
3439 {{ caller() }}
You can’t perform that action at this time.
0 commit comments