Compare commits

..

No commits in common. "f8f721ffaca3bda5a050751a514e5a014498756c" and "bd3f0e7fcd8a880f1342cc7e906a564fc644b590" have entirely different histories.

6 changed files with 27 additions and 131 deletions

View File

@ -1,28 +0,0 @@
<?php
namespace App\View\Components;
use App\Models\Bookmark as ModelsBookmark;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class Bookmark extends Component
{
/**
* Create a new component instance.
*/
public function __construct(
public ModelsBookmark $bookmark
) {
//
}
/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
return view('components.bookmark');
}
}

View File

@ -1,88 +1,22 @@
* {
box-sizing: border-box;
}
html {
margin: 0;
padding: 0;
}
body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif;
background-color: #335C67;
}
h1 {
color: #FFF3B0;
text-align: center;
font-family: Helvetica, Arial, sans-serif;
background-color: hsl(100, 50%, 90%);
}
.container {
max-width: 40rem;
margin: 1em auto;
}
.bookmark {
display: grid;
align-items: center;
gap: 0px 0px;
grid-template-areas:
"title title"
"href href"
"description description"
"date tags";
margin-bottom: 1em;
padding: 0;
border: 2px solid #540B0E;
background-color: #FFF3B0;
padding: 1ex;
&-title {
margin: 0;
padding: 1ex;
background-color: #E09F3E;
grid-area: title;
font-weight: bold;
}
&-href,
&-description,
&-date,
&-tags {
padding: 1ex;
margin: 0;
}
&-href,
&-description,
&-date {
font-size: 0.9em;
}
&-href {
grid-area: href;
}
&-description {
grid-area: description;
> p {
border-left: 3px solid #9E2A2B;
margin: 0;
padding: 0.5ex 0 0.5ex 1ex;
}
}
&-date {
grid-area: date;
margin-top: 0;
}
&-tags {
font-size: 0.8em;
grid-area: tags;
text-align: right;
padding: 0;
margin: 1em 0;
}
&-tag {
@ -92,7 +26,7 @@ h1 {
margin: 0 0 0.2ex 0;
border-radius: 7px;
background-color: #9E2A2B;
color: #FFF3B0;
background-color: hsl(230, 50%, 50%);
color: #fff;
}
}

View File

@ -1,9 +1,5 @@
@extends('layouts.app')
@section('content')
@foreach ($bookmarks as $bookmark)
<x-bookmark :bookmark="$bookmark" />
@endforeach
@endsection
@include('bookmarks.show')
@endforeach

View File

@ -1,5 +1,19 @@
@extends('layouts.app')
@section('content')
<x-bookmark :bookmark="$bookmark" />
<div class="bookmark">
<p class="bookmark-title">{{ $bookmark->title }}</p>
<p class="bookmark-href"><a href="{{ $bookmark->href }}">{{ $bookmark->href }}</a></p>
@if ($bookmark->description)
<p class="bookmark-description">{{ $bookmark->description }}</p>
@endif
<p>{{ $bookmark->created_at }}</p>
<ul class="bookmark-tags">
@foreach ($bookmark->tags as $tag)
<li class="bookmark-tag">
{{ $tag->tag->name }}
</li>
@endforeach
</ul>
</div>
@endsection

View File

@ -1,19 +0,0 @@
<div class="bookmark">
<p class="bookmark-title">{{ $bookmark->title }}</p>
<p class="bookmark-href"><a href="{{ $bookmark->href }}">{{ $bookmark->href }}</a></p>
@if (!empty($bookmark->description))
<div class="bookmark-description">
<p>{{ strip_tags($bookmark->description) }}</p>
</div>
@endif
<p class="bookmark-date">
<time datetime="{{ $bookmark->created_at }}">{{ $bookmark->created_at->diffForHumans() }}</time>
</p>
<ul class="bookmark-tags">
@foreach ($bookmark->tags as $tag)
<li class="bookmark-tag">
{{ $tag->tag->name }}
</li>
@endforeach
</ul>
</div>

View File

@ -1,12 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<title>urlsnail</title>
<title>urlslug</title>
@vite(['resources/sass/app.scss'])
</head>
<body>
<div class="container">
<h1>url snail</h1>
@yield('content')
</div>
</body>