From 86a9eb213bbcd1abaedbb4eba204ceba16a94ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20Ioni=C8=9B=C4=83?= Date: Wed, 29 Mar 2023 17:38:29 +0100 Subject: [PATCH] feat: component work (#291) * feat: add buttons to image with text block * fix: remove category description max-width * fix: reduce person title font size --- app/View/Components/Blocks/ImageText.php | 16 +++++++++ .../js/components/Blocks/Block/ImageText.vue | 32 +++++++++++++++++ .../components/blocks/image-text.blade.php | 35 +++++++++++++++---- .../views/components/blocks/people.blade.php | 11 +++--- .../views/front/decisions/category.blade.php | 2 +- .../views/front/posts/category.blade.php | 2 +- 6 files changed, 85 insertions(+), 13 deletions(-) diff --git a/app/View/Components/Blocks/ImageText.php b/app/View/Components/Blocks/ImageText.php index 7d0ba93a..8093af1e 100644 --- a/app/View/Components/Blocks/ImageText.php +++ b/app/View/Components/Blocks/ImageText.php @@ -14,6 +14,14 @@ class ImageText extends BlockComponent public ?Media $image; + public ?string $primary_button_url; + + public ?string $primary_button_text; + + public ?string $secondary_button_url; + + public ?string $secondary_button_text; + public function setup(): void { $this->title = $this->block->translatedInput('title'); @@ -21,6 +29,14 @@ public function setup(): void $this->html = $this->block->translatedInput('text'); $this->image = $this->block->firstMedia('image'); + + $this->primary_button_url = $this->block->translatedInput('primary_button_url'); + + $this->primary_button_text = $this->block->translatedInput('primary_button_text'); + + $this->secondary_button_url = $this->block->translatedInput('secondary_button_url'); + + $this->secondary_button_text = $this->block->translatedInput('secondary_button_text'); } public function containerColumns(): string diff --git a/resources/js/components/Blocks/Block/ImageText.vue b/resources/js/components/Blocks/Block/ImageText.vue index 553c1f25..4f1573e3 100644 --- a/resources/js/components/Blocks/Block/ImageText.vue +++ b/resources/js/components/Blocks/Block/ImageText.vue @@ -38,6 +38,34 @@ :options="align" default="top" /> + + + + + + + +