mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
fix: half and quadrant layout for recipes with render_markup_view
Some checks failed
tests / ci (push) Has been cancelled
Some checks failed
tests / ci (push) Has been cancelled
This commit is contained in:
parent
dc676327c2
commit
94d5fca879
1 changed files with 20 additions and 7 deletions
|
|
@ -565,17 +565,30 @@ class Plugin extends Model
|
||||||
|
|
||||||
if ($this->render_markup_view) {
|
if ($this->render_markup_view) {
|
||||||
if ($standalone) {
|
if ($standalone) {
|
||||||
return view('trmnl-layouts.single', [
|
$renderedView = view($this->render_markup_view, [
|
||||||
|
'size' => $size,
|
||||||
|
'data' => $this->data_payload,
|
||||||
|
'config' => $this->configuration ?? [],
|
||||||
|
])->render();
|
||||||
|
|
||||||
|
if ($size === 'full') {
|
||||||
|
return view('trmnl-layouts.single', [
|
||||||
|
'colorDepth' => $device?->colorDepth(),
|
||||||
|
'deviceVariant' => $device?->deviceVariant() ?? 'og',
|
||||||
|
'noBleed' => $this->no_bleed,
|
||||||
|
'darkMode' => $this->dark_mode,
|
||||||
|
'scaleLevel' => $device?->scaleLevel(),
|
||||||
|
'slot' => $renderedView,
|
||||||
|
])->render();
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('trmnl-layouts.mashup', [
|
||||||
|
'mashupLayout' => $this->getPreviewMashupLayoutForSize($size),
|
||||||
'colorDepth' => $device?->colorDepth(),
|
'colorDepth' => $device?->colorDepth(),
|
||||||
'deviceVariant' => $device?->deviceVariant() ?? 'og',
|
'deviceVariant' => $device?->deviceVariant() ?? 'og',
|
||||||
'noBleed' => $this->no_bleed,
|
|
||||||
'darkMode' => $this->dark_mode,
|
'darkMode' => $this->dark_mode,
|
||||||
'scaleLevel' => $device?->scaleLevel(),
|
'scaleLevel' => $device?->scaleLevel(),
|
||||||
'slot' => view($this->render_markup_view, [
|
'slot' => $renderedView,
|
||||||
'size' => $size,
|
|
||||||
'data' => $this->data_payload,
|
|
||||||
'config' => $this->configuration ?? [],
|
|
||||||
])->render(),
|
|
||||||
])->render();
|
])->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue