Remove Livewire

Seems like overkill for this stage of things. It's also not clear to me
how to use Livewire for only a subset of interactive functionality on
the page.
This commit is contained in:
Annika Backstrom 2024-05-26 13:02:44 +01:00
parent 5961e52797
commit 0b1fe6d491
Signed by: annika
GPG Key ID: 3561F004DE1D9AFE
5 changed files with 40 additions and 3 deletions

View File

@ -17,6 +17,19 @@ body {
@import 'components/bookmark';
@import 'components/pagination';
a {
&,
&:active,
&:visited {
color: #fff;
}
&:hover {
color: #88f;
}
}
h1 {
color: #FFF3B0;
text-align: center;

View File

@ -16,6 +16,18 @@
overflow: hidden;
a {
&,
&:active,
&:visited {
color: #9E2A2B;
}
&:hover {
color: #000;
}
}
&-title {
margin: 0;
padding: 1ex;

View File

@ -1,5 +1,8 @@
@extends('layouts.app')
@section('content')
<p>
<a href="{{ action('BookmarkController@index') }}">&larr; Back</a>
</p>
<x-bookmark :bookmark="$bookmark" />
@endsection

View File

@ -1,5 +1,10 @@
<div class="bookmark">
<p class="bookmark-title">{{ $bookmark->title }}</p>
<p class="bookmark-title">
{{ $bookmark->title }}
@action('index')
<a href="/bookmarks/{{ $bookmark->id }}">#</a>
@endaction
</p>
<p class="bookmark-href"><a href="{{ $bookmark->href }}">{{ $bookmark->href }}</a></p>
@if (!empty($bookmark->description))
<div class="bookmark-description">

View File

@ -3,5 +3,9 @@
use App\Http\Controllers\BookmarkController;
use Illuminate\Support\Facades\Route;
Route::get('/', [BookmarkController::class, 'index']);
Route::resource('bookmarks', BookmarkController::class)->except(['index']);
Route::get(
'/', function () {
return redirect()->action([BookmarkController::class, 'index']);
}
);
Route::resource('bookmarks', BookmarkController::class);