gutacher kopf farben

This commit is contained in:
salam committed 2025-10-16 20:18:46 +02:00
1 parent 00cdc5b152
commit a16cf05a8f
3 files changed
+61 -26

No files matched your search

+6 -8
View File
@@ -3,6 +3,7 @@
namespace App\Actions\Generate\Gutachten;
use App\Actions\Generate\MakeGutachten;
use Filament\Forms\Components\RichEditor\RichContentRenderer;
use Illuminate\Support\Facades\Storage;
class Deckblatt
@@ -11,21 +12,18 @@ class Deckblatt
{
// dd(MakeGutachten::$gutachter->kopf);
// GUTACHTER
$html = '<div class="right">';
$html = '<div class="base">';
foreach (MakeGutachten::$gutachter->kopf as $component) {
switch ($component) {
case 'logo':
$imgUrl = Storage::disk('public')->url(MakeGutachten::$gutachter->logo);
$html .= '<img src="'.$imgUrl.'" width="45%">';
break;
case 'firma':
$html .= '<p class="big">'.MakeGutachten::$gutachter->company.'</p>';
break;
case 'adresse':
$html .= '<p class="gray small">'.nl2br(MakeGutachten::$gutachter->address).'</p>';
break;
case 'name':
$html .= '<p class="gray bold py-1">'.MakeGutachten::$gutachter->title.' '.MakeGutachten::$gutachter->gender.' '.MakeGutachten::$gutachter->name.'</p>';
$from = ['--', 'text-align: end;'];
$to = ['', 'text-align: right;'];
$html .= str_replace($from, $to, RichContentRenderer::make(MakeGutachten::$gutachter->address)->toHtml());
break;
}
}
@@ -4,8 +4,8 @@ namespace App\Filament\Resources\Gutachters\Schemas;
use Filament\Forms\Components\CheckboxList;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\RichEditor;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Components\Tabs;
use Filament\Schemas\Components\Tabs\Tab;
@@ -23,12 +23,40 @@ class GutachterForm
->tabs([
Tab::make('Firmenname')
->icon('lucide-stamp')
->inlineLabel()
->schema([
TextInput::make('company')
->label('Firma')
->required(),
Textarea::make('address')
RichEditor::make('address')
->extraInputAttributes(['style' => 'min-height: 20rem; max-height: 50vh; overflow-y: auto;'])
->toolbarButtons([
['bold', 'italic', 'underline', 'horizontalRule', 'clearFormatting'],
['h1', 'h2', 'h3', 'alignStart', 'alignCenter', 'alignEnd', 'alignJustify'],
['undo', 'redo', 'textColor'],
])
->textColors([
'#fb2c36' => 'Rot',
'#ff6900' => 'Orange',
'#fe9a00' => 'Bernstein',
'#f0b100' => 'Gelb',
'#7ccf00' => 'Limette',
'#00c950' => 'Grün',
'#00bc7d' => 'Smaragd',
'#00bba7' => 'Blaugrün',
'#00b8db' => 'Cyan',
'#00a6f4' => 'Himmelblau',
'#2b7fff' => 'Blau',
'#615fff' => 'Indigo',
'#8e51ff' => 'Violett',
'#ad46ff' => 'Lila',
'#e12afb' => 'Fuchisa',
'#f6339a' => 'Rosa',
'#ff2056' => 'Rose',
'#a6a09b' => 'Steingrau Hell',
'#44403b' => 'Steingrau Dunkel',
'#cad5e2' => 'Schiefer Hell',
'#314158' => 'Schiefer Dunkel',
])
->label('Adresse')
->required(),
]),
+24 -15
View File
@@ -1,7 +1,7 @@
body {
font-family: DejaVuSans;
font-size: 1rem;
line-height: 1.6rem;
font-size: 0.8rem;
line-height: 1.3rem;
margin: 0;
padding: 0;
}
@@ -13,16 +13,33 @@ body {
}
.base {
font-size: 1rem;
line-height: 1.6rem;
font-size: 0.8rem;
line-height: 1.3rem;
font-weight: normal;
}
.small {
font-size: 0.7rem;
line-height: 1rem;
font-size: 0.6rem;
line-height: 0.9rem;
}
h1 {
font-size: 2rem;
line-height: 2.4rem;
margin: 0;
}
h2 {
font-size: 1.7rem;
line-height: 2rem;
margin: 0;
}
h3 {
font-size: 1.2rem;
line-height: 1.5rem;
margin: 0;
}
.gray {
color: #4a5565;
@@ -86,7 +103,7 @@ p {
.title {
position: absolute;
font-weight: bold;
font-size: 2.2rem;
font-size: 2.8rem;
top: 90mm;
width: 185mm;
}
@@ -112,14 +129,6 @@ p {
background-color: #f3f4f6;
}
.deckblatt {
/* 210mm x 297mm */
width: 100%;
height: 100%;
background-color: #f3f4f6;
padding: 10mm;
}
table.table-striped td.head,
td.head {
font-weight: bold;