mirror of
https://github.com/NyaaStudios/nyaabooru.git
synced 2025-12-10 05:42:58 +00:00
Add proper mobile nav; update mongodb package ver
This commit is contained in:
parent
1e19f79af1
commit
4c58b94f96
10 changed files with 195 additions and 12 deletions
13
app/Livewire/App/NavFooter.php
Normal file
13
app/Livewire/App/NavFooter.php
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Livewire\App;
|
||||||
|
|
||||||
|
use Livewire\Component;
|
||||||
|
|
||||||
|
class NavFooter extends Component
|
||||||
|
{
|
||||||
|
public function render()
|
||||||
|
{
|
||||||
|
return view('livewire.app.nav-footer');
|
||||||
|
}
|
||||||
|
}
|
||||||
13
app/Livewire/App/NavMenu.php
Normal file
13
app/Livewire/App/NavMenu.php
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Livewire\App;
|
||||||
|
|
||||||
|
use Livewire\Component;
|
||||||
|
|
||||||
|
class NavMenu extends Component
|
||||||
|
{
|
||||||
|
public function render()
|
||||||
|
{
|
||||||
|
return view('livewire.app.nav-menu');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
"league/flysystem": "^3.29",
|
"league/flysystem": "^3.29",
|
||||||
"league/flysystem-gridfs": "3.x-dev",
|
"league/flysystem-gridfs": "3.x-dev",
|
||||||
"livewire/livewire": "^3.6",
|
"livewire/livewire": "^3.6",
|
||||||
"mongodb/laravel-mongodb": "^5.4",
|
"mongodb/laravel-mongodb": "*",
|
||||||
"overtrue/laravel-favorite": "^5.3",
|
"overtrue/laravel-favorite": "^5.3",
|
||||||
"predis/predis": "^3.0",
|
"predis/predis": "^3.0",
|
||||||
"socialiteproviders/authentik": "^5.2",
|
"socialiteproviders/authentik": "^5.2",
|
||||||
|
|
|
||||||
95
composer.lock
generated
95
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "5de9119745206eabc310e39501de5f17",
|
"content-hash": "75207b40221a16fc6aa38c1290b281f5",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
|
|
@ -2915,23 +2915,24 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mongodb/mongodb",
|
"name": "mongodb/mongodb",
|
||||||
"version": "1.21.1",
|
"version": "2.1.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/mongodb/mongo-php-library.git",
|
"url": "https://github.com/mongodb/mongo-php-library.git",
|
||||||
"reference": "37bc8df3a67ddf8380704a5ba5dbd00e92ec1f6a"
|
"reference": "3bbe7ba9578724c7e1f47fcd17c881c0995baaad"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/37bc8df3a67ddf8380704a5ba5dbd00e92ec1f6a",
|
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/3bbe7ba9578724c7e1f47fcd17c881c0995baaad",
|
||||||
"reference": "37bc8df3a67ddf8380704a5ba5dbd00e92ec1f6a",
|
"reference": "3bbe7ba9578724c7e1f47fcd17c881c0995baaad",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"composer-runtime-api": "^2.0",
|
"composer-runtime-api": "^2.0",
|
||||||
"ext-mongodb": "^1.21.0",
|
"ext-mongodb": "^2.1",
|
||||||
"php": "^8.1",
|
"php": "^8.1",
|
||||||
"psr/log": "^1.1.4|^2|^3"
|
"psr/log": "^1.1.4|^2|^3",
|
||||||
|
"symfony/polyfill-php85": "^1.32"
|
||||||
},
|
},
|
||||||
"replace": {
|
"replace": {
|
||||||
"mongodb/builder": "*"
|
"mongodb/builder": "*"
|
||||||
|
|
@ -2985,9 +2986,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/mongodb/mongo-php-library/issues",
|
"issues": "https://github.com/mongodb/mongo-php-library/issues",
|
||||||
"source": "https://github.com/mongodb/mongo-php-library/tree/1.21.1"
|
"source": "https://github.com/mongodb/mongo-php-library/tree/2.1.0"
|
||||||
},
|
},
|
||||||
"time": "2025-02-28T17:24:20+00:00"
|
"time": "2025-05-23T10:48:05+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "monolog/monolog",
|
"name": "monolog/monolog",
|
||||||
|
|
@ -6316,6 +6317,82 @@
|
||||||
],
|
],
|
||||||
"time": "2024-09-09T11:45:10+00:00"
|
"time": "2024-09-09T11:45:10+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/polyfill-php85",
|
||||||
|
"version": "v1.32.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/polyfill-php85.git",
|
||||||
|
"reference": "6fedf31ce4e3648f4ff5ca58bfd53127d38f05fd"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/6fedf31ce4e3648f4ff5ca58bfd53127d38f05fd",
|
||||||
|
"reference": "6fedf31ce4e3648f4ff5ca58bfd53127d38f05fd",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.2"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"thanks": {
|
||||||
|
"url": "https://github.com/symfony/polyfill",
|
||||||
|
"name": "symfony/polyfill"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"bootstrap.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Polyfill\\Php85\\": ""
|
||||||
|
},
|
||||||
|
"classmap": [
|
||||||
|
"Resources/stubs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "p@tchwork.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony polyfill backporting some PHP 8.5+ features to lower PHP versions",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"compatibility",
|
||||||
|
"polyfill",
|
||||||
|
"portable",
|
||||||
|
"shim"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-php85/tree/v1.32.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2025-05-02T08:40:52+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-uuid",
|
"name": "symfony/polyfill-uuid",
|
||||||
"version": "v1.32.0",
|
"version": "v1.32.0",
|
||||||
|
|
|
||||||
|
|
@ -33,13 +33,35 @@ wa-page[view='desktop'] {
|
||||||
[slot*='navigation'] {
|
[slot*='navigation'] {
|
||||||
border-inline-end: var(--wa-border-width-s) var(--wa-border-style) var(--wa-color-surface-border);
|
border-inline-end: var(--wa-border-width-s) var(--wa-border-style) var(--wa-color-surface-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[slot*='navigation'],
|
||||||
|
[slot*='navigation-header'],
|
||||||
|
[slot*='navigation-footer']{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wa-page[view='mobile'] {
|
wa-page[view='mobile'] {
|
||||||
|
[slot*='header'] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
--menu-width: auto;
|
--menu-width: auto;
|
||||||
--aside-width: auto;
|
--aside-width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[slot*='navigation'] a {
|
||||||
|
text-decoration: none;
|
||||||
|
--wa-color-text-link: var(--wa-color-text-normal);
|
||||||
|
}
|
||||||
|
|
||||||
|
[slot*='navigation-footer'] {
|
||||||
|
border-block-start: var(--wa-border-width-s) var(--wa-border-style) var(--wa-color-surface-border);
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
--wa-color-text-link: var(--wa-color-text-normal);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[slot='header'] {
|
[slot='header'] {
|
||||||
--wa-link-decoration-default: none;
|
--wa-link-decoration-default: none;
|
||||||
border-block-end: var(--wa-border-width-s) var(--wa-border-style) var(--wa-color-surface-border);
|
border-block-end: var(--wa-border-width-s) var(--wa-border-style) var(--wa-color-surface-border);
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,14 @@
|
||||||
@livewire('app.navbar')
|
@livewire('app.navbar')
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
<nav slot="navigation">
|
||||||
|
@livewire('app.nav-menu')
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<nav slot="navigation-footer">
|
||||||
|
@livewire('app.nav-footer')
|
||||||
|
</nav>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
{{ $slot }}
|
{{ $slot }}
|
||||||
</main>
|
</main>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<wa-icon name="paw-simple"></wa-icon>
|
<wa-icon name="paw-simple"></wa-icon>
|
||||||
<span>{{ config('app.name') }}</span>
|
<span>{{ config('app.name') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<span class="wa-caption-l">© 2025 NyaaStudios; All rights reserved.</span>
|
<span class="wa-caption-l">© 2025 <a href="https://nyaastudios.io" target="_blank">NyaaStudios</a>; All rights reserved.</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="wa-cluster wa-heading-m">
|
<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>
|
<wa-icon-button family="brands" name="github" href="https://github.com/NyaaStudios/nyaabooru" target="_blank"></wa-icon-button>
|
||||||
|
|
|
||||||
22
resources/views/livewire/app/nav-footer.blade.php
Normal file
22
resources/views/livewire/app/nav-footer.blade.php
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
<div class="wa-stack">
|
||||||
|
@guest
|
||||||
|
<a href="{{ route('login') }}" class="wa-cluster">
|
||||||
|
<wa-icon name="arrow-right-to-bracket"></wa-icon>
|
||||||
|
Sign in to {{ config('app.name') }}
|
||||||
|
</a>
|
||||||
|
@endguest
|
||||||
|
|
||||||
|
@auth
|
||||||
|
<a href="{{ url('/profiles/' . Auth::id()) }}" wire:navigate.hover>
|
||||||
|
<div class="wa-cluster wa-align-items-center">
|
||||||
|
<livewire:app.pfp :user="auth()->user()" size="2rem" shape="rounded" />
|
||||||
|
{{ Auth::user()->name }}
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="{{ route('logout') }}" class="wa-cluster">
|
||||||
|
<wa-icon name="arrow-left-from-bracket"></wa-icon>
|
||||||
|
Sign out
|
||||||
|
</a>
|
||||||
|
@endauth
|
||||||
|
</div>
|
||||||
28
resources/views/livewire/app/nav-menu.blade.php
Normal file
28
resources/views/livewire/app/nav-menu.blade.php
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
<div class="wa-stack">
|
||||||
|
<a href="{{ route('home') }}" class="wa-cluster" style="font-size: 1.5rem;" wire:navigate.hover>
|
||||||
|
<wa-icon name="paw-simple"></wa-icon>
|
||||||
|
{{ config('app.name') }}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
@auth
|
||||||
|
<a href="{{ route('posts.home') }}" class="wa-cluster" wire:navigate.hover>
|
||||||
|
<wa-icon name="images"></wa-icon>
|
||||||
|
Posts
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="{{ route('upload') }}" class="wa-cluster" wire:navigate.hover>
|
||||||
|
<wa-icon name="arrow-up-from-bracket"></wa-icon>
|
||||||
|
Upload
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="{{ route('tags.home') }}" class="wa-cluster" wire:navigate.hover>
|
||||||
|
<wa-icon name="tags"></wa-icon>
|
||||||
|
Tags
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="{{ route('users') }}" class="wa-cluster" wire:navigate.hover>
|
||||||
|
<wa-icon name="users"></wa-icon>
|
||||||
|
Users
|
||||||
|
</a>
|
||||||
|
@endauth
|
||||||
|
</div>
|
||||||
|
|
@ -99,7 +99,7 @@
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
{{-- Full image dialog --}}
|
{{-- Full image dialog --}}
|
||||||
<wa-dialog id="fullImagePreview" without-header without-footer light-dismiss style="--width: 90%;" wire:ignore>
|
<wa-dialog id="fullImagePreview" without-header without-footer light-dismiss style="--width: 120vh;" wire:ignore>
|
||||||
<livewire:posts.full-image :$post lazy />
|
<livewire:posts.full-image :$post lazy />
|
||||||
</wa-dialog>
|
</wa-dialog>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue