|
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"> |
32 | 3 | <div wire:loading class="flex w-full h-full text-2xl text-gray-700"> |
33 | 4 | Loading... |
34 | 5 | </div> |
|
92 | 63 | {{ $articles->links() }} |
93 | 64 |
|
94 | 65 | </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> |
95 | 96 | </div> |
0 commit comments