Skip to content

Commit c9a6cb9

Browse files
committed
Move sidebar
1 parent 33380db commit c9a6cb9

File tree

1 file changed

+32
-31
lines changed

1 file changed

+32
-31
lines changed

resources/views/livewire/show-articles.blade.php

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,5 @@
1-
<div class="container mx-auto px-4 pt-4 flex flex-wrap flex-col-reverse md:flex-row">
2-
<div class="w-full lg:w-1/4 lg:pt-8 pr-4">
3-
<span class="relative z-0 inline-flex shadow-sm mb-8">
4-
<button wire:click="sortBy('recent')" type="button" class="relative inline-flex items-center px-4 py-2 rounded-l-md border text-sm leading-5 font-medium focus:z-10 focus:outline-none focus:border-green-light focus:shadow-outline-green active:bg-green-primary active:text-white transition ease-in-out duration-150 {{ $selectedSortBy === 'recent' ? 'bg-green-primary text-white border-green-primary shadow-outline-green z-10' : 'bg-white text-gray-700 border-gray-300' }}">
5-
Recent
6-
</button>
7-
<button wire:click="sortBy('popular')" type="button" class="-ml-px relative inline-flex items-center px-4 py-2 border text-sm leading-5 font-medium focus:z-10 focus:outline-none focus:border-green-light focus:shadow-outline-green active:bg-green-primary active:text-white transition ease-in-out duration-150 {{ $selectedSortBy === 'popular' ? 'bg-green-primary text-white border-green-primary shadow-outline-green z-10' : 'bg-white text-gray-700 border-gray-300' }}">
8-
Popular
9-
</button>
10-
<button wire:click="sortBy('trending')" type="button" class="-ml-px relative inline-flex items-center px-4 py-2 rounded-r-md border text-sm leading-5 font-medium focus:z-10 focus:outline-none focus:border-green-light focus:shadow-outline-green active:bg-green-primary active:text-white transition ease-in-out duration-150 {{ $selectedSortBy === 'trending' ? 'bg-green-primary text-white border-green-primary shadow-outline-green z-10' : 'bg-white text-gray-700 border-gray-300' }}">
11-
Trending 🔥
12-
</button>
13-
</span>
14-
15-
<ul class="tags">
16-
<li class="{{ ! $selectedTag ? ' active' : '' }}">
17-
<button wire:click="toggleTag('')">
18-
All
19-
</button>
20-
</li>
21-
22-
@foreach (App\Models\Tag::whereHas('articles')->orderBy('name')->get() as $tag)
23-
<li class="{{ $selectedTag === $tag->slug() ? ' active' : '' }}">
24-
<button wire:click="toggleTag('{{ $tag->slug() }}')">
25-
{{ $tag->name() }}
26-
</button>
27-
</li>
28-
@endforeach
29-
</ul>
30-
</div>
31-
<div class="w-full lg:w-3/4 py-8 pl-4">
1+
<div class="container mx-auto px-4 pt-4 flex flex-wrap flex-col-reverse lg:flex-row">
2+
<div class="w-full lg:w-3/4 py-8 lg:pr-4">
323
<div wire:loading class="flex w-full h-full text-2xl text-gray-700">
334
Loading...
345
</div>
@@ -92,4 +63,34 @@
9263
{{ $articles->links() }}
9364

9465
</div>
66+
67+
<div class="w-full lg:w-1/4 lg:pt-8 lg:pl-4">
68+
<span class="relative z-0 inline-flex shadow-sm mb-8">
69+
<button wire:click="sortBy('recent')" type="button" class="relative inline-flex items-center px-4 py-2 rounded-l-md border text-sm leading-5 font-medium focus:z-10 focus:outline-none focus:border-green-light focus:shadow-outline-green active:bg-green-primary active:text-white transition ease-in-out duration-150 {{ $selectedSortBy === 'recent' ? 'bg-green-primary text-white border-green-primary shadow-outline-green z-10' : 'bg-white text-gray-700 border-gray-300' }}">
70+
Recent
71+
</button>
72+
<button wire:click="sortBy('popular')" type="button" class="-ml-px relative inline-flex items-center px-4 py-2 border text-sm leading-5 font-medium focus:z-10 focus:outline-none focus:border-green-light focus:shadow-outline-green active:bg-green-primary active:text-white transition ease-in-out duration-150 {{ $selectedSortBy === 'popular' ? 'bg-green-primary text-white border-green-primary shadow-outline-green z-10' : 'bg-white text-gray-700 border-gray-300' }}">
73+
Popular
74+
</button>
75+
<button wire:click="sortBy('trending')" type="button" class="-ml-px relative inline-flex items-center px-4 py-2 rounded-r-md border text-sm leading-5 font-medium focus:z-10 focus:outline-none focus:border-green-light focus:shadow-outline-green active:bg-green-primary active:text-white transition ease-in-out duration-150 {{ $selectedSortBy === 'trending' ? 'bg-green-primary text-white border-green-primary shadow-outline-green z-10' : 'bg-white text-gray-700 border-gray-300' }}">
76+
Trending 🔥
77+
</button>
78+
</span>
79+
80+
<ul class="tags">
81+
<li class="{{ ! $selectedTag ? ' active' : '' }}">
82+
<button wire:click="toggleTag('')">
83+
All
84+
</button>
85+
</li>
86+
87+
@foreach (App\Models\Tag::whereHas('articles')->orderBy('name')->get() as $tag)
88+
<li class="{{ $selectedTag === $tag->slug() ? ' active' : '' }}">
89+
<button wire:click="toggleTag('{{ $tag->slug() }}')">
90+
{{ $tag->name() }}
91+
</button>
92+
</li>
93+
@endforeach
94+
</ul>
95+
</div>
9596
</div>

0 commit comments

Comments
 (0)