mirror of
https://github.com/NyaaStudios/nyaabooru.git
synced 2025-12-10 05:42:58 +00:00
add models, setup livewire, setup mongodb
This commit is contained in:
parent
c0590a3412
commit
be4c848eee
27 changed files with 2508 additions and 0 deletions
49
resources/views/livewire/posts/edit.blade.php
Normal file
49
resources/views/livewire/posts/edit.blade.php
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<div class="wa-flank wa-align-items-start wa-gap-3xl" style="--flank-size: 20rem;">
|
||||
|
||||
{{-- Sidebar --}}
|
||||
<div class="wa-stack" wire:poll>
|
||||
|
||||
<div class="wa-cluster">
|
||||
<span class="wa-caption-m">Changes are automatically saved.</span>
|
||||
<wa-button href="{{ url("posts/$post->id") }}" appearance="outlined" variant="neutral" size="small" wire:navigate.hover>
|
||||
<wa-icon slot="prefix" name="check"></wa-icon>
|
||||
<span>Finish</span>
|
||||
</wa-button>
|
||||
</div>
|
||||
|
||||
<wa-divider></wa-divider>
|
||||
|
||||
<form wire:submit class="wa-stack">
|
||||
<wa-select wire:model.live="rating" label="Rating" value="{{ $post->rating }}" wire:loading.attr="disabled" @error('rating') hint="{{ $message }}" @enderror>
|
||||
<wa-option value="safe">Safe</wa-option>
|
||||
<wa-option value="suggestive">Suggestive</wa-option>
|
||||
<wa-option value="explicit">Explicit</wa-option>
|
||||
</wa-select>
|
||||
|
||||
@if ($post->rating == 'safe')
|
||||
<wa-switch
|
||||
wire:model.live="featured"
|
||||
{{ $post->featured ? 'checked' : '' }}
|
||||
wire:loading.attr="disabled"
|
||||
hint="Featured posts will be randomly selected to show on the front page.">
|
||||
Feature post
|
||||
</wa-switch>
|
||||
@endif
|
||||
</form>
|
||||
|
||||
<wa-divider></wa-divider>
|
||||
|
||||
{{-- Tags --}}
|
||||
<div class="wa-cluster wa-heading-m">
|
||||
<wa-icon fixed-width name="tags"></wa-icon>
|
||||
<span>Tags</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{-- Main content --}}
|
||||
<div class="wa-stack wa-gap-2xl" wire:poll>
|
||||
<livewire:posts.image :$post lazy />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue