mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
feat: adds compatibility with TRMNL Design Framework v2
This commit is contained in:
parent
f20977a822
commit
12c82e02d7
7 changed files with 27 additions and 12 deletions
|
|
@ -278,7 +278,7 @@ class Plugin extends Model
|
|||
*
|
||||
* @throws LiquidException
|
||||
*/
|
||||
public function render(string $size = 'full', bool $standalone = true): string
|
||||
public function render(string $size = 'full', bool $standalone = true, ?Device $device = null): string
|
||||
{
|
||||
if ($this->render_markup) {
|
||||
$renderedContent = '';
|
||||
|
|
@ -344,6 +344,7 @@ class Plugin extends Model
|
|||
|
||||
if ($standalone) {
|
||||
return view('trmnl-layouts.single', [
|
||||
'colorDepth' => $device?->deviceModel?->color_depth,
|
||||
'slot' => $renderedContent,
|
||||
])->render();
|
||||
}
|
||||
|
|
@ -354,6 +355,7 @@ class Plugin extends Model
|
|||
if ($this->render_markup_view) {
|
||||
if ($standalone) {
|
||||
return view('trmnl-layouts.single', [
|
||||
'colorDepth' => $device?->deviceModel?->color_depth,
|
||||
'slot' => view($this->render_markup_view, [
|
||||
'size' => $size,
|
||||
'data' => $this->data_payload,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue