Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ <h1 class="h1-heading text-center mt-0">{{ page.header }}</h1>
{# User is not logged in. Return cached results. 24 hour caching applied. #}
{% cache 86400 pni_home_page template_cache_key_fragment %}
{% for product in products %}
{% include "../fragments/buyersguide_item.html" with product=product %}
{% include "../fragments/buyersguide_item.html" with product=product.localized %}
{% endfor %}
{% endcache %}
{% else %}
{# User is logged in. Don't cache their results so they can see live and draft products here. #}
{% for product in products %}
{% include "../fragments/buyersguide_item.html" with product=product %}
{% include "../fragments/buyersguide_item.html" with product=product.localized %}
{% endfor %}
{% endif %}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2 class="px-lg-4 px-0">{{ page.contents_title }}</h2>
</div>
<div class="col-12">
{% for child_page in child_pages %}
{% with child=child_page.child %}
{% with child=child_page.child.localized %}
<div class="row publication-row pt-3 pb-3 d-flex align-items-center">
<div class="col-sm-1 d-md-block d-none">&nbsp;</div>
<div class="col-auto">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2>{{ page.contents_title }}</h2>
</div>
<div class="col-12">
{% for child_page in child_pages %}
{% with child=child_page.child %}
{% with child=child_page.child.localized %}
<div class="row publication-row pt-3 pb-sm-4 pb-0">
<div class="col-auto">
<div class="publication-chapter-number"
Expand All @@ -40,24 +40,28 @@ <h3 class="{% if child.get_children_count %}publication-chapter-title{% else %}m
{{ child.title }} {% if child.has_unpublished_changes %}🐣{% endif %}
</a>
</h3>
{% for grandchild in child_page.grandchildren %}
{% for ancestor in child_page.grandchildren %}
{% with grandchild=ancestor.localized %}
<h4 class="d-sm-block d-none body">
<a href="{{ grandchild.url }}" class="d-block w-75 publication-chapter-article-link">
{{ grandchild.title }}
</a>
</h4>
{% endwith %}
{% endfor %}
</div>
</div>
{% if child_page.grandchildren %}
{# Child listings on mobile. #}
<div class="pt-2 d-sm-none d-block">
{% for grandchild in child_page.grandchildren %}
{% for ancestor in child_page.grandchildren %}
{% with grandchild=ancestor.localized %}
<h4 class="body">
<a href="{{ grandchild.url }}" class="d-block publication-chapter-article-link">
{{ grandchild.title }} {% if child.has_unpublished_changes %}🐣{% endif %}
</a>
</h4>
{% endwith %}
{% endfor %}
</div>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="section-cause-statement dark-theme p-5 text-center">
<p class="h4-heading">{{ page.cause_statement }}</p>
{% if page.cause_statement_link_text and page.cause_statement_link_page %}
<a href="{{page.cause_statement_link_page.url}}" class="cta-link" id="homepage-cause-statement-cta">{{page.cause_statement_link_text}}</a>
<a href="{{page.cause_statement_link_page.localized.url}}" class="cta-link" id="homepage-cause-statement-cta">{{page.cause_statement_link_text}}</a>
{% endif %}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h2 class="h4-heading">{{ area.name }}</h2>
<p>{{ area.description }}</p>

{% if area.page %}<div class="mb-4 learn-more-link">
<a href="{{ area.page.url }}" aria-label="{% blocktrans with name=area.name %}Learn more about: {{ name }}{% endblocktrans %}">{% trans "Learn more →" %}</a>
<a href="{{ area.page.localized.url }}" aria-label="{% blocktrans with name=area.name %}Learn more about: {{ name }}{% endblocktrans %}">{% trans "Learn more →" %}</a>
</div>{% endif %}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2 class="h4-heading mb-4">{% trans "News you can use" %}</h2>

{% endcomment %}

{% with first=items.first.blog %}
{% with first=items.first.blog.localized %}
<div class="d-none d-xl-block col-xl-12 feature mb-md-5">
<div class="position-relative h-100 d-flex justify-content-end">
<div class="feature-image">
Expand Down Expand Up @@ -56,22 +56,24 @@ <h3 class="mb-2 pb-1"><a href="{{first.url}}">{{ first.title }}</a></h3>

{% with item_1_class="d-xl-none mb-5 mb-xl-0" item_2_class="mb-5 mb-xl-0" item_3_class="mb-5 mb-md-0" %}
{% for item in items %}
{% with localized=item.blog.localized %}
<div class="col-12 col-md-6 col-xl-4 d-flex {% if forloop.counter == 1 %} {{item_1_class}}{% endif %} {% if forloop.counter == 2 %} {{item_2_class}}{% endif %} {% if forloop.counter == 3 %} {{item_3_class}}{% endif %}">
<div class="bg-white">
<img src="{% image_url item.blog.get_meta_image "fill-700x394" %}" alt="" class="embed-responsive-item">
<img src="{% image_url localized.get_meta_image "fill-700x394" %}" alt="" class="embed-responsive-item">
<div class="p-4">
{% if item.blog.category.count %}
{% with category=item.blog.category.first %}
{% if localized.category.count %}
{% with category=localized.category.first %}
<a class="h6-heading d-block mb-1" href="/blog/category/{{ category.slug }}">{{ category }}</a>
{% endwith %}
{% else %}
<div class="h6-heading d-md-block d-none mb-1">&nbsp;</div>
{% endif %}
<h3 class="h4-heading"><a href="{{item.blog.url}}">{{ item.blog.title }}</a></h3>
<h3 class="h4-heading"><a href="{{localized.url}}">{{ localized.title }}</a></h3>
{% include "./blog_authors.html" with blog_page=item.blog %}
</div>
</div>
</div>
{% endwith %}
{% endfor %}
{% endwith %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h2 class="h3-heading">{{ page.partner_heading }}</h2>
{{ page.partner_intro_text }}
</p>
{% endif %}
<a href="{{ page.partner_page.url }}" class="text-white cta-link font-weight-bold" id="partner-cta">
<a href="{{ page.partner_page.localized.url }}" class="text-white cta-link font-weight-bold" id="partner-cta">
{{ page.partner_page_text }}
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
<div class="col-lg-8 offset-lg-2 dark-theme">
{% if is_publication_article or is_publication_page %}
<div class="mb-2 body-small publication-breadcrumb">
{% for parent_page in self.breadcrumb_list %}
{% for entry in self.breadcrumb_list %}
{% with parent_page=entry.localized %}
<a href="{{ parent_page.url }}" class="body-small">{{ parent_page.title }}</a>
<span class='body-small'> › </span>
{% endwith %}
{% endfor %}
</div>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ <h3 class="h2-heading spotlight-headline mb-0">{{ page.spotlight_headline }}</h3

<div class="col-12 col-lg-6">
{% for post in page.spotlight_posts.all %}
{% with localized=post.blog.localized %}
<div class="spotlight-post">
<h4 class="mb-2 h5-heading">
<a href="{{post.blog.url}}">{{post.blog.title}}</a>
<a href="{{localized.url}}">{{localized.title}}</a>
</h4>
{% include "./blog_authors.html" with blog_page=post.blog %}
{% include "./blog_authors.html" with blog_page=localized %}
</div>
{% endwith %}
{% endfor %}
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ <h2 class="take-action-title mb-4">{{ page.take_action_title }}</h2>
<div class="col-lg-8 col-md-12">
<div class="row">
{% for item in page.take_action_cards.all %}
{% with target=item.internal_link.localized %}
<div class="col-md-6 d-flex">
<div class="card flex-grow-1 mb-4">
<a href="{{ item.internal_link.url }}">
<a href="{{ target.url }}">
<img src="{% image_url item.image "fill-350x130" %}" class="card-img-top" alt="{{ img.alt }}" aria-label="{{ item.text }}">
</a>
<div class="card-body">
<a href="{{ item.internal_link.url }}" class="h5-heading d-inline-block my-2">
<a href="{{ target.url }}" class="h5-heading d-inline-block my-2">
{{ item.text }}
</a>
</div>
</div>
</div>
{% endwith %}
{% endfor %}
</div>
</div>
Expand Down