Skip to content

Commit 89042fb

Browse files
authored
feat: added trustarc to footer v2 (#126)
1 parent 04edd69 commit 89042fb

File tree

4 files changed

+60
-55
lines changed

4 files changed

+60
-55
lines changed

assets/css/v2/style.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ header {
108108
/* footer */
109109
footer {
110110
background-color: var(--color-footer);
111-
padding: 1rem;
111+
padding: 2.5rem;
112+
margin: -0.5rem;
113+
margin-top: auto;
112114
}
113115

114116
.footer-layout {

layouts/_default/baseof.html

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
body {
77
/* Hide entire body for first paint. This suppresses flicker when theme is loading. */
88
visibility: hidden;
9+
height: 100vh;
10+
display: flex;
11+
flex-direction: column;
912
}
1013
</style>
1114

@@ -62,14 +65,24 @@
6265
if (element !== null) {
6366
element.style.display = isNewTheme ? "none" : "";
6467
}
68+
69+
const trustarc = document.getElementById("teconsent-v1");
70+
if(trustarc) {
71+
trustarc.id = isNewTheme ? "teconsent-v1" : "teconsent";
72+
}
6573
});
6674

6775
const mfElements = ['[data-mf="true"]'];
6876
mfElements.forEach((elementId) => {
69-
document
70-
.querySelectorAll(elementId)
71-
.forEach(
72-
(element) => (element.style.display = isNewTheme ? "" : "none")
77+
document.querySelectorAll(elementId).forEach(
78+
(element) => {
79+
element.style.display = isNewTheme ? "" : "none";
80+
81+
const trustarc = document.getElementById("teconsent-v2");
82+
if(trustarc) {
83+
trustarc.id = isNewTheme ? "teconsent" : "teconsent-v2";
84+
}
85+
}
7386
);
7487
});
7588

@@ -144,21 +157,18 @@
144157
{{ block "main" . }}{{ end }}
145158
</div>
146159
</section>
147-
160+
148161
<footer id="footer">
149-
150162
{{ block "footer" . }}
151163
{{ partial "footer.html" . }}
152164
{{ end }}
153-
154165
</footer>
155166

156167
<footer data-mf="true" id="footer-v2" style="display:none;">
157168
{{ block "footer-v2" . }}
158169
{{ partial "footer-v2.html" . }}
159170
{{ end }}
160171
</footer>
161-
162172
{{ partial "scripts.html" . }}
163173
<div id="consent_blackbar"></div>
164174
</body>

layouts/partials/footer-v2.html

Lines changed: 38 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,39 @@
1-
<footer id="footer">
2-
<div class="footer-layout">
3-
<div class="footer-f5-trademark">
4-
<img class="f5-logo-footer" src="{{ "/images/icons/Logo_F5.svg" | absURL }}" alt="F5 logo">
5-
<p>©2025 F5, Inc. All rights reserved. NGINX is a registered trademark of F5, Inc.</p>
6-
</div>
7-
<div class="footer-useful-links">
8-
<a
9-
href="https://www.f5.com/company/policies/trademarks"
10-
rel="noopener"
11-
target="_blank"
12-
>Trademarks
13-
</a>
14-
<a
15-
href="https://www.f5.com/company/policies"
16-
rel="noopener"
17-
target="_blank"
18-
>Policies
19-
</a>
20-
<a
21-
href="https://www.f5.com/company/policies/privacy-notice"
22-
rel="noopener"
23-
target="_blank"
24-
>Privacy
25-
</a>
26-
<a
27-
href="https://www.f5.com/company/policies/F5-California-privacy-summary"
28-
rel="noopener"
29-
target="_blank"
30-
>California Privacy
31-
</a>
32-
<a
33-
href="https://www.f5.com/company/policies/privacy-notice#no-sell"
34-
rel="noopener"
35-
target="_blank"
36-
>Do Not Sell My Personal Information
37-
</a>
38-
<a
39-
href="https://docs.nginx.com"
40-
rel="noopener"
41-
target="_blank"
42-
>Cookie Preference
43-
</a>
44-
</div>
1+
<div class="footer-layout">
2+
<div class="footer-f5-trademark">
3+
<img class="f5-logo-footer" src="{{ "/images/icons/Logo_F5.svg" | absURL }}" alt="F5 logo">
4+
<p>©2025 F5, Inc. All rights reserved. NGINX is a registered trademark of F5, Inc.</p>
455
</div>
46-
</footer>
6+
<div class="footer-useful-links">
7+
<a
8+
href="https://www.f5.com/company/policies/trademarks"
9+
rel="noopener"
10+
target="_blank"
11+
>Trademarks
12+
</a>
13+
<a
14+
href="https://www.f5.com/company/policies"
15+
rel="noopener"
16+
target="_blank"
17+
>Policies
18+
</a>
19+
<a
20+
href="https://www.f5.com/company/policies/privacy-notice"
21+
rel="noopener"
22+
target="_blank"
23+
>Privacy
24+
</a>
25+
<a
26+
href="https://www.f5.com/company/policies/F5-California-privacy-summary"
27+
rel="noopener"
28+
target="_blank"
29+
>California Privacy
30+
</a>
31+
<a
32+
href="https://www.f5.com/company/policies/privacy-notice#no-sell"
33+
rel="noopener"
34+
target="_blank"
35+
>Do Not Sell My Personal Information
36+
</a>
37+
<span id="teconsent-v2"></span>
38+
</div>
39+
</div>

layouts/partials/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273
target="_blank"
274274
>Do Not Sell My Personal Information</a
275275
>
276-
<span id="teconsent"></span>
276+
<span id="teconsent-v1"></span>
277277
</p>
278278
</div>
279279
</div>

0 commit comments

Comments
 (0)