diff --git a/cfgov/v1/jinja2/v1/includes/molecules/feature-card.html b/cfgov/v1/jinja2/v1/includes/molecules/feature-card.html index 89d3300502c..a7ddde0be07 100644 --- a/cfgov/v1/jinja2/v1/includes/molecules/feature-card.html +++ b/cfgov/v1/jinja2/v1/includes/molecules/feature-card.html @@ -1,48 +1,85 @@ {# ========================================================================== - Featured Cards + Feature Card - ========================================================================== + ========================================================================== - Description: + Description: - Create a 50/50 set of featured cards organism when given: + Create a feature card molecule when given: - value: Object defined from a StreamField block. + value: Object defined from a StreamField block. - value.feature_cards: List of Feature Card molecules. See Info Unit - molecule template for details. + value.category: A set of values related to the card category + (title), including: - ========================================================================== #} + value.category.url: A string for the URL of the category page. - {%- from 'v1/includes/blocks/heading.html' import heading without context %} - {%- from 'v1/includes/molecules/feature-card.html' import feature_card with context %} + value.category.text: A string for the title of the category. -
-

- Browse questions by category -

+ value.icon: A string corresponding to an SVG icon. - + value.footer_label: A tuple of items related to the card, including: -
-
-
+ value.links: A tuple of items to create a list + of links, containing: - {% for card in value.feature_cards %} - {{- feature_card(card) }} - {% endfor %} + value.links[i].url: A string for the URL of the link. -
-
-
-
+ value.links[i].text: A string for the text of the link. + + value.links[i].aria_label: (Optional) An aria-label for the link. + + ========================================================================== #} + +{%- from 'v1/includes/blocks/heading.html' import heading without context %} + +{%- macro feature_card(value) -%} + +
+

+ + {{ svg_icon( value.icon ) }} + {{ value.category.text }} + +

+ + + + + +
+ +{% endmacro %} diff --git a/cfgov/v1/jinja2/v1/includes/organisms/feature-cards.html b/cfgov/v1/jinja2/v1/includes/organisms/feature-cards.html index a7ddde0be07..89d3300502c 100644 --- a/cfgov/v1/jinja2/v1/includes/organisms/feature-cards.html +++ b/cfgov/v1/jinja2/v1/includes/organisms/feature-cards.html @@ -1,85 +1,48 @@ {# ========================================================================== - Feature Card + Featured Cards - ========================================================================== + ========================================================================== - Description: + Description: - Create a feature card molecule when given: + Create a 50/50 set of featured cards organism when given: - value: Object defined from a StreamField block. + value: Object defined from a StreamField block. - value.category: A set of values related to the card category - (title), including: + value.feature_cards: List of Feature Card molecules. See Info Unit + molecule template for details. - value.category.url: A string for the URL of the category page. + ========================================================================== #} - value.category.text: A string for the title of the category. + {%- from 'v1/includes/blocks/heading.html' import heading without context %} + {%- from 'v1/includes/molecules/feature-card.html' import feature_card with context %} - value.icon: A string corresponding to an SVG icon. +
+

+ Browse questions by category +

- value.footer_label: A tuple of items related to the card, including: + - value.links: A tuple of items to create a list - of links, containing: +
+
+
- value.links[i].url: A string for the URL of the link. + {% for card in value.feature_cards %} + {{- feature_card(card) }} + {% endfor %} - value.links[i].text: A string for the text of the link. - - value.links[i].aria_label: (Optional) An aria-label for the link. - - ========================================================================== #} - -{%- from 'v1/includes/blocks/heading.html' import heading without context %} - -{%- macro feature_card(value) -%} - -
-

- - {{ svg_icon( value.icon ) }} - {{ value.category.text }} - -

- -
    - {%- for link in value.links %} -
  • - {%- if link.text is not none and link.text.find('@') > -1 -%} - {%- if not value.emails is defined -%} - {%- do value.update({'emails':[{'url':link.text}]}) -%} - {%- endif -%} - {% include 'contact-email.html' with context %} - {%- else -%} - {%- set link_text = link.text if link.text else 'Learn More' -%} - {%- set link -%} - - - {{ link_text }} - - - {{ _('Read answer') }} - - - {%- endset -%} - {{ link | safe }} - {%- endif %} -
  • - {%- endfor %} -
- - - -
- -{% endmacro %} +
+
+
+