Skip to content

Commit 8568971

Browse files
committed
Adjust image crop for landscape images only
1 parent 489367f commit 8568971

File tree

1 file changed

+67
-64
lines changed
  • tbx/project_styleguide/templates/patterns/organisms/footer

1 file changed

+67
-64
lines changed
Lines changed: 67 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,85 @@
11
{% load wagtailcore_tags wagtailimages_tags wagtail_cache navigation_tags %}
2-
32
<footer class="footer">
4-
53
<div class="grid footer__top ">
64
<span class="grid__footer-line footer__line"></span>
75
{% with contact=page.footer_contact %}
86
{% if contact %}
97
{% include "patterns/molecules/footer-cta/footer-cta.html" with contact_heading=contact.title contact_text=contact.text contact_link=contact.link contact_name=contact.name contact_role=contact.role contact_image=contact.image contact_action=contact.button_text contact_email=contact.email_text %}
108
{% endif %}
119
{% endwith %}
12-
1310
<div class="grid__footer-links">
1411
{% wagtailcache 600 "footerlinks" current_site.pk is_pattern_library %}
15-
{% footerlinks %}
16-
{% endwagtailcache %}
17-
18-
<ul class="footer__socials">
19-
<li>
20-
<a aria-label="Follow us on Twitter" href="https://twitter.com/torchbox" class="footer__social-link">
21-
<svg width="24" height="24" aria-hidden="true" class="footer__social-icon">
22-
<use xlink:href="#twitter" />
23-
</svg>
24-
</a>
25-
</li>
26-
<li>
27-
<a aria-label="Connect with us on LinkedIn" href="https://www.linkedin.com/company/torchbox" class="footer__social-link">
28-
<svg width="24" height="24" aria-hidden="true" class="footer__social-icon">
29-
<use xlink:href="#linkedin" />
30-
</svg>
31-
</a>
32-
</li>
33-
<li>
34-
<a aria-label="Follow us on Instagram" href="https://www.instagram.com/torchboxltd/" class="footer__social-link">
35-
<svg width="24" height="24" aria-hidden="true" class="footer__social-icon">
36-
<use xlink:href="#instagram" />
37-
</svg>
38-
</a>
39-
</li>
40-
</ul>
41-
</div>
12+
{% footerlinks %}
13+
{% endwagtailcache %}
14+
<ul class="footer__socials">
15+
<li>
16+
<a aria-label="Follow us on Twitter"
17+
href="https://twitter.com/torchbox"
18+
class="footer__social-link">
19+
<svg width="24" height="24" aria-hidden="true" class="footer__social-icon">
20+
<use xlink:href="#twitter" />
21+
</svg>
22+
</a>
23+
</li>
24+
<li>
25+
<a aria-label="Connect with us on LinkedIn"
26+
href="https://www.linkedin.com/company/torchbox"
27+
class="footer__social-link">
28+
<svg width="24" height="24" aria-hidden="true" class="footer__social-icon">
29+
<use xlink:href="#linkedin" />
30+
</svg>
31+
</a>
32+
</li>
33+
<li>
34+
<a aria-label="Follow us on Instagram"
35+
href="https://www.instagram.com/torchboxltd/"
36+
class="footer__social-link">
37+
<svg width="24" height="24" aria-hidden="true" class="footer__social-icon">
38+
<use xlink:href="#instagram" />
39+
</svg>
40+
</a>
41+
</li>
42+
</ul>
4243
</div>
43-
44-
<div class="footer__bottom-container">
45-
<div class="grid footer__bottom">
46-
<div class="grid__footer-logos">
47-
{% with settings.navigation.NavigationSettings as global_settings %}
48-
{% if global_settings.footer_logos %}
49-
<ul class="footer__logos">
50-
{% for item in global_settings.footer_logos %}
51-
{% with item.value as logo %}
52-
<li>
53-
{% with logo.link as link %}
54-
<a class="footer__logo-link" href="{{ link.url }}">
44+
</div>
45+
<div class="footer__bottom-container">
46+
<div class="grid footer__bottom">
47+
<div class="grid__footer-logos">
48+
{% with settings.navigation.NavigationSettings as global_settings %}
49+
{% if global_settings.footer_logos %}
50+
<ul class="footer__logos">
51+
{% for item in global_settings.footer_logos %}
52+
{% with item.value as logo %}
53+
<li>
54+
{% with logo.link as link %}
55+
<a class="footer__logo-link" href="{{ link.url }}">
56+
{% if logo.image.width > logo.image.height %}
5557
{% image logo.image max-200x100 format-webp loading="lazy" class="footer__logo" alt=logo.alt_text|default:logo.image.title %}
56-
</a>
57-
{% endwith %}
58-
</li>
59-
{% endwith %}
60-
{% endfor %}
61-
</ul>
62-
{% endif %}
63-
{% endwith %}
64-
</div>
65-
<div class="grid__footer-company">
66-
<div class="footer__company">
67-
<div class="footer__company-address">
68-
<p>© Torchbox {% now "Y" %} - </p><address>3rd Floor, 15 Colston St, Bristol, BS1 5AP</address>
69-
</div>
70-
<div>
71-
<p>Registered in England &amp; Wales. Company no. 3983354, VAT no. 752981011</p>
72-
</div>
58+
{% else %}
59+
{% image logo.image max-100x100 format-webp loading="lazy" class="footer__logo" alt=logo.alt_text|default:logo.image.title %}
60+
{% endif %}
61+
</a>
62+
{% endwith %}
63+
</li>
64+
{% endwith %}
65+
{% endfor %}
66+
</ul>
67+
{% endif %}
68+
{% endwith %}
69+
</div>
70+
<div class="grid__footer-company">
71+
<div class="footer__company">
72+
<div class="footer__company-address">
73+
<p>© Torchbox {% now "Y" %} -</p>
74+
<address>3rd Floor, 15 Colston St, Bristol, BS1 5AP</address>
75+
</div>
76+
<div>
77+
<p>Registered in England &amp; Wales. Company no. 3983354, VAT no. 752981011</p>
7378
</div>
7479
</div>
7580
</div>
76-
77-
{% include "patterns/molecules/carbon-impact/carbon-impact.html" %}
7881
</div>
79-
80-
{% include "patterns/molecules/cookie-message/cookie-message.html" %}
81-
82+
{% include "patterns/molecules/carbon-impact/carbon-impact.html" %}
83+
</div>
84+
{% include "patterns/molecules/cookie-message/cookie-message.html" %}
8285
</footer>

0 commit comments

Comments
 (0)