From 410391672aa3b60a46491bef71f64504842ef416 Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Fri, 1 Dec 2023 10:38:23 -0500 Subject: [PATCH 1/7] Reevaluating heroes --- config/base.php | 2 +- resources/scss/components/_bg-gradient.scss | 6 + resources/scss/main.scss | 6 + .../Controllers/HeroContainedController.php | 71 ------------ .../Http/Controllers/HeroController.php | 109 ++++++++++++++++++ .../Http/Controllers/HeroFullController.php | 71 ------------ .../Http/Controllers/HeroLogoController.php | 74 ------------ .../Http/Controllers/HeroRotateController.php | 72 ------------ .../Http/Controllers/HeroSVGController.php | 74 ------------ .../Http/Controllers/HeroTextController.php | 73 ------------ styleguide/Pages/HeroContained.php | 2 +- styleguide/Pages/HeroFull.php | 2 +- styleguide/Pages/HeroFullLogoOverlay.php | 2 +- styleguide/Pages/HeroFullRotate.php | 2 +- styleguide/Pages/HeroFullSVGOverlay.php | 2 +- styleguide/Pages/HeroFullTextOverlay.php | 2 +- styleguide/Pages/HeroSkinny.php | 28 +++++ styleguide/Repositories/PromoRepository.php | 46 +++++++- 18 files changed, 198 insertions(+), 446 deletions(-) delete mode 100644 styleguide/Http/Controllers/HeroContainedController.php create mode 100644 styleguide/Http/Controllers/HeroController.php delete mode 100644 styleguide/Http/Controllers/HeroFullController.php delete mode 100644 styleguide/Http/Controllers/HeroLogoController.php delete mode 100644 styleguide/Http/Controllers/HeroRotateController.php delete mode 100644 styleguide/Http/Controllers/HeroSVGController.php delete mode 100644 styleguide/Http/Controllers/HeroTextController.php create mode 100644 styleguide/Pages/HeroSkinny.php diff --git a/config/base.php b/config/base.php index 6e879a67..d82ba2b8 100644 --- a/config/base.php +++ b/config/base.php @@ -89,7 +89,7 @@ | as if it was in this array. | */ - 'hero_full_controllers' => [], + 'hero_full_controllers' => ['HomepageController'], /* |-------------------------------------------------------------------------- diff --git a/resources/scss/components/_bg-gradient.scss b/resources/scss/components/_bg-gradient.scss index 425c7529..22ad4810 100644 --- a/resources/scss/components/_bg-gradient.scss +++ b/resources/scss/components/_bg-gradient.scss @@ -23,4 +23,10 @@ background-image: none; } } + + .jenny { + border: 1px solid pink; + display: block; + background-color: blue; + } } diff --git a/resources/scss/main.scss b/resources/scss/main.scss index c79e7d17..fcdb8f9a 100644 --- a/resources/scss/main.scss +++ b/resources/scss/main.scss @@ -46,4 +46,10 @@ .break-avoid { break-inside: avoid; } + + .olu { + border: 1px solid red; + display: block; + background-color: yellow; + } } diff --git a/styleguide/Http/Controllers/HeroContainedController.php b/styleguide/Http/Controllers/HeroContainedController.php deleted file mode 100644 index bd5eb9fa..00000000 --- a/styleguide/Http/Controllers/HeroContainedController.php +++ /dev/null @@ -1,71 +0,0 @@ -faker['faker'] = $faker->create(); - } - - /** - * Article Listing Controller - */ - public function index(Request $request): View - { - config([ - 'base.hero_contained' => false, - 'base.hero_full_controllers' => ['HeroFullController'], - ]); - - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'title' => 'Configuration', - 'description' => ' -

Visit the modular documentation for more information

-
-
Page field
-
Data
-
-
modular-hero-1
-
-
-
-{
-"id":0000,
-}
-
-
-
-', - 'promo_item_id' => 0, - ], - ], - 'component' => [ - 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, - ], - ], - 'hero-1' => [ - 'data' => app(HeroImage::class)->create(1, true), - ], - ]; - - $request->data['base']['hero'] = $components['components']['hero-1']; - - return view('modularpage', merge($request->data, $components)); - } -} diff --git a/styleguide/Http/Controllers/HeroController.php b/styleguide/Http/Controllers/HeroController.php new file mode 100644 index 00000000..73651570 --- /dev/null +++ b/styleguide/Http/Controllers/HeroController.php @@ -0,0 +1,109 @@ +faker['faker'] = $faker->create(); + } + + /** + * Article Listing Controller + */ + public function index(Request $request): View + { + + $component_config_title = 'Hero component configuration'; + $component_config_description = ' + + + + + + + + + + + +
Page fieldData
+
modular-hero-1
+
+
+{
+"id":0000,
+"config":"randomize|page_id|limit:1"
+}
+
+

The last array item cannot have a comma.

+

View the promo config documentation on Github.

+
'; + + $promo_group_setup_title = 'Hero promo group setup'; + $promo_group_setup_description = ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Available fields
TitleDisplayed using options "Text overlay," "Logo overlay" and will become a link if link field is used.
LinkURL
DescriptionFormattable text. If the link field is set, description links will be stripped out.
Filename1600x580px or 3200x1160px saved at low quality
OptionsNone, Text overlay, Logo overlay, SVG overlay
'; + + $components['components'] = [ + 'accordion-1' => [ + 'data' => [ + 0 => [ + 'title' => $component_config_title, + 'description' => $component_config_description, + 'promo_item_id' => 0, + ], + 1 => [ + 'title' => $promo_group_setup_title, + 'description' => $promo_group_setup_description, + 'promo_item_id' => 1, + ], + ], + 'component' => [ + 'filename' => 'accordion', + 'columns' => '4', + 'showDescription' => false, + ], + ], + ]; + + return view('modularpage', merge($request->data, $components)); + } +} diff --git a/styleguide/Http/Controllers/HeroFullController.php b/styleguide/Http/Controllers/HeroFullController.php deleted file mode 100644 index 316230c8..00000000 --- a/styleguide/Http/Controllers/HeroFullController.php +++ /dev/null @@ -1,71 +0,0 @@ -faker['faker'] = $faker->create(); - } - - /** - * Article Listing Controller - */ - public function index(Request $request): View - { - config([ - 'base.hero_contained' => false, - 'base.hero_full_controllers' => ['HeroFullController'], - ]); - - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'title' => 'Configuration', - 'description' => ' -

Visit the modular documentation for more information

-
-
Page field
-
Data
-
-
modular-hero-1
-
-
-
-{
-"id":0000,
-}
-
-
-
-', - 'promo_item_id' => 0, - ], - ], - 'component' => [ - 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, - ], - ], - 'hero-1' => [ - 'data' => app(HeroImage::class)->create(1, true), - ], - ]; - - $request->data['base']['hero'] = $components['components']['hero-1']; - - return view('modularpage', merge($request->data, $components)); - } -} diff --git a/styleguide/Http/Controllers/HeroLogoController.php b/styleguide/Http/Controllers/HeroLogoController.php deleted file mode 100644 index 597c6c83..00000000 --- a/styleguide/Http/Controllers/HeroLogoController.php +++ /dev/null @@ -1,74 +0,0 @@ -faker['faker'] = $faker->create(); - } - - /** - * Article Listing Controller - */ - public function index(Request $request): View - { - config([ - 'base.hero_contained' => false, - 'base.hero_full_controllers' => ['HeroLogoController'], - ]); - - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'title' => 'Configuration', - 'description' => ' -

Visit the modular documentation for more information

-
-
Page field
-
Data
-
-
modular-hero-1
-
-
-
-{
-"id":0000,
-}
-
-
-
-', - 'promo_item_id' => 0, - ], - ], - 'component' => [ - 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, - ], - ], - 'hero-1' => [ - 'data' => app(HeroImage::class)->create(1, true, [ - 'option' => 'Logo Overlay', - 'secondary_relative_url' => '/styleguide/image/600x250?text=600x250', - ]), - ], - ]; - - $request->data['base']['hero'] = $components['components']['hero-1']; - - return view('modularpage', merge($request->data, $components)); - } -} diff --git a/styleguide/Http/Controllers/HeroRotateController.php b/styleguide/Http/Controllers/HeroRotateController.php deleted file mode 100644 index 65800886..00000000 --- a/styleguide/Http/Controllers/HeroRotateController.php +++ /dev/null @@ -1,72 +0,0 @@ -faker['faker'] = $faker->create(); - } - - /** - * Article Listing Controller - */ - public function index(Request $request): View - { - config([ - 'base.hero_contained' => false, - 'base.hero_full_controllers' => ['HeroRotateController'], - ]); - - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'title' => 'Configuration', - 'description' => ' -

Visit the modular documentation for more information

-
-
Page field
-
Data
-
-
modular-hero-1
-
-
-
-{
-"id":0000,
-}
-
-
-
-', - 'promo_item_id' => 0, - ], - ], - 'component' => [ - 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, - ], - ], - 'hero-1' => [ - 'data' => app(HeroImage::class)->create(4, false), - ], - ]; - - $request->data['base']['hero'] = $components['components']['hero-1']['data']; - - - return view('modularpage', merge($request->data, $components)); - } -} diff --git a/styleguide/Http/Controllers/HeroSVGController.php b/styleguide/Http/Controllers/HeroSVGController.php deleted file mode 100644 index 4d740f83..00000000 --- a/styleguide/Http/Controllers/HeroSVGController.php +++ /dev/null @@ -1,74 +0,0 @@ -faker['faker'] = $faker->create(); - } - - /** - * Article Listing Controller - */ - public function index(Request $request): View - { - config([ - 'base.hero_contained' => false, - 'base.hero_full_controllers' => ['HeroSVGController'], - ]); - - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'title' => 'Configuration', - 'description' => ' -

Visit the modular documentation for more information

-
-
Page field
-
Data
-
-
modular-hero-1
-
-
-
-{
-"id":0000,
-}
-
-
-
-', - 'promo_item_id' => 0, - ], - ], - 'component' => [ - 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, - ], - ], - 'hero-1' => [ - 'data' => app(HeroImage::class)->create(1, true, [ - 'option' => 'SVG Overlay', - 'secondary_relative_url' => "data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTYwMCA1ODAiPjxzdHlsZT4uc3Qwe2ZpbGw6I2ZmZn08L3N0eWxlPjxwYXRoIGQ9Ik0wIDBoMTAwdjEwMEgwek0xNTAwIDQ4MGgxMDB2MTAwaC0xMDB6TTAgNDgwaDEwMHYxMDBIMHpNMTUwMCAwaDEwMHYxMDBoLTEwMHoiLz48cGF0aCBjbGFzcz0ic3QwIiBkPSJNMzc0LjkgNDk0LjVoLS4yTDM3MCA1MzloLTE4bC05LjMtODMuNGgxMi43bDYuOSA2NS44aC4ybDYuMi02NS44aDEyLjZsNi40IDY2LjJoLjJsNi43LTY2LjJINDA2bC05IDgzLjRoLTE3LjRsLTQuNy00NC41ek00NTMuNCA1MzloLTEzLjJsLTIuMy0xNS4xaC0xNi4xbC0yLjMgMTUuMWgtMTJsMTMuMy04My40SDQ0MGwxMy40IDgzLjR6bS0yOS45LTI2LjVoMTIuNmwtNi4yLTQyLjJoLS4ybC02LjIgNDIuMnpNNDY1Ljkg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jMtNi43IDIxLTE5LjUgMjFzLTE5LjUtNy42LTE5LjUtMjF2LTUuMWgxMi40djZjMCA2IDIuNiA4LjEgNi44IDguMSA0LjIgMCA2LjgtMi4xIDYuOC04LjEgMC02LjEtMi42LTEwLjYtMTEuMi0xOC4xLTExLTkuNi0xNC40LTE2LjYtMTQuNC0yNi4xIDAtMTMuNCA2LjYtMjEgMTkuMy0yMXpNMTE1MC4zIDQ1NS42aDEzLjFWNTM5aC0xMy4xdi04My40ek0xMTY5LjEgNDU1LjZoNDAuNXYxMS45aC0xMy43VjUzOWgtMTMuMXYtNzEuNWgtMTMuN3YtMTEuOXpNMTIyNy42IDUxMS4zbC0xNi42LTU1LjhoMTMuN2w5LjkgMzhoLjJsOS45LTM4aDEyLjVsLTE2LjYgNTUuOFY1MzloLTEzLjF2LTI3Ljd6Ii8+PC9zdmc+", - ]), - ], - ]; - - $request->data['base']['hero'] = $components['components']['hero-1']; - - return view('modularpage', merge($request->data, $components)); - } -} diff --git a/styleguide/Http/Controllers/HeroTextController.php b/styleguide/Http/Controllers/HeroTextController.php deleted file mode 100644 index ee0930aa..00000000 --- a/styleguide/Http/Controllers/HeroTextController.php +++ /dev/null @@ -1,73 +0,0 @@ -faker['faker'] = $faker->create(); - } - - /** - * Article Listing Controller - */ - public function index(Request $request): View - { - config([ - 'base.hero_contained' => false, - 'base.hero_full_controllers' => ['HeroTextController'], - ]); - - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'title' => 'Configuration', - 'description' => ' -

Visit the modular documentation for more information

-
-
Page field
-
Data
-
-
modular-hero-1
-
-
-
-{
-"id":0000,
-}
-
-
-
-', - 'promo_item_id' => 0, - ], - ], - 'component' => [ - 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, - ], - ], - 'hero-1' => [ - 'data' => app(HeroImage::class)->create(1, true, [ - 'option' => 'Text Overlay', - ]), - ], - ]; - - $request->data['base']['hero'] = $components['components']['hero-1']; - - return view('modularpage', merge($request->data, $components)); - } -} diff --git a/styleguide/Pages/HeroContained.php b/styleguide/Pages/HeroContained.php index e1a1a7d0..4d3ef1a8 100644 --- a/styleguide/Pages/HeroContained.php +++ b/styleguide/Pages/HeroContained.php @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeroContainedController', + 'controller' => 'HeroController', 'title' => 'Contained', 'id' => 105100100, 'content' => [ diff --git a/styleguide/Pages/HeroFull.php b/styleguide/Pages/HeroFull.php index f477d821..1b3cb39d 100644 --- a/styleguide/Pages/HeroFull.php +++ b/styleguide/Pages/HeroFull.php @@ -16,7 +16,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeroFullController', + 'controller' => 'HeroController', 'title' => 'Full width', 'id' => 105100103, 'content' => [ diff --git a/styleguide/Pages/HeroFullLogoOverlay.php b/styleguide/Pages/HeroFullLogoOverlay.php index 4a14e804..702ef341 100644 --- a/styleguide/Pages/HeroFullLogoOverlay.php +++ b/styleguide/Pages/HeroFullLogoOverlay.php @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeroLogoController', + 'controller' => 'HeroController', 'title' => 'Logo overlay', 'id' => 105100107, 'content' => [ diff --git a/styleguide/Pages/HeroFullRotate.php b/styleguide/Pages/HeroFullRotate.php index 0d97e26d..f2365fc8 100644 --- a/styleguide/Pages/HeroFullRotate.php +++ b/styleguide/Pages/HeroFullRotate.php @@ -16,7 +16,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeroRotateController', + 'controller' => 'HeroController', 'title' => 'Rotate', 'id' => 105100104, 'content' => [ diff --git a/styleguide/Pages/HeroFullSVGOverlay.php b/styleguide/Pages/HeroFullSVGOverlay.php index badf554e..097d8e19 100644 --- a/styleguide/Pages/HeroFullSVGOverlay.php +++ b/styleguide/Pages/HeroFullSVGOverlay.php @@ -16,7 +16,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeroSVGController', + 'controller' => 'HeroController', 'title' => 'SVG overlay', 'id' => 105100106, 'content' => [ diff --git a/styleguide/Pages/HeroFullTextOverlay.php b/styleguide/Pages/HeroFullTextOverlay.php index 361d206f..f11e745f 100644 --- a/styleguide/Pages/HeroFullTextOverlay.php +++ b/styleguide/Pages/HeroFullTextOverlay.php @@ -16,7 +16,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeroTextController', + 'controller' => 'HeroController', 'title' => 'Text overlay', 'id' => 105100105, 'content' => [ diff --git a/styleguide/Pages/HeroSkinny.php b/styleguide/Pages/HeroSkinny.php new file mode 100644 index 00000000..015cb4c4 --- /dev/null +++ b/styleguide/Pages/HeroSkinny.php @@ -0,0 +1,28 @@ +create(1, true, [ + 'page' => [ + 'controller' => 'HeroFullController', + 'title' => 'Skinny', + 'id' => 105100103, + 'content' => [ + 'main' => '

', + ], + ], + ]); + } +} diff --git a/styleguide/Repositories/PromoRepository.php b/styleguide/Repositories/PromoRepository.php index 1e8e62d4..9f6b0535 100644 --- a/styleguide/Repositories/PromoRepository.php +++ b/styleguide/Repositories/PromoRepository.php @@ -45,13 +45,51 @@ public function getRequestData(array $data) // Only pull under_menu promos if they match the page_ids that are specified $under_menu = !empty($under_menu_page_ids[$data['page']['id']]) ? app(Button::class)->create($under_menu_page_ids[$data['page']['id']]) : null; - // Define the pages that have hero images: page_id => quanity + // Define the pages that have hero images $hero_page_ids = [ - 101101 => 1, // Homepage + // Homepage + 101101 => app(HeroImage::class)->create(1, false), + // Contained + 105100100 => app(HeroImage::class)->create(1, false), + // Full width + 105100103 => app(HeroImage::class)->create(1, false), + // Rotate + 105100104 => app(HeroImage::class)->create(4, false), + // Text overlay + 105100105 => app(HeroImage::class)->create(1, false, [ + 'option' => 'Text Overlay', + ]), + // SVG overlay + 105100106 => app(HeroImage::class)->create(1, false, [ + 'option' => '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TUuOFY1MzloLTEzLjF2LTI3Ljd6Ii8+PC9zdmc+", + ]), + // Logo overlay + 105100107 => app(HeroImage::class)->create(1, false, [ + 'option' => 'Logo Overlay', + 'secondary_relative_url' => '/styleguide/image/600x250?text=600x250', + ]), ]; - // Only pull hero promos if they match the pages_ids that are specificed - $hero = !empty($hero_page_ids[$data['page']['id']]) ? app(HeroImage::class)->create($hero_page_ids[$data['page']['id']]) : null; + // Only pull hero promos if they match the page ids that are specificed + $hero = !empty($hero_page_ids[$data['page']['id']]) ? $hero_page_ids[$data['page']['id']] : null; + + // Full width page IDs + $hero_full_width_ids = [ + 105100103, + 105100104, + 105100105, + 105100106, + 105100107, + ]; + + // Set the config for full width hero if they match the page ids that are specified + if(in_array($data['page']['id'], $hero_full_width_ids)) { + config([ + 'base.hero_contained' => false, + 'base.hero_full_controllers' => ['HeroController'], + ]); + } // Define the pages that the childpage accordion should show on page_id => quanity $accordion_page_ids = [ From cb7da0edc659f1032cb23384d7674e53f306eac4 Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Mon, 11 Dec 2023 12:20:19 -0500 Subject: [PATCH 2/7] Updating spotlight --- .../views/components/buttons/image.blade.php | 2 +- .../Http/Controllers/AccordionController.php | 26 ++++ .../Http/Controllers/ButtonSetController.php | 121 ++++++++---------- .../Http/Controllers/CatalogController.php | 4 + .../Http/Controllers/SpotlightController.php | 7 +- styleguide/Pages/Accordion.php | 4 +- styleguide/Pages/ButtonSet.php | 4 +- styleguide/Pages/Catalog.php | 4 +- .../Views/styleguide-accordion.blade.php | 59 --------- .../Views/styleguide-button-set.blade.php | 42 ++++++ 10 files changed, 133 insertions(+), 140 deletions(-) delete mode 100644 styleguide/Views/styleguide-accordion.blade.php create mode 100644 styleguide/Views/styleguide-button-set.blade.php diff --git a/resources/views/components/buttons/image.blade.php b/resources/views/components/buttons/image.blade.php index e144fc49..03f6315d 100644 --- a/resources/views/components/buttons/image.blade.php +++ b/resources/views/components/buttons/image.blade.php @@ -4,7 +4,7 @@ @if(!empty($button['link']) && !empty($button['relative_url'])) - @image($button['relative_url'], $button['filename_alt_text']) + @image($button['relative_url'], $button['filename_alt_text'] ?? $button['title']) @if(!empty($button['secondary_relative_url']))
@image($button['secondary_relative_url'], $button['secondary_alt_text'], 'w-full')
@endif diff --git a/styleguide/Http/Controllers/AccordionController.php b/styleguide/Http/Controllers/AccordionController.php index 2a18be2f..41afd0f8 100644 --- a/styleguide/Http/Controllers/AccordionController.php +++ b/styleguide/Http/Controllers/AccordionController.php @@ -14,6 +14,10 @@ class AccordionController extends Controller */ public function index(Request $request): View { + $request->data['base']['page']['content']['main'] = ' +

Display one or more accordions to your page.

+'; + $components['components'] = [ 'accordion-1' => [ 'data' => [ @@ -43,6 +47,28 @@ public function index(Request $request): View +', + ], + 1 => [ + 'promo_item_id' => 0, + 'title' => 'Promo group setup', + 'description' => ' + + + + + + + + + + + + + + + +
Available fields
TitleLabel on the closed accordion
DescriptionContent when the accordion is clicked open
', ], ], diff --git a/styleguide/Http/Controllers/ButtonSetController.php b/styleguide/Http/Controllers/ButtonSetController.php index a8def1d0..daacbf1d 100644 --- a/styleguide/Http/Controllers/ButtonSetController.php +++ b/styleguide/Http/Controllers/ButtonSetController.php @@ -7,7 +7,6 @@ use Illuminate\Http\Request; use Faker\Factory; use Factories\Button; -use Factories\GenericPromo; class ButtonSetController extends Controller { @@ -24,6 +23,11 @@ public function __construct(Factory $faker) */ public function index(Request $request): View { + + $request->data['base']['page']['content']['main'] = ' +

This component serves as the buttons under the side menu and as button components on your page.

+'; + $icon_green = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXz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czYuOCAyLjYgNi44IDcuMVYxMTVjMCA0LjUtMi40IDcuMS02LjggNy4xcy02LjgtMi42LTYuOC03LjF2LTE0Ljd6bTQuNCAxNWMwIDIgLjkgMi44IDIuMyAyLjhzMi4zLS44IDIuMy0yLjhWMTAwYzAtMi0uOS0yLjgtMi4zLTIuOHMtMi4zLjgtMi4zIDIuOHYxNS4zem0xOC42IDEuM2wzLjQtMjMuMWg0LjFsLTQuNCAyOC4zaC02LjZsLTQuNC0yOC4zaDQuNWwzLjQgMjMuMXptMTQtMTEuMWg2LjF2NGgtNi4xdjguM2g3Ljd2NGgtMTIuMVY5My41aDEyLjF2NGgtNy43djh6bTE5LjggMTYuNGMtLjItLjctLjQtMS4yLS40LTMuNXYtNC41YzAtMi42LS45LTMuNi0yLjktMy42aC0xLjV2MTEuNWgtNC41VjkzLjVoNi43YzQuNiAwIDYuNiAyLjEgNi42IDYuNXYyLjJjMCAyLjktLjkgNC44LTIuOSA1Ljd2LjFjMi4yLjkgMyAzIDMgNnY0LjRjMCAxLjQgMCAyLjQuNSAzLjRoLTQuNnptLTQuOS0yNC4zdjguN2gxLjdjMS43IDAgMi43LS43IDIuNy0zdi0yLjhjMC0yLS43LTIuOS0yLjMtMi45aC0yLjF6bTExLjgtNC4xaDQuNXYyNC4zaDcuM3Y0aC0xMS44VjkzLjV6bTI4LjIgMjguNGgtNC41bC0uOC01LjFoLTUuNWwtLjggNS4xSDMyMWw0LjUtMjguM2g2LjVsNC43IDI4LjN6bS0xMC4yLTloNC4zbC0yLjEtMTQuM2gtLjFsLTIuMSAxNC4zem0xNC40LS40bC01LjYtMTguOWg0LjdsMy40IDEyLjloLjFsMy40LTEyLjloNC4ybC01LjYgMTguOXY5LjRIMzQxdi05LjR6Ii8+PC9zdmc+"; @@ -81,7 +85,7 @@ public function index(Request $request): View 'title' => 'Image', 'option' => 'Image', 'relative_url' => "/styleguide/image/600x218?text=Primary+image+only", - 'filename_alt_text' => "Placeholder image", + 'filename_alt_text' => "", ]); // PDF @@ -104,21 +108,55 @@ public function index(Request $request): View ]); // Use them as components - $components['components'] = [ - 'accordion-1' => [ + $components = [ + 'accordion' => [ 'data' => [ 0 => [ 'promo_item_id' => 0, - 'title' => 'Promo group setup', + 'title' => 'Promotion group details', 'description' => ' -

Default options: Default, Green, Image

-Additional available options: Green gradient, Gold, Gold gradient. View these colors on the
Buttons page.

-

When linking to a pdf, "(pdf)" is added automatically.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Available fields
TitleText to appear on the button.
LinkYour URL. When linking to a pdf, "(pdf)" is added automatically.
ExcerptAdd a 2-3 word second line of text.
Options +Default options: Default, Green, Image
+Options available by request: Green gradient, Gold, Gold gradient
View these colors on the Buttons page.

+
Primary image +Icons: 40x40px PNG, SVG
Images: 600x218px JPG, PNG recommended with descriptive alternative text.
Text within the image is not recommended because it cannot maintain readability when scaled.
Secondary imageSVG overlay image of the same dimensions as the primary image.
Text can be used within the SVG because it is scalable. You must provide enough contrast between the background and overlay image to meet accessibility standards. Secondary image alternative text not used.
', ], 1 => [ 'promo_item_id' => 1, - 'title' => 'Configuration', + 'title' => 'Component configuration', 'description' => ' @@ -137,7 +175,7 @@ public function index(Request $request): View { "id":000000, "heading":"Buttons", -"config":"limit:3|page_id" +"config":"page_id|limit:3" } @@ -167,7 +205,7 @@ public function index(Request $request): View 'showDescription' => false, ], ], - 'button-row-10' => [ + 'button_row_1' => [ 'data' => app(Button::class)->create(3, false, [ 'option' => 'Green', ]), @@ -177,7 +215,7 @@ public function index(Request $request): View 'columns' => 3 ], ], - 'button-column-10' => [ + 'button_column_1' => [ 'data' => app(Button::class)->create(3, false, [ 'option' => 'Green', ]), @@ -186,80 +224,29 @@ public function index(Request $request): View 'filename' => 'button-column', ], ], - 'content-row-10' => [ - 'data' => app(GenericPromo::class)->create(1, false, [ - 'title' => 'Available button styles', - 'description' => ' -

Default options: Default, Green, Image.
-Additional available options: Green gradient, Gold, Gold gradient. View these colors on the Buttons page.
-When linking to a pdf, "(pdf)" is added automatically.

', - ]), - 'component' => [ - 'filename' => 'content-row', - ], - ], - 'button-column-1' => [ + 'button_column_2' => [ 'data' => $default, 'component' => [ 'heading' => 'Default buttons', 'filename' => 'button-column', ], ], - 'content-column-1' => [ - 'data' => app(GenericPromo::class)->create(1, false, [ - 'title' => 'Default config', - 'description' => ' -

Option: None or \'Default\'

-

Two-lines: Add an excerpt

-

Icon: Add a primary image, ~40x40px.

', - ]), - 'component' => [ - 'filename' => 'content-column', - ], - ], - 'button-column-2' => [ + 'button_column_3' => [ 'data' => $green, 'component' => [ 'heading' => 'Green buttons', 'filename' => 'button-column', ], ], - 'content-column-2' => [ - 'data' => app(GenericPromo::class)->create(1, false, [ - 'title' => 'Green config', - 'description' => ' -

Option: Green

-

Two-lines: Add an excerpt

-

Icon: Add a primary image, ~40x40px.

', - ]), - 'component' => [ - 'heading' => '', - 'filename' => 'content-column', - ], - ], - 'button-column-3' => [ + 'button_column_4' => [ 'data' => $image, 'component' => [ 'heading' => 'Image buttons', 'filename' => 'button-column', ], ], - 'content-column-3' => [ - 'data' => app(GenericPromo::class)->create(1, false, [ - 'title' => 'Image config', - 'description' => ' -

Option: Image

-

Overlay: Add a primary JPG/PNG image (background) and secondary SVG image (overlay) of the same dimensions.

-

You must provide enough contrast between the background and overlay image to meet accessibility standards.

-', - ]), - 'component' => [ - 'heading' => '', - 'filename' => 'content-column', - ], - ], ]; - return view('childpage', merge($request->data, $components)); + return view('styleguide-button-set', merge($request->data, $components)); } } diff --git a/styleguide/Http/Controllers/CatalogController.php b/styleguide/Http/Controllers/CatalogController.php index 94974719..689c949c 100644 --- a/styleguide/Http/Controllers/CatalogController.php +++ b/styleguide/Http/Controllers/CatalogController.php @@ -23,6 +23,10 @@ public function __construct(Factory $faker) */ public function index(Request $request): View { + $request->data['base']['page']['content']['main'] = ' +

Display a grid or listing of items from a single promo group.

+'; + $components['components'] = [ 'accordion-1' => [ 'data' => [ diff --git a/styleguide/Http/Controllers/SpotlightController.php b/styleguide/Http/Controllers/SpotlightController.php index a5953fc4..7eb315ef 100644 --- a/styleguide/Http/Controllers/SpotlightController.php +++ b/styleguide/Http/Controllers/SpotlightController.php @@ -49,10 +49,9 @@ public function index(Request $request): View { "id":000000, "heading":"Spotlight", -"config":"randomize|limit:1|page_id", -"singlePromoView":true, -"showExcerpt":true, -"showDescription":true +"config":"randomize|page_id|limit:1", +"singlePromoView":false, +"showDescription":false } diff --git a/styleguide/Pages/Accordion.php b/styleguide/Pages/Accordion.php index 442422fc..abea387d 100644 --- a/styleguide/Pages/Accordion.php +++ b/styleguide/Pages/Accordion.php @@ -16,9 +16,7 @@ public function getPageData() 'controller' => 'AccordionController', 'title' => 'Accordion', 'id' => 107100, - 'content' => [ - 'main' => '

You can now add more than one accordion to a page.

', - ], + 'content' => [], // On controller ], ]); } diff --git a/styleguide/Pages/ButtonSet.php b/styleguide/Pages/ButtonSet.php index 7c721e6c..ece4036b 100644 --- a/styleguide/Pages/ButtonSet.php +++ b/styleguide/Pages/ButtonSet.php @@ -16,9 +16,7 @@ public function getPageData() 'controller' => 'ButtonSetController', 'title' => 'Button set', 'id' => 114100, - 'content' => [ - 'main' => '

This component can be used as buttons under the side menu and as buttons on your page.

', - ], + 'content' => [], // On controller ], ]); } diff --git a/styleguide/Pages/Catalog.php b/styleguide/Pages/Catalog.php index f2e91a95..fc0374c7 100644 --- a/styleguide/Pages/Catalog.php +++ b/styleguide/Pages/Catalog.php @@ -16,9 +16,7 @@ public function getPageData() 'controller' => 'CatalogController', 'title' => 'Catalog', 'id' => 118100, - 'content' => [ - 'main' => '

Display a grid or listing of items from a single promo group.

', - ], + 'content' => [], // On controller ], ]); } diff --git a/styleguide/Views/styleguide-accordion.blade.php b/styleguide/Views/styleguide-accordion.blade.php deleted file mode 100644 index 1b210f51..00000000 --- a/styleguide/Views/styleguide-accordion.blade.php +++ /dev/null @@ -1,59 +0,0 @@ -@extends('components.content-area') - -@section('content') - @include('components.page-title', ['title' => $base['page']['title']]) - -
- {!! $base['page']['content']['main'] !!} -
- - @if(!empty($base['accordion_page'])) - @include('components.accordion', ['data' => $base['accordion_page']]) - @endif - -

Configuration

-
-
Page field
-
Data
-
-
modular-accordion-1
-
-
-
-{!! htmlspecialchars('{
-"id":1234,
-"heading":"My accordion"
-}') !!}
-
-
-
- -

CMS HTML

-
-{!! htmlspecialchars('
    - -
  • - Accordion 1 -
    -

    Panel 1. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    -
    -
  • - - -
  • - Accordion 2 -
    -

    Panel 2. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    -
    -
  • - - -
  • - Accordion 3 -
    -

    Panel 3. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    -
    -
  • -
') !!} -
-@endsection diff --git a/styleguide/Views/styleguide-button-set.blade.php b/styleguide/Views/styleguide-button-set.blade.php new file mode 100644 index 00000000..6a4fd964 --- /dev/null +++ b/styleguide/Views/styleguide-button-set.blade.php @@ -0,0 +1,42 @@ +@extends('components.content-area') + +@section('content') + @include('components.page-title', ['title' => $base['page']['title']]) + +
+ {!! $base['page']['content']['main'] !!} +
+ +
+
+ @include('components/accordion', ['data' => $accordion['data'], 'component' => $accordion['component']]) +
+
+

{{ $button_row_1['component']['heading'] }}

+ @include('components/button-row', ['data' => $button_row_1['data'], 'component' => $button_row_1['component']]) +
+
+

{{ $button_column_1['component']['heading'] }}

+ @include('components/button-column', ['data' => $button_column_1['data'], 'component' => $button_column_1['component']]) +
+
+
+

Button appearance examples

+

A button's appearance depends on which fields you add to the promotion item.

+

For "Default" and "Green" buttons, the excerpt displays as a second line line of text, and the primary image displays as a small icon next to either one or two lines of text. +

For "Image" buttons, a primary and secondary image create a layered effect. None of the text fields are used when "Image" is selected.

+
+
+

Default buttons

+ @include('components/button-column', ['data' => $button_column_2['data'], 'component' => $button_column_2['component']]) +

Green buttons

+ @include('components/button-column', ['data' => $button_column_3['data'], 'component' => $button_column_3['component']]) +
+
+

Image buttons

+ @include('components/button-column', ['data' => $button_column_4['data'], 'component' => $button_column_4['component']]) +
+
+ + +@endsection From a2c470e1487a6b8e77840fcd44a7ba9391b7dc77 Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Mon, 11 Dec 2023 12:22:12 -0500 Subject: [PATCH 3/7] If no decorative text supplied for image button defaults to title --- resources/views/components/buttons/image.blade.php | 2 +- styleguide/Http/Controllers/ButtonSetController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/components/buttons/image.blade.php b/resources/views/components/buttons/image.blade.php index 03f6315d..df57cdf5 100644 --- a/resources/views/components/buttons/image.blade.php +++ b/resources/views/components/buttons/image.blade.php @@ -4,7 +4,7 @@ @if(!empty($button['link']) && !empty($button['relative_url'])) - @image($button['relative_url'], $button['filename_alt_text'] ?? $button['title']) + @image($button['relative_url'], ($button['filename_alt_text'] ? $button['filename_alt_text'] : $button['title'])) @if(!empty($button['secondary_relative_url']))
@image($button['secondary_relative_url'], $button['secondary_alt_text'], 'w-full')
@endif diff --git a/styleguide/Http/Controllers/ButtonSetController.php b/styleguide/Http/Controllers/ButtonSetController.php index daacbf1d..a502c487 100644 --- a/styleguide/Http/Controllers/ButtonSetController.php +++ b/styleguide/Http/Controllers/ButtonSetController.php @@ -85,7 +85,7 @@ public function index(Request $request): View 'title' => 'Image', 'option' => 'Image', 'relative_url' => "/styleguide/image/600x218?text=Primary+image+only", - 'filename_alt_text' => "", + 'filename_alt_text' => "Placeholder image", ]); // PDF From ad14660844709279d4f247b1a82b3a8411b35c92 Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Mon, 11 Dec 2023 13:34:32 -0500 Subject: [PATCH 4/7] streamlining components --- .../Http/Controllers/AccordionController.php | 48 +++++++++---------- .../Http/Controllers/ButtonSetController.php | 6 +-- .../Http/Controllers/CatalogController.php | 38 ++++++++++++++- .../Controllers/EventListingController.php | 4 +- 4 files changed, 65 insertions(+), 31 deletions(-) diff --git a/styleguide/Http/Controllers/AccordionController.php b/styleguide/Http/Controllers/AccordionController.php index 41afd0f8..b7a313b9 100644 --- a/styleguide/Http/Controllers/AccordionController.php +++ b/styleguide/Http/Controllers/AccordionController.php @@ -22,8 +22,30 @@ public function index(Request $request): View 'accordion-1' => [ 'data' => [ 0 => [ - 'promo_item_id' => 0, - 'title' => 'Configuration', + 'promo_item_id' => 'promoGroupDetails', + 'title' => 'Promotion group details', + 'description' => ' +
+ + + + + + + + + + + + + + + +
Available fields
TitleText on the closed accordion.
DescriptionContent when the accordion is clicked open.
', + ], + 1 => [ + 'promo_item_id' => 'componentConfiguration', + 'title' => 'Component configuration', 'description' => ' @@ -47,28 +69,6 @@ public function index(Request $request): View -
', - ], - 1 => [ - 'promo_item_id' => 0, - 'title' => 'Promo group setup', - 'description' => ' - - - - - - - - - - - - - - - -
Available fields
TitleLabel on the closed accordion
DescriptionContent when the accordion is clicked open
', ], ], diff --git a/styleguide/Http/Controllers/ButtonSetController.php b/styleguide/Http/Controllers/ButtonSetController.php index a502c487..7125ef48 100644 --- a/styleguide/Http/Controllers/ButtonSetController.php +++ b/styleguide/Http/Controllers/ButtonSetController.php @@ -112,7 +112,7 @@ public function index(Request $request): View 'accordion' => [ 'data' => [ 0 => [ - 'promo_item_id' => 0, + 'promo_item_id' => 'promoGroupDetails', 'title' => 'Promotion group details', 'description' => ' @@ -137,7 +137,7 @@ public function index(Request $request): View @@ -155,7 +155,7 @@ public function index(Request $request): View ', ], 1 => [ - 'promo_item_id' => 1, + 'promo_item_id' => 'componentConfiguration', 'title' => 'Component configuration', 'description' => '
Options -Default options: Default, Green, Image
+Default: Default, Green, Image
Options available by request: Green gradient, Gold, Gold gradient
View these colors on the Buttons page.

diff --git a/styleguide/Http/Controllers/CatalogController.php b/styleguide/Http/Controllers/CatalogController.php index 689c949c..ef5c7f78 100644 --- a/styleguide/Http/Controllers/CatalogController.php +++ b/styleguide/Http/Controllers/CatalogController.php @@ -31,7 +31,42 @@ public function index(Request $request): View 'accordion-1' => [ 'data' => [ 0 => [ - 'title' => 'Configuration', + 'promo_item_id' => 'promoGroupDetails', + 'title' => 'Promotion group details', + 'description' => ' +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Available fields
TitleBold text.
LinkOptional external link. Component flag "singlePromoView" sets the link to the individual promo item view.
ExcerptOptional smaller text under the title.
DescriptionOptional smaller text under the title and/or excerpt. You might use this area on a singe promo view page and hide it from the catalog component.
Primary imageMinimum width of 600px jpg, png.
', + ], + 1 => [ + 'promo_item_id' => 'componentConfiguration', + 'title' => 'Component configuration', 'description' => ' @@ -61,7 +96,6 @@ public function index(Request $request): View
', - 'promo_item_id' => 0, ], ], 'component' => [ diff --git a/styleguide/Http/Controllers/EventListingController.php b/styleguide/Http/Controllers/EventListingController.php index f1ec6821..eb80d2c1 100644 --- a/styleguide/Http/Controllers/EventListingController.php +++ b/styleguide/Http/Controllers/EventListingController.php @@ -27,8 +27,8 @@ public function index(Request $request): View 'accordion-1' => [ 'data' => [ 0 => [ - 'promo_item_id' => 0, - 'title' => 'Configuration', + 'promo_item_id' => 'componentConfiguration', + 'title' => 'Component configuration', 'description' => ' From a459c96ffdc205e1c1e9b9553d8ca570cf089892 Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Tue, 12 Dec 2023 15:01:33 -0500 Subject: [PATCH 5/7] streamlining components --- ...geWithOptions.php => PromoWithOptions.php} | 2 +- resources/views/components/catalog.blade.php | 16 +- .../views/components/image-column.blade.php | 17 -- .../components/promo-catalog-item.blade.php | 31 ++++ .../views/components/promo-column.blade.php | 6 +- ...promo-grid-item-gradient-overlay.blade.php | 33 ++++ .../components/promo-grid-item.blade.php | 18 +- .../views/components/promo-row.blade.php | 2 +- .../Http/Controllers/AccordionController.php | 33 ++-- .../Http/Controllers/ButtonSetController.php | 173 +++++++++--------- .../Http/Controllers/CatalogController.php | 133 +++++++++----- .../Controllers/HeroContainedController.php | 71 ------- .../Http/Controllers/HeroController.php | 8 +- .../Http/Controllers/HeroFullController.php | 71 ------- .../Http/Controllers/HeroLogoController.php | 74 -------- .../Http/Controllers/HeroRotateController.php | 72 -------- .../Http/Controllers/HeroSVGController.php | 74 -------- .../Http/Controllers/HeroTextController.php | 73 -------- .../Http/Controllers/IconsController.php | 61 +++++- .../Http/Controllers/ImageController.php | 77 -------- .../Controllers/SinglePromoController.php | 79 ++++++-- .../Http/Controllers/SpotlightController.php | 90 +++++---- styleguide/Pages/Accordion.php | 4 +- styleguide/Pages/ButtonSet.php | 4 +- styleguide/Pages/Catalog.php | 4 +- styleguide/Pages/IconsComponent.php | 2 +- styleguide/Pages/ImageComponent.php | 25 --- styleguide/Pages/SpotlightComponent.php | 2 +- .../styleguide-using-components.blade.php | 69 ++++++- styleguide/menu.json | 10 - tailwind.config.js | 3 + .../ModularPageRepositoryTest.php | 8 +- 32 files changed, 537 insertions(+), 808 deletions(-) rename factories/{PromoPageWithOptions.php => PromoWithOptions.php} (97%) delete mode 100644 resources/views/components/image-column.blade.php create mode 100644 resources/views/components/promo-catalog-item.blade.php create mode 100644 resources/views/components/promo-grid-item-gradient-overlay.blade.php delete mode 100644 styleguide/Http/Controllers/HeroContainedController.php delete mode 100644 styleguide/Http/Controllers/HeroFullController.php delete mode 100644 styleguide/Http/Controllers/HeroLogoController.php delete mode 100644 styleguide/Http/Controllers/HeroRotateController.php delete mode 100644 styleguide/Http/Controllers/HeroSVGController.php delete mode 100644 styleguide/Http/Controllers/HeroTextController.php delete mode 100644 styleguide/Http/Controllers/ImageController.php delete mode 100644 styleguide/Pages/ImageComponent.php diff --git a/factories/PromoPageWithOptions.php b/factories/PromoWithOptions.php similarity index 97% rename from factories/PromoPageWithOptions.php rename to factories/PromoWithOptions.php index 78a97ab7..35cdbb8f 100644 --- a/factories/PromoPageWithOptions.php +++ b/factories/PromoWithOptions.php @@ -5,7 +5,7 @@ use Contracts\Factories\FactoryContract; use Faker\Factory; -class PromoPageWithOptions implements FactoryContract +class PromoWithOptions implements FactoryContract { /** * Construct the factory. diff --git a/resources/views/components/catalog.blade.php b/resources/views/components/catalog.blade.php index 731131bf..a965262b 100644 --- a/resources/views/components/catalog.blade.php +++ b/resources/views/components/catalog.blade.php @@ -22,9 +22,13 @@ @endforeach @else -
+
@foreach($group_items as $item) - @include('components/promo-grid-item') + @if(!empty($component['gradientOverlay']) && $component['gradientOverlay'] === true) + @include('components/promo-grid-item-gradient-overlay') + @else + @include('components/promo-grid-item') + @endif @endforeach
@endif @@ -37,9 +41,13 @@ @endforeach
@else -
+
@foreach($data as $item) - @include('components/promo-grid-item') + @if(!empty($component['gradientOverlay']) && $component['gradientOverlay'] === true) + @include('components/promo-grid-item-gradient-overlay') + @else + @include('components/promo-grid-item') + @endif @endforeach
@endif diff --git a/resources/views/components/image-column.blade.php b/resources/views/components/image-column.blade.php deleted file mode 100644 index 1a1bd4c1..00000000 --- a/resources/views/components/image-column.blade.php +++ /dev/null @@ -1,17 +0,0 @@ -{{-- - $image_promo => single // ['title', 'link', 'filename_url', 'filename_alt_text'] ---}} -@foreach($data as $image) - -@endforeach diff --git a/resources/views/components/promo-catalog-item.blade.php b/resources/views/components/promo-catalog-item.blade.php new file mode 100644 index 00000000..f9182648 --- /dev/null +++ b/resources/views/components/promo-catalog-item.blade.php @@ -0,0 +1,31 @@ +{{-- + This component's image is 1/4 width on small views + $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-0 md:block {{ !empty($item['link']) ? 'group' : '' }}"> + @if(!empty($item['youtube_id'])) +
+ @if(!empty($item['relative_url'])) + @image($item['relative_url'], $item['filename_alt_text'], "lazy w-1/4 shrink-0 md:shrink md:w-full object-cover h-full") + @else + @image('//i.wayne.edu/youtube/'.$item['youtube_id'].'/max', $item['filename_alt_text'], "lazy w-1/4 shrink-0 md:shrink md:w-full object-cover h-full") + @endif +
+ @elseif(!empty($item['relative_url'])) + @image($item['relative_url'], $item['filename_alt_text'], "lazy w-1/4 shrink-0 md:shrink md:w-full") + @endif +
+
{{ $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'] !!}
+ @endif + @endif +
+<{{ !empty($item['link']) ? '/a' : '/div' }}> + + diff --git a/resources/views/components/promo-column.blade.php b/resources/views/components/promo-column.blade.php index 0ec0e71c..4b75a7e0 100644 --- a/resources/views/components/promo-column.blade.php +++ b/resources/views/components/promo-column.blade.php @@ -3,5 +3,9 @@ $image_promo => single // ['title', 'link', 'filename_url', 'filename_alt_text'] --}} @foreach($data as $item) - @include('components/promo-grid-item') + @if(!empty($component['gradientOverlay']) && $component['gradientOverlay'] === true) + @include('components/promo-grid-item-gradient-overlay') + @else + @include('components/promo-grid-item') + @endif @endforeach diff --git a/resources/views/components/promo-grid-item-gradient-overlay.blade.php b/resources/views/components/promo-grid-item-gradient-overlay.blade.php new file mode 100644 index 00000000..5ebc1192 --- /dev/null +++ b/resources/views/components/promo-grid-item-gradient-overlay.blade.php @@ -0,0 +1,33 @@ +{{-- + This component's image is 1/4 width on small views + $item => array // ['title', 'link', 'description', 'excerpt', 'relative_url', 'option'] +--}} + +<{{ !empty($item['link']) ? 'a href='.$item['link'] : 'div' }} class="bg-green-800 relative block overflow-hidden {{ !empty($item['link']) ? 'group' : '' }}"> + @if(!empty($item['youtube_id'])) +
+ @if(!empty($item['relative_url'])) + @image($item['relative_url'], $item['filename_alt_text'], "lazy w-full object-cover h-full") + @else + @image('//i.wayne.edu/youtube/'.$item['youtube_id'].'/max', $item['filename_alt_text'], "lazy w-full object-cover h-full") + @endif +
+ @elseif(!empty($item['relative_url'])) + @image($item['relative_url'], $item['filename_alt_text'], "lazy w-full") + @endif +
+ +
+<{{ !empty($item['link']) ? '/a' : '/div' }}> + + diff --git a/resources/views/components/promo-grid-item.blade.php b/resources/views/components/promo-grid-item.blade.php index f9182648..3618233a 100644 --- a/resources/views/components/promo-grid-item.blade.php +++ b/resources/views/components/promo-grid-item.blade.php @@ -3,26 +3,26 @@ $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-0 md:block {{ !empty($item['link']) ? 'group' : '' }}"> +<{{ !empty($item['link']) ? 'a href='.$item['link'] : 'div' }} class="block {{ !empty($item['link']) ? 'group' : '' }}"> @if(!empty($item['youtube_id']))
@if(!empty($item['relative_url'])) - @image($item['relative_url'], $item['filename_alt_text'], "lazy w-1/4 shrink-0 md:shrink md:w-full object-cover h-full") + @image($item['relative_url'], $item['filename_alt_text'], "lazy w-full object-cover h-full") @else - @image('//i.wayne.edu/youtube/'.$item['youtube_id'].'/max', $item['filename_alt_text'], "lazy w-1/4 shrink-0 md:shrink md:w-full object-cover h-full") + @image('//i.wayne.edu/youtube/'.$item['youtube_id'].'/max', $item['filename_alt_text'], "lazy w-full object-cover h-full") @endif
@elseif(!empty($item['relative_url'])) - @image($item['relative_url'], $item['filename_alt_text'], "lazy w-1/4 shrink-0 md:shrink md:w-full") + @image($item['relative_url'], $item['filename_alt_text'], "lazy w-full") @endif -
-
{{ $item['title'] }}
- @if(!empty($item['excerpt']))

{!! strip_tags($item['excerpt'], ['em', 'strong']) !!}

@endif +
+
{{ $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']) !!}
+
{!! preg_replace(array('""', '""'), array('',''), $item['description']) !!}
@else -
{!! $item['description'] !!}
+
{!! $item['description'] !!}
@endif @endif
diff --git a/resources/views/components/promo-row.blade.php b/resources/views/components/promo-row.blade.php index 706f4c38..c62b69ec 100644 --- a/resources/views/components/promo-row.blade.php +++ b/resources/views/components/promo-row.blade.php @@ -16,7 +16,7 @@ @endif
-
{{ $item['title'] }}
+
{{ $item['title'] }}
@if(!empty($item['excerpt']))
{!! strip_tags($item['excerpt'], ['em', 'strong']) !!}
@endif diff --git a/styleguide/Http/Controllers/AccordionController.php b/styleguide/Http/Controllers/AccordionController.php index b7a313b9..9b764c38 100644 --- a/styleguide/Http/Controllers/AccordionController.php +++ b/styleguide/Http/Controllers/AccordionController.php @@ -18,13 +18,7 @@ public function index(Request $request): View

Display one or more accordions to your page.

'; - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'promo_item_id' => 'promoGroupDetails', - 'title' => 'Promotion group details', - 'description' => ' + $promotion_group_details = '
@@ -41,12 +35,9 @@ public function index(Request $request): View -
Content when the accordion is clicked open.
', - ], - 1 => [ - 'promo_item_id' => 'componentConfiguration', - 'title' => 'Component configuration', - 'description' => ' + +'; + $component_configuration = ' @@ -69,7 +60,21 @@ public function index(Request $request): View -
', + +'; + + $components['components'] = [ + 'accordion' => [ + 'data' => [ + 0 => [ + 'promo_item_id' => 'componentConfiguration', + 'title' => 'Component configuration', + 'description' => $component_configuration, + ], + 1 => [ + 'promo_item_id' => 'promoGroupDetails', + 'title' => 'Promotion group details', + 'description' => $promotion_group_details, ], ], 'component' => [ diff --git a/styleguide/Http/Controllers/ButtonSetController.php b/styleguide/Http/Controllers/ButtonSetController.php index 7125ef48..d016ac27 100644 --- a/styleguide/Http/Controllers/ButtonSetController.php +++ b/styleguide/Http/Controllers/ButtonSetController.php @@ -26,6 +26,86 @@ public function index(Request $request): View $request->data['base']['page']['content']['main'] = '

This component serves as the buttons under the side menu and as button components on your page.

+'; + $promotion_group_details = ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Available fields
TitleText to appear on the button.
LinkYour URL. When linking to a pdf, "(pdf)" is added automatically.
ExcerptAdd a 2-3 word second line of text.
Options + Default: Default, Green, Image
+ Options available by request: Green gradient, Gold, Gold gradient
View these colors on the Buttons page.

+
Primary image + Icons: 40x40px PNG, SVG
Images: 600x218px JPG, PNG recommended with descriptive alternative text.
Text within the image is not recommended because it cannot maintain readability when scaled.
Secondary imageSVG overlay image of the same dimensions as the primary image.
Text can be used within the SVG because it is scalable. You must provide enough contrast between the background and overlay image to meet accessibility standards. Secondary image alternative text not used.
+'; + $component_configuration = ' + + + + + + + + + + + + + + + + + +
Page fieldData
+
modular-button-column-1
+
+
+{
+"id":000000,
+"heading":"Buttons",
+"config":"page_id|limit:3"
+}
+
+
+
modular-button-row-1
+
+
+{
+"id":000000,
+"heading":"Buttons",
+"config":"page_id|limit:3",
+"columns":3
+}
+
+
'; $icon_green = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxMDAgMTAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6IzA4MzUyRjt9Cjwvc3R5bGU+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik01MCwyLjVDMjMuOCwyLjUsMi41LDIzLjgsMi41LDUwUzIzLjgsOTcuNSw1MCw5Ny41Uzk3LjUsNzYuMiw5Ny41LDUwUzc2LjIsMi41LDUwLDIuNXogTTQzLjgsMjAuOQoJYzEuNi0xLjUsMy41LTIuMiw1LjYtMi4yYzIuMiwwLDQuMSwwLjcsNS42LDIuMmMxLjYsMS41LDIuMywzLjIsMi4zLDUuM2MwLDItMC44LDMuOC0yLjQsNS4yYy0xLjYsMS40LTMuNCwyLjItNS42LDIuMgoJYy0yLjIsMC00LjEtMC43LTUuNi0yLjJjLTEuNi0xLjQtMi40LTMuMi0yLjQtNS4yQzQxLjQsMjQuMSw0Mi4yLDIyLjMsNDMuOCwyMC45eiBNNjMuMyw4MS4zSDM3Ljd2LTNjMC43LTAuMSwxLjQtMC4xLDIuMS0wLjIKCXMxLjMtMC4yLDEuNy0wLjRjMC45LTAuMywxLjUtMC44LDEuOC0xLjRzMC41LTEuNCwwLjUtMi40VjUwLjRjMC0wLjktMC4yLTEuOC0wLjYtMi41Yy0wLjQtMC43LTEtMS4zLTEuNi0xLjcKCWMtMC41LTAuMy0xLjItMC42LTIuMi0wLjlzLTEuOS0wLjUtMi43LTAuNnYtM2wxOS44LTEuMWwwLjYsMC42djMyLjFjMCwwLjksMC4yLDEuNywwLjYsMi40YzAuNCwwLjcsMSwxLjIsMS43LDEuNQoJYzAuNSwwLjIsMS4xLDAuNSwxLjgsMC42YzAuNiwwLjIsMS4zLDAuMywyLDAuNHYzLjFDNjMuMiw4MS4zLDYzLjMsODEuMyw2My4zLDgxLjN6Ii8+Cjwvc3ZnPgo="; @@ -111,98 +191,19 @@ public function index(Request $request): View $components = [ 'accordion' => [ 'data' => [ - 0 => [ - 'promo_item_id' => 'promoGroupDetails', - 'title' => 'Promotion group details', - 'description' => ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Available fields
TitleText to appear on the button.
LinkYour URL. When linking to a pdf, "(pdf)" is added automatically.
ExcerptAdd a 2-3 word second line of text.
Options -Default: Default, Green, Image
-Options available by request: Green gradient, Gold, Gold gradient
View these colors on the Buttons page.

-
Primary image -Icons: 40x40px PNG, SVG
Images: 600x218px JPG, PNG recommended with descriptive alternative text.
Text within the image is not recommended because it cannot maintain readability when scaled.
Secondary imageSVG overlay image of the same dimensions as the primary image.
Text can be used within the SVG because it is scalable. You must provide enough contrast between the background and overlay image to meet accessibility standards. Secondary image alternative text not used.
-', - ], - 1 => [ + 2 => [ 'promo_item_id' => 'componentConfiguration', 'title' => 'Component configuration', - 'description' => ' - - - - - - - - - - - - - - - - - -
Page fieldData
-
modular-button-column-1
-
-
-{
-"id":000000,
-"heading":"Buttons",
-"config":"page_id|limit:3"
-}
-
-
-
modular-button-row-1
-
-
-{
-"id":000000,
-"heading":"Buttons",
-"config":"limit:3|page_id",
-"columns":3
-}
-
-
', + 'description' => $component_configuration, + ], + 1 => [ + 'promo_item_id' => 'promoGroupDetails', + 'title' => 'Promotion group details', + 'description' => $promotion_group_details, ], ], 'component' => [ 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, ], ], 'button_row_1' => [ diff --git a/styleguide/Http/Controllers/CatalogController.php b/styleguide/Http/Controllers/CatalogController.php index ef5c7f78..d6636d51 100644 --- a/styleguide/Http/Controllers/CatalogController.php +++ b/styleguide/Http/Controllers/CatalogController.php @@ -7,14 +7,23 @@ use Illuminate\Http\Request; use Faker\Factory; use Factories\GenericPromo; +use Factories\PromoWithOptions; +use Contracts\Repositories\PromoRepositoryContract; +use Contracts\Repositories\ModularPageRepositoryContract; class CatalogController extends Controller { /** * Construct the controller. + * */ - public function __construct(Factory $faker) - { + public function __construct( + Factory $faker, + PromoRepositoryContract $promo, + ModularPageRepositoryContract $components + ) { + $this->promo = $promo; + $this->components = $components; $this->faker['faker'] = $faker->create(); } @@ -23,17 +32,46 @@ public function __construct(Factory $faker) */ public function index(Request $request): View { + $request->data['base']['page']['content']['main'] = ''; + $promotion_group_details = ''; + $component_configuration = ''; + $request->data['base']['page']['content']['main'] = '

Display a grid or listing of items from a single promo group.

'; - - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'promo_item_id' => 'promoGroupDetails', - 'title' => 'Promotion group details', - 'description' => ' + $component_configuration = ' + + + + + + + + + + + + + +
Page fieldData
+
modular-catalog-1
+
+
+{
+"id":000000,
+"heading":"Catalog",
+"config":"randomize|limit:1|page_id|youtube",
+"columns":3,
+"singlePromoView":true,
+"showExcerpt":true,
+"showDescription":false,
+"groupByOptions":false,
+"gradientOverlay":false
+}
+
+
+'; + $promotion_group_details = ' @@ -62,46 +100,25 @@ public function index(Request $request): View -
Minimum width of 600px jpg, png.
', + +'; + + $components['components'] = [ + 'accordion' => [ + 'data' => [ + 0 => [ + 'title' => 'Component configuration', + 'promo_item_id' => 'componentConfiguration', + 'description' => $component_configuration, ], 1 => [ - 'promo_item_id' => 'componentConfiguration', - 'title' => 'Component configuration', - 'description' => ' - - - - - - - - - - - - - -
Page fieldData
-
modular-catalog-1
-
-
-{
-"id":000000,
-"heading":"Catalog",
-"config":"randomize|limit:1|page_id|youtube",
-"columns":3,
-"singlePromoView":true,
-"showExcerpt":true,
-"showDescription":false
-}
-
-
', + 'title' => 'Promotion group details', + 'promo_item_id' => 'promotionGroupDetails', + 'description' => $promotion_group_details, ], ], 'component' => [ 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, ], ], 'catalog-1' => [ @@ -113,6 +130,20 @@ public function index(Request $request): View 'filename' => 'catalog', 'columns' => '3', 'showDescription' => false, + 'gradientOverlay' => false, + ], + ], + 'catalog-10' => [ + 'data' => app(GenericPromo::class)->create(5, false, [ + 'relative_url' => '/styleguide/image/450x600', + 'description' => '', + ]), + 'component' => [ + 'heading' => 'Three-column catalog', + 'filename' => 'catalog', + 'columns' => '3', + 'showDescription' => false, + 'gradientOverlay' => true, ], ], 'catalog-2' => [ @@ -126,8 +157,22 @@ public function index(Request $request): View 'showDescription' => false, ], ], + 'catalog-3' => [ + 'data' => app(PromoWithOptions::class)->create(8, false, [ + 'excerpt' => '', + ]), + 'component' => [ + 'heading' => 'Catalog sorted by option', + 'filename' => 'catalog', + 'columns' => '4', + 'showDescription' => false, + 'groupByOptions' => true, + ], + ], ]; + $components['components']['catalog-3']['data'] = $this->components->organizePromoItemsByOption($components['components']['catalog-3']['data']); + return view('childpage', merge($request->data, $components)); } } diff --git a/styleguide/Http/Controllers/HeroContainedController.php b/styleguide/Http/Controllers/HeroContainedController.php deleted file mode 100644 index e019ae44..00000000 --- a/styleguide/Http/Controllers/HeroContainedController.php +++ /dev/null @@ -1,71 +0,0 @@ -faker['faker'] = $faker->create(); - } - - /** - * Article Listing Controller - */ - public function index(Request $request): View - { - config([ - 'base.hero_contained' => false, - 'base.hero_full_controllers' => ['HeroFullController'], - ]); - - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'title' => 'Configuration', - 'description' => ' -

Visit the modular documentation for more information

-
-
Page field
-
Data
-
-
modular-hero-1
-
-
-
-{
-"id":0000
-}
-
-
-
-', - 'promo_item_id' => 0, - ], - ], - 'component' => [ - 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, - ], - ], - 'hero-1' => [ - 'data' => app(HeroImage::class)->create(1, true), - ], - ]; - - $request->data['base']['hero'] = $components['components']['hero-1']; - - return view('childpage', merge($request->data, $components)); - } -} diff --git a/styleguide/Http/Controllers/HeroController.php b/styleguide/Http/Controllers/HeroController.php index faa0d013..38d8cb36 100644 --- a/styleguide/Http/Controllers/HeroController.php +++ b/styleguide/Http/Controllers/HeroController.php @@ -23,7 +23,7 @@ public function __construct(Factory $faker) public function index(Request $request): View { - $component_config = ' + $component_configuration = ' @@ -42,8 +42,6 @@ public function index(Request $request): View "config":"randomize|page_id|limit:1" } -

The last array item cannot have a comma.

-

View the promo config documentation on Github.

@@ -75,7 +73,7 @@ public function index(Request $request): View Options - None, Text ovrrlay, Logo overlay, SVG overlay + None, Skinny, Text overlay, Logo overlay, SVG overlay '; @@ -86,7 +84,7 @@ public function index(Request $request): View 0 => [ 'title' => 'Component configuration', 'promo_item_id' => 'componentConfiguration', - 'description' => $component_config, + 'description' => $component_configuration, ], 1 => [ 'title' => 'Promotion group details', diff --git a/styleguide/Http/Controllers/HeroFullController.php b/styleguide/Http/Controllers/HeroFullController.php deleted file mode 100644 index a25e1589..00000000 --- a/styleguide/Http/Controllers/HeroFullController.php +++ /dev/null @@ -1,71 +0,0 @@ -faker['faker'] = $faker->create(); - } - - /** - * Article Listing Controller - */ - public function index(Request $request): View - { - config([ - 'base.hero_contained' => false, - 'base.hero_full_controllers' => ['HeroFullController'], - ]); - - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'title' => 'Configuration', - 'description' => ' -

Visit the modular documentation for more information

-
-
Page field
-
Data
-
-
modular-hero-1
-
-
-
-{
-"id":0000
-}
-
-
-
-', - 'promo_item_id' => 0, - ], - ], - 'component' => [ - 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, - ], - ], - 'hero-1' => [ - 'data' => app(HeroImage::class)->create(1, true), - ], - ]; - - $request->data['base']['hero'] = $components['components']['hero-1']; - - return view('childpage', merge($request->data, $components)); - } -} diff --git a/styleguide/Http/Controllers/HeroLogoController.php b/styleguide/Http/Controllers/HeroLogoController.php deleted file mode 100644 index bd5e2a35..00000000 --- a/styleguide/Http/Controllers/HeroLogoController.php +++ /dev/null @@ -1,74 +0,0 @@ -faker['faker'] = $faker->create(); - } - - /** - * Article Listing Controller - */ - public function index(Request $request): View - { - config([ - 'base.hero_contained' => false, - 'base.hero_full_controllers' => ['HeroLogoController'], - ]); - - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'title' => 'Configuration', - 'description' => ' -

Visit the modular documentation for more information

-
-
Page field
-
Data
-
-
modular-hero-1
-
-
-
-{
-"id":0000
-}
-
-
-
-', - 'promo_item_id' => 0, - ], - ], - 'component' => [ - 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, - ], - ], - 'hero-1' => [ - 'data' => app(HeroImage::class)->create(1, true, [ - 'option' => 'Logo Overlay', - 'secondary_relative_url' => '/styleguide/image/600x250?text=600x250', - ]), - ], - ]; - - $request->data['base']['hero'] = $components['components']['hero-1']; - - return view('childpage', merge($request->data, $components)); - } -} diff --git a/styleguide/Http/Controllers/HeroRotateController.php b/styleguide/Http/Controllers/HeroRotateController.php deleted file mode 100644 index 60bb8f45..00000000 --- a/styleguide/Http/Controllers/HeroRotateController.php +++ /dev/null @@ -1,72 +0,0 @@ -faker['faker'] = $faker->create(); - } - - /** - * Article Listing Controller - */ - public function index(Request $request): View - { - config([ - 'base.hero_contained' => false, - 'base.hero_full_controllers' => ['HeroRotateController'], - ]); - - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'title' => 'Configuration', - 'description' => ' -

Visit the modular documentation for more information

-
-
Page field
-
Data
-
-
modular-hero-1
-
-
-
-{
-"id":0000
-}
-
-
-
-', - 'promo_item_id' => 0, - ], - ], - 'component' => [ - 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, - ], - ], - 'hero-1' => [ - 'data' => app(HeroImage::class)->create(4, false), - ], - ]; - - $request->data['base']['hero'] = $components['components']['hero-1']['data']; - - - return view('childpage', merge($request->data, $components)); - } -} diff --git a/styleguide/Http/Controllers/HeroSVGController.php b/styleguide/Http/Controllers/HeroSVGController.php deleted file mode 100644 index 35f2f9c0..00000000 --- a/styleguide/Http/Controllers/HeroSVGController.php +++ /dev/null @@ -1,74 +0,0 @@ -faker['faker'] = $faker->create(); - } - - /** - * Article Listing Controller - */ - public function index(Request $request): View - { - config([ - 'base.hero_contained' => false, - 'base.hero_full_controllers' => ['HeroSVGController'], - ]); - - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'title' => 'Configuration', - 'description' => ' -

Visit the modular documentation for more information

-
-
Page field
-
Data
-
-
modular-hero-1
-
-
-
-{
-"id":0000
-}
-
-
-
-', - 'promo_item_id' => 0, - ], - ], - 'component' => [ - 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, - ], - ], - 'hero-1' => [ - 'data' => app(HeroImage::class)->create(1, true, [ - 'option' => 'SVG Overlay', - 'secondary_relative_url' => "data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTYwMCA1ODAiPjxzdHlsZT4uc3Qwe2ZpbGw6I2ZmZn08L3N0eWxlPjxwYXRoIGQ9Ik0wIDBoMTAwdjEwMEgwek0xNTAwIDQ4MGgxMDB2MTAwaC0xMDB6TTAgNDgwaDEwMHYxMDBIMHpNMTUwMCAwaDEwMHYxMDBoLTEwMHoiLz48cGF0aCBjbGFzcz0ic3QwIiBkPSJNMzc0LjkgNDk0LjVoLS4yTDM3MCA1MzloLTE4bC05LjMtODMuNGgxMi43bDYuOSA2NS44aC4ybDYuMi02NS44aDEyLjZsNi40IDY2LjJoLjJsNi43LTY2LjJINDA2bC05IDgzLjRoLTE3LjRsLTQuNy00NC41ek00NTMuNCA1MzloLTEzLjJsLTIuMy0xNS4xaC0xNi4xbC0yLjMgMTUuMWgtMTJsMTMuMy04My40SDQ0MGwxMy40IDgzLjR6bS0yOS45LTI2LjVoMTIuNmwtNi4yLTQyLjJoLS4ybC02LjIgNDIuMnpNNDY1LjkgNTExLjNsLTE2LjYtNTUuOEg0NjNsOS45IDM4aC4ybDkuOS0zOGgxMi41bC0xNi42IDU1LjhWNTM5aC0xMy4xdi0yNy43ek01MTIuOCA0NzguNmgtLjJWNTM5aC0xMS44di04My40aDE2LjRsMTMuMiA0OS45aC4ydi00OS45aDExLjdWNTM5aC0xMy41bC0xNi02MC40ek01NjQuOCA0OTAuN2gxOHYxMS45aC0xOFY1MjdoMjIuNnYxMmgtMzUuN3YtODMuNGgzNS43djExLjloLTIyLjZ2MjMuMnpNNjMxLjcgNDU0LjZjMTIuNyAwIDE5LjMgNy42IDE5LjMgMjF2Mi42aC0xMi40di0zLjVjMC02LTIuNC04LjItNi42LTguMnMtNi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N2w5LjkgMzhoLjJsOS45LTM4aDEyLjVsLTE2LjYgNTUuOFY1MzloLTEzLjF2LTI3Ljd6Ii8+PC9zdmc+", - ]), - ], - ]; - - $request->data['base']['hero'] = $components['components']['hero-1']; - - return view('childpage', merge($request->data, $components)); - } -} diff --git a/styleguide/Http/Controllers/HeroTextController.php b/styleguide/Http/Controllers/HeroTextController.php deleted file mode 100644 index 5dd46613..00000000 --- a/styleguide/Http/Controllers/HeroTextController.php +++ /dev/null @@ -1,73 +0,0 @@ -faker['faker'] = $faker->create(); - } - - /** - * Article Listing Controller - */ - public function index(Request $request): View - { - config([ - 'base.hero_contained' => false, - 'base.hero_full_controllers' => ['HeroTextController'], - ]); - - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'title' => 'Configuration', - 'description' => ' -

Visit the modular documentation for more information

-
-
Page field
-
Data
-
-
modular-hero-1
-
-
-
-{
-"id":0000
-}
-
-
-
-', - 'promo_item_id' => 0, - ], - ], - 'component' => [ - 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, - ], - ], - 'hero-1' => [ - 'data' => app(HeroImage::class)->create(1, true, [ - 'option' => 'Text Overlay', - ]), - ], - ]; - - $request->data['base']['hero'] = $components['components']['hero-1']; - - return view('childpage', merge($request->data, $components)); - } -} diff --git a/styleguide/Http/Controllers/IconsController.php b/styleguide/Http/Controllers/IconsController.php index 3a55ae3a..7f95304c 100644 --- a/styleguide/Http/Controllers/IconsController.php +++ b/styleguide/Http/Controllers/IconsController.php @@ -23,13 +23,43 @@ public function __construct(Factory $faker) */ public function index(Request $request): View { - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'promo_item_id' => 0, - 'title' => 'Configuration', - 'description' => ' + $request->data['base']['page']['content']['main'] = ' +

List of promo items with small icons.

+'; + + $promotion_group_details = ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Available fields
TitleBold text.
LinkOptional external link. Component flag "singlePromoView" sets the link to the individual promo item view.
ExcerptOptional smaller text under the title.
DescriptionOptional smaller text under the title and/or excerpt. You might use this area on a singe promo view page and hide it from the component.
Primary imageMinimum width of 160px svg, png, jpg.
+'; + + $component_configuration = ' @@ -81,12 +111,25 @@ public function index(Request $request): View -
', + +'; + + $components['components'] = [ + 'accordion-1' => [ + 'data' => [ + 0 => [ + 'title' => 'Component configuration', + 'promo_item_id' => 'componentConfiguration', + 'description' => $component_configuration, + ], + 1 => [ + 'title' => 'Promotion group details', + 'promo_item_id' => 'promotionGroupDetails', + 'description' => $promotion_group_details, ], ], 'component' => [ 'filename' => 'accordion', - 'columns' => '4', 'showDescription' => false, ], ], diff --git a/styleguide/Http/Controllers/ImageController.php b/styleguide/Http/Controllers/ImageController.php deleted file mode 100644 index 39fbead6..00000000 --- a/styleguide/Http/Controllers/ImageController.php +++ /dev/null @@ -1,77 +0,0 @@ -faker['faker'] = $faker->create(); - } - - /** - * Article Listing Controller - */ - public function index(Request $request): View - { - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'promo_item_id' => 0, - 'title' => 'Configuration', - 'description' => ' - - - - - - - - - - - - - -
Page fieldData
-
modular-image-column-1
-
-
-{
-"id":000000,
-"heading":"Image column",
-"config":"randomize|limit:1|page_id",
-"singlePromoView":true
-}
-
-
', - ], - ], - 'component' => [ - 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, - ], - ], - 'image-1' => [ - 'data' => app(GenericPromo::class)->create(1, false), - 'component' => [ - 'heading' => 'Image column', - 'filename' => 'image-column', - ], - ], - ]; - - return view('childpage', merge($request->data, $components)); - } -} diff --git a/styleguide/Http/Controllers/SinglePromoController.php b/styleguide/Http/Controllers/SinglePromoController.php index e985ef2d..ffb59ec8 100644 --- a/styleguide/Http/Controllers/SinglePromoController.php +++ b/styleguide/Http/Controllers/SinglePromoController.php @@ -23,12 +23,47 @@ public function __construct(Factory $faker) */ public function index(Request $request): View { - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'title' => 'Configuration', - 'description' => ' + $request->data['base']['page']['content']['main'] = ''; + + $promotion_group_details = ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Available fields
TitleBold text.
Link +Optional external link.
+Component flag "singlePromoView" sets the link to the individual promo item view. +
ExcerptOptional smaller text under the title.
Description +Optional smaller text under the title and/or excerpt.
+You might use this area on a singe promo view page and hide it from the catalog component. +
Primary imageMinimum width of 600px jpg, png.
+'; + + $component_configuration = ' @@ -50,20 +85,32 @@ public function index(Request $request): View "config":"randomize|limit:1|page_id", "singlePromoView":true, "showExcerpt":true, -"showDescription":false +"showDescription":false, +"gradientOverlay":false } -
', - 'promo_item_id' => 0, + +'; + + $components['components'] = [ + 'accordion' => [ + 'data' => [ + 0 => [ + 'title' => 'Component configuration', + 'promo_item_id' => 'componentConfiguration', + 'description' => $component_configuration, + ], + 1 => [ + 'title' => 'Promotion group details', + 'promo_item_id' => 'promotionGroupDetails', + 'description' => $promotion_group_details, ], ], 'component' => [ 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, ], ], 'promo-column-1' => [ @@ -75,6 +122,16 @@ public function index(Request $request): View 'filename' => 'promo-column', ], ], + 'promo-column-2' => [ + 'data' => app(GenericPromo::class)->create(1, false, [ + 'description' => '', + ]), + 'component' => [ + 'heading' => 'Gradient overlay', + 'filename' => 'promo-column', + 'gradientOverlay' => true, + ], + ], 'promo-row-1' => [ 'data' => app(GenericPromo::class)->create(1, false, [ 'excerpt' => '', diff --git a/styleguide/Http/Controllers/SpotlightController.php b/styleguide/Http/Controllers/SpotlightController.php index 7eb315ef..bb41183d 100644 --- a/styleguide/Http/Controllers/SpotlightController.php +++ b/styleguide/Http/Controllers/SpotlightController.php @@ -24,45 +24,11 @@ public function __construct(Factory $faker) */ public function index(Request $request): View { - $components['components'] = [ - 'accordion-1' => [ - 'data' => [ - 0 => [ - 'promo_item_id' => 0, - 'title' => 'Configuration', - 'description' => ' - - - - - - - - - - - - - -
Page fieldData
-
modular-spotlight-column-1
-
modular-spotlight-row-1
-
-
-{
-"id":000000,
-"heading":"Spotlight",
-"config":"randomize|page_id|limit:1",
-"singlePromoView":false,
-"showDescription":false
-}
-
-
', - ], - 1 => [ - 'promo_item_id' => 0, - 'title' => 'Promo group setup', - 'description' => ' + $request->data['base']['page']['content']['main'] = ' +

Single promo item for a quote with a citation and image.

+'; + + $promotion_group_details = ' @@ -91,7 +57,51 @@ public function index(Request $request): View -
Primary promo image, 600x600px or any square size. Other sizes will be centered to fit in the circle.
', + +'; + + $component_configuration = ' + + + + + + + + + + + + + +
Page fieldData
+
modular-spotlight-column-1
+
modular-spotlight-row-1
+
+
+{
+"id":000000,
+"heading":"Spotlight",
+"config":"randomize|page_id|limit:1",
+"singlePromoView":false,
+"showDescription":false
+}
+
+
+'; + + $components['components'] = [ + 'accordion' => [ + 'data' => [ + 0 => [ + 'title' => 'Component configuration', + 'promo_item_id' => 'componentConfiguration', + 'description' => $component_configuration, + ], + 1 => [ + 'title' => 'Promotion group details', + 'promo_item_id' => 'promotionGroupDetails', + 'description' => $promotion_group_details, ], ], 'component' => [ diff --git a/styleguide/Pages/Accordion.php b/styleguide/Pages/Accordion.php index abea387d..f3b8f87c 100644 --- a/styleguide/Pages/Accordion.php +++ b/styleguide/Pages/Accordion.php @@ -16,7 +16,9 @@ public function getPageData() 'controller' => 'AccordionController', 'title' => 'Accordion', 'id' => 107100, - 'content' => [], // On controller + 'content' => [ + 'main' => '', + ], ], ]); } diff --git a/styleguide/Pages/ButtonSet.php b/styleguide/Pages/ButtonSet.php index ece4036b..08e10b8d 100644 --- a/styleguide/Pages/ButtonSet.php +++ b/styleguide/Pages/ButtonSet.php @@ -16,7 +16,9 @@ public function getPageData() 'controller' => 'ButtonSetController', 'title' => 'Button set', 'id' => 114100, - 'content' => [], // On controller + 'content' => [ + 'main' => '', + ], ], ]); } diff --git a/styleguide/Pages/Catalog.php b/styleguide/Pages/Catalog.php index fc0374c7..53cfa5ec 100644 --- a/styleguide/Pages/Catalog.php +++ b/styleguide/Pages/Catalog.php @@ -16,7 +16,9 @@ public function getPageData() 'controller' => 'CatalogController', 'title' => 'Catalog', 'id' => 118100, - 'content' => [], // On controller + 'content' => [ + 'main' => '', + ], ], ]); } diff --git a/styleguide/Pages/IconsComponent.php b/styleguide/Pages/IconsComponent.php index da793a36..010e36d0 100644 --- a/styleguide/Pages/IconsComponent.php +++ b/styleguide/Pages/IconsComponent.php @@ -17,7 +17,7 @@ public function getPageData() 'title' => 'Icons', 'id' => 121100, 'content' => [ - 'main' => '

List of promo items with small icons.

', + 'main' => '', ], ], ]); diff --git a/styleguide/Pages/ImageComponent.php b/styleguide/Pages/ImageComponent.php deleted file mode 100644 index bc43117e..00000000 --- a/styleguide/Pages/ImageComponent.php +++ /dev/null @@ -1,25 +0,0 @@ -create(1, true, [ - 'page' => [ - 'controller' => 'ImageController', - 'title' => 'Image', - 'id' => 120100, - 'content' => [ - 'main' => '

Single image with a title and gradient overlay.

', - ], - ], - ]); - } -} diff --git a/styleguide/Pages/SpotlightComponent.php b/styleguide/Pages/SpotlightComponent.php index cd716f56..1f63c5e4 100644 --- a/styleguide/Pages/SpotlightComponent.php +++ b/styleguide/Pages/SpotlightComponent.php @@ -17,7 +17,7 @@ public function getPageData() 'title' => 'Spotlight', 'id' => 119100, 'content' => [ - 'main' => '

Single promo item for a quote with a citation and image.

', + 'main' => '', ], ], ]); diff --git a/styleguide/Views/styleguide-using-components.blade.php b/styleguide/Views/styleguide-using-components.blade.php index 711c1947..87e5fc72 100644 --- a/styleguide/Views/styleguide-using-components.blade.php +++ b/styleguide/Views/styleguide-using-components.blade.php @@ -33,7 +33,7 @@ "showExcerpt":true, "showDescription":false, "singlePromoView":true, -"config":"randomize|limit:5|page_id" +"config":"randomize|page_id|limit:5" }') !!} @@ -65,39 +65,88 @@ columns - 1 to 4 columns is recommended. Use with the catalog, button row, and news components. + +Define how many columns the component will display.
+1 to 4 columns is recommended.
+Use with the catalog, button row, and news components. + singlePromoView - True or false; false is default and will use the promotion's link field if it is set.
Creates a link to a detailed page of a single promo item, like a Spotlight. + +Creates a link to a detailed page of a single promo item, like a Spotlight.
+True or false; false is default and will use the promotion's link field if it is set. + showExcerpt - True or false; true is default.
Show or hide the promo's excerpt. + +Show or hide the promo's excerpt.
+True or false; true is default. + showDescription - True or false; true is default.
Show or hide the promo's description. Commonly used in conjunction with "singlePromoView" where the description is hidden from the catalog but displayed on the detailed promo page. + +Show or hide the promo's description.
+True or false; true is default.
+Commonly used in conjunction with "singlePromoView" where the description is hidden from the catalog but displayed on the detailed promo page. + + + + gradientOverlay + +Moves the title, excerpt and/description on top of the image with a gradient for contrast.
+True or false; false is default.
+Single promo and catalog components only. + + + + groupByOptions + +Group promotion items by the options in the options dropdown.
+True or false; false is default.
+Catalog component only. + limit - Integer; default is 4.
News and events only; Limit the number of items displayed. + +Limit the number of items displayed.
+Integer; default is 4.
+News and events only. For promotion based components, see "config." + link_text - News and Events only.
To change "More news" or "More events" to your specific text, i.e. "Student news", "Career events". + +To change "More news" or "More events" to your specific text, i.e. "Student news", "Career events".
+News and Events only. + featured - True or false; all articles shown by default.
News row only; Display only the articles that have a specific featured image uploaded in the news manager. + +Display only the articles that have a specific featured image uploaded in the news manager.
+True or false; all articles shown by default.
+News row only. + topics - All topics shown by default.
News only; Pass in an array of topics to display i.e. [76, 4] + +Pass in an array of topics to display i.e. [76, 4]
+All topics shown by default.
+News components only. + cal_name - Defaults to the site's selected calendar.
Events only; the relative url to your calendar that the "more events" link goes to, i.e. "main/". + +The relative url to your calendar that the "more events" link goes to, i.e. "main/".
+Defaults to the site's selected calendar.
+Events components only. + diff --git a/styleguide/menu.json b/styleguide/menu.json index 7b61e43d..a5fabe8c 100644 --- a/styleguide/menu.json +++ b/styleguide/menu.json @@ -281,16 +281,6 @@ "relative_url": "/styleguide/iconscomponent", "submenu": [] }, - "120100": { - "menu_item_id": 120100, - "is_active": 1, - "page_id": 120100, - "target": "", - "display_name": "Image", - "class_name": "", - "relative_url": "/styleguide/imagecomponent", - "submenu": [] - }, "108100": { "menu_item_id": 108100, "is_active": 1, diff --git a/tailwind.config.js b/tailwind.config.js index 3944a11d..8e3ebab1 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -136,6 +136,9 @@ module.exports = { minHeight: { 'hero': '36.3vw', }, + dropShadow: { + 'px': '0 1px 1px rgba(12, 84, 73, 0.5)', + }, boxShadow: { 'white': '0 7px 0 '+ twColors.white +', 0 14px 0 '+ twColors.white, 'grey': '0 7px 0 '+ twColors.gray +', 0 14px 0 '+ twColors.gray, diff --git a/tests/Unit/Repositories/ModularPageRepositoryTest.php b/tests/Unit/Repositories/ModularPageRepositoryTest.php index df9e1bde..2d2f1747 100644 --- a/tests/Unit/Repositories/ModularPageRepositoryTest.php +++ b/tests/Unit/Repositories/ModularPageRepositoryTest.php @@ -8,7 +8,7 @@ use App\Repositories\ModularPageRepository; use Factories\Page; use Factories\GenericPromo; -use Factories\PromoPageWithOptions; +use Factories\PromoWithOptions; use Tests\TestCase; use Mockery as Mockery; use Waynestate\Api\Connector; @@ -496,7 +496,7 @@ public function promo_page_returns_legacy_listing_array_with_individual_view(): // Create a fake data request $data = app(Page::class)->create(1, true, [ 'page' => [ - 'controller' => 'PromoPagePromos', + 'controller' => 'Childpage', ], 'data' => [ 'listing_promo_group_id' => $promo_group_id, @@ -529,7 +529,7 @@ public function promo_page_returns_legacy_grid_array_with_individual_view(): voi // Create a fake data request $data = app(Page::class)->create(1, true, [ 'page' => [ - 'controller' => 'PromoPagePromos', + 'controller' => 'Childpage', ], 'data' => [ 'grid_promo_group_id' => $promo_group_id, @@ -555,7 +555,7 @@ public function return_modular_promos_by_option(): void $promo_group_id = $this->faker->numberbetween(1, 3); // Fake return - $return['promotions'] = app(PromoPageWithOptions::class)->create(15, false, [ + $return['promotions'] = app(PromoWithOptions::class)->create(15, false, [ 'promo_group_id' => $promo_group_id, ]); From 7bcd5476673a640447ae701a8436aff1f8538ec7 Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Wed, 13 Dec 2023 16:32:43 -0500 Subject: [PATCH 6/7] Streamlining components --- factories/FeaturedPromo.php | 41 --- factories/GenericPromo.php | 48 ++-- factories/Grid.php | 46 ---- factories/PromoPage.php | 70 ------ factories/PromoWithOptions.php | 3 +- factories/Video.php | 2 +- resources/scss/components/_text-shadow.scss | 5 - resources/scss/main.scss | 1 - .../components/hero/logo-overlay.blade.php | 2 +- .../components/hero/text-overlay.blade.php | 2 +- ...promo-grid-item-gradient-overlay.blade.php | 6 +- .../components/promo-grid-item.blade.php | 6 +- .../views/components/promo-row.blade.php | 32 +-- .../views/components/video-column.blade.php | 18 -- .../views/components/video-row.blade.php | 25 -- .../Http/Controllers/CatalogController.php | 30 +-- .../ChildpageWithComponentsController.php | 237 ++++++++++++------ .../Controllers/SinglePromoController.php | 24 +- .../Http/Controllers/SpotlightController.php | 4 + styleguide/Pages/ChildpageWithComponents.php | 7 +- styleguide/Pages/HeroHalf.php | 28 +++ .../Repositories/ModularPageRepository.php | 122 +-------- styleguide/Repositories/PromoRepository.php | 33 +-- .../styleguide-using-components.blade.php | 9 +- styleguide/menu.json | 10 + 25 files changed, 318 insertions(+), 493 deletions(-) delete mode 100644 factories/FeaturedPromo.php delete mode 100644 factories/Grid.php delete mode 100644 factories/PromoPage.php delete mode 100644 resources/scss/components/_text-shadow.scss delete mode 100644 resources/views/components/video-column.blade.php delete mode 100644 resources/views/components/video-row.blade.php create mode 100644 styleguide/Pages/HeroHalf.php diff --git a/factories/FeaturedPromo.php b/factories/FeaturedPromo.php deleted file mode 100644 index fc4bbfc8..00000000 --- a/factories/FeaturedPromo.php +++ /dev/null @@ -1,41 +0,0 @@ -faker = $faker->create(); - } - - /** - * {@inheritdoc} - */ - public function create($limit = 1, $flatten = false, $options = []) - { - for ($i = 1; $i <= $limit; $i++) { - $data[$i] = [ - 'link' => 'https://wayne.edu', - 'relative_url' => '/styleguide/image/600x450?text=Featured', - 'title' => $this->faker->sentence(), - 'excerpt' => $this->faker->sentence(), - 'filename_alt_text' => 'Example featured image', - ]; - - $data[$i] = array_replace_recursive($data[$i], $options); - } - - if ($limit === 1 && $flatten === true) { - return current($data); - } - - return $data; - } -} diff --git a/factories/GenericPromo.php b/factories/GenericPromo.php index 5bbf7e89..398d493e 100644 --- a/factories/GenericPromo.php +++ b/factories/GenericPromo.php @@ -24,28 +24,46 @@ public function create($limit = 1, $flatten = false, $options = []) $promo_group_id = $this->faker->randomNumber(5); + $relative_url = '/styleguide/image/' . $this->faker->randomElement([ + '600x450?text=600x450', // 4:3 + '450x600?text=450x600', // 3:4 + '600x338?text=600x338', // 16:9 + '600x600?text=600x600', // 1:1 + //'600x217', // 2.76:1 + //'600x200', // 3:1 + ]); + + for ($i = 0; $i <= $limit - 1; $i++) { + $video = $this->faker->boolean(33); + + $title = $this->faker->randomElement([ + ucfirst(implode(' ', $this->faker->words(6))), + $this->faker->name(), + ]); + + $excerpt = $this->faker->randomElement([ + $this->faker->catchPhrase, + $this->faker->jobTitle(), + ]); + + $option = $this->faker->randomElement(['Green', 'Gold', '']); + $data[$i] = [ - 'title' => ucfirst(implode(' ', $this->faker->words(6))), - 'excerpt' => $this->faker->catchPhrase, + 'title' => $title, + 'excerpt' => $excerpt, 'description' => '

' . $this->faker->text(100) . ' '. $this->faker->sentence(3) .'

', - 'link' => 'https://wayne.edu', + 'link' => (!empty($video) && $video === true) ? 'https://www.youtube.com/watch?v=PHqfwq033yQ' : '#', + 'youtube_id' => (!empty($video) && $video === true) ? 'PHqfwq033yQ' : null, 'promo_item_id' => $i, 'promo_group_id' => strval($promo_group_id), - 'relative_url' => '/styleguide/image/600x450?text=600x450:'.$i, // 4:3 - //'relative_url' => '/styleguide/image/450x600', // 3:4 - //'relative_url' => '/styleguide/image/600x338', // 16:9 - //'relative_url' => '/styleguide/image/600x600', // 1:1 - //'relative_url' => '/styleguide/image/600x217', // 2.76:1 - //'relative_url' => '/styleguide/image/600x200', // 3:1 - 'filename_url' => '/styleguide/image/600x450?text=600x450:'.$i, // 4:3 + 'relative_url' => $relative_url.':'.$i, + 'filename_url' => $relative_url.':'.$i, 'filename_alt_text' => 'Placeholder image '.$i, - 'secondary_image' => '', - 'secondary_relative_url' => '/styleguide/image/150x150?text=150x150:'.$i, // 4:3 + 'secondary_relative_url' => '', 'secondary_filename_url' => '', 'secondary_alt_text' => 'Secondary placeholder image '.$i, - 'option' => '', - //'option' => $this->faker->randomElement(['Gold', 'Green', '']), + 'option' => '', // $option 'start_date' => $this->faker->dateTimeThisMonth('now')->format('Y-m-d H:i:s'), 'end_date' => '', 'display_start_date' => '0000-00-00 00:00:00', @@ -53,7 +71,7 @@ public function create($limit = 1, $flatten = false, $options = []) 'start_time_hide' => '0', 'end_time_hide' => '0', 'group' => [ - 'title' => 'Promo group title', + 'title' => 'Generic Promo Group', ], ]; diff --git a/factories/Grid.php b/factories/Grid.php deleted file mode 100644 index a82adb43..00000000 --- a/factories/Grid.php +++ /dev/null @@ -1,46 +0,0 @@ -faker = $faker->create(); - } - - /** - * {@inheritdoc} - */ - public function create($limit = 1, $flatten = false, $options = []) - { - $promo_group_id = $this->faker->randomDigitNotNull(); - - for ($i = 1; $i <= $limit; $i++) { - $data[$i] = [ - 'relative_url' => '/styleguide/image/550x400?text=550x400', - 'title' => $this->faker->text(20), - 'link' => 'https://wayne.edu', - 'excerpt' => $this->faker->text(20), - 'promo_group_id' => $promo_group_id, - 'promo_item_id' => $i, - 'filename_alt_text' => 'Example grid image', - 'start_date' => $this->faker->dateTimeThisMonth()->format('Y-m-d H:i:s'), - ]; - - $data[$i] = array_replace_recursive($data[$i], $options); - } - - if ($limit === 1 && $flatten === true) { - return current($data); - } - - return $data; - } -} diff --git a/factories/PromoPage.php b/factories/PromoPage.php deleted file mode 100644 index d10a3085..00000000 --- a/factories/PromoPage.php +++ /dev/null @@ -1,70 +0,0 @@ -faker = $faker->create(); - } - - /** - * {@inheritdoc} - */ - public function create($limit = 1, $flatten = false, $options = []) - { - $promo_group_id = $this->faker->randomNumber(5); - $image = '/styleguide/image/' . $this->faker->randomElement([ - '600x450?text=600x450', // 4:3 - '450x600?text=450x600', // 3:4 - '600x338?text=600x338', // 16:9 - '600x600?text=600x600', // 1:1 - //'600x217', // 2.76:1 - //'600x200', // 3:1 - ]); - - for ($i = 1; $i <= $limit; $i++) { - $data[$i] = [ - 'title' => $this->faker->name(), - 'excerpt' => $this->faker->jobTitle(), - 'description' => '

' . $this->faker->text(70) . ' '. $this->faker->sentence(3) .'

', - 'link' => 'https://wayne.edu', - 'promo_item_id' => strval($this->faker->randomNumber(5)), - 'promo_group_id' => strval($promo_group_id), - 'option' => $this->faker->randomElement(['Gold', 'Green', '']), - 'relative_url' => $image.':'.$i, - 'filename_url' => $image.':'.$i, - 'filename_alt_text' => 'Placeholder image '.$i, - 'secondary_image' => '', - 'secondary_relative_url' => '/styleguide/image/150x150?text=150x150:'.$i, // 4:3 - 'secondary_filename_url' => '', - 'secondary_alt_text' => 'Secondary placeholder image '.$i, - 'option' => '', - 'start_date' => $this->faker->dateTimeThisMonth('now')->format('Y-m-d H:i:s'), - 'end_date' => '', - 'display_start_date' => '0000-00-00 00:00:00', - 'display_end_date' => '0000-00-00 00:00:00', - 'start_time_hide' => '0', - 'end_time_hide' => '0', - 'group' => [ - 'title' => 'Promo group title', - ], - ]; - - $data[$i] = array_replace_recursive($data[$i], $options); - } - - if ($limit === 1 && $flatten === true) { - return current($data); - } - - return $data; - } -} diff --git a/factories/PromoWithOptions.php b/factories/PromoWithOptions.php index 35cdbb8f..06556843 100644 --- a/factories/PromoWithOptions.php +++ b/factories/PromoWithOptions.php @@ -21,6 +21,7 @@ public function __construct(Factory $faker) public function create($limit = 1, $flatten = false, $options = []) { $promo_group_id = $this->faker->randomNumber(5); + $image = '/styleguide/image/' . $this->faker->randomElement([ '600x450?text=600x450', // 4:3 '450x600?text=450x600', // 3:4 @@ -32,7 +33,7 @@ public function create($limit = 1, $flatten = false, $options = []) 'title' => $this->faker->name(), 'excerpt' => $this->faker->jobTitle(), 'description' => '

' . $this->faker->text(70) . ' '. $this->faker->sentence(3) .'

', - 'link' => 'https://wayne.edu', + 'link' => '#', 'promo_item_id' => strval($this->faker->randomNumber(5)), 'promo_group_id' => strval($promo_group_id), 'relative_url' => $image.':'.$i, diff --git a/factories/Video.php b/factories/Video.php index 91417ef7..cd90d1c9 100644 --- a/factories/Video.php +++ b/factories/Video.php @@ -27,7 +27,7 @@ public function create($limit = 1, $flatten = false, $options = []) 'relative_url' => '', //'relative_url' => $this->faker->randomElement(['/styleguide/image/800x450?text=Video', '']), 'title' => $this->faker->sentence(), - 'excerpt' => $this->faker->sentence(), + 'excerpt' => $this->faker->sentence(20), 'filename_alt_text' => 'Example video image', ]; diff --git a/resources/scss/components/_text-shadow.scss b/resources/scss/components/_text-shadow.scss deleted file mode 100644 index 03667e10..00000000 --- a/resources/scss/components/_text-shadow.scss +++ /dev/null @@ -1,5 +0,0 @@ -@layer utilities { - .text-shadow-darkest { - text-shadow: 0 1px 1px theme('colors.green.900'); - } -} diff --git a/resources/scss/main.scss b/resources/scss/main.scss index fcdb8f9a..f5407942 100644 --- a/resources/scss/main.scss +++ b/resources/scss/main.scss @@ -26,7 +26,6 @@ @import "components/row"; @import "components/skip"; @import "components/slate"; -@import "components/text-shadow"; @import "components/visually-hidden"; @import "components/table-of-contents"; @import "components/print"; diff --git a/resources/views/components/hero/logo-overlay.blade.php b/resources/views/components/hero/logo-overlay.blade.php index f919137d..bb59b34f 100644 --- a/resources/views/components/hero/logo-overlay.blade.php +++ b/resources/views/components/hero/logo-overlay.blade.php @@ -3,7 +3,7 @@