mirror of
https://github.com/NyaaStudios/nyaabooru.git
synced 2025-12-10 05:42:58 +00:00
add users page, full screen image preview, footer
Some checks are pending
Docker / build (push) Waiting to run
Some checks are pending
Docker / build (push) Waiting to run
This commit is contained in:
parent
7ec9c4bc9d
commit
1442dbfa60
20 changed files with 202 additions and 32 deletions
|
|
@ -45,6 +45,11 @@ wa-page[view='mobile'] {
|
|||
border-block-end: var(--wa-border-width-s) var(--wa-border-style) var(--wa-color-surface-border);
|
||||
}
|
||||
|
||||
[slot='footer'] {
|
||||
--wa-link-decoration-default: none;
|
||||
border-block-start: var(--wa-border-width-s) var(--wa-border-style) var(--wa-color-surface-border);
|
||||
}
|
||||
|
||||
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
|
||||
@source '../../storage/framework/views/*.php';
|
||||
@source '../**/*.blade.php';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!doctype html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="wa-dark">
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="wa-cloak wa-dark">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
|
@ -19,6 +19,10 @@
|
|||
<main>
|
||||
{{ $slot }}
|
||||
</main>
|
||||
|
||||
<footer slot="footer">
|
||||
@livewire('app.footer')
|
||||
</footer>
|
||||
</wa-page>
|
||||
|
||||
@stack('modals')
|
||||
|
|
|
|||
12
resources/views/livewire/app/footer.blade.php
Normal file
12
resources/views/livewire/app/footer.blade.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<div class="wa-split">
|
||||
<div class="wa-stack wa-gap-2xs">
|
||||
<div class="wa-cluster wa-heading-l">
|
||||
<wa-icon name="paw-simple"></wa-icon>
|
||||
<span>{{ config('app.name') }}</span>
|
||||
</div>
|
||||
<span class="wa-caption-l">© 2025 NyaaStudios; All rights reserved.</span>
|
||||
</div>
|
||||
<div class="wa-cluster wa-heading-m">
|
||||
<wa-icon-button family="brands" name="github" href="https://github.com/NyaaStudios/nyaabooru" target="_blank"></wa-icon-button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -11,5 +11,5 @@
|
|||
@endauth
|
||||
</div>
|
||||
|
||||
<livewire:post-feature />
|
||||
<livewire:post-feature lazy />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,11 @@
|
|||
<wa-icon slot="prefix" name="tags"></wa-icon>
|
||||
Tags
|
||||
</wa-button>
|
||||
|
||||
<wa-button appearance="plain" href="{{ route('users') }}" wire:navigate.hover>
|
||||
<wa-icon slot="prefix" name="users"></wa-icon>
|
||||
Users
|
||||
</wa-button>
|
||||
@endauth
|
||||
</div>
|
||||
|
||||
|
|
@ -41,7 +46,10 @@
|
|||
{{ Auth::user()->name }}
|
||||
</div>
|
||||
</wa-button>
|
||||
<wa-icon-button href="{{ route('logout') }}" appearance="plain" name="arrow-left-from-bracket"></wa-icon-button>
|
||||
<wa-button href="{{ route('logout') }}" appearance="plain">
|
||||
<wa-icon name="arrow-left-from-bracket" slot="prefix"></wa-icon>
|
||||
Sign out
|
||||
</wa-button>
|
||||
@endauth
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
@php use Illuminate\Support\Facades\Storage; @endphp
|
||||
<div>
|
||||
<wa-avatar
|
||||
@if(Storage::has("avatars/$user->id"))
|
||||
image="{{ $user->getAvatarBase64() }}"
|
||||
@endif
|
||||
label="avatar for {{ $user->name }}"
|
||||
shape="{{ $shape }}"
|
||||
style="--size: {{ $size }}"
|
||||
></wa-avatar>
|
||||
</div>
|
||||
<wa-avatar
|
||||
@if(Illuminate\Support\Facades\Storage::has("avatars/$user->id"))
|
||||
image="{{ $user->getAvatarBase64() }}"
|
||||
@endif
|
||||
label="avatar for {{ $user->name }}"
|
||||
shape="{{ $shape }}"
|
||||
style="--size: {{ $size }}"
|
||||
></wa-avatar>
|
||||
|
|
|
|||
13
resources/views/livewire/app/user-card.blade.php
Normal file
13
resources/views/livewire/app/user-card.blade.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<article class="wa-stack">
|
||||
<a class="wa-frame wa-border-radius-l" style="max-inline-size: 15rem;" href="{{ url("/profiles/$user->id") }}" wire:navigate.hover>
|
||||
@if (\Illuminate\Support\Facades\Storage::has("avatars/$user->id"))
|
||||
<img src="{{ $user->getAvatarBase64() }}"/>
|
||||
@else
|
||||
<wa-icon name="user"></wa-icon>
|
||||
@endif
|
||||
</a>
|
||||
<div class="wa-stack wa-gap-3xs">
|
||||
<span class="wa-heading-s">{{ $user->name }}</span>
|
||||
<span class="wa-caption-m">Joined <wa-format-date value="{{ $user->created_at }}"></wa-format-date></span>
|
||||
</div>
|
||||
</article>
|
||||
|
|
@ -1,8 +1,11 @@
|
|||
<div class="wa-stack wa-gap-3xl">
|
||||
<div class="wa-stack">
|
||||
<div class="wa-stack wa-gap-xl">
|
||||
<div class="wa-flank wa-align-items-center">
|
||||
<livewire:app.pfp :$user size="5rem" shape="rounded" />
|
||||
<h1>{{ $user->name }}</h1>
|
||||
<div class="wa-stack wa-gap-2xs">
|
||||
<h1>{{ $user->name }}</h1>
|
||||
<span class="wa-caption-l">Member since <wa-format-date value="{{ $user->created_at }}"></wa-format-date></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wa-grid" style="--min-column-size: 30ch;">
|
||||
|
|
|
|||
9
resources/views/livewire/pages/users.blade.php
Normal file
9
resources/views/livewire/pages/users.blade.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<div class="wa-stack wa-gap-3xl">
|
||||
<h1>Users</h1>
|
||||
|
||||
<div class="wa-cluster wa-gap-3xl">
|
||||
@foreach ($users as $user)
|
||||
<livewire:app.user-card :$user />
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,16 +1,18 @@
|
|||
<div class="wa-flank wa-align-items-center">
|
||||
<livewire:app.pfp :user="$comment->user" />
|
||||
<div class="wa-split">
|
||||
<div class="wa-stack wa-gap-3xs">
|
||||
<div class="wa-cluster wa-align-items-center">
|
||||
<strong>{{ $comment->user->name }}</strong>
|
||||
<span class="wa-caption-m" wire:poll.visible>{{ $comment->created_at->diffForHumans() }}</span>
|
||||
<wa-card>
|
||||
<div class="wa-flank wa-align-items-start">
|
||||
<livewire:app.pfp :user="$comment->user" />
|
||||
<div class="wa-split">
|
||||
<div class="wa-stack wa-gap-3xs">
|
||||
<div class="wa-cluster wa-align-items-center">
|
||||
<strong>{{ $comment->user->name }}</strong>
|
||||
<span class="wa-caption-m" wire:poll.visible>{{ $comment->created_at->diffForHumans() }}</span>
|
||||
</div>
|
||||
<span>{{ $comment->message }}</span>
|
||||
</div>
|
||||
<span>{{ $comment->message }}</span>
|
||||
</div>
|
||||
|
||||
@if (Auth::id() == $comment->user->id)
|
||||
<wa-icon-button href="{{ url("/delete/comment/$comment->id") }}" name="times" label="Delete"></wa-icon-button>
|
||||
@endif
|
||||
@if (Auth::id() == $comment->user->id)
|
||||
<wa-icon-button href="{{ url("/delete/comment/$comment->id") }}" name="times" label="Delete"></wa-icon-button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</wa-card>
|
||||
|
|
|
|||
3
resources/views/livewire/posts/full-image.blade.php
Normal file
3
resources/views/livewire/posts/full-image.blade.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<div class="wa-frame wa-border-radius-l" style="max-inline-size: 100%; {{ $post->getAspectRatio() }}">
|
||||
<img src="{{ $post->getFullUrl() }}" />
|
||||
</div>
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
<wa-icon-button href="{{ url("posts/$post->id/edit") }}" name="file-pen" style="color: var(--wa-color-text-link);" wire:navigate.hover></wa-icon-button>
|
||||
<wa-icon-button href="{{ url("posts/$post->id/download") }}" name="download" style="color: var(--wa-color-text-link);"></wa-icon-button>
|
||||
<wa-icon-button name="arrow-up-right-and-arrow-down-left-from-center" wire:click="$js.showFullImage" style="color: var(--wa-color-text-link);"></wa-icon-button>
|
||||
</div>
|
||||
|
||||
<wa-divider></wa-divider>
|
||||
|
|
@ -70,7 +71,9 @@
|
|||
|
||||
{{-- Main content --}}
|
||||
<div class="wa-stack wa-gap-2xl" wire:poll.visible>
|
||||
<livewire:posts.image :$post lazy />
|
||||
<a wire:click="$js.showFullImage" style="cursor: pointer;">
|
||||
<livewire:posts.image :$post lazy />
|
||||
</a>
|
||||
|
||||
<span class="wa-heading-m">
|
||||
<wa-format-number value="{{ $post->comments->count() }}"></wa-format-number>
|
||||
|
|
@ -86,6 +89,19 @@
|
|||
@foreach ($comments as $comment)
|
||||
<livewire:posts.comment :$comment :key="$comment->id" />
|
||||
@endforeach
|
||||
|
||||
{{-- Full image dialog --}}
|
||||
<wa-dialog id="fullImagePreview" without-header without-footer light-dismiss style="--width: 90%;" wire:ignore>
|
||||
<livewire:posts.full-image :$post lazy />
|
||||
</wa-dialog>
|
||||
|
||||
@script
|
||||
<script>
|
||||
$js('showFullImage', () => {
|
||||
document.querySelector('#fullImagePreview').open = true
|
||||
});
|
||||
</script>
|
||||
@endscript
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue