+<{{ !empty($item['link']) ? 'a href='.$item['link'] : 'div' }}
+class="{{ !empty($component['imageSize']) && $component['imageSize'] === 'small' ? 'flex items-start' : 'md:flex items-center' }} gap-x-3 lg:gap-x-6 {{ !empty($item['link']) ? 'group' : '' }}">
+
@if(!empty($item['youtube_id']))
@if(!empty($item['relative_url']))
@@ -19,16 +21,18 @@
-
{{ $item['title'] }}
- @if(!empty($item['excerpt']))
-
{!! strip_tags($item['excerpt'], ['em', 'strong']) !!}
- @endif
- @if(!empty($item['description']))
- @if (!empty($item['link']))
-
{!! preg_replace(array('"
"', '""'), array('',''), $item['description']) !!}
- @else
-
{!! $item['description'] !!}
+
{{ $item['title'] }}
+
+ @if(!empty($item['excerpt']))
+
{!! strip_tags($item['excerpt'], ['em', 'strong']) !!}
@endif
- @endif
+ @if(!empty($item['description']))
+ @if (!empty($item['link']))
+
{!! preg_replace(array('"
"', '""'), array('',''), $item['description']) !!}
+ @else
+
{!! $item['description'] !!}
+ @endif
+ @endif
+
<{{ !empty($item['link']) ? '/a' : '/div' }}>
diff --git a/resources/views/components/promo/list-item-small.blade.php b/resources/views/components/promo/list-item-small.blade.php
index 50d44251..8b82de5f 100644
--- a/resources/views/components/promo/list-item-small.blade.php
+++ b/resources/views/components/promo/list-item-small.blade.php
@@ -3,7 +3,7 @@
$item => array // ['title', 'link', 'description', 'excerpt', 'relative_url', 'option']
--}}
-<{{ !empty($item['link']) ? 'a href='.$item['link'] : 'div' }} class="flex items-start space-x-3 md:space-x-6 mb-8 {{ !empty($item['link']) ? 'group' : '' }}">
+<{{ !empty($item['link']) ? 'a href='.$item['link'] : 'div' }} class=" flex items-start space-x-3 md:space-x-6 mb-8 {{ !empty($item['link']) ? 'group' : '' }}">
@if(!empty($item['youtube_id']))
@if(!empty($item['filename_url']))
diff --git a/styleguide/Http/Controllers/CatalogController.php b/styleguide/Http/Controllers/CatalogController.php
index fbda03aa..0b4a8fa8 100644
--- a/styleguide/Http/Controllers/CatalogController.php
+++ b/styleguide/Http/Controllers/CatalogController.php
@@ -59,7 +59,8 @@ public function index(Request $request): View
"showExcerpt":true,
"showDescription":false,
"groupByOptions":false,
-"gradientOverlay":false
+"gradientOverlay":false,
+"imageSize":small
}
@@ -118,7 +119,7 @@ public function index(Request $request): View
],
],
'catalog-1' => [
- 'data' => app(GenericPromo::class)->create(5, false, [
+ 'data' => app(GenericPromo::class)->create(3, false, [
'description' => '',
]),
'component' => [
@@ -126,6 +127,17 @@ public function index(Request $request): View
'filename' => 'catalog',
'columns' => '3',
'showDescription' => false,
+ ],
+ ],
+ 'catalog-9' => [
+ 'data' => app(GenericPromo::class)->create(2, false, [
+ 'description' => '',
+ ]),
+ 'component' => [
+ 'heading' => 'Two-column catalog',
+ 'filename' => 'catalog',
+ 'columns' => '2',
+ 'showDescription' => false,
'gradientOverlay' => false,
],
],
@@ -138,6 +150,7 @@ public function index(Request $request): View
'filename' => 'catalog',
'columns' => '1',
'showDescription' => false,
+ 'imageSize' => 'small',
],
],
'catalog-3' => [
@@ -145,15 +158,15 @@ public function index(Request $request): View
'excerpt' => '',
]),
'component' => [
- 'heading' => 'Catalog sorted by option',
+ 'heading' => 'Four-column catalog sorted by option',
'filename' => 'catalog',
'columns' => '4',
'showDescription' => false,
'groupByOptions' => true,
],
],
- 'catalog-10' => [
- 'data' => app(GenericPromo::class)->create(5, false, [
+ 'catalog-5' => [
+ 'data' => app(GenericPromo::class)->create(3, false, [
'relative_url' => '/styleguide/image/450x600',
'description' => '',
]),
@@ -165,6 +178,20 @@ public function index(Request $request): View
'gradientOverlay' => true,
],
],
+ 'catalog-6' => [
+ 'data' => app(GenericPromo::class)->create(3, false, [
+ 'relative_url' => '',
+ 'excerpt' => '',
+ 'youtube_id' => '',
+ 'link' => '',
+ ]),
+ 'component' => [
+ 'heading' => 'Catalog without images',
+ 'filename' => 'catalog',
+ 'columns' => '3',
+ 'showDescription' => true,
+ ],
+ ],
];
$components['components']['catalog-3']['data'] = $this->components->organizePromoItemsByOption($components['components']['catalog-3']['data']);
diff --git a/styleguide/Http/Controllers/ChildpageWithComponentsController.php b/styleguide/Http/Controllers/ChildpageWithComponentsController.php
index fecac8a2..dc612c6d 100644
--- a/styleguide/Http/Controllers/ChildpageWithComponentsController.php
+++ b/styleguide/Http/Controllers/ChildpageWithComponentsController.php
@@ -137,6 +137,18 @@ public function index(Request $request): View
],
],
+ 'catalog-10' => [
+ 'data' => app(GenericPromo::class)->create(4, false, [
+ 'description' => '',
+ ]),
+ 'component' => [
+ 'heading' => 'Three column catalog',
+ 'filename' => 'catalog',
+ 'columns' => '3',
+ 'showDescription' => false,
+ ],
+ ],
+
'content-row-1' => [
'data' => app(GenericPromo::class)->create(1, false, [
'title' => 'Content row',
@@ -205,6 +217,7 @@ public function index(Request $request): View
'filename' => 'catalog',
'columns' => '1',
'showDescription' => false,
+ 'imageSize' => 'small',
],
],
@@ -218,25 +231,18 @@ public function index(Request $request): View
],
'promo-row-1' => [
- 'data' => app(GenericPromo::class)->create(1, false),
- 'component' => [
- 'heading' => 'Video row',
- 'filename' => 'promo-row',
- ],
- ],
-
- 'promo-row-2' => [
- 'data' => app(Video::class)->create(1, false),
+ 'data' => app(GenericPromo::class)->create(2, false),
'component' => [
+ 'heading' => 'Promo row',
'filename' => 'promo-row',
- 'imagePosition' => 'right',
+ 'imagePosition' => 'alternate',
],
],
- 'promo-column-1' => [
+ 'promo-column-3' => [
'data' => app(Video::class)->create(1, false),
'component' => [
- 'heading' => 'Video column',
+ 'heading' => 'Promo column',
'filename' => 'promo-column',
],
],
@@ -245,7 +251,6 @@ public function index(Request $request): View
'data' => app(GenericPromo::class)->create(4, false, [
'option' => 'Default',
'excerpt' => '',
- 'relative_url' => '',
]),
'component' => [
'heading' => 'Button column',
diff --git a/styleguide/Http/Controllers/SinglePromoController.php b/styleguide/Http/Controllers/SinglePromoController.php
index d2f679c2..36d20657 100644
--- a/styleguide/Http/Controllers/SinglePromoController.php
+++ b/styleguide/Http/Controllers/SinglePromoController.php
@@ -103,6 +103,7 @@ public function index(Request $request): View
"singlePromoView":true,
"showExcerpt":true,
"showDescription":false,
+"imagePosition":alternate,
}
diff --git a/styleguide/Pages/UsingComponents.php b/styleguide/Pages/UsingComponents.php
index 1ff2f482..cbfe60af 100644
--- a/styleguide/Pages/UsingComponents.php
+++ b/styleguide/Pages/UsingComponents.php
@@ -26,12 +26,6 @@ public function getPageData()
'application_id' => 1,
],
],
- 'data' => [
- 'modular-hero-1' => '{"id":"1"}',
- 'modular-buttons' => '{}',
- 'modular-events-column-1' => 1,
- 'modular-news-column-1' => 2,
- ],
]);
}
}
diff --git a/styleguide/Views/styleguide-using-components.blade.php b/styleguide/Views/styleguide-using-components.blade.php
index f444215a..764854b0 100644
--- a/styleguide/Views/styleguide-using-components.blade.php
+++ b/styleguide/Views/styleguide-using-components.blade.php
@@ -116,6 +116,23 @@
Catalog component only.
+
+ imagePosition |
+
+Moves the image from the left to the right, or alternates their position if the item limit is greater than one.
+Left, right, alternate; left is default.
+Promo row component only.
+ |
+
+
+ imageSize |
+
+ w-1/4' : 'md:w-2/5
+Uses a small 1/4 width or large 2/5 width.
+Small or large; large is default.
+Promo row component only.
+ |
+
limit |
|