vanilla-framework 4.41.0 → 4.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -318,15 +318,25 @@
|
|
|
318
318
|
]
|
|
319
319
|
}
|
|
320
320
|
]
|
|
321
|
+
@param padding (string) - Optional bottom padding for the section
|
|
321
322
|
#}
|
|
322
|
-
{% macro vf_resources(title={}, blocks=[], caller=None) %}
|
|
323
|
+
{% macro vf_resources(title={}, blocks=[], caller=None, padding="default") %}
|
|
323
324
|
{%- set description = blocks | selectattr("type", "equalto", "description") | first -%}
|
|
324
325
|
{%- set cta = blocks | selectattr("type", "equalto", "cta-block") | first -%}
|
|
325
326
|
{%- set resources = blocks | selectattr("type", "equalto", "resources") | first -%}
|
|
326
327
|
{%- set render_images = resources.get("render_images", true) -%}
|
|
327
328
|
{%- set render_categories = resources.get("render_categories", true) -%}
|
|
328
329
|
{%- set is_text_only = not (render_images or render_categories) -%}
|
|
329
|
-
|
|
330
|
+
{%- set padding = padding | trim -%}
|
|
331
|
+
{%- if padding not in ["deep", "shallow", "default"] -%}
|
|
332
|
+
{%- set padding = "default" -%}
|
|
333
|
+
{%- endif -%}
|
|
334
|
+
{%- if padding == "default" -%}
|
|
335
|
+
{%- set padding_classes = "p-section" -%}
|
|
336
|
+
{%- else -%}
|
|
337
|
+
{%- set padding_classes = "p-section--" + padding -%}
|
|
338
|
+
{%- endif -%}
|
|
339
|
+
<section class="{{ padding_classes }}">
|
|
330
340
|
<div class="grid-row--50-50{% if is_text_only %}-on-large{% endif %}{% if not is_text_only %} p-section--shallow{% endif %}">
|
|
331
341
|
{{- vf_section_top_rule("default") -}}
|
|
332
342
|
<div class="grid-col">{{- _title_block(title) -}}</div>
|