mirror of
https://github.com/NyaaStudios/nyaabooru.git
synced 2025-12-10 05:42:58 +00:00
Update post context buttons, page nav, dockerfile
This commit is contained in:
parent
e7b31a716c
commit
b4d83e9a29
22 changed files with 124 additions and 48 deletions
|
|
@ -1,3 +1,3 @@
|
|||
<div class="wa-frame wa-border-radius-l" style="max-inline-size: 100%; {{ $post->getAspectRatio() }}">
|
||||
<img src="{{ $post->getFullUrl() }}" />
|
||||
<img src="{{ $post->getFullUrl() }}" style="height: 95vh;" />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
<div class="wa-stack wa-gap-3xl">
|
||||
<h1>Posts</h1>
|
||||
<wa-breadcrumb class="wa-heading-l">
|
||||
<wa-breadcrumb-item href="{{ route('home') }}" wire:navigate.hover>{{ config('app.name') }}</wa-breadcrumb-item>
|
||||
<wa-breadcrumb-item>posts</wa-breadcrumb-item>
|
||||
</wa-breadcrumb>
|
||||
<div class="wa-cluster wa-gap-s">
|
||||
@foreach ($posts as $post)
|
||||
<livewire:posts.thumbnail :$post lazy />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div style="max-inline-size: 256px;">
|
||||
<div style="inline-size: 256px;">
|
||||
<a
|
||||
id="post_{{ $post->id }}"
|
||||
href="{{ url("posts/$post->id") }}"
|
||||
|
|
|
|||
|
|
@ -6,20 +6,34 @@
|
|||
{{-- Post navigation --}}
|
||||
<div class="wa-cluster">
|
||||
@if ($prev = $post->getPreviousPost())
|
||||
<wa-icon-button href="{{ url("posts/$prev->id") }}" name="arrow-left" style="color: var(--wa-color-text-link);" wire:navigate.hover></wa-icon-button>
|
||||
<wa-button appearance="plain" href="{{ url("posts/$prev->id") }}" label="Previous" style="color: var(--wa-color-text-link);" wire:navigate.hover>
|
||||
<livewire:app.icon name="arrow-left" />
|
||||
</wa-button>
|
||||
@else
|
||||
<wa-icon-button name="arrow-left" disabled></wa-icon-button>
|
||||
<wa-button appearance="plain" label="Previous" disabled>
|
||||
<livewire:app.icon name="arrow-left" />
|
||||
</wa-button>
|
||||
@endif
|
||||
|
||||
@if ($next = $post->getNextPost())
|
||||
<wa-icon-button href="{{ url("posts/$next->id") }}" name="arrow-right" style="color: var(--wa-color-text-link);" wire:navigate.hover></wa-icon-button>
|
||||
<wa-button appearance="plain" href="{{ url("posts/$next->id") }}" label="Next" style="color: var(--wa-color-text-link);" wire:navigate.hover>
|
||||
<livewire:app.icon name="arrow-right" />
|
||||
</wa-button>
|
||||
@else
|
||||
<wa-icon-button name="arrow-right" disabled></wa-icon-button>
|
||||
<wa-button appearance="plain" label="Next" disabled>
|
||||
<livewire:app.icon name="arrow-right" />
|
||||
</wa-button>
|
||||
@endif
|
||||
|
||||
<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>
|
||||
<wa-button appearance="plain" href="{{ url("posts/$post->id/edit") }}" label="Edit" style="color: var(--wa-color-text-link);" wire:navigate.hover>
|
||||
<livewire:app.icon name="file-pen" />
|
||||
</wa-button>
|
||||
<wa-button appearance="plain" href="{{ url("posts/$post->id/download") }}" label="Download" style="color: var(--wa-color-text-link);">
|
||||
<livewire:app.icon name="download" />
|
||||
</wa-button>
|
||||
<wa-button appearance="plain" wire:click="$js.showFullImage" label="Expand" style="color: var(--wa-color-text-link);">
|
||||
<livewire:app.icon name="arrow-up-right-and-arrow-down-left-from-center" />
|
||||
</wa-button>
|
||||
</div>
|
||||
|
||||
<wa-divider></wa-divider>
|
||||
|
|
@ -99,7 +113,8 @@
|
|||
@endforeach
|
||||
|
||||
{{-- Full image dialog --}}
|
||||
<wa-dialog id="fullImagePreview" without-header without-footer light-dismiss style="--width: 120vh;" wire:ignore>
|
||||
@php [$imgw, $imgh] = $post->getDimensions(); @endphp
|
||||
<wa-dialog id="fullImagePreview" without-header without-footer light-dismiss style="--width: calc(95vh * ({{ $imgw }} / {{ $imgh }}));" wire:ignore>
|
||||
<livewire:posts.full-image :$post lazy />
|
||||
</wa-dialog>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue