summaryrefslogtreecommitdiff
path: root/_layouts/landing.html
blob: 306067b2b14bc8ff9df2c7a55faaea7c5940b3ee (plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
---
layout: page
header: false
full_width: true
article_header:
  type: overlay
  align: center
  height: 80vh
---
<div class="layout--landing">
  <div class="heros">
  {%- for _section in page.data.sections -%}
    {%- include snippets/get-nav-url.html path=_section.background_image.src -%}
    {%- assign _url = __return -%}
    {%- if _section.theme == 'light' -%}
      <section class="hero hero--center hero--light" id="hero-{{ forloop.index }}"
    {%- elsif _section.theme == 'dark' -%}
      <section class="hero hero--center hero--dark" id="hero-{{ forloop.index }}"
    {%- else -%}
      <section class="hero hero--center" id="hero-{{ forloop.index }}"
    {%- endif -%}
    {%- if _section.background_color -%}
        style="background-image: url({{ _url }}); background-color: {{ _section.background_color }};">
    {%- else -%}
        style="background-image: url({{ _url }});">
    {%- endif -%}

        <div class="hero__content">
          <div class="mb-5">

            <h3>{{ _section.title }}</h3>
              {%- if _section.excerpt-%}
            <p>{{ _section.excerpt }}</p>
            {%- endif -%}

            {%- if _section.actions -%}
              <ul class="menu">
              {%- for _action in _section.actions -%}
                {%- include snippets/get-nav-url.html path=_action.url -%}
                {%- assign _url = __return -%}
                {%- assign _type = _action.type | default: 'outline-info' -%}
                <li><a class="button button--{{ _type }} button--pill button--lg" href="{{ _url }}">{{ _action.text }}</a></li>
              {%- endfor -%}
              </ul>
            {%- endif -%}

          </div>

          {%- if _section.children -%}
            {%- assign _size = _section.children | size  -%}
            <div class="grid--container">
              <div class="grid grid--p-3">

                {%- for child in _section.children -%}

                  {%- if _size >= 2 -%}
                    {%- assign _cell_md_col = 6 -%}
                  {%- else -%}
                    {%- assign _cell_md_col = 12 | divided_by: _size -%}
                  {%- endif -%}

                  {%- if _size >= 4 -%}
                    {%- assign _cell_lg_col = 3 -%}
                  {%- else -%}
                    {%- assign _cell_lg_col = 12 | divided_by: _size -%}
                  {%- endif -%}

                  <div class="cell cell--12 cell--md-{{ _cell_md_col }} cell--lg-{{ _cell_lg_col }} ">

                    <div class="mb-5">
                      <h4>{{ child.title }}</h4>

                      {%- if child.excerpt-%}
                        <p>{{ child.excerpt }}</p>
                      {%- endif -%}

                      {%- if child.actions -%}
                        <ul class="menu">
                          {%- for _action in child.actions -%}
                            {%- include snippets/get-nav-url.html path=_action.url -%}
                            {%- assign _url = __return -%}
                            {%- assign _type = _action.type | default: 'outline-info' -%}
                            <li><a class="button button--{{ _type }} button--pill button--lg" href="{{ _url }}">{{ _action.text }}</a></li>
                          {%- endfor -%}
                        </ul>
                      {%- endif -%}
                    </div>

                    {%- if child.image and child.image.src -%}

                      {%- if child.image.url -%}
                        {%- include snippets/get-nav-url.html path=child.image.url -%}
                        {%- assign _item_image_url = __return -%}
                      {%- else -%}
                        {%- assign _item_image_url = nil -%}
                      {%- endif -%}

                      {%- include snippets/get-nav-url.html path=child.image.src -%}
                      {%- assign _item_image_src = __return -%}

                      {%- if child.image.is_row -%}
                        <div class="mb-5">
                      {%- endif -%}
                          <div class="mx-auto" style="{{ child.image.style }}">
                      {%- if _item_image_url -%}
                            <a href="{{ _item_image_url }}">
                      {%- endif -%}
                              <img src="{{ _item_image_src }}"/>
                      {%- if _item_image_url -%}
                            </a>
                      {%- endif -%}
                          </div>
                      {%- if child.image.is_row -%}
                        </div>
                      {%- endif -%}
                    {%- endif -%}

                    {%- if child.content-%}
                      <p>{{ child.content }}</p>
                    {%- endif -%}

                  </div>
                {%- endfor-%}

              </div>
            </div>
          {%- endif -%}

      {%- if _section.image.full_width == true -%}
        </div> {% comment %} end hero__content {% endcomment %}
      {%- endif -%}

          {%- if _section.image and _section.image.src -%}

            {%- if _section.image.url -%}
              {%- include snippets/get-nav-url.html path=_section.image.url -%}
              {%- assign _section_image_url = __return -%}
            {%- else -%}
              {%- assign _section_image_url = nil -%}
            {%- endif -%}

            {%- include snippets/get-nav-url.html path=_section.image.src -%}
            {%- assign _section_image_src = __return -%}

            {%- if _section.image.is_row -%}
              <div class="mb-5">
            {%- endif -%}
                <div class="mx-auto" style="{{ _section.image.style }}">
            {%- if _section_image_url -%}
                  <a href="{{ _section_image_url }}">
            {%- endif -%}
                    {%- if _section.image.full_width == true -%}
                      <img class="hero__cover hero__cover--full-width" src="{{ _section_image_src }}"/>
                    {%- else -%}
                      <img class="hero__cover" src="{{ _section_image_src }}"/>
                    {%- endif -%}
            {%- if _section_image_url -%}
                  </a>
            {%- endif -%}
                </div>
            {%- if _section.image.is_row -%}
              </div>
            {%- endif -%}
          {%- endif -%}

      {%- if _section.image.full_width != true -%}
        </div> {% comment %} end hero__content {% endcomment %}
      {%- endif -%}

      {%- if _section.content-%}
        <p>{{ _section.content }}</p>
      {%- endif -%}
      </section>
  {%- endfor -%}
  </div>
</div>

{{ content }}