Skip to content

Commit

Permalink
Merge branch 'main' into docs/strict
Browse files Browse the repository at this point in the history
  • Loading branch information
chosak authored Apr 3, 2024
2 parents 2db0306 + 0759c7b commit 682fffc
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 63 deletions.
76 changes: 38 additions & 38 deletions cfgov/v1/jinja2/v1/includes/molecules/feature-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
value.category.url: A string for the URL of the category page.

value.category.text: A string for the title of the category.

value.category.aria_label: (Optional) An aria-label for the category page link.

value.icon: A string corresponding to an SVG icon.

Expand All @@ -40,44 +38,46 @@

<article class="m-card">
<h2 class="m-card_heading">
<a class="" href="{{ value.category.url }}">
<span class="m-card_icon">{{ svg_icon( value.icon ) }}</span>
<span>{{ value.category.text }}</span>
</a>
<a href="{{ value.category.url }}">
<span class="m-card_icon">{{ svg_icon( value.icon ) }}</span>
<span>{{ value.category.text }}</span>
</a>
</h2>

<ul class="m-list">
{%- for link in value.links %}
<li class="m-list_item">
{%- 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 -%}
<a class="a_link a-link__partially-styled"
href="{{ link.url }}"
{%- if link.aria_label -%}
aria-label="{{ link.aria_label }}"
{%- endif %}>
<span class="a-link__partially-styled_plain">{{ link_text }} </span>
<span class="a-link__partially-styled_underlined">{{ _('Read answer') }}</span>

<ul class="m-list">
{%- for link in value.links %}
<li class="m-list_item">
{%- 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 -%}
<a class="a_link a-link__partially-styled"
href="{{ link.url }}"
{%- if link.aria_label -%}
aria-label="{{ link.aria_label }}"
{%- endif %}>
<span class="a-link__partially-styled_plain">
{{ link_text }}
</span>
<span class="a-link__partially-styled_underlined">
{{ _('Read answer') }}
</span>
</a>
{%- endset -%}
{{ link | safe }}
{%- endif %}
</li>
{%- endfor %}
</ul>

<div class="m-card_footer">
<a href="{{ value.category.url }}">
{{ value.footer_label }}
</a>
{%- endset -%}
{{ link | safe }}
{%- endif %}
</li>
{%- endfor %}
</ul>

<div class="m-card_footer">
<a href="{{ value.category.url }}">
{{ value.footer_label }}
</a>
</div>

</article>
Expand Down
49 changes: 24 additions & 25 deletions cfgov/v1/jinja2/v1/includes/organisms/feature-cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,31 @@
{%- from 'v1/includes/blocks/heading.html' import heading without context %}
{%- from 'v1/includes/molecules/feature-card.html' import feature_card with context %}

<section class="ask-categories">
<section>
<h2 class="u-show-on-mobile u-mt45">
Browse questions by category
</h2>

<ul class="u-show-on-mobile category_list m-list m-list__links u-mb0">
{% for card in value.feature_cards %}
<li class="m-list_item">
<a class="m-list_link a-link a-link__jump a-link__icon-after-text" href="{{ card.category.url }}">
<span class="a-link_text">{{ card.category.text }}</span>
{{ svg_icon( card.icon ) }}
</a>
</li>
{% endfor %}
</ul>

<div class="u-hide-on-mobile question-categories u-mb30">
<div class="o-card-group o-card-group__column-2">
<div class="o-card-group_cards">

{% for card in value.feature_cards %}
{{- feature_card(card) }}
{% endfor %}

</div>
</div>
</div>

</section>
<ul class="u-show-on-mobile category_list m-list m-list__links u-mb0">
{% for card in value.feature_cards %}
<li class="m-list_item">
<a class="m-list_link a-link a-link__jump a-link__icon-after-text" href="{{ card.category.url }}">
<span class="a-link_text">{{ card.category.text }}</span>
{{ svg_icon( card.icon ) }}
</a>
</li>
{% endfor %}
</ul>

<div class="u-hide-on-mobile question-categories u-mb30">
<div class="o-card-group o-card-group__column-2">
<div class="o-card-group_cards">

{% for card in value.feature_cards %}
{{- feature_card(card) }}
{% endfor %}

</div>
</div>
</div>
</section>

0 comments on commit 682fffc

Please sign in to comment.