-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added dedicated route for user/following - Updated Profile/Following/Index to be a proper page
- Loading branch information
1 parent
8cc4a1f
commit 20555c1
Showing
5 changed files
with
95 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 67 additions & 5 deletions
72
resources/views/livewire/profile/following/index.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,69 @@ | ||
<div> | ||
<x-rows.user-lockup :users="$this->followings" :is-row="false" /> | ||
<main> | ||
<x-slot:title> | ||
{{ __(':x’s Following', ['x' => $user->username]) }} | ||
</x-slot:title> | ||
|
||
<div class="mt-4"> | ||
{{ $this->followings->links() }} | ||
<x-slot:description> | ||
{{ __('Browse the users :x is following on Kurozora. Join the Kurozora community and create your anime, manga and game list. Discover songs, episodes and read reviews and news!', ['x' => $user->username]) }} | ||
</x-slot:description> | ||
|
||
<x-slot:meta> | ||
<meta property="og:title" content="{{ __(':x’s Following', ['x' => $user->username]) }} — {{ config('app.name') }}" /> | ||
<meta property="og:description" content="{{ __('Browse :x’s following on Kurozora. Join the Kurozora community and create your anime, manga and game list. Discover songs, episodes and read reviews and news!', ['x' => $user->username]) }}" /> | ||
<meta property="og:image" content="{{ $user->getFirstMediaFullUrl(\App\Enums\MediaCollection::Profile()) }}" /> | ||
<meta property="og:type" content="website" /> | ||
<link rel="canonical" href="{{ route('profile.following', $user) }}"> | ||
</x-slot:meta> | ||
|
||
<x-slot:appArgument> | ||
users/{{ $user->id }}/following | ||
</x-slot:appArgument> | ||
|
||
<div class="max-w-7xl mx-auto pl-4 pr-4 py-6 sm:px-6" wire:init="loadPage"> | ||
<section class="mb-4"> | ||
<div> | ||
<div class="flex gap-1"> | ||
<div class="flex flex-wrap items-center w-full"> | ||
<h1 class="text-2xl font-bold">{{ __(':x’s Following', ['x' => $user->username]) }}</h1> | ||
</div> | ||
|
||
<div class="flex flex-wrap flex-1 justify-end items-center w-full"> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
@if ($this->following->count()) | ||
<x-rows.user-lockup :users="$this->following" :is-row="false" /> | ||
|
||
<div class="mt-4"> | ||
{{ $this->following->links() }} | ||
</div> | ||
@elseif (!$readyToLoad) | ||
<section class="mt-4"> | ||
<div class="flex gap-4 justify-between flex-wrap"> | ||
@foreach(range(1,25) as $range) | ||
<div class="bg-gray-200 w-64 md:w-80 flex-grow" style="height: 168px;"></div> | ||
@endforeach | ||
<div class="w-64 md:w-80 flex-grow"></div> | ||
<div class="w-64 md:w-80 flex-grow"></div> | ||
</div> | ||
</section> | ||
@else | ||
<section class="flex flex-col items-center mt-4 text-center"> | ||
<x-picture> | ||
<img class="w-full max-w-sm" src="{{ asset('images/static/placeholders/empty_anime_library.webp') }}" alt="No following" title="No following"> | ||
</x-picture> | ||
|
||
<p class="font-bold">{{ __('No Following') }}</p> | ||
|
||
@if ($user->id != auth()->user()?->id) | ||
<p class="text-sm text-gray-500">{{ __('Be the first to follow :x!', ['x' => $user->username]) }}</p> | ||
<livewire:components.follow-button :user="$user" :is-followed="$isFollowed" wire:key="{{ uniqid(more_entropy: true) }}" /> | ||
@else | ||
<p class="text-sm text-gray-500">{{ __('Users you follow show up here!') }}</p> | ||
@endif | ||
</section> | ||
@endif | ||
</div> | ||
</div> | ||
</main> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters