Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions app/Livewire/Forms/MediaForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ public function edit($id)
$this->media = Media::findOrFail($id);

$this->name = $this->media->name;
$this->states[] = $this->media->is_favorite ? 'is_favorite' : '';
$this->states[] = $this->media->is_active ? 'is_active' : '';
$this->states[] = $this->media->in_backlog ? 'in_backlog' : '';
$this->states[] = $this->media->is_completed ? 'is_completed' : '';
$this->states[] = $this->media->data && $this->media->data['total_completion'] ? 'total_completion' : '';
$this->states[] = $this->media->is_favorite ? 'is_favorite' : null;
$this->states[] = $this->media->is_active ? 'is_active' : null;
$this->states[] = $this->media->in_backlog ? 'in_backlog' : null;
$this->states[] = $this->media->is_completed ? 'is_completed' : null;
$this->states[] = $this->media->data && $this->media->data['total_completion'] ? 'total_completion' : null;

$this->states = collect($this->states)->filter()->values()->toArray();
}

public function update()
Expand All @@ -59,7 +61,5 @@ public function update()
'total_completion' => $states->contains('total_completion'),
],
]);

$this->reset();
}
}
1 change: 1 addition & 0 deletions app/Livewire/Media/Music/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public function store($mediaId)
]);

$this->phrase = '';
$this->searchedMedia = [];

Flux::toast(variant: 'success', text: "{$media->type->name} added!", duration: 3000);
}
Expand Down
2 changes: 1 addition & 1 deletion app/Livewire/Photos/Gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function photos()
{
return Asset::query()
->whereIn('type_id', is_array($this->type) ? $this->type : [$this->type])
->paginate(6);
->paginate(9);
}

public function destroy($id)
Expand Down
34 changes: 19 additions & 15 deletions resources/views/components/prezet/article.blade.php
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
<article>
<flux:card
class="space-y-2 xl:grid xl:grid-cols-4 xl:items-baseline xl:space-y-0"
class="space-y-2 xl:grid xl:grid-cols-4 xl:items-baseline"
>
<dl>
<dt class="sr-only">Published on</dt>
<dd class="text-base font-medium leading-6">
<time datetime="{{ $article->createdAt->toIso8601String() }}">
{{ $article->createdAt->format('F j, Y') }}
{{ $article->createdAt->format('l, F j, Y') }}
</time>
</dd>
</dl>
<div class="space-y-5 xl:col-span-3">
<div class="space-y-6">
<div>
<h2 class="text-2xl font-bold leading-8 tracking-tight">
<h2 class="text-xl md:text-2xl font-bold leading-8 tracking-tight">
<a href="{{ route('prezet.show', $article->slug) }}">
{{ $article->frontmatter->title }}
</a>
</h2>
<div class="flex flex-wrap">
<a
class="mr-3 text-sm font-medium uppercase"
href="{{ route('prezet.index', ['category' => $article->category]) }}"
>
{{ $article->category }}
</a>
@foreach ($article->frontmatter->tags as $tag)
<div class="flex flex-col">
<div class="my-2">
<a
class="mr-3 text-xs font-small uppercase"
href="{{ route('prezet.index', ['tag' => $tag]) }}"
class="mr-3 text-base font-medium underline underline-offset-3"
href="{{ route('prezet.index', ['category' => $article->category]) }}"
>
{{ $tag }}
{{ $article->category }}
</a>
@endforeach
</div>
<div class="flex flex-wrap">
@foreach ($article->frontmatter->tags as $tag)
<a
class="mr-3 text-xs uppercase"
href="{{ route('prezet.index', ['tag' => $tag]) }}"
>
{{ $tag }}
</a>
@endforeach
</div>
</div>
</div>
<div class="prose dark:prose-invert max-w-none">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/flux/main.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@php
$classes = Flux::classes('[grid-area:main]')
->add('p-6 lg:px-8 lg:pt-2')
->add('p-4 lg:px-8')
->add('in-data-flux-container:px-0') // If there is a wrapping container, let IT handle the x padding...
->add($container ? 'mx-auto w-full [:where(&)]:max-w-7xl' : '')
;
Expand Down
2 changes: 1 addition & 1 deletion resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<body class="min-h-screen">
<livewire:navigation />

<flux:main container class="px-8 mt-4">
<flux:main container class="px-4 md:px-8 md:mt-4">
@if (isset($header))
<div class="flex justify-between">
<div class="w-full sm:w-auto">
Expand Down
6 changes: 2 additions & 4 deletions resources/views/layouts/guest.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<livewire:navigation />

<!-- Page Content -->
<flux:main container class="px-8 mt-4">
<flux:main container class="px-4 md:px-8 md:mt-4">
@if (isset($header))
<div class="flex justify-between">
<div class="w-full sm:w-auto">
Expand All @@ -42,9 +42,7 @@
<flux:separator class="mt-2 mb-1" />
@endif

<div class="mt-2">
{{ $slot }}
</div>
{{ $slot }}
</flux:main>

@persist('toast')
Expand Down
4 changes: 3 additions & 1 deletion resources/views/livewire/blog.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@

<flux:table.row :key="$post->getKey()">
<flux:table.cell>
{{ $data->title }}
<flux:tooltip :content="$data->title">
<flux:text>{{ str()->limit($data->title, 30) }}</flux:text>
</flux:tooltip>
</flux:table.cell>

<flux:table.cell>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/livewire/dashboard.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<a href="{{ route('gallery.edit') }}">
<flux:card class="flex space-x-2">
<flux:icon.photo />
<span>Photo Gallery</span>
<span>Photo Manager</span>
</flux:card>
</a>
<a href="{{ route('projects') }}">
Expand Down
53 changes: 27 additions & 26 deletions resources/views/livewire/photos/gallery.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,39 @@
<x-slot name="header">{{ $header }}</x-slot>

<div class="my-2">
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mt-4 mb-4">
<div class="grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-6 mt-4 mb-4">
@forelse($this->photos as $photo)
<flux:card>
<div class="flex flex-col items-center">
<img
src="{{ route('asset', ['slug' => $photo->slug]) }}"
alt="{{ $photo->name }}"
style="width: auto; height: auto; max-width: 100%;"
{{-- disgusting ahhhh hack --}}
onload="if (this.naturalHeight > this.naturalWidth) { this.style.width = '50%'; }"
>
<img
src="{{ route('asset', ['slug' => $photo->slug]) }}"
alt="{{ $photo->name }}"
{{-- disgusting ahhhh hack --}}
onload="if (this.naturalHeight > this.naturalWidth) { this.style.width = '50%'; }"
>

<div class="my-2 text-center">
<flux:text>{{ $photo->name }} - {{ $photo->captured_at }}</flux:text>
</div>
<div class="mt-1">
<div class="flex flex-col">
<div class="my-2">
<flux:text>{{ $photo->name }}</flux:text>

<div>
<flux:text variant="subtle" class="text-xs">{{ $photo->description }}</flux:text>
</div>
</div>
<flux:text variant="subtle" class="text-xs">{{ $photo->description }}</flux:text>

@auth
<div class="flex justify-center">
<flux:button
variant="danger"
size="sm"
icon="trash"
wire:click="destroy({{ $photo->getKey() }})"
wire:confirm="Are you sure you want to delete this photo?"
/>
<flux:text class="mt-2" size="sm">{{ $photo->captured_at }}</flux:text>
</div>
</div>
@endauth

@if (auth()->check() && request()->routeIs('gallery.edit'))
<div class="flex justify-end my-2">
<flux:button
variant="danger"
size="xs"
icon="trash"
wire:click="destroy({{ $photo->getKey() }})"
wire:confirm="Are you sure you want to delete this photo?"
/>
</div>
@endif
</div>
</flux:card>
@empty
<flux:card>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/prezet/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
])
<section>
<div class="">
<div class="space-y-2 ">
<div class="space-y-2">
<x-slot name="header">My Writings</x-slot>

<div class="justify-between sm:flex">
<div class="mt-2 block sm:mt-0">
<div class="mt-1 block sm:mt-0">
@if ($currentTag)
<span
class="inline-flex items-center gap-x-0.5 rounded-md bg-gray-50 px-2.5 py-1.5 text-xs font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10"
Expand Down Expand Up @@ -57,7 +57,7 @@ class="h-3.5 w-3.5 stroke-gray-600/50 group-hover:stroke-gray-600/75"
</div>
<ul class="divide-y divide-gray-200">
@foreach ($articles as $article)
<li class="py-8">
<li class="py-4">
<x-prezet.article :article="$article" />
</li>
@endforeach
Expand Down
2 changes: 1 addition & 1 deletion resources/views/prezet/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
])

{{-- Main Content --}}
<div class="max-w-4xl mx-auto px-3 sm:px-4 lg:px-8 py-4 sm:py-6">
<div class="max-w-4xl mx-auto px-3 sm:px-4 lg:px-8 md:py-2 sm:py-6">
<flux:card class="overflow-hidden">
<article class="overflow-x-auto">
<header class="mb-6 sm:mb-9 space-y-2 sm:space-y-1">
Expand Down
9 changes: 5 additions & 4 deletions resources/views/welcome.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@

<div class="mt-4">
<div class="flex flex-col md:flex-row">
<div class="w-full md:w-auto md:mr-4 mb-4 md:mb-0">
<div class="w-full md:w-auto md:mr-4">
<img class="rounded-lg border-8 border-zinc-800 mx-auto md:mx-0 max-w-64" src="{{ asset('me.jfif') }}">

<div class="my-4 md:mt-4 items-center text-center hidden md:block">
<span class="text-xs italic">
<div class="my-4 md:mt-4 items-center text-center md:block">
<flux:text class="text-xs italic">
Do it right the first time · Less is more · The cake is a lie
</span>
</flux:text>
</div>
</div>

<flux:separator class="block md:hidden mb-2" />
<flux:separator vertical class="hidden md:block" />

<div class="mx-4">
Expand Down