1
0

Added an Update details

This commit is contained in:
Richard Dern 2024-04-25 02:11:28 +02:00
parent f702b56fdb
commit 11a58333a7
3 changed files with 42 additions and 3 deletions

View File

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

View File

@ -1,8 +1,7 @@
.spoiler {
border-left: 4px solid #d08770;
.spoiler,
.update {
margin: 1rem auto;
color: #e4f1fe;
background-color: #564d33;
max-width: var(--design-width);
width: 100%;
border-radius: .5rem;
@ -20,3 +19,13 @@ .spoiler {
}
}
}
.spoiler {
border-left: 4px solid #d08770;
background-color: #564d33;
}
.update {
border-left: 4px solid #7070d0;
background-color: #363356;
}

View File

@ -0,0 +1,4 @@
<details class="update">
<summary>{{ $title }}</summary>
<div class="markdown-body">{!! (new \App\Services\Markdown\Formatter($slot))->render() !!}</div>
</details>