|
1 | 1 | {% set feature_one %} |
2 | 2 | {% block feature_one %} |
3 | | - <div class="c-ground-nav__feature-inner o-rhythm o-rhythm--condensed"> |
4 | | - <div class="o-rhythm o-rhythm--compact"> |
5 | | - {% embed '@cloudfour/components/heading/heading.twig' with { |
6 | | - "tag_name": "h2", |
7 | | - "level": 1, |
8 | | - "weight": "light" |
9 | | - } only %} |
10 | | - {% block content %} |
11 | | - Nice to meet you |
12 | | - {% endblock %} |
13 | | - {% endembed %} |
14 | | - <p> |
15 | | - Cloud Four helps every day. |
16 | | - </p> |
17 | | - </div> |
18 | | - {% embed '@cloudfour/objects/button-group/button-group.twig' only %} |
19 | | - {% block content %} |
20 | | - {% include '@cloudfour/components/button/button.twig' with { |
21 | | - label: 'See our work', |
22 | | - class: 'c-button--secondary' |
23 | | - } only %} |
24 | | - {% include '@cloudfour/components/button/button.twig' with { |
25 | | - label: 'Get in touch', |
26 | | - class: 'c-button--secondary' |
27 | | - } only %} |
28 | | - {% endblock %} |
29 | | - {% endembed %} |
30 | | - </div> |
31 | 3 | {% endblock %} |
32 | 4 | {% endset %} |
33 | 5 |
|
34 | 6 | {% set feature_two %} |
35 | 7 | {% block feature_two %} |
36 | | - <form class="c-ground-nav__feature-inner o-rhythm o-rhythm--condensed" action="#"> |
37 | | - <div class="o-rhythm o-rhythm--compact"> |
38 | | - {% embed '@cloudfour/components/heading/heading.twig' with { |
39 | | - "tag_name": "h2", |
40 | | - "level": 1, |
41 | | - "weight": "light" |
42 | | - } only %} |
43 | | - {% block content %} |
44 | | - Cloud Four, in your inbox |
45 | | - {% endblock %} |
46 | | - {% endembed %} |
47 | | - <p> |
48 | | - Our latest articles, updates, quick tips and insights in one |
49 | | - convenient, occasional newsletter. |
50 | | - </p> |
51 | | - </div> |
52 | | - {% embed '@cloudfour/objects/input-group/input-group.twig' only %} |
53 | | - {% block content %} |
54 | | - {% include '@cloudfour/components/input/input.twig' with { |
55 | | - placeholder: 'Your Email', |
56 | | - type: 'email', |
57 | | - } only %} |
58 | | - {% include '@cloudfour/components/button/button.twig' with { |
59 | | - label: 'Sign up' |
60 | | - } only %} |
61 | | - {% endblock %} |
62 | | - {% endembed %} |
63 | | - </form> |
64 | 8 | {% endblock %} |
65 | 9 | {% endset %} |
66 | 10 |
|
|
73 | 17 | {% endblock %} |
74 | 18 | {% endset %} |
75 | 19 |
|
76 | | -<footer class="c-ground-nav {% if alternate %}c-ground-nav--alternate{% endif %}"> |
| 20 | +<footer |
| 21 | + class="c-ground-nav |
| 22 | + {% if alternate %}c-ground-nav--alternate{% endif %} |
| 23 | + {% if feature_count == 1 %}c-ground-nav--single-feature{% endif %}" |
| 24 | +> |
| 25 | + |
| 26 | + {# |
| 27 | + A note to future devs: |
| 28 | + Looking at this code, you may be tempted to simplify. You may think, |
| 29 | + surely `c-ground-nav__features-inner` could move up a level to save a div, |
| 30 | + or similar changes. Trust me, I've tried. The three outer containers are |
| 31 | + needed to keep the layout in alignment with other containers on the page. |
| 32 | + The features and their wrapper need to be nested inside so they can be |
| 33 | + centered and behave appropriately when there's only one feature. |
| 34 | + Modify at your own risk, and test thoroughly. |
| 35 | + #} |
77 | 36 | {% if feature_count > 0 %} |
78 | 37 | <div class="c-ground-nav__features o-container o-container--pad-inline"> |
79 | | - <div class="c-ground-nav__features-layout o-container__content"> |
80 | | - <div class="c-ground-nav__features-inner t-dark o-container__fill"> |
81 | | - <div class="c-ground-nav__feature o-container__pad |
82 | | - {% if feature_count > 1 %}t-alternate{% endif %}"> |
83 | | - {{ feature_one }} |
84 | | - </div> |
85 | | - {% if feature_count > 1 %} |
86 | | - <div class="c-ground-nav__feature o-container__pad"> |
87 | | - {{ feature_two }} |
| 38 | + <div class="o-container__content"> |
| 39 | + <div class="o-container__fill"> |
| 40 | + <div class="c-ground-nav__features-inner t-dark"> |
| 41 | + <div class="c-ground-nav__feature {% if feature_count > 1 %}t-alternate{% endif %}"> |
| 42 | + {{ feature_one }} |
88 | 43 | </div> |
89 | | - {% endif %} |
| 44 | + {% if feature_count > 1 %} |
| 45 | + <div class="c-ground-nav__feature"> |
| 46 | + {{ feature_two }} |
| 47 | + </div> |
| 48 | + {% endif %} |
| 49 | + </div> |
90 | 50 | </div> |
91 | 51 | </div> |
92 | 52 | </div> |
|
0 commit comments