gutacher kopf farben
This commit is contained in:
1 parent
00cdc5b152
commit
a16cf05a8f
3 files changed
+61
-26
No files matched your search
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Actions\Generate\Gutachten;
|
namespace App\Actions\Generate\Gutachten;
|
||||||
|
|
||||||
use App\Actions\Generate\MakeGutachten;
|
use App\Actions\Generate\MakeGutachten;
|
||||||
|
use Filament\Forms\Components\RichEditor\RichContentRenderer;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
class Deckblatt
|
class Deckblatt
|
||||||
@@ -11,21 +12,18 @@ class Deckblatt
|
|||||||
{
|
{
|
||||||
// dd(MakeGutachten::$gutachter->kopf);
|
// dd(MakeGutachten::$gutachter->kopf);
|
||||||
// GUTACHTER
|
// GUTACHTER
|
||||||
$html = '<div class="right">';
|
|
||||||
|
$html = '<div class="base">';
|
||||||
foreach (MakeGutachten::$gutachter->kopf as $component) {
|
foreach (MakeGutachten::$gutachter->kopf as $component) {
|
||||||
switch ($component) {
|
switch ($component) {
|
||||||
case 'logo':
|
case 'logo':
|
||||||
$imgUrl = Storage::disk('public')->url(MakeGutachten::$gutachter->logo);
|
$imgUrl = Storage::disk('public')->url(MakeGutachten::$gutachter->logo);
|
||||||
$html .= '<img src="'.$imgUrl.'" width="45%">';
|
$html .= '<img src="'.$imgUrl.'" width="45%">';
|
||||||
break;
|
break;
|
||||||
case 'firma':
|
|
||||||
$html .= '<p class="big">'.MakeGutachten::$gutachter->company.'</p>';
|
|
||||||
break;
|
|
||||||
case 'adresse':
|
case 'adresse':
|
||||||
$html .= '<p class="gray small">'.nl2br(MakeGutachten::$gutachter->address).'</p>';
|
$from = ['--', 'text-align: end;'];
|
||||||
break;
|
$to = ['', 'text-align: right;'];
|
||||||
case 'name':
|
$html .= str_replace($from, $to, RichContentRenderer::make(MakeGutachten::$gutachter->address)->toHtml());
|
||||||
$html .= '<p class="gray bold py-1">'.MakeGutachten::$gutachter->title.' '.MakeGutachten::$gutachter->gender.' '.MakeGutachten::$gutachter->name.'</p>';
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ namespace App\Filament\Resources\Gutachters\Schemas;
|
|||||||
|
|
||||||
use Filament\Forms\Components\CheckboxList;
|
use Filament\Forms\Components\CheckboxList;
|
||||||
use Filament\Forms\Components\FileUpload;
|
use Filament\Forms\Components\FileUpload;
|
||||||
|
use Filament\Forms\Components\RichEditor;
|
||||||
use Filament\Forms\Components\Select;
|
use Filament\Forms\Components\Select;
|
||||||
use Filament\Forms\Components\Textarea;
|
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
use Filament\Schemas\Components\Tabs;
|
use Filament\Schemas\Components\Tabs;
|
||||||
use Filament\Schemas\Components\Tabs\Tab;
|
use Filament\Schemas\Components\Tabs\Tab;
|
||||||
@@ -23,12 +23,40 @@ class GutachterForm
|
|||||||
->tabs([
|
->tabs([
|
||||||
Tab::make('Firmenname')
|
Tab::make('Firmenname')
|
||||||
->icon('lucide-stamp')
|
->icon('lucide-stamp')
|
||||||
->inlineLabel()
|
|
||||||
->schema([
|
->schema([
|
||||||
TextInput::make('company')
|
TextInput::make('company')
|
||||||
->label('Firma')
|
->label('Firma')
|
||||||
->required(),
|
->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')
|
->label('Adresse')
|
||||||
->required(),
|
->required(),
|
||||||
]),
|
]),
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
body {
|
body {
|
||||||
font-family: DejaVuSans;
|
font-family: DejaVuSans;
|
||||||
font-size: 1rem;
|
font-size: 0.8rem;
|
||||||
line-height: 1.6rem;
|
line-height: 1.3rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
@@ -13,16 +13,33 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.base {
|
.base {
|
||||||
font-size: 1rem;
|
font-size: 0.8rem;
|
||||||
line-height: 1.6rem;
|
line-height: 1.3rem;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small {
|
.small {
|
||||||
font-size: 0.7rem;
|
font-size: 0.6rem;
|
||||||
line-height: 1rem;
|
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 {
|
.gray {
|
||||||
color: #4a5565;
|
color: #4a5565;
|
||||||
@@ -86,7 +103,7 @@ p {
|
|||||||
.title {
|
.title {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 2.2rem;
|
font-size: 2.8rem;
|
||||||
top: 90mm;
|
top: 90mm;
|
||||||
width: 185mm;
|
width: 185mm;
|
||||||
}
|
}
|
||||||
@@ -112,14 +129,6 @@ p {
|
|||||||
background-color: #f3f4f6;
|
background-color: #f3f4f6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.deckblatt {
|
|
||||||
/* 210mm x 297mm */
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background-color: #f3f4f6;
|
|
||||||
padding: 10mm;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.table-striped td.head,
|
table.table-striped td.head,
|
||||||
td.head {
|
td.head {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
Reference in new issue
Block a user