Skip to content

Commit 0722443

Browse files
committed
refactor: Simplify footer links
1 parent 84b2636 commit 0722443

File tree

2 files changed

+25
-39
lines changed

2 files changed

+25
-39
lines changed

assets/sass/footer.scss

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,22 @@
1313
.o-footer__links {
1414
display: flex;
1515
flex-wrap: wrap;
16+
gap: 1.6rem;
1617

1718
@media print {
1819
display: none;
1920
}
20-
}
2121

22-
.o-footer__link {
23-
margin-left: 0;
24-
margin-right: 1.6rem;
25-
text-decoration: underline;
26-
color: var(--link-special);
27-
font-weight: 700;
28-
text-decoration: none;
29-
30-
&:hover,
31-
&:focus {
32-
color: var(--link-hovered);
33-
text-decoration: underline;
34-
}
22+
& > a {
23+
color: var(--link-special);
24+
font-weight: 700;
25+
text-decoration: none;
3526

36-
@media (min-width: #{$breakpoint-lg}) {
37-
margin-left: 1.6rem;
38-
margin-right: 0;
27+
&:hover,
28+
&:focus {
29+
color: var(--link-hovered);
30+
text-decoration: underline;
31+
}
3932
}
4033
}
4134

layouts/partials/footer.html

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,23 @@
99
</div>
1010
<div class="o-footer__links">
1111
{{ $contactPage := site.GetPage "contact" }}
12-
{{ if $contactPage }}
13-
<a class="o-footer__link" href="{{ $contactPage.RelPermalink }}"
14-
>{{ $contactPage.Title }}</a
15-
>
16-
{{ end }}
12+
<a href="{{ $contactPage.RelPermalink }}">
13+
{{ $contactPage.Title }}
14+
</a>
1715
{{ $imprintPage := site.GetPage "imprint" }}
18-
{{ if $imprintPage }}
19-
<a class="o-footer__link" href="{{ $imprintPage.RelPermalink }}"
20-
>{{ $imprintPage.Title }}</a
21-
>
22-
{{ end }}
16+
<a href="{{ $imprintPage.RelPermalink }}">
17+
{{ $imprintPage.Title }}
18+
</a>
2319
{{ $privacyPage := site.GetPage "privacy" }}
24-
{{ if $privacyPage }}
25-
<a class="o-footer__link" href="{{ $privacyPage.RelPermalink }}"
26-
>{{ $privacyPage.Title }}</a
27-
>
28-
{{ end }}
29-
<a
30-
class="o-footer__link"
31-
href="https://www.paypal.com/pool/9jVNH0tMMT"
32-
target="_blank"
33-
rel="noopener noreferrer"
34-
>{{ T "donation" }}</a
35-
>
20+
<a href="{{ $privacyPage.RelPermalink }}">
21+
{{ $privacyPage.Title }}
22+
</a>
23+
{{ partial "link"
24+
(dict
25+
"Destination" "https://www.paypal.com/pool/9jVNH0tMMT"
26+
"Text" (T "donation")
27+
)
28+
}}
3629
</div>
3730
</div>
3831
<div class="o-footer__line">

0 commit comments

Comments
 (0)