Skip to content

Commit c9d2b31

Browse files
sebastianthulinSebastian Thulin
andauthored
fix: remove logo scopes / add subfooter scope (#660)
Co-authored-by: Sebastian Thulin <sebastian.thulin@helsingborg.se>
1 parent 54ec71c commit c9d2b31

2 files changed

Lines changed: 51 additions & 53 deletions

File tree

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
1-
<div class="{{$baseClass}}__subfooter {{$directionClass}} {{$alignmentClass}}">
2-
<div class="o-container">
3-
<div class="{{$baseClass}}__subfooter__wrapper">
4-
@if($subfooterLogotype)
5-
<div class="{{$baseClass}}__subfooter__logotype-wrapper">
6-
@logotype([
7-
'id' => 'footer-subfooter-logotype',
8-
'src'=> $subfooterLogotype,
9-
'alt' => $lang->goToHomepage ?? 'Go to homepage',
10-
'classList' => [$baseClass . '__subfooter__logotype'],
11-
'maskable' => true,
12-
])
13-
@endlogotype
14-
</div>
15-
@endif
16-
<ul class="{{$baseClass}}__subfooter__list">
17-
@foreach($subfooter['content'] as $index => $item)
18-
<li>
19-
<strong>{{ $item['title'] }}</strong>
20-
@if($item['link'])
21-
@link([
22-
'href' => $item['link']
23-
])
1+
@scope(['name' => ['footer']])
2+
<div class="{{$baseClass}}__subfooter {{$directionClass}} {{$alignmentClass}}">
3+
<div class="o-container">
4+
<div class="{{$baseClass}}__subfooter__wrapper">
5+
@if($subfooterLogotype)
6+
<div class="{{$baseClass}}__subfooter__logotype-wrapper">
7+
@logotype([
8+
'id' => 'footer-subfooter-logotype',
9+
'src'=> $subfooterLogotype,
10+
'alt' => $lang->goToHomepage ?? 'Go to homepage',
11+
'classList' => [$baseClass . '__subfooter__logotype'],
12+
'maskable' => true,
13+
])
14+
@endlogotype
15+
</div>
16+
@endif
17+
<ul class="{{$baseClass}}__subfooter__list">
18+
@foreach($subfooter['content'] as $index => $item)
19+
<li>
20+
<strong>{{ $item['title'] }}</strong>
21+
@if($item['link'])
22+
@link([
23+
'href' => $item['link']
24+
])
25+
{{ $item['content'] }}
26+
@endlink
27+
@else
2428
{{ $item['content'] }}
25-
@endlink
26-
@else
27-
{{ $item['content'] }}
28-
@endif
29-
</li>
30-
@endforeach
31-
</ul>
29+
@endif
30+
</li>
31+
@endforeach
32+
</ul>
33+
</div>
3234
</div>
3335
</div>
34-
</div>
36+
@endscope

source/php/Component/Footer/footer.blade.php

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,15 @@
88
<div class="o-container">
99
<div class="o-grid-12">
1010
@link(['href' => $logotypeHref])
11-
@scope(['name' => ['mainfooterlogotype']])
12-
@logotype([
13-
'id' => 'footer-logotype',
14-
'src'=> $logotype,
15-
'alt' => $lang->goToHomepage ?? 'Go to homepage',
16-
'classList' => ['site-footer__logo', 'c-footer__logotype'],
17-
'context' => 'footer.logotype',
18-
'maskable' => true,
19-
])
20-
@endlogotype
21-
@endscope
11+
@logotype([
12+
'id' => 'footer-logotype',
13+
'src'=> $logotype,
14+
'alt' => $lang->goToHomepage ?? 'Go to homepage',
15+
'classList' => ['site-footer__logo', 'c-footer__logotype'],
16+
'context' => 'footer.logotype',
17+
'maskable' => true,
18+
])
19+
@endlogotype
2220
@endlink
2321
</div>
2422
</div>
@@ -61,17 +59,15 @@
6159
@else
6260
<div class="{{ $baseClass }}__body">
6361
<a href="{{ $logotypeHref }}" class="{{ $baseClass }}__home-link">
64-
@scope(['name' => ['footerlogotype']])
65-
@logotype([
66-
'id' => 'footer-logotype',
67-
'src'=> $logotype,
68-
'alt' => $lang->goToHomepage ?? 'Go to homepage',
69-
'classList' => ['site-footer__logo', 'c-footer__logotype'],
70-
'context' => 'footer.logotype',
71-
'maskable' => true,
72-
])
73-
@endlogotype
74-
@endscope
62+
@logotype([
63+
'id' => 'footer-logotype',
64+
'src'=> $logotype,
65+
'alt' => $lang->goToHomepage ?? 'Go to homepage',
66+
'classList' => ['site-footer__logo', 'c-footer__logotype'],
67+
'context' => 'footer.logotype',
68+
'maskable' => true,
69+
])
70+
@endlogotype
7571
</a>
7672
<div class="{{ $baseClass }}__nav">
7773
@if ($slot)

0 commit comments

Comments
 (0)