diff --git a/templates/_macros/shared/vf_section_top_rule.jinja b/templates/_macros/shared/vf_section_top_rule.jinja index 179936264..bcb859bc5 100644 --- a/templates/_macros/shared/vf_section_top_rule.jinja +++ b/templates/_macros/shared/vf_section_top_rule.jinja @@ -1,7 +1,12 @@ # Helper macro to render a top rule for a section. # Parameters: -# - top_rule_variant: string, one of "default", "muted", "highlighted", "none" -{%- macro vf_section_top_rule(top_rule_variant="default") -%} +# - top_rule_variant("default" | "muted" | "highlighted" |"none"): variant of horizontal rule to use +# - is_fixed_width(Boolean): Whether to constrain the rule by the fixed content width. Default to False. +# If you don't use this, you should wrap the rule in a .grid-row. +{%- macro vf_section_top_rule( + top_rule_variant="default", + is_fixed_width=False +) -%} {%- set top_rule_variant = top_rule_variant | trim | lower -%} {%- if top_rule_variant not in ["default", "muted", "highlighted", "none"] -%} {%- set top_rule_variant = "default" -%} @@ -23,6 +28,10 @@ {%- endif -%} {%- endif -%} + {%- if is_fixed_width -%} + {%- set top_rule_classes = top_rule_classes + " " + "is-fixed-width" -%} + {%- endif -%} + {%- if top_rule_variant != "none" -%}
+ + “{{ quote_text }}” + +
+ {%- endif -%} +{%- endmacro %} + +{#- + Params + - citation + - name + - organisation + - title + -#} +{%- macro _quote_wrapper_citation_block(citation={}) -%} + {%- set citation_source_name = citation.get("name", "") | trim -%} + {%- set citation_source_title = citation.get("title", "") | trim -%} + {%- set citation_source_organisation = citation.get("organisation", "") | trim -%} + + {%- set has_citation_source_name = citation_source_name | length > 0 -%} + {%- set has_citation_source_title = citation_source_title | length > 0 -%} + {%- set has_citation_source_organisation = citation_source_organisation | length > 0 -%} + {%- set has_citation = has_citation_source_name or has_citation_source_title or has_citation_source_organisation -%} + + {%- if has_citation -%} + {#- Optional citation block -#} +
+ {% if has_citation_source_name -%}
+ {#- Optional citation source name -#}
+ {{ citation_source_name }}
+ {% if has_citation_source_title or has_citation_source_organisation -%}
+ {#- If the citation name is followed by title and/or organisation, add a line break -#}
+
+ {% endif -%}
+ {% endif -%}
+ {% if has_citation_source_title or has_citation_source_organisation -%}
+ {#- Optional citation source title and/or organisation -#}
+
+ {% if has_citation_source_title -%}
+ {#- Optional citation source title -#}
+ {{ citation_source_title }}
+ {%- if has_citation_source_organisation %}
+ {#- Add a line break between the title and org if both are present -#}
+
+ {%- endif %}
+ {% endif %}
+ {%- if has_citation_source_organisation -%}
+ {#- Optional citation source organisation -#}
+ {{ citation_source_organisation }}
+ {%- endif %}
+
+ {%- endif %}
+
+ {{ heading_link_html }} +
+- - “{{ quote_text }}” - -
-
- {% if has_citation_source_name -%}
- {#- Optional citation source name -#}
- {{ citation_source_name_text }}
- {% if has_citation_source_title or has_citation_source_organisation -%}
- {#- If the citation name is followed by title and/or organisation, add a line break -#}
-
- {% endif -%}
- {% endif -%}
- {% if has_citation_source_title or has_citation_source_organisation -%}
- {#- Optional citation source title and/or organisation -#}
-
- {% if has_citation_source_title -%}
- {#- Optional citation source title -#}
- {{ citation_source_title_text }}
- {%- if has_citation_source_organisation %}
- {#- Add a line break between the title and org if both are present -#}
-
- {%- endif %}
- {% endif %}
- {%- if has_citation_source_organisation -%}
- {#- Optional citation source organisation -#}
- {{ citation_source_organisation_text }}
- {%- endif %}
-
- {%- endif %}
-
- {{ heading_link_content }} -
-
+
+
"
+ }
+ }
+) -}}
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/docs/examples/patterns/quote-wrapper/combined.html b/templates/docs/examples/patterns/quote-wrapper/combined.html
index 85ca3a8f3..e2d5fe13f 100644
--- a/templates/docs/examples/patterns/quote-wrapper/combined.html
+++ b/templates/docs/examples/patterns/quote-wrapper/combined.html
@@ -22,5 +22,8 @@