Skip to content

Commit 85d679e

Browse files
committed
Automatically display the latest version on the library upgrade page.
1 parent f19ab86 commit 85d679e

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

resources/views/library/upgrade.blade.php

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,27 @@
1212
которого необходимо придерживаться.
1313
</x-slot>
1414

15-
<x-slot:content >
15+
<x-slot:content>
1616
<div class="d-none d-md-flex align-items-baseline lead fw-bold mx-md-auto text-md-center">
17-
<span class="d-inline-block mx-2 mx-sm-3 display-5 opacity-25">7.x</span>
18-
<span class="d-inline-block mx-2 mx-sm-3 display-4 opacity-50 border-5">8.x</span>
19-
<span class="d-inline-block mx-2 mx-sm-3 display-3 opacity-75">9.x</span>
20-
<span class="d-inline-block mx-2 mx-sm-3 display-1 border-bottom border-primary">10.x</span>
17+
@php
18+
$version = \Str::of(\App\Docs::DEFAULT_VERSION)->before('.')->toString();
19+
@endphp
20+
21+
@foreach(collect()->range(0,3)->reverse() as $index)
22+
<span @class([
23+
'd-inline-block mx-2 mx-sm-3',
24+
'display-' . ($index + 1),
25+
'opacity-' . [100, 75, 50, 25][$index],
26+
'border-bottom border-primary' => $index === 0,
27+
])>
28+
{{ $version - $index }}.x
29+
</span>
30+
@endforeach
2131
</div>
2232
</x-slot:content>
2333
</x-header>
2434

35+
2536
@php
2637
$sections = collect([
2738
"security",

0 commit comments

Comments
 (0)