mirror of
https://github.com/NyaaStudios/nyaabooru.git
synced 2025-12-10 05:42:58 +00:00
Compare commits
No commits in common. "c7c621b086f15d52b77cc086a4b0e134b7b9f885" and "e7b31a716c0d5449b5066804faf421330a148f47" have entirely different histories.
c7c621b086
...
e7b31a716c
22 changed files with 49 additions and 125 deletions
|
|
@ -7,8 +7,6 @@ use Livewire\Component;
|
|||
class Icon extends Component
|
||||
{
|
||||
public string $name = 'paw-simple';
|
||||
public string $label = '';
|
||||
public string $style = '';
|
||||
public string $attrs = '';
|
||||
public string|null $slot = null;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,12 +3,10 @@
|
|||
namespace App\Livewire\Pages;
|
||||
|
||||
use App\Models\User;
|
||||
use Livewire\Attributes\Title;
|
||||
use Livewire\Component;
|
||||
|
||||
class Users extends Component
|
||||
{
|
||||
#[Title('Users')]
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.pages.users', [ 'users' => User::paginate(10) ]);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
FROM dunglas/frankenphp
|
||||
|
||||
# Copy php.ini
|
||||
# COPY ./deploy/php.ini $PHP_INI_DIR/php-app-config.ini
|
||||
COPY --link ./deploy/php.ini $PHP_INI_DIR/conf.d/
|
||||
COPY ./deploy/php.ini $PHP_INI_DIR/php-app-config.ini
|
||||
|
||||
RUN apt update -y && apt install -y --no-install-recommends git nodejs npm
|
||||
COPY --from=composer:lts /usr/bin/composer /usr/bin/composer
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
[php]
|
||||
upload_max_filesize = 100M
|
||||
post_max_size = 128M
|
||||
post_max_filesize = 128M
|
||||
memory_limit = 1G
|
||||
max_execution_time = 120
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
@import url('https://early.webawesome.com/webawesome@3.0.0-beta.1/dist/styles/webawesome.css');
|
||||
@import url('https://early.webawesome.com/webawesome@3.0.0-beta.1/dist/styles/utilities.css');
|
||||
|
||||
@import url('https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/styles/themes/awesome/typography.css');
|
||||
@import url('https://early.webawesome.com/webawesome@3.0.0-beta.1/dist/styles/themes/tailspin.css');
|
||||
@import url('https://early.webawesome.com/webawesome@3.0.0-beta.1/dist/styles/color/palettes/elegant.css');
|
||||
@import url('https://early.webawesome.com/webawesome@3.0.0-beta.1/dist/styles/color/palettes/default.css');
|
||||
|
||||
html,
|
||||
body {
|
||||
|
|
@ -13,7 +12,11 @@ body {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
:root {
|
||||
:where(:root),
|
||||
:host,
|
||||
.wa-theme-nyaabooru {
|
||||
--wa-icon-family: classic;
|
||||
--wa-icon-variant: light;
|
||||
--wa-border-radius-scale: 0.5;
|
||||
--wa-border-width-scale: 1;
|
||||
--wa-space-scale: 0.75;
|
||||
|
|
|
|||
|
|
@ -1,16 +1,12 @@
|
|||
<!doctype html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="wa-theme-tailspin wa-palette-elegant wa-brand-pink wa-neutral-gray wa-success-green wa-warning-yellow wa-danger-red wa-dark">
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="wa-cloak wa-theme-tailspin wa-palette-default wa-dark wa-brand-pink wa-neutral-gray wa-success-green wa-warning-yellow wa-danger-red">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
<script type="module" src="https://early.webawesome.com/webawesome@3.0.0-beta.1/dist/webawesome.loader.js"></script>
|
||||
<script type="module" data-fa-kit-code="ba9cf75857">
|
||||
import { setDefaultIconFamily } from 'https://early.webawesome.com/webawesome@3.0.0-beta.1/dist/webawesome.js';
|
||||
setDefaultIconFamily('classic');
|
||||
</script>
|
||||
<script type="module" src="https://early.webawesome.com/webawesome@3.0.0-beta.1/dist/webawesome.loader.js" data-fa-kit-code="ba9cf75857"></script>
|
||||
@livewireStyles
|
||||
<title>{{ $title ?? 'Untitled' }} ~ {{ config('app.name') }}</title>
|
||||
</head>
|
||||
|
|
@ -22,9 +18,7 @@
|
|||
|
||||
<nav slot="subheader">
|
||||
<div class="wa-cluster">
|
||||
<wa-button data-toggle-nav appearance="plain" label="Menu">
|
||||
<livewire:app.icon name="bars" />
|
||||
</wa-button>
|
||||
<wa-icon-button data-toggle-nav name="bars" label="Menu"></wa-icon-button>
|
||||
<a href="{{ route('home') }}" class="wa-cluster" style="font-size: 1.5rem;" wire:navigate.hover>
|
||||
<livewire:app.icon name="paw-simple" />
|
||||
{{ config('app.name') }}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
<div class="wa-stack wa-gap-3xl">
|
||||
<wa-breadcrumb class="wa-heading-l">
|
||||
<wa-breadcrumb-item>{{ config('app.name') }}</wa-breadcrumb-item>
|
||||
</wa-breadcrumb>
|
||||
<h1>{{ config('app.name') }}</h1>
|
||||
|
||||
<livewire:post-feature lazy />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,3 @@
|
|||
<wa-icon
|
||||
name="{{ $name }}"
|
||||
variant="light"
|
||||
label="{{ $label }}"
|
||||
fixed-width
|
||||
@isset($slot)
|
||||
slot="{{ $slot }}"
|
||||
@endisset
|
||||
style="{{ $style }}"
|
||||
$attrs
|
||||
></wa-icon>
|
||||
<span>
|
||||
<wa-icon name="{{ $name }}" variant="light" fixed-width @isset($slot) slot="{{ $slot }}" @endisset $attrs></wa-icon>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -15,14 +15,9 @@
|
|||
Tags
|
||||
</a>
|
||||
|
||||
<a href="{{ route('tags.groups') }}" class="wa-cluster" wire:navigate.hover>
|
||||
<livewire:app.icon name="layer-group" />
|
||||
Tag groups
|
||||
</a>
|
||||
|
||||
<a href="{{ route('users') }}" class="wa-cluster" wire:navigate.hover>
|
||||
<livewire:app.icon name="users" />
|
||||
Profiles
|
||||
Users
|
||||
</a>
|
||||
@endauth
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
<div class="wa-split">
|
||||
<div class="wa-cluster wa-align-items-center">
|
||||
<wa-button
|
||||
<wa-icon-button
|
||||
href="{{ route('home') }}"
|
||||
name="paw-simple"
|
||||
appearance="plain"
|
||||
style="font-size: 1.5rem;"
|
||||
wire:navigate.hover>
|
||||
<livewire:app.icon name="paw-simple" label="Home" style="font-size: 1.5rem;" />
|
||||
</wa-button>
|
||||
</wa-icon-button>
|
||||
|
||||
@auth
|
||||
<wa-button appearance="plain" href="{{ route('posts.home') }}" wire:navigate.hover>
|
||||
|
|
@ -23,14 +24,9 @@
|
|||
Tags
|
||||
</wa-button>
|
||||
|
||||
<wa-button appearance="plain" href="{{ route('tags.groups') }}" wire:navigate.hover>
|
||||
<livewire:app.icon slot="start" name="layer-group" />
|
||||
Tag groups
|
||||
</wa-button>
|
||||
|
||||
<wa-button appearance="plain" href="{{ route('users') }}" wire:navigate.hover>
|
||||
<livewire:app.icon slot="start" name="users" />
|
||||
Profiles
|
||||
Users
|
||||
</wa-button>
|
||||
@endauth
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<article class="wa-stack nyaabooru-pfp">
|
||||
<a class="wa-frame wa-border-radius-l" style="inline-size: 15rem;" href="{{ url("/profiles/$user->id") }}" wire:navigate.hover>
|
||||
<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
|
||||
|
|
|
|||
|
|
@ -3,11 +3,7 @@
|
|||
<div class="wa-flank wa-align-items-center">
|
||||
<livewire:app.pfp :$user size="5rem" shape="rounded" />
|
||||
<div class="wa-stack wa-gap-2xs">
|
||||
<wa-breadcrumb class="wa-heading-l">
|
||||
<wa-breadcrumb-item href="{{ route('home') }}" wire:navigate.hover>{{ config('app.name') }}</wa-breadcrumb-item>
|
||||
<wa-breadcrumb-item href="{{ route('users') }}" wire:navigate.hover>profiles</wa-breadcrumb-item>
|
||||
<wa-breadcrumb-item>{{ $user->name }}</wa-breadcrumb-item>
|
||||
</wa-breadcrumb>
|
||||
<h1>{{ $user->name }}</h1>
|
||||
<span class="wa-caption-l">Member since <wa-format-date value="{{ $user->created_at }}"></wa-format-date></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
<div class="wa-stack wa-gap-3xl">
|
||||
<wa-breadcrumb class="wa-heading-l">
|
||||
<wa-breadcrumb-item href="{{ route('home') }}" wire:navigate.hover>{{ config('app.name') }}</wa-breadcrumb-item>
|
||||
<wa-breadcrumb-item>upload</wa-breadcrumb-item>
|
||||
</wa-breadcrumb>
|
||||
<h1>Upload</h1>
|
||||
|
||||
<form wire:submit="createPost" class="wa-stack wa-gap-xl">
|
||||
<wa-card class="wa-stack">
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
<div class="wa-stack wa-gap-3xl">
|
||||
<wa-breadcrumb class="wa-heading-l">
|
||||
<wa-breadcrumb-item href="{{ route('home') }}" wire:navigate.hover>{{ config('app.name') }}</wa-breadcrumb-item>
|
||||
<wa-breadcrumb-item>profiles</wa-breadcrumb-item>
|
||||
</wa-breadcrumb>
|
||||
<h1>Users</h1>
|
||||
|
||||
<div class="wa-cluster wa-gap-3xl">
|
||||
@foreach ($users as $user)
|
||||
|
|
|
|||
|
|
@ -2,27 +2,5 @@
|
|||
<a href="{{ url("posts/$post->id") }}" class="wa-frame wa-border-radius-l" style="max-inline-size: 100%; {{ $post->getAspectRatio() }}" wire:navigate.hover>
|
||||
<img src="{{ $post->getPreviewUrl() }}" />
|
||||
</a>
|
||||
<div class="wa-cluster wa-gap-xl wa-caption-m">
|
||||
<span class="wa-cluster wa-gap-xs">
|
||||
<livewire:app.icon name="user" />
|
||||
<a href="{{ url("profiles/{$post->user->id}") }}" wire:navigate.hover>{{ $post->user->name }}</a>
|
||||
</span>
|
||||
|
||||
<div class="wa-cluster wa-gap-xs">
|
||||
<livewire:app.icon name="calendar" />
|
||||
<wa-format-date
|
||||
month="numeric"
|
||||
day="numeric"
|
||||
year="numeric"
|
||||
hour="numeric"
|
||||
minute="numeric"
|
||||
date="{{ $post->created_at }}">
|
||||
</wa-format-date>
|
||||
</div>
|
||||
|
||||
<div class="wa-cluster wa-gap-xs">
|
||||
<livewire:app.icon name="hashtag" />
|
||||
<a href="{{ url("posts/$post->id") }}" wire:navigate.hover>{{ $post->id }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<span class="wa-caption-m">-{{ $post->user->name }}, <wa-format-date></wa-format-date></span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<div class="wa-frame wa-border-radius-l" style="max-inline-size: 100%; {{ $post->getAspectRatio() }}">
|
||||
<img src="{{ $post->getFullUrl() }}" style="height: 95vh;" />
|
||||
<img src="{{ $post->getFullUrl() }}" />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
<div class="wa-stack wa-gap-3xl">
|
||||
<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>
|
||||
<h1>Posts</h1>
|
||||
<div class="wa-cluster wa-gap-s">
|
||||
@foreach ($posts as $post)
|
||||
<livewire:posts.thumbnail :$post lazy />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div style="inline-size: 256px;">
|
||||
<div style="max-inline-size: 256px;">
|
||||
<a
|
||||
id="post_{{ $post->id }}"
|
||||
href="{{ url("posts/$post->id") }}"
|
||||
|
|
|
|||
|
|
@ -6,34 +6,20 @@
|
|||
{{-- Post navigation --}}
|
||||
<div class="wa-cluster">
|
||||
@if ($prev = $post->getPreviousPost())
|
||||
<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>
|
||||
<wa-icon-button href="{{ url("posts/$prev->id") }}" name="arrow-left" style="color: var(--wa-color-text-link);" wire:navigate.hover></wa-icon-button>
|
||||
@else
|
||||
<wa-button appearance="plain" label="Previous" disabled>
|
||||
<livewire:app.icon name="arrow-left" />
|
||||
</wa-button>
|
||||
<wa-icon-button name="arrow-left" disabled></wa-icon-button>
|
||||
@endif
|
||||
|
||||
@if ($next = $post->getNextPost())
|
||||
<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>
|
||||
<wa-icon-button href="{{ url("posts/$next->id") }}" name="arrow-right" style="color: var(--wa-color-text-link);" wire:navigate.hover></wa-icon-button>
|
||||
@else
|
||||
<wa-button appearance="plain" label="Next" disabled>
|
||||
<livewire:app.icon name="arrow-right" />
|
||||
</wa-button>
|
||||
<wa-icon-button name="arrow-right" disabled></wa-icon-button>
|
||||
@endif
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
|
@ -113,8 +99,7 @@
|
|||
@endforeach
|
||||
|
||||
{{-- Full image dialog --}}
|
||||
@php [$imgw, $imgh] = $post->getDimensions(); @endphp
|
||||
<wa-dialog id="fullImagePreview" without-header without-footer light-dismiss style="--width: calc(95vh * ({{ $imgw }} / {{ $imgh }}));" wire:ignore>
|
||||
<wa-dialog id="fullImagePreview" without-header without-footer light-dismiss style="--width: 120vh;" wire:ignore>
|
||||
<livewire:posts.full-image :$post lazy />
|
||||
</wa-dialog>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<div class="wa-stack">
|
||||
<wa-breadcrumb class="wa-heading-l">
|
||||
<wa-breadcrumb-item href="{{ route('home') }}" wire:navigate.hover>{{ config('app.name') }}</wa-breadcrumb-item>
|
||||
<wa-breadcrumb-item>tag groups</wa-breadcrumb-item>
|
||||
</wa-breadcrumb>
|
||||
<h1 class="wa-cluster wa-gap-3xl" style="--wa-link-decoration-default: none; --wa-color-text-link: var(--wa-color-text-quiet)">
|
||||
<a href="{{ route('tags.home') }}" wire:navigate.hover>Tags</a>
|
||||
<span>Tag groups</span>
|
||||
</h1>
|
||||
|
||||
<div class="wa-flank:end wa-align-items-start">
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
@php use App\Models\Tag; @endphp
|
||||
|
||||
<div class="wa-stack">
|
||||
<wa-breadcrumb class="wa-heading-l">
|
||||
<wa-breadcrumb-item href="{{ route('home') }}" wire:navigate.hover>{{ config('app.name') }}</wa-breadcrumb-item>
|
||||
<wa-breadcrumb-item>tags</wa-breadcrumb-item>
|
||||
</wa-breadcrumb>
|
||||
<h1 class="wa-cluster wa-gap-3xl" style="--wa-link-decoration-default: none; --wa-color-text-link: var(--wa-color-text-quiet)">
|
||||
<span>Tags</span>
|
||||
<a href="{{ route('tags.groups') }}" wire:navigate.hover>Tag groups</a>
|
||||
</h1>
|
||||
|
||||
<div class="wa-flank:end wa-align-items-start">
|
||||
<table class="wa-table">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
<tbody>
|
||||
{{-- Untagged posts --}}
|
||||
<tr>
|
||||
<td>Untagged</td>
|
||||
<td class="wa-caption-m">-- Untagged --</td>
|
||||
<td></td>
|
||||
<td><wa-format-number value="{{ $untaggedPosts->count() }}"></wa-format-number> {{ Str::plural('post', $untaggedPosts->count()) }}</td>
|
||||
<td></td>
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ Route::get('/', AppHome::class)->name('home');
|
|||
// Authenticated routes
|
||||
Route::middleware('auth')->group(function () {
|
||||
Route::get('/upload', UploadPage::class)->name('upload');
|
||||
Route::get('/profiles', UsersPage::class)->name('users');
|
||||
Route::get('/profiles/{user}', ProfilePage::class);
|
||||
Route::get('/users', UsersPage::class)->name('users');
|
||||
Route::get('/phpinfo', function () { return phpinfo(); });
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue