From 8c09779d3fe15562f7873855df8d03cae7688c93 Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Mon, 29 Apr 2024 14:43:53 -0400 Subject: [PATCH 01/14] Version 8.10.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4a02e7e4..a7af6b67 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "base", "private": true, - "version": "8.10.0", + "version": "8.10.1", "description": "", "scripts": { "dev": "npm run development", From 4c85a8cd2d4723e3e17c7747f312423a3da69898 Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Tue, 30 Apr 2024 13:56:46 -0400 Subject: [PATCH 02/14] feat: specific accordion for the styleguide to easily display component and promo info without using html in the php controller file --- .../components/accordion-styleguide.blade.php | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 resources/views/components/accordion-styleguide.blade.php diff --git a/resources/views/components/accordion-styleguide.blade.php b/resources/views/components/accordion-styleguide.blade.php new file mode 100644 index 00000000..1d297ea1 --- /dev/null +++ b/resources/views/components/accordion-styleguide.blade.php @@ -0,0 +1,57 @@ +{{-- + $items => array // ['title', 'description'] +--}} + From 105834a484aeba68fccd7d449ba016e8e49908c9 Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Tue, 30 Apr 2024 13:58:09 -0400 Subject: [PATCH 03/14] feat: moving the component loop into its own partial --- resources/views/partials/component-loop.blade.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 resources/views/partials/component-loop.blade.php diff --git a/resources/views/partials/component-loop.blade.php b/resources/views/partials/component-loop.blade.php new file mode 100644 index 00000000..dc34db02 --- /dev/null +++ b/resources/views/partials/component-loop.blade.php @@ -0,0 +1,15 @@ +@if(!empty($base['components'])) +
+ @foreach($base['components'] as $componentName => $component) + @if(!empty($component['data']) && !empty($component['component']['filename'])) + @if(\View::exists('components/'.$component['component']['filename'])) +
+ @if(!empty($component['component']['heading']))

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

@endif + + @include('components/'.$component['component']['filename'], ['data' => $component['data'], 'component' => $component['component']]) +
+ @endif + @endif + @endforeach +
+@endif From 262d5163d01fa832ef88189205d4a175a6d7bbda Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Tue, 30 Apr 2024 14:01:48 -0400 Subject: [PATCH 04/14] feat: Making the components global and moving them to the promo repository and out of the childpage controller --- .../Controllers/ChildpageWithComponentsController.php | 5 ++++- styleguide/Repositories/PromoRepository.php | 10 +++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/styleguide/Http/Controllers/ChildpageWithComponentsController.php b/styleguide/Http/Controllers/ChildpageWithComponentsController.php index a4cfaeda..3a4ea1c5 100644 --- a/styleguide/Http/Controllers/ChildpageWithComponentsController.php +++ b/styleguide/Http/Controllers/ChildpageWithComponentsController.php @@ -87,7 +87,7 @@ public function index(Request $request): View '; - $request->data['base']['components'] = [ + $components = [ 'accordion' => [ 'data' => [ 0 => [ @@ -299,6 +299,9 @@ public function index(Request $request): View config(['base.hero_full_controllers' => [$request->data['base']['page']['controller']]]); } + // Assign components globally + $request->data['base']['components'] = $components; + return view('childpage', merge($request->data)); } } diff --git a/styleguide/Repositories/PromoRepository.php b/styleguide/Repositories/PromoRepository.php index 5ea55d84..f6316b6c 100644 --- a/styleguide/Repositories/PromoRepository.php +++ b/styleguide/Repositories/PromoRepository.php @@ -3,22 +3,26 @@ namespace Styleguide\Repositories; use App\Repositories\PromoRepository as Repository; +use Contracts\Repositories\ModularPageRepositoryContract; +use Faker\Factory; use Factories\FooterContact; use Factories\FooterSocial; use Factories\HeroImage; use Factories\HeroImageRotate; use Factories\GenericPromo; use Factories\Button; -use Faker\Factory; class PromoRepository extends Repository { /** * Construct the factory. */ - public function __construct(Factory $faker) - { + public function __construct( + Factory $faker, + ModularPageRepositoryContract $modular + ) { $this->faker = $faker->create(); + $this->modular = $modular; } /** From dfb14de272e8b275ebe705854a0188b27e79c23b Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Tue, 30 Apr 2024 14:55:49 -0400 Subject: [PATCH 05/14] feat: Organizing styleguide by renaming files --- ...ller.php => CMSBasicLayoutsController.php} | 4 +- ...ontroller.php => CMSButtonsController.php} | 4 +- ...Controller.php => CMSColorsController.php} | 2 +- ...Controller.php => CMSFigureController.php} | 2 +- ...sController.php => CMSFormsController.php} | 2 +- ...roller.php => CMSFormsErrorController.php} | 2 +- ...ler.php => CMSHeadingStylesController.php} | 2 +- ...Controller.php => CMSTablesController.php} | 2 +- ...oController.php => CMSVideoController.php} | 2 +- ...r.php => ComponentAccordionController.php} | 9 ++- ... => ComponentArticleListingController.php} | 9 ++- ...ler.php => ComponentButtonsController.php} | 7 ++- ...ler.php => ComponentCatalogController.php} | 39 ++---------- ...hp => ComponentEventListingController.php} | 9 ++- ...oller.php => ComponentGuideController.php} | 2 +- ...ler.php => ComponentHeadingController.php} | 7 ++- ...roller.php => ComponentHeroController.php} | 9 ++- ...oller.php => ComponentIconsController.php} | 18 +++--- ...php => ComponentPageContentController.php} | 9 ++- ...php => ComponentSinglePromoController.php} | 9 ++- ...r.php => ComponentSpotlightController.php} | 9 ++- ...oller.php => LayoutError403Controller.php} | 0 ...oller.php => LayoutError404Controller.php} | 0 ...oller.php => LayoutError500Controller.php} | 0 ...ontroller.php => LayoutFlagController.php} | 0 ... => LayoutFooterContactFourController.php} | 0 ...p => LayoutFooterContactOneController.php} | 0 ...=> LayoutFooterContactThreeController.php} | 0 ...p => LayoutFooterContactTwoController.php} | 0 ... => LayoutHeaderTitleDoubleController.php} | 0 ... => LayoutHeaderTitleSingleController.php} | 0 ...oller.php => LayoutMenuLeftController.php} | 0 ...roller.php => LayoutMenuTopController.php} | 2 +- ...lateChildpageWithComponentsController.php} | 0 ...er.php => TemplateFullWidthController.php} | 0 .../{BasicLayouts.php => CMSBasicLayouts.php} | 4 +- .../Pages/{Buttons.php => CMSButtons.php} | 4 +- .../Pages/{Colors.php => CMSColors.php} | 4 +- .../Pages/{Figure.php => CMSFigure.php} | 4 +- styleguide/Pages/{Forms.php => CMSForms.php} | 4 +- .../{FormsError.php => CMSFormsError.php} | 4 +- .../{FormsSlate.php => CMSFormsSlate.php} | 4 +- ...HeadingStyles.php => CMSHeadingStyles.php} | 4 +- .../Pages/{Tables.php => CMSTables.php} | 4 +- styleguide/Pages/{Video.php => CMSVideo.php} | 4 +- .../{Accordion.php => ComponentAccordion.php} | 4 +- ...isting.php => ComponentArticleListing.php} | 4 +- .../{ButtonSet.php => ComponentButtons.php} | 4 +- .../{Catalog.php => ComponentCatalog.php} | 4 +- ...tListing.php => ComponentEventListing.php} | 4 +- ...UsingComponents.php => ComponentGuide.php} | 4 +- ...dingComponent.php => ComponentHeading.php} | 4 +- ...Large.php => ComponentHeroBannerLarge.php} | 4 +- ...Small.php => ComponentHeroBannerSmall.php} | 4 +- ...Carousel.php => ComponentHeroCarousel.php} | 7 +-- .../{HeroHalf.php => ComponentHeroHalf.php} | 7 +-- ...erlay.php => ComponentHeroLogoOverlay.php} | 7 +-- ...verlay.php => ComponentHeroSVGOverlay.php} | 7 +-- ...erlay.php => ComponentHeroTextOverlay.php} | 7 +-- ...{IconsComponent.php => ComponentIcons.php} | 4 +- ...geContent.php => ComponentPageContent.php} | 4 +- ...nglePromo.php => ComponentSinglePromo.php} | 4 +- ...htComponent.php => ComponentSpotlight.php} | 4 +- .../Pages/{Error.php => LayoutError.php} | 0 .../{Error403.php => LayoutError403.php} | 0 .../{Error404.php => LayoutError404.php} | 0 .../{Error500.php => LayoutError500.php} | 0 styleguide/Pages/{Flag.php => LayoutFlag.php} | 0 ...ctFour.php => LayoutFooterContactFour.php} | 0 ...tactOne.php => LayoutFooterContactOne.php} | 0 ...Three.php => LayoutFooterContactThree.php} | 0 ...tactTwo.php => LayoutFooterContactTwo.php} | 0 ...Double.php => LayoutHeaderTitleDouble.php} | 0 ...Single.php => LayoutHeaderTitleSingle.php} | 0 ...enuExternal.php => LayoutMenuExternal.php} | 0 .../{MenuLeft.php => LayoutMenuLeft.php} | 0 .../Pages/{MenuTop.php => LayoutMenuTop.php} | 4 +- .../Pages/{NoMenu.php => LayoutNoMenu.php} | 0 ...hp => TemplateChildpageWithComponents.php} | 0 ...ctTables.php => TemplateContactTables.php} | 0 ...TOC.php => TemplateContactTablesNoTOC.php} | 0 .../{Directory.php => TemplateDirectory.php} | 0 ...dered.php => TemplateDirectoryOrdered.php} | 0 .../{Fullwidth.php => TemplateFullwidth.php} | 0 .../{Homepage.php => TemplateHomepage.php} | 0 ...=> styleguide-cms-basic-layouts.blade.php} | 0 ...e.php => styleguide-cms-buttons.blade.php} | 0 ...de.php => styleguide-cms-colors.blade.php} | 0 ...de.php => styleguide-cms-figure.blade.php} | 0 ...p => styleguide-cms-forms-error.blade.php} | 0 ...ade.php => styleguide-cms-forms.blade.php} | 0 ...> styleguide-cms-heading-styles.blade.php} | 0 ...de.php => styleguide-cms-tables.blade.php} | 0 ...ade.php => styleguide-cms-video.blade.php} | 0 ...=> styleguide-component-buttons.blade.php} | 21 ------- ...p => styleguide-component-guide.blade.php} | 0 ...yleguide-component-promo-column.blade.php} | 0 styleguide/menu.json | 62 +++++++++---------- 98 files changed, 167 insertions(+), 207 deletions(-) rename styleguide/Http/Controllers/{BasicLayoutsController.php => CMSBasicLayoutsController.php} (75%) rename styleguide/Http/Controllers/{ButtonsController.php => CMSButtonsController.php} (77%) rename styleguide/Http/Controllers/{ColorsController.php => CMSColorsController.php} (87%) rename styleguide/Http/Controllers/{FigureController.php => CMSFigureController.php} (92%) rename styleguide/Http/Controllers/{FormsController.php => CMSFormsController.php} (87%) rename styleguide/Http/Controllers/{FormsErrorController.php => CMSFormsErrorController.php} (86%) rename styleguide/Http/Controllers/{HeadingStylesController.php => CMSHeadingStylesController.php} (90%) rename styleguide/Http/Controllers/{TablesController.php => CMSTablesController.php} (92%) rename styleguide/Http/Controllers/{VideoController.php => CMSVideoController.php} (90%) rename styleguide/Http/Controllers/{AccordionController.php => ComponentAccordionController.php} (94%) rename styleguide/Http/Controllers/{ArticleListingController.php => ComponentArticleListingController.php} (91%) rename styleguide/Http/Controllers/{ButtonSetController.php => ComponentButtonsController.php} (96%) rename styleguide/Http/Controllers/{CatalogController.php => ComponentCatalogController.php} (72%) rename styleguide/Http/Controllers/{EventListingController.php => ComponentEventListingController.php} (93%) rename styleguide/Http/Controllers/{UsingComponentsController.php => ComponentGuideController.php} (96%) rename styleguide/Http/Controllers/{HeadingComponentController.php => ComponentHeadingController.php} (93%) rename styleguide/Http/Controllers/{HeroController.php => ComponentHeroController.php} (91%) rename styleguide/Http/Controllers/{IconsController.php => ComponentIconsController.php} (76%) rename styleguide/Http/Controllers/{ComponentsPageContentController.php => ComponentPageContentController.php} (87%) rename styleguide/Http/Controllers/{SinglePromoController.php => ComponentSinglePromoController.php} (97%) rename styleguide/Http/Controllers/{SpotlightController.php => ComponentSpotlightController.php} (95%) rename styleguide/Http/Controllers/{Error403Controller.php => LayoutError403Controller.php} (100%) rename styleguide/Http/Controllers/{Error404Controller.php => LayoutError404Controller.php} (100%) rename styleguide/Http/Controllers/{Error500Controller.php => LayoutError500Controller.php} (100%) rename styleguide/Http/Controllers/{FlagController.php => LayoutFlagController.php} (100%) rename styleguide/Http/Controllers/{FooterContactFourController.php => LayoutFooterContactFourController.php} (100%) rename styleguide/Http/Controllers/{FooterContactOneController.php => LayoutFooterContactOneController.php} (100%) rename styleguide/Http/Controllers/{FooterContactThreeController.php => LayoutFooterContactThreeController.php} (100%) rename styleguide/Http/Controllers/{FooterContactTwoController.php => LayoutFooterContactTwoController.php} (100%) rename styleguide/Http/Controllers/{HeaderTitleDoubleController.php => LayoutHeaderTitleDoubleController.php} (100%) rename styleguide/Http/Controllers/{HeaderTitleSingleController.php => LayoutHeaderTitleSingleController.php} (100%) rename styleguide/Http/Controllers/{MenuLeftController.php => LayoutMenuLeftController.php} (100%) rename styleguide/Http/Controllers/{MenuTopController.php => LayoutMenuTopController.php} (95%) rename styleguide/Http/Controllers/{ChildpageWithComponentsController.php => TemplateChildpageWithComponentsController.php} (100%) rename styleguide/Http/Controllers/{FullWidthController.php => TemplateFullWidthController.php} (100%) rename styleguide/Pages/{BasicLayouts.php => CMSBasicLayouts.php} (78%) rename styleguide/Pages/{Buttons.php => CMSButtons.php} (86%) rename styleguide/Pages/{Colors.php => CMSColors.php} (80%) rename styleguide/Pages/{Figure.php => CMSFigure.php} (80%) rename styleguide/Pages/{Forms.php => CMSForms.php} (80%) rename styleguide/Pages/{FormsError.php => CMSFormsError.php} (78%) rename styleguide/Pages/{FormsSlate.php => CMSFormsSlate.php} (88%) rename styleguide/Pages/{HeadingStyles.php => CMSHeadingStyles.php} (77%) rename styleguide/Pages/{Tables.php => CMSTables.php} (80%) rename styleguide/Pages/{Video.php => CMSVideo.php} (80%) rename styleguide/Pages/{Accordion.php => ComponentAccordion.php} (80%) rename styleguide/Pages/{ArticleListing.php => ComponentArticleListing.php} (83%) rename styleguide/Pages/{ButtonSet.php => ComponentButtons.php} (81%) rename styleguide/Pages/{Catalog.php => ComponentCatalog.php} (81%) rename styleguide/Pages/{EventListing.php => ComponentEventListing.php} (79%) rename styleguide/Pages/{UsingComponents.php => ComponentGuide.php} (86%) rename styleguide/Pages/{HeadingComponent.php => ComponentHeading.php} (81%) rename styleguide/Pages/{HeroBannerLarge.php => ComponentHeroBannerLarge.php} (80%) rename styleguide/Pages/{HeroBannerSmall.php => ComponentHeroBannerSmall.php} (80%) rename styleguide/Pages/{HeroCarousel.php => ComponentHeroCarousel.php} (73%) rename styleguide/Pages/{HeroHalf.php => ComponentHeroHalf.php} (74%) rename styleguide/Pages/{HeroLogoOverlay.php => ComponentHeroLogoOverlay.php} (72%) rename styleguide/Pages/{HeroSVGOverlay.php => ComponentHeroSVGOverlay.php} (72%) rename styleguide/Pages/{HeroTextOverlay.php => ComponentHeroTextOverlay.php} (72%) rename styleguide/Pages/{IconsComponent.php => ComponentIcons.php} (81%) rename styleguide/Pages/{ComponentsPageContent.php => ComponentPageContent.php} (79%) rename styleguide/Pages/{SinglePromo.php => ComponentSinglePromo.php} (81%) rename styleguide/Pages/{SpotlightComponent.php => ComponentSpotlight.php} (80%) rename styleguide/Pages/{Error.php => LayoutError.php} (100%) rename styleguide/Pages/{Error403.php => LayoutError403.php} (100%) rename styleguide/Pages/{Error404.php => LayoutError404.php} (100%) rename styleguide/Pages/{Error500.php => LayoutError500.php} (100%) rename styleguide/Pages/{Flag.php => LayoutFlag.php} (100%) rename styleguide/Pages/{FooterContactFour.php => LayoutFooterContactFour.php} (100%) rename styleguide/Pages/{FooterContactOne.php => LayoutFooterContactOne.php} (100%) rename styleguide/Pages/{FooterContactThree.php => LayoutFooterContactThree.php} (100%) rename styleguide/Pages/{FooterContactTwo.php => LayoutFooterContactTwo.php} (100%) rename styleguide/Pages/{HeaderTitleDouble.php => LayoutHeaderTitleDouble.php} (100%) rename styleguide/Pages/{HeaderTitleSingle.php => LayoutHeaderTitleSingle.php} (100%) rename styleguide/Pages/{MenuExternal.php => LayoutMenuExternal.php} (100%) rename styleguide/Pages/{MenuLeft.php => LayoutMenuLeft.php} (100%) rename styleguide/Pages/{MenuTop.php => LayoutMenuTop.php} (78%) rename styleguide/Pages/{NoMenu.php => LayoutNoMenu.php} (100%) rename styleguide/Pages/{ChildpageWithComponents.php => TemplateChildpageWithComponents.php} (100%) rename styleguide/Pages/{ContactTables.php => TemplateContactTables.php} (100%) rename styleguide/Pages/{ContactTablesNoTOC.php => TemplateContactTablesNoTOC.php} (100%) rename styleguide/Pages/{Directory.php => TemplateDirectory.php} (100%) rename styleguide/Pages/{DirectoryOrdered.php => TemplateDirectoryOrdered.php} (100%) rename styleguide/Pages/{Fullwidth.php => TemplateFullwidth.php} (100%) rename styleguide/Pages/{Homepage.php => TemplateHomepage.php} (100%) rename styleguide/Views/{styleguide-basic-layouts.blade.php => styleguide-cms-basic-layouts.blade.php} (100%) rename styleguide/Views/{styleguide-buttons.blade.php => styleguide-cms-buttons.blade.php} (100%) rename styleguide/Views/{styleguide-colors.blade.php => styleguide-cms-colors.blade.php} (100%) rename styleguide/Views/{styleguide-figure.blade.php => styleguide-cms-figure.blade.php} (100%) rename styleguide/Views/{styleguide-forms-error.blade.php => styleguide-cms-forms-error.blade.php} (100%) rename styleguide/Views/{styleguide-forms.blade.php => styleguide-cms-forms.blade.php} (100%) rename styleguide/Views/{styleguide-heading-styles.blade.php => styleguide-cms-heading-styles.blade.php} (100%) rename styleguide/Views/{styleguide-tables.blade.php => styleguide-cms-tables.blade.php} (100%) rename styleguide/Views/{styleguide-video.blade.php => styleguide-cms-video.blade.php} (100%) rename styleguide/Views/{styleguide-button-set.blade.php => styleguide-component-buttons.blade.php} (53%) rename styleguide/Views/{styleguide-using-components.blade.php => styleguide-component-guide.blade.php} (100%) rename styleguide/Views/{styleguide-promo-column.blade.php => styleguide-component-promo-column.blade.php} (100%) diff --git a/styleguide/Http/Controllers/BasicLayoutsController.php b/styleguide/Http/Controllers/CMSBasicLayoutsController.php similarity index 75% rename from styleguide/Http/Controllers/BasicLayoutsController.php rename to styleguide/Http/Controllers/CMSBasicLayoutsController.php index 678ea811..798e05fc 100644 --- a/styleguide/Http/Controllers/BasicLayoutsController.php +++ b/styleguide/Http/Controllers/CMSBasicLayoutsController.php @@ -7,7 +7,7 @@ use Illuminate\Http\Request; use Faker\Factory; -class BasicLayoutsController extends Controller +class CMSBasicLayoutsController extends Controller { /** * Construct the controller. @@ -22,6 +22,6 @@ public function __construct(Factory $faker) */ public function index(Request $request): View { - return view('styleguide-basic-layouts', merge($request->data, $this->faker)); + return view('styleguide-cms-basic-layouts', merge($request->data, $this->faker)); } } diff --git a/styleguide/Http/Controllers/ButtonsController.php b/styleguide/Http/Controllers/CMSButtonsController.php similarity index 77% rename from styleguide/Http/Controllers/ButtonsController.php rename to styleguide/Http/Controllers/CMSButtonsController.php index 16b01959..e7df8d6b 100644 --- a/styleguide/Http/Controllers/ButtonsController.php +++ b/styleguide/Http/Controllers/CMSButtonsController.php @@ -7,7 +7,7 @@ use Illuminate\Http\Request; use Faker\Factory; -class ButtonsController extends Controller +class CMSButtonsController extends Controller { /** * Construct the controller. @@ -22,6 +22,6 @@ public function __construct(Factory $faker) */ public function index(Request $request): View { - return view('styleguide-buttons', merge($request->data, $this->faker)); + return view('styleguide-cms-buttons', merge($request->data, $this->faker)); } } diff --git a/styleguide/Http/Controllers/ColorsController.php b/styleguide/Http/Controllers/CMSColorsController.php similarity index 87% rename from styleguide/Http/Controllers/ColorsController.php rename to styleguide/Http/Controllers/CMSColorsController.php index cef78cc2..523c782b 100644 --- a/styleguide/Http/Controllers/ColorsController.php +++ b/styleguide/Http/Controllers/CMSColorsController.php @@ -6,7 +6,7 @@ use App\Http\Controllers\Controller; use Illuminate\Http\Request; -class ColorsController extends Controller +class CMSColorsController extends Controller { /** * Display the styleguide view. diff --git a/styleguide/Http/Controllers/FigureController.php b/styleguide/Http/Controllers/CMSFigureController.php similarity index 92% rename from styleguide/Http/Controllers/FigureController.php rename to styleguide/Http/Controllers/CMSFigureController.php index 1c12ca9a..24643d6e 100644 --- a/styleguide/Http/Controllers/FigureController.php +++ b/styleguide/Http/Controllers/CMSFigureController.php @@ -7,7 +7,7 @@ use Illuminate\Http\Request; use Faker\Factory; -class FigureController extends Controller +class CMSFigureController extends Controller { /** * Construct the controller. diff --git a/styleguide/Http/Controllers/FormsController.php b/styleguide/Http/Controllers/CMSFormsController.php similarity index 87% rename from styleguide/Http/Controllers/FormsController.php rename to styleguide/Http/Controllers/CMSFormsController.php index 800ec69b..20f58cc3 100644 --- a/styleguide/Http/Controllers/FormsController.php +++ b/styleguide/Http/Controllers/CMSFormsController.php @@ -6,7 +6,7 @@ use App\Http\Controllers\Controller; use Illuminate\Http\Request; -class FormsController extends Controller +class CMSFormsController extends Controller { /** * Display the form view. diff --git a/styleguide/Http/Controllers/FormsErrorController.php b/styleguide/Http/Controllers/CMSFormsErrorController.php similarity index 86% rename from styleguide/Http/Controllers/FormsErrorController.php rename to styleguide/Http/Controllers/CMSFormsErrorController.php index 8d465c02..b4aa73f8 100644 --- a/styleguide/Http/Controllers/FormsErrorController.php +++ b/styleguide/Http/Controllers/CMSFormsErrorController.php @@ -6,7 +6,7 @@ use App\Http\Controllers\Controller; use Illuminate\Http\Request; -class FormsErrorController extends Controller +class CMSFormsErrorController extends Controller { /** * Display the form view. diff --git a/styleguide/Http/Controllers/HeadingStylesController.php b/styleguide/Http/Controllers/CMSHeadingStylesController.php similarity index 90% rename from styleguide/Http/Controllers/HeadingStylesController.php rename to styleguide/Http/Controllers/CMSHeadingStylesController.php index de0f23de..6561aa43 100644 --- a/styleguide/Http/Controllers/HeadingStylesController.php +++ b/styleguide/Http/Controllers/CMSHeadingStylesController.php @@ -7,7 +7,7 @@ use Illuminate\Http\Request; use Faker\Factory; -class HeadingStylesController extends Controller +class CMSHeadingStylesController extends Controller { /** * Construct the controller. diff --git a/styleguide/Http/Controllers/TablesController.php b/styleguide/Http/Controllers/CMSTablesController.php similarity index 92% rename from styleguide/Http/Controllers/TablesController.php rename to styleguide/Http/Controllers/CMSTablesController.php index 649bd06b..ccf1c44a 100644 --- a/styleguide/Http/Controllers/TablesController.php +++ b/styleguide/Http/Controllers/CMSTablesController.php @@ -7,7 +7,7 @@ use Illuminate\Http\Request; use Faker\Factory; -class TablesController extends Controller +class CMSTablesController extends Controller { /** * Construct the controller. diff --git a/styleguide/Http/Controllers/VideoController.php b/styleguide/Http/Controllers/CMSVideoController.php similarity index 90% rename from styleguide/Http/Controllers/VideoController.php rename to styleguide/Http/Controllers/CMSVideoController.php index 4ded80bd..42d33983 100644 --- a/styleguide/Http/Controllers/VideoController.php +++ b/styleguide/Http/Controllers/CMSVideoController.php @@ -7,7 +7,7 @@ use Factories\Video; use Illuminate\Http\Request; -class VideoController extends Controller +class CMSVideoController extends Controller { /** * Display an example Video. diff --git a/styleguide/Http/Controllers/AccordionController.php b/styleguide/Http/Controllers/ComponentAccordionController.php similarity index 94% rename from styleguide/Http/Controllers/AccordionController.php rename to styleguide/Http/Controllers/ComponentAccordionController.php index 18d3bd0f..b996d336 100644 --- a/styleguide/Http/Controllers/AccordionController.php +++ b/styleguide/Http/Controllers/ComponentAccordionController.php @@ -7,7 +7,7 @@ use Illuminate\Http\Request; use Factories\AccordionItems; -class AccordionController extends Controller +class ComponentAccordionController extends Controller { /** * Display an example accordion. @@ -79,7 +79,7 @@ public function index(Request $request): View '; - $components['components'] = [ + $components = [ 'accordion' => [ 'data' => [ 0 => [ @@ -113,6 +113,9 @@ public function index(Request $request): View ], ]; - return view('childpage', merge($request->data, $components)); + // Assign components globally + $request->data['base']['components'] = $components; + + return view('childpage', merge($request->data)); } } diff --git a/styleguide/Http/Controllers/ArticleListingController.php b/styleguide/Http/Controllers/ComponentArticleListingController.php similarity index 91% rename from styleguide/Http/Controllers/ArticleListingController.php rename to styleguide/Http/Controllers/ComponentArticleListingController.php index 76a6f0ae..77a35738 100644 --- a/styleguide/Http/Controllers/ArticleListingController.php +++ b/styleguide/Http/Controllers/ComponentArticleListingController.php @@ -8,7 +8,7 @@ use Faker\Factory; use Factories\Article; -class ArticleListingController extends Controller +class ComponentArticleListingController extends Controller { /** * Construct the controller. @@ -23,7 +23,7 @@ public function __construct(Factory $faker) */ public function index(Request $request): View { - $components['components'] = [ + $components = [ 'accordion-1' => [ 'data' => [ 0 => [ @@ -107,6 +107,9 @@ public function index(Request $request): View ], ]; - return view('childpage', merge($request->data, $components)); + // Assign components globally + $request->data['base']['components'] = $components; + + return view('childpage', merge($request->data)); } } diff --git a/styleguide/Http/Controllers/ButtonSetController.php b/styleguide/Http/Controllers/ComponentButtonsController.php similarity index 96% rename from styleguide/Http/Controllers/ButtonSetController.php rename to styleguide/Http/Controllers/ComponentButtonsController.php index 893bf3ba..2ee94be9 100644 --- a/styleguide/Http/Controllers/ButtonSetController.php +++ b/styleguide/Http/Controllers/ComponentButtonsController.php @@ -8,7 +8,7 @@ use Faker\Factory; use Factories\Button; -class ButtonSetController extends Controller +class ComponentButtonsController extends Controller { /** * Construct the controller. @@ -237,6 +237,9 @@ public function index(Request $request): View ], ]; - return view('styleguide-button-set', merge($request->data, $components)); + // Assign components globally + $request->data['base']['components'] = $components; + + return view('styleguide-component-buttons', merge($request->data, $components)); } } diff --git a/styleguide/Http/Controllers/CatalogController.php b/styleguide/Http/Controllers/ComponentCatalogController.php similarity index 72% rename from styleguide/Http/Controllers/CatalogController.php rename to styleguide/Http/Controllers/ComponentCatalogController.php index 87425016..8d8bb090 100644 --- a/styleguide/Http/Controllers/CatalogController.php +++ b/styleguide/Http/Controllers/ComponentCatalogController.php @@ -11,7 +11,7 @@ use Contracts\Repositories\PromoRepositoryContract; use Contracts\Repositories\ModularPageRepositoryContract; -class CatalogController extends Controller +class ComponentCatalogController extends Controller { /** * Construct the controller. @@ -35,26 +35,7 @@ public function index(Request $request): View $request->data['base']['page']['content']['main'] = '

The catalog component is ideal for showcasing a collection of items from a single promo group in a multiple-column grid or single-column list format.

'; - $component_details = ' -

Visual presentation
-Display items such as program highlights, courses, or any categorized content in a grid or list layout. The grid can feature thumbnail images with brief descriptions, while the list format might include more detailed information per item.

-

Customization
-Tailor the catalog\'s appearance to suit your needs by adjusting the number of columns and items displayed per row.

- -

Linking and detail views
-Enable users to click on individual items within the catalog to access detailed information about each item. This might include a dedicated page for a specific catalog item providing comprehensive details, images, and a call-to-action for further engagement.

-

Use cases

-

Program highlights
-Feature unique aspects of programs, such as lab experiences, hands-on projects, cutting-edge industry equipment, or collaborations with industry partners. Each catalog item can include a description highlighting these program-specific highlights, giving insight into the program\'s strengths and distinguishing features.

-

Course listings
-Display courses available within a program, department, or semester, allowing students to explore offerings and find detailed information about each course.

-

Service offerings
-Showcase different services provided by the university, allowing users to explore and access detailed information about each service.

-

Student success stories
-Showcase successful projects, research, or initiatives undertaken by students within different programs.

-
-'; $component_configuration = ' @@ -120,7 +101,7 @@ public function index(Request $request): View
'; - $components['components'] = [ + $components = [ 'accordion' => [ 'data' => [ 0 => [ @@ -149,17 +130,6 @@ public function index(Request $request): View 'showDescription' => false, ], ], - 'promo-row-1' => [ - 'data' => [ - 0 => [ - 'title' => 'How to use the catalog', - 'description' => $component_details, - ], - ], - 'component' => [ - 'filename' => 'promo-row' - ], - ], 'catalog-2' => [ 'data' => app(GenericPromo::class)->create(3, false, [ ]), @@ -222,7 +192,10 @@ public function index(Request $request): View ], ]; - $components['components']['catalog-3']['data'] = $this->components->organizePromoItemsByOption($components['components']['catalog-3']['data']); + $components['catalog-3']['data'] = $this->components->organizePromoItemsByOption($components['catalog-3']['data']); + + // Assign components globally + $request->data['base']['components'] = $components; return view('childpage', merge($request->data, $components)); } diff --git a/styleguide/Http/Controllers/EventListingController.php b/styleguide/Http/Controllers/ComponentEventListingController.php similarity index 93% rename from styleguide/Http/Controllers/EventListingController.php rename to styleguide/Http/Controllers/ComponentEventListingController.php index 57ab2589..d16f2e9c 100644 --- a/styleguide/Http/Controllers/EventListingController.php +++ b/styleguide/Http/Controllers/ComponentEventListingController.php @@ -9,7 +9,7 @@ use Factories\Event; use Factories\EventFullListing; -class EventListingController extends Controller +class ComponentEventListingController extends Controller { /** * Construct the controller. @@ -27,7 +27,7 @@ public function index(Request $request): View $request->data['base']['page']['content']['main'] = '

Adding events from the events calendar. Featured event components display images uploaded to each event.

'; - $components['components'] = [ + $components = [ 'accordion-1' => [ 'data' => [ 0 => [ @@ -118,6 +118,9 @@ public function index(Request $request): View ], ]; - return view('childpage', merge($request->data, $components)); + // Assign components globally + $request->data['base']['components'] = $components; + + return view('childpage', merge($request->data)); } } diff --git a/styleguide/Http/Controllers/UsingComponentsController.php b/styleguide/Http/Controllers/ComponentGuideController.php similarity index 96% rename from styleguide/Http/Controllers/UsingComponentsController.php rename to styleguide/Http/Controllers/ComponentGuideController.php index f13894d0..1c23d47a 100644 --- a/styleguide/Http/Controllers/UsingComponentsController.php +++ b/styleguide/Http/Controllers/ComponentGuideController.php @@ -7,7 +7,7 @@ use Illuminate\Http\Request; use Factories\GenericPromo; -class UsingComponentsController extends Controller +class ComponentGuideController extends Controller { /** * Display the banner at the top of the page. diff --git a/styleguide/Http/Controllers/HeadingComponentController.php b/styleguide/Http/Controllers/ComponentHeadingController.php similarity index 93% rename from styleguide/Http/Controllers/HeadingComponentController.php rename to styleguide/Http/Controllers/ComponentHeadingController.php index 1917a43f..af0a84fe 100644 --- a/styleguide/Http/Controllers/HeadingComponentController.php +++ b/styleguide/Http/Controllers/ComponentHeadingController.php @@ -8,7 +8,7 @@ use Factories\GenericPromo; use Factories\Event; -class HeadingComponentController extends Controller +class ComponentHeadingController extends Controller { /** * Display a page heading from a page field @@ -42,7 +42,7 @@ public function index(Request $request): View '; - $components['components'] = [ + $components = [ 'accordion-1' => [ 'data' => [ 0 => [ @@ -86,6 +86,9 @@ public function index(Request $request): View ], ]; + // Assign components globally + $request->data['base']['components'] = $components; + return view('childpage', merge($request->data, $components)); } } diff --git a/styleguide/Http/Controllers/HeroController.php b/styleguide/Http/Controllers/ComponentHeroController.php similarity index 91% rename from styleguide/Http/Controllers/HeroController.php rename to styleguide/Http/Controllers/ComponentHeroController.php index 408f2fca..3ff66f52 100644 --- a/styleguide/Http/Controllers/HeroController.php +++ b/styleguide/Http/Controllers/ComponentHeroController.php @@ -7,7 +7,7 @@ use Illuminate\Http\Request; use Faker\Factory; -class HeroController extends Controller +class ComponentHeroController extends Controller { /** * Construct the controller. @@ -79,7 +79,7 @@ public function index(Request $request): View '; - $components['components'] = [ + $components = [ 'accordion-1' => [ 'data' => [ 0 => [ @@ -101,6 +101,9 @@ public function index(Request $request): View ], ]; - return view('childpage', merge($request->data, $components)); + // Assign components globally + $request->data['base']['components'] = $components; + + return view('childpage', merge($request->data)); } } diff --git a/styleguide/Http/Controllers/IconsController.php b/styleguide/Http/Controllers/ComponentIconsController.php similarity index 76% rename from styleguide/Http/Controllers/IconsController.php rename to styleguide/Http/Controllers/ComponentIconsController.php index 123d7848..1786c30c 100644 --- a/styleguide/Http/Controllers/IconsController.php +++ b/styleguide/Http/Controllers/ComponentIconsController.php @@ -8,7 +8,7 @@ use Faker\Factory; use Factories\Icon; -class IconsController extends Controller +class ComponentIconsController extends Controller { /** * Construct the controller. @@ -24,14 +24,7 @@ public function __construct(Factory $faker) public function index(Request $request): View { $request->data['base']['page']['content']['main'] = ' -
    -
  • Purpose: Present a list of promotional items accompanied by icons, offering a visually appealing and informative display.
  • -
  • Visual representation: Showcase content that can easily be associated with icons. Icons can represent different types of content, providing a quick visual cue for users.
  • -
  • Enhanced readability: Icons complement textual information by offering a visual reference, aiding users in quickly identifying and differentiating between various items or content categories within the list.
  • -
  • Customization: Tailor the icons to align with the respective content. For instance, if highlighting various academic disciplines or departments, you can customize the icons to align with each field of study. Ensure consistency in icon design for better comprehension.
  • -
  • Accessibility: Clarity in icon representation: Ensure icons are clear and easily recognizable, even at smaller sizes, to maintain accessibility for users who might rely on screen readers or have visual impairments.
  • -
- +

Present a list of promotional items accompanied by icons, offering a visually appealing and informative display.

'; $promotion_group_details = ' @@ -121,7 +114,7 @@ public function index(Request $request): View '; - $components['components'] = [ + $components = [ 'accordion-1' => [ 'data' => [ 0 => [ @@ -171,6 +164,9 @@ public function index(Request $request): View ], ]; - return view('childpage', merge($request->data, $components)); + // Assign components globally + $request->data['base']['components'] = $components; + + return view('childpage', merge($request->data)); } } diff --git a/styleguide/Http/Controllers/ComponentsPageContentController.php b/styleguide/Http/Controllers/ComponentPageContentController.php similarity index 87% rename from styleguide/Http/Controllers/ComponentsPageContentController.php rename to styleguide/Http/Controllers/ComponentPageContentController.php index 675c9943..6bf07119 100644 --- a/styleguide/Http/Controllers/ComponentsPageContentController.php +++ b/styleguide/Http/Controllers/ComponentPageContentController.php @@ -6,7 +6,7 @@ use App\Http\Controllers\Controller; use Illuminate\Http\Request; -class ComponentsPageContentController extends Controller +class ComponentPageContentController extends Controller { /** * Display page content from a page field @@ -39,7 +39,7 @@ public function index(Request $request): View '; - $components['components'] = [ + $components = [ 'page-content-row' => [ 'data' => [ 0 => [ @@ -64,6 +64,9 @@ public function index(Request $request): View ], ]; - return view('childpage', merge($request->data, $components)); + // Assign components globally + $request->data['base']['components'] = $components; + + return view('childpage', merge($request->data)); } } diff --git a/styleguide/Http/Controllers/SinglePromoController.php b/styleguide/Http/Controllers/ComponentSinglePromoController.php similarity index 97% rename from styleguide/Http/Controllers/SinglePromoController.php rename to styleguide/Http/Controllers/ComponentSinglePromoController.php index 3e43c0ec..d39398a3 100644 --- a/styleguide/Http/Controllers/SinglePromoController.php +++ b/styleguide/Http/Controllers/ComponentSinglePromoController.php @@ -8,7 +8,7 @@ use Faker\Factory; use Factories\GenericPromo; -class SinglePromoController extends Controller +class ComponentSinglePromoController extends Controller { /** * Construct the controller. @@ -112,7 +112,7 @@ public function index(Request $request): View '; - $components['components'] = [ + $components = [ 'accordion' => [ 'data' => [ 0 => [ @@ -244,6 +244,9 @@ public function index(Request $request): View ], ]; - return view('childpage', merge($request->data, $components)); + // Assign components globally + $request->data['base']['components'] = $components; + + return view('childpage', merge($request->data)); } } diff --git a/styleguide/Http/Controllers/SpotlightController.php b/styleguide/Http/Controllers/ComponentSpotlightController.php similarity index 95% rename from styleguide/Http/Controllers/SpotlightController.php rename to styleguide/Http/Controllers/ComponentSpotlightController.php index 59eaa2ab..9f5ba1c5 100644 --- a/styleguide/Http/Controllers/SpotlightController.php +++ b/styleguide/Http/Controllers/ComponentSpotlightController.php @@ -9,7 +9,7 @@ use Factories\Spotlight; use Factories\GenericPromo; -class SpotlightController extends Controller +class ComponentSpotlightController extends Controller { /** * Construct the controller. @@ -96,7 +96,7 @@ public function index(Request $request): View '; - $components['components'] = [ + $components = [ 'accordion' => [ 'data' => [ 0 => [ @@ -140,6 +140,9 @@ public function index(Request $request): View ], ]; - return view('childpage', merge($request->data, $components)); + // Assign components globally + $request->data['base']['components'] = $components; + + return view('childpage', merge($request->data)); } } diff --git a/styleguide/Http/Controllers/Error403Controller.php b/styleguide/Http/Controllers/LayoutError403Controller.php similarity index 100% rename from styleguide/Http/Controllers/Error403Controller.php rename to styleguide/Http/Controllers/LayoutError403Controller.php diff --git a/styleguide/Http/Controllers/Error404Controller.php b/styleguide/Http/Controllers/LayoutError404Controller.php similarity index 100% rename from styleguide/Http/Controllers/Error404Controller.php rename to styleguide/Http/Controllers/LayoutError404Controller.php diff --git a/styleguide/Http/Controllers/Error500Controller.php b/styleguide/Http/Controllers/LayoutError500Controller.php similarity index 100% rename from styleguide/Http/Controllers/Error500Controller.php rename to styleguide/Http/Controllers/LayoutError500Controller.php diff --git a/styleguide/Http/Controllers/FlagController.php b/styleguide/Http/Controllers/LayoutFlagController.php similarity index 100% rename from styleguide/Http/Controllers/FlagController.php rename to styleguide/Http/Controllers/LayoutFlagController.php diff --git a/styleguide/Http/Controllers/FooterContactFourController.php b/styleguide/Http/Controllers/LayoutFooterContactFourController.php similarity index 100% rename from styleguide/Http/Controllers/FooterContactFourController.php rename to styleguide/Http/Controllers/LayoutFooterContactFourController.php diff --git a/styleguide/Http/Controllers/FooterContactOneController.php b/styleguide/Http/Controllers/LayoutFooterContactOneController.php similarity index 100% rename from styleguide/Http/Controllers/FooterContactOneController.php rename to styleguide/Http/Controllers/LayoutFooterContactOneController.php diff --git a/styleguide/Http/Controllers/FooterContactThreeController.php b/styleguide/Http/Controllers/LayoutFooterContactThreeController.php similarity index 100% rename from styleguide/Http/Controllers/FooterContactThreeController.php rename to styleguide/Http/Controllers/LayoutFooterContactThreeController.php diff --git a/styleguide/Http/Controllers/FooterContactTwoController.php b/styleguide/Http/Controllers/LayoutFooterContactTwoController.php similarity index 100% rename from styleguide/Http/Controllers/FooterContactTwoController.php rename to styleguide/Http/Controllers/LayoutFooterContactTwoController.php diff --git a/styleguide/Http/Controllers/HeaderTitleDoubleController.php b/styleguide/Http/Controllers/LayoutHeaderTitleDoubleController.php similarity index 100% rename from styleguide/Http/Controllers/HeaderTitleDoubleController.php rename to styleguide/Http/Controllers/LayoutHeaderTitleDoubleController.php diff --git a/styleguide/Http/Controllers/HeaderTitleSingleController.php b/styleguide/Http/Controllers/LayoutHeaderTitleSingleController.php similarity index 100% rename from styleguide/Http/Controllers/HeaderTitleSingleController.php rename to styleguide/Http/Controllers/LayoutHeaderTitleSingleController.php diff --git a/styleguide/Http/Controllers/MenuLeftController.php b/styleguide/Http/Controllers/LayoutMenuLeftController.php similarity index 100% rename from styleguide/Http/Controllers/MenuLeftController.php rename to styleguide/Http/Controllers/LayoutMenuLeftController.php diff --git a/styleguide/Http/Controllers/MenuTopController.php b/styleguide/Http/Controllers/LayoutMenuTopController.php similarity index 95% rename from styleguide/Http/Controllers/MenuTopController.php rename to styleguide/Http/Controllers/LayoutMenuTopController.php index 758b5d96..95eb3c94 100644 --- a/styleguide/Http/Controllers/MenuTopController.php +++ b/styleguide/Http/Controllers/LayoutMenuTopController.php @@ -7,7 +7,7 @@ use Illuminate\Http\Request; use Styleguide\Repositories\MenuRepository; -class MenuTopController extends Controller +class LayoutMenuTopController extends Controller { /** * Construct the controller. diff --git a/styleguide/Http/Controllers/ChildpageWithComponentsController.php b/styleguide/Http/Controllers/TemplateChildpageWithComponentsController.php similarity index 100% rename from styleguide/Http/Controllers/ChildpageWithComponentsController.php rename to styleguide/Http/Controllers/TemplateChildpageWithComponentsController.php diff --git a/styleguide/Http/Controllers/FullWidthController.php b/styleguide/Http/Controllers/TemplateFullWidthController.php similarity index 100% rename from styleguide/Http/Controllers/FullWidthController.php rename to styleguide/Http/Controllers/TemplateFullWidthController.php diff --git a/styleguide/Pages/BasicLayouts.php b/styleguide/Pages/CMSBasicLayouts.php similarity index 78% rename from styleguide/Pages/BasicLayouts.php rename to styleguide/Pages/CMSBasicLayouts.php index eaf22aa8..840c3a14 100644 --- a/styleguide/Pages/BasicLayouts.php +++ b/styleguide/Pages/CMSBasicLayouts.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class BasicLayouts extends Page +class CMSBasicLayouts extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'BasicLayoutsController', + 'controller' => 'CMSBasicLayoutsController', 'title' => 'Basic responsive layouts', 'id' => 100200, ], diff --git a/styleguide/Pages/Buttons.php b/styleguide/Pages/CMSButtons.php similarity index 86% rename from styleguide/Pages/Buttons.php rename to styleguide/Pages/CMSButtons.php index cdf09a17..7eed2136 100644 --- a/styleguide/Pages/Buttons.php +++ b/styleguide/Pages/CMSButtons.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class Buttons extends Page +class CMSButtons extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'ButtonsController', + 'controller' => 'CMSButtonsController', 'title' => 'Buttons', 'id' => 100400, 'content' => [ diff --git a/styleguide/Pages/Colors.php b/styleguide/Pages/CMSColors.php similarity index 80% rename from styleguide/Pages/Colors.php rename to styleguide/Pages/CMSColors.php index ee45212e..c98fdd8d 100644 --- a/styleguide/Pages/Colors.php +++ b/styleguide/Pages/CMSColors.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class Colors extends Page +class CMSColors extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'ColorsController', + 'controller' => 'CMSColorsController', 'title' => 'Colors', 'id' => 100800, ], diff --git a/styleguide/Pages/Figure.php b/styleguide/Pages/CMSFigure.php similarity index 80% rename from styleguide/Pages/Figure.php rename to styleguide/Pages/CMSFigure.php index d89264c2..15fe08ed 100644 --- a/styleguide/Pages/Figure.php +++ b/styleguide/Pages/CMSFigure.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class Figure extends Page +class CMSFigure extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'FigureController', + 'controller' => 'CMSFigureController', 'title' => 'Figure', 'id' => 115100, ], diff --git a/styleguide/Pages/Forms.php b/styleguide/Pages/CMSForms.php similarity index 80% rename from styleguide/Pages/Forms.php rename to styleguide/Pages/CMSForms.php index e3657826..ccf60458 100644 --- a/styleguide/Pages/Forms.php +++ b/styleguide/Pages/CMSForms.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class Forms extends Page +class CMSForms extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'FormsController', + 'controller' => 'CMSFormsController', 'title' => 'Forms', 'id' => 111100100, ], diff --git a/styleguide/Pages/FormsError.php b/styleguide/Pages/CMSFormsError.php similarity index 78% rename from styleguide/Pages/FormsError.php rename to styleguide/Pages/CMSFormsError.php index 52592f4d..9b1bb079 100644 --- a/styleguide/Pages/FormsError.php +++ b/styleguide/Pages/CMSFormsError.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class FormsError extends Page +class CMSFormsError extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'FormsErrorController', + 'controller' => 'CMSFormsErrorController', 'title' => 'Form Errors', 'id' => 111100101, ], diff --git a/styleguide/Pages/FormsSlate.php b/styleguide/Pages/CMSFormsSlate.php similarity index 88% rename from styleguide/Pages/FormsSlate.php rename to styleguide/Pages/CMSFormsSlate.php index d75b07b1..d463603c 100644 --- a/styleguide/Pages/FormsSlate.php +++ b/styleguide/Pages/CMSFormsSlate.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class FormsSlate extends Page +class CMSFormsSlate extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'MenuTopController', + 'controller' => 'LayoutMenuTopController', 'title' => 'Slate Form', 'id' => 111100102, 'content' => [ diff --git a/styleguide/Pages/HeadingStyles.php b/styleguide/Pages/CMSHeadingStyles.php similarity index 77% rename from styleguide/Pages/HeadingStyles.php rename to styleguide/Pages/CMSHeadingStyles.php index 5787fc4a..8935058d 100644 --- a/styleguide/Pages/HeadingStyles.php +++ b/styleguide/Pages/CMSHeadingStyles.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class HeadingStyles extends Page +class CMSHeadingStyles extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeadingStylesController', + 'controller' => 'CMSHeadingStylesController', 'title' => 'Heading styles', 'id' => 100900, ], diff --git a/styleguide/Pages/Tables.php b/styleguide/Pages/CMSTables.php similarity index 80% rename from styleguide/Pages/Tables.php rename to styleguide/Pages/CMSTables.php index de24be1a..11c89cd8 100644 --- a/styleguide/Pages/Tables.php +++ b/styleguide/Pages/CMSTables.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class Tables extends Page +class CMSTables extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'TablesController', + 'controller' => 'CMSTablesController', 'title' => 'Tables', 'id' => 113100, ], diff --git a/styleguide/Pages/Video.php b/styleguide/Pages/CMSVideo.php similarity index 80% rename from styleguide/Pages/Video.php rename to styleguide/Pages/CMSVideo.php index 645d03d4..38f11c78 100644 --- a/styleguide/Pages/Video.php +++ b/styleguide/Pages/CMSVideo.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class Video extends Page +class CMSVideo extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'VideoController', + 'controller' => 'CMSVideoController', 'title' => 'Video', 'id' => 117100, ], diff --git a/styleguide/Pages/Accordion.php b/styleguide/Pages/ComponentAccordion.php similarity index 80% rename from styleguide/Pages/Accordion.php rename to styleguide/Pages/ComponentAccordion.php index f3b8f87c..b638a3af 100644 --- a/styleguide/Pages/Accordion.php +++ b/styleguide/Pages/ComponentAccordion.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class Accordion extends Page +class ComponentAccordion extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'AccordionController', + 'controller' => 'ComponentAccordionController', 'title' => 'Accordion', 'id' => 107100, 'content' => [ diff --git a/styleguide/Pages/ArticleListing.php b/styleguide/Pages/ComponentArticleListing.php similarity index 83% rename from styleguide/Pages/ArticleListing.php rename to styleguide/Pages/ComponentArticleListing.php index f299a315..a68c21ff 100644 --- a/styleguide/Pages/ArticleListing.php +++ b/styleguide/Pages/ComponentArticleListing.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class ArticleListing extends Page +class ComponentArticleListing extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'ArticleListingController', + 'controller' => 'ComponentArticleListingController', 'title' => 'News article listing', 'id' => 108100, 'content' => [ diff --git a/styleguide/Pages/ButtonSet.php b/styleguide/Pages/ComponentButtons.php similarity index 81% rename from styleguide/Pages/ButtonSet.php rename to styleguide/Pages/ComponentButtons.php index 08e10b8d..a0e4b06d 100644 --- a/styleguide/Pages/ButtonSet.php +++ b/styleguide/Pages/ComponentButtons.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class ButtonSet extends Page +class ComponentButtons extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'ButtonSetController', + 'controller' => 'ComponentButtonsController', 'title' => 'Button set', 'id' => 114100, 'content' => [ diff --git a/styleguide/Pages/Catalog.php b/styleguide/Pages/ComponentCatalog.php similarity index 81% rename from styleguide/Pages/Catalog.php rename to styleguide/Pages/ComponentCatalog.php index 53cfa5ec..8940082d 100644 --- a/styleguide/Pages/Catalog.php +++ b/styleguide/Pages/ComponentCatalog.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class Catalog extends Page +class ComponentCatalog extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'CatalogController', + 'controller' => 'ComponentCatalogController', 'title' => 'Catalog', 'id' => 118100, 'content' => [ diff --git a/styleguide/Pages/EventListing.php b/styleguide/Pages/ComponentEventListing.php similarity index 79% rename from styleguide/Pages/EventListing.php rename to styleguide/Pages/ComponentEventListing.php index 1cc5de0b..00422d99 100644 --- a/styleguide/Pages/EventListing.php +++ b/styleguide/Pages/ComponentEventListing.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class EventListing extends Page +class ComponentEventListing extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'EventListingController', + 'controller' => 'ComponentEventListingController', 'title' => 'Events listing', 'id' => 109100, 'content' => [ diff --git a/styleguide/Pages/UsingComponents.php b/styleguide/Pages/ComponentGuide.php similarity index 86% rename from styleguide/Pages/UsingComponents.php rename to styleguide/Pages/ComponentGuide.php index cbfe60af..b7ddce22 100644 --- a/styleguide/Pages/UsingComponents.php +++ b/styleguide/Pages/ComponentGuide.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class UsingComponents extends Page +class ComponentGuide extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'UsingComponentsController', + 'controller' => 'ComponentGuideController', 'title' => 'Using components', 'id' => 101110600, 'content' => [ diff --git a/styleguide/Pages/HeadingComponent.php b/styleguide/Pages/ComponentHeading.php similarity index 81% rename from styleguide/Pages/HeadingComponent.php rename to styleguide/Pages/ComponentHeading.php index 008f1f21..0471ffdd 100644 --- a/styleguide/Pages/HeadingComponent.php +++ b/styleguide/Pages/ComponentHeading.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class HeadingComponent extends Page +class ComponentHeading extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeadingComponentController', + 'controller' => 'ComponentHeadingController', 'title' => 'Heading', 'id' => 122100, 'content' => [ diff --git a/styleguide/Pages/HeroBannerLarge.php b/styleguide/Pages/ComponentHeroBannerLarge.php similarity index 80% rename from styleguide/Pages/HeroBannerLarge.php rename to styleguide/Pages/ComponentHeroBannerLarge.php index 2b0e3847..e4e4462f 100644 --- a/styleguide/Pages/HeroBannerLarge.php +++ b/styleguide/Pages/ComponentHeroBannerLarge.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class HeroBannerLarge extends Page +class ComponentHeroBannerLarge extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeroController', + 'controller' => 'ComponentHeroController', 'title' => 'Hero banner large', 'id' => 105100103, 'content' => [ diff --git a/styleguide/Pages/HeroBannerSmall.php b/styleguide/Pages/ComponentHeroBannerSmall.php similarity index 80% rename from styleguide/Pages/HeroBannerSmall.php rename to styleguide/Pages/ComponentHeroBannerSmall.php index ac42ddeb..9adbf383 100644 --- a/styleguide/Pages/HeroBannerSmall.php +++ b/styleguide/Pages/ComponentHeroBannerSmall.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class HeroBannerSmall extends Page +class ComponentHeroBannerSmall extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeroController', + 'controller' => 'ComponentHeroController', 'title' => 'Hero banner small', 'id' => 105100108, 'content' => [ diff --git a/styleguide/Pages/HeroCarousel.php b/styleguide/Pages/ComponentHeroCarousel.php similarity index 73% rename from styleguide/Pages/HeroCarousel.php rename to styleguide/Pages/ComponentHeroCarousel.php index 2202d7f9..8d156c34 100644 --- a/styleguide/Pages/HeroCarousel.php +++ b/styleguide/Pages/ComponentHeroCarousel.php @@ -4,11 +4,8 @@ use Factories\Page as PageFactory; -class HeroCarousel extends Page +class ComponentHeroCarousel extends Page { - /** {@inheritdoc} **/ - public $path = '/styleguide/hero/carousel'; - /** * {@inheritdoc} */ @@ -16,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeroController', + 'controller' => 'componentHeroController', 'title' => 'Hero carousel', 'id' => 105100104, 'content' => [ diff --git a/styleguide/Pages/HeroHalf.php b/styleguide/Pages/ComponentHeroHalf.php similarity index 74% rename from styleguide/Pages/HeroHalf.php rename to styleguide/Pages/ComponentHeroHalf.php index 08e7a6ff..59ffbc62 100644 --- a/styleguide/Pages/HeroHalf.php +++ b/styleguide/Pages/ComponentHeroHalf.php @@ -4,11 +4,8 @@ use Factories\Page as PageFactory; -class HeroHalf extends Page +class ComponentHeroHalf extends Page { - /** {@inheritdoc} **/ - public $path = '/styleguide/hero/half'; - /** * {@inheritdoc} */ @@ -16,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeroController', + 'controller' => 'ComponentHeroController', 'title' => 'Hero half', 'id' => 105100109, 'content' => [ diff --git a/styleguide/Pages/HeroLogoOverlay.php b/styleguide/Pages/ComponentHeroLogoOverlay.php similarity index 72% rename from styleguide/Pages/HeroLogoOverlay.php rename to styleguide/Pages/ComponentHeroLogoOverlay.php index aa959bf8..f0c6af5b 100644 --- a/styleguide/Pages/HeroLogoOverlay.php +++ b/styleguide/Pages/ComponentHeroLogoOverlay.php @@ -4,11 +4,8 @@ use Factories\Page as PageFactory; -class HeroLogoOverlay extends Page +class ComponentHeroLogoOverlay extends Page { - /** {@inheritdoc} **/ - public $path = '/styleguide/hero/logooverlay'; - /** * {@inheritdoc} */ @@ -16,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeroController', + 'controller' => 'ComponentHeroController', 'title' => 'Hero logo overlay', 'id' => 105100107, 'content' => [ diff --git a/styleguide/Pages/HeroSVGOverlay.php b/styleguide/Pages/ComponentHeroSVGOverlay.php similarity index 72% rename from styleguide/Pages/HeroSVGOverlay.php rename to styleguide/Pages/ComponentHeroSVGOverlay.php index c4e5080a..45315ae1 100644 --- a/styleguide/Pages/HeroSVGOverlay.php +++ b/styleguide/Pages/ComponentHeroSVGOverlay.php @@ -4,11 +4,8 @@ use Factories\Page as PageFactory; -class HeroSVGOverlay extends Page +class ComponentHeroSVGOverlay extends Page { - /** {@inheritdoc} **/ - public $path = '/styleguide/hero/svgoverlay'; - /** * {@inheritdoc} */ @@ -16,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeroController', + 'controller' => 'ComponentHeroController', 'title' => 'Hero SVG overlay', 'id' => 105100106, 'content' => [ diff --git a/styleguide/Pages/HeroTextOverlay.php b/styleguide/Pages/ComponentHeroTextOverlay.php similarity index 72% rename from styleguide/Pages/HeroTextOverlay.php rename to styleguide/Pages/ComponentHeroTextOverlay.php index bd90e17b..6a7c1cf4 100644 --- a/styleguide/Pages/HeroTextOverlay.php +++ b/styleguide/Pages/ComponentHeroTextOverlay.php @@ -4,11 +4,8 @@ use Factories\Page as PageFactory; -class HeroTextOverlay extends Page +class ComponentHeroTextOverlay extends Page { - /** {@inheritdoc} **/ - public $path = '/styleguide/hero/textoverlay'; - /** * {@inheritdoc} */ @@ -16,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeroController', + 'controller' => 'ComponentHeroController', 'title' => 'Hero text overlay', 'id' => 105100105, 'content' => [ diff --git a/styleguide/Pages/IconsComponent.php b/styleguide/Pages/ComponentIcons.php similarity index 81% rename from styleguide/Pages/IconsComponent.php rename to styleguide/Pages/ComponentIcons.php index 010e36d0..8dcd84bc 100644 --- a/styleguide/Pages/IconsComponent.php +++ b/styleguide/Pages/ComponentIcons.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class IconsComponent extends Page +class ComponentIcons extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'IconsController', + 'controller' => 'ComponentIconsController', 'title' => 'Icons', 'id' => 121100, 'content' => [ diff --git a/styleguide/Pages/ComponentsPageContent.php b/styleguide/Pages/ComponentPageContent.php similarity index 79% rename from styleguide/Pages/ComponentsPageContent.php rename to styleguide/Pages/ComponentPageContent.php index 9f49e586..909ffcc8 100644 --- a/styleguide/Pages/ComponentsPageContent.php +++ b/styleguide/Pages/ComponentPageContent.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class ComponentsPageContent extends Page +class ComponentPageContent extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'ComponentsPageContentController', + 'controller' => 'ComponentPageContentController', 'title' => 'Page content', 'id' => 123100, 'content' => [ diff --git a/styleguide/Pages/SinglePromo.php b/styleguide/Pages/ComponentSinglePromo.php similarity index 81% rename from styleguide/Pages/SinglePromo.php rename to styleguide/Pages/ComponentSinglePromo.php index 77913e61..8607c339 100644 --- a/styleguide/Pages/SinglePromo.php +++ b/styleguide/Pages/ComponentSinglePromo.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class SinglePromo extends Page +class ComponentSinglePromo extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'SinglePromoController', + 'controller' => 'ComponentSinglePromoController', 'title' => 'Single promo', 'id' => 116100, 'content' => [ diff --git a/styleguide/Pages/SpotlightComponent.php b/styleguide/Pages/ComponentSpotlight.php similarity index 80% rename from styleguide/Pages/SpotlightComponent.php rename to styleguide/Pages/ComponentSpotlight.php index 1f63c5e4..e7b8d450 100644 --- a/styleguide/Pages/SpotlightComponent.php +++ b/styleguide/Pages/ComponentSpotlight.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class SpotlightComponent extends Page +class ComponentSpotlight extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'SpotlightController', + 'controller' => 'ComponentSpotlightController', 'title' => 'Spotlight', 'id' => 119100, 'content' => [ diff --git a/styleguide/Pages/Error.php b/styleguide/Pages/LayoutError.php similarity index 100% rename from styleguide/Pages/Error.php rename to styleguide/Pages/LayoutError.php diff --git a/styleguide/Pages/Error403.php b/styleguide/Pages/LayoutError403.php similarity index 100% rename from styleguide/Pages/Error403.php rename to styleguide/Pages/LayoutError403.php diff --git a/styleguide/Pages/Error404.php b/styleguide/Pages/LayoutError404.php similarity index 100% rename from styleguide/Pages/Error404.php rename to styleguide/Pages/LayoutError404.php diff --git a/styleguide/Pages/Error500.php b/styleguide/Pages/LayoutError500.php similarity index 100% rename from styleguide/Pages/Error500.php rename to styleguide/Pages/LayoutError500.php diff --git a/styleguide/Pages/Flag.php b/styleguide/Pages/LayoutFlag.php similarity index 100% rename from styleguide/Pages/Flag.php rename to styleguide/Pages/LayoutFlag.php diff --git a/styleguide/Pages/FooterContactFour.php b/styleguide/Pages/LayoutFooterContactFour.php similarity index 100% rename from styleguide/Pages/FooterContactFour.php rename to styleguide/Pages/LayoutFooterContactFour.php diff --git a/styleguide/Pages/FooterContactOne.php b/styleguide/Pages/LayoutFooterContactOne.php similarity index 100% rename from styleguide/Pages/FooterContactOne.php rename to styleguide/Pages/LayoutFooterContactOne.php diff --git a/styleguide/Pages/FooterContactThree.php b/styleguide/Pages/LayoutFooterContactThree.php similarity index 100% rename from styleguide/Pages/FooterContactThree.php rename to styleguide/Pages/LayoutFooterContactThree.php diff --git a/styleguide/Pages/FooterContactTwo.php b/styleguide/Pages/LayoutFooterContactTwo.php similarity index 100% rename from styleguide/Pages/FooterContactTwo.php rename to styleguide/Pages/LayoutFooterContactTwo.php diff --git a/styleguide/Pages/HeaderTitleDouble.php b/styleguide/Pages/LayoutHeaderTitleDouble.php similarity index 100% rename from styleguide/Pages/HeaderTitleDouble.php rename to styleguide/Pages/LayoutHeaderTitleDouble.php diff --git a/styleguide/Pages/HeaderTitleSingle.php b/styleguide/Pages/LayoutHeaderTitleSingle.php similarity index 100% rename from styleguide/Pages/HeaderTitleSingle.php rename to styleguide/Pages/LayoutHeaderTitleSingle.php diff --git a/styleguide/Pages/MenuExternal.php b/styleguide/Pages/LayoutMenuExternal.php similarity index 100% rename from styleguide/Pages/MenuExternal.php rename to styleguide/Pages/LayoutMenuExternal.php diff --git a/styleguide/Pages/MenuLeft.php b/styleguide/Pages/LayoutMenuLeft.php similarity index 100% rename from styleguide/Pages/MenuLeft.php rename to styleguide/Pages/LayoutMenuLeft.php diff --git a/styleguide/Pages/MenuTop.php b/styleguide/Pages/LayoutMenuTop.php similarity index 78% rename from styleguide/Pages/MenuTop.php rename to styleguide/Pages/LayoutMenuTop.php index b27e8d4f..788cdbeb 100644 --- a/styleguide/Pages/MenuTop.php +++ b/styleguide/Pages/LayoutMenuTop.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class MenuTop extends Page +class LayoutMenuTop extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'MenuTopController', + 'controller' => 'LayoutMenuTopController', 'title' => 'Menu top', 'id' => 103100101, ], diff --git a/styleguide/Pages/NoMenu.php b/styleguide/Pages/LayoutNoMenu.php similarity index 100% rename from styleguide/Pages/NoMenu.php rename to styleguide/Pages/LayoutNoMenu.php diff --git a/styleguide/Pages/ChildpageWithComponents.php b/styleguide/Pages/TemplateChildpageWithComponents.php similarity index 100% rename from styleguide/Pages/ChildpageWithComponents.php rename to styleguide/Pages/TemplateChildpageWithComponents.php diff --git a/styleguide/Pages/ContactTables.php b/styleguide/Pages/TemplateContactTables.php similarity index 100% rename from styleguide/Pages/ContactTables.php rename to styleguide/Pages/TemplateContactTables.php diff --git a/styleguide/Pages/ContactTablesNoTOC.php b/styleguide/Pages/TemplateContactTablesNoTOC.php similarity index 100% rename from styleguide/Pages/ContactTablesNoTOC.php rename to styleguide/Pages/TemplateContactTablesNoTOC.php diff --git a/styleguide/Pages/Directory.php b/styleguide/Pages/TemplateDirectory.php similarity index 100% rename from styleguide/Pages/Directory.php rename to styleguide/Pages/TemplateDirectory.php diff --git a/styleguide/Pages/DirectoryOrdered.php b/styleguide/Pages/TemplateDirectoryOrdered.php similarity index 100% rename from styleguide/Pages/DirectoryOrdered.php rename to styleguide/Pages/TemplateDirectoryOrdered.php diff --git a/styleguide/Pages/Fullwidth.php b/styleguide/Pages/TemplateFullwidth.php similarity index 100% rename from styleguide/Pages/Fullwidth.php rename to styleguide/Pages/TemplateFullwidth.php diff --git a/styleguide/Pages/Homepage.php b/styleguide/Pages/TemplateHomepage.php similarity index 100% rename from styleguide/Pages/Homepage.php rename to styleguide/Pages/TemplateHomepage.php diff --git a/styleguide/Views/styleguide-basic-layouts.blade.php b/styleguide/Views/styleguide-cms-basic-layouts.blade.php similarity index 100% rename from styleguide/Views/styleguide-basic-layouts.blade.php rename to styleguide/Views/styleguide-cms-basic-layouts.blade.php diff --git a/styleguide/Views/styleguide-buttons.blade.php b/styleguide/Views/styleguide-cms-buttons.blade.php similarity index 100% rename from styleguide/Views/styleguide-buttons.blade.php rename to styleguide/Views/styleguide-cms-buttons.blade.php diff --git a/styleguide/Views/styleguide-colors.blade.php b/styleguide/Views/styleguide-cms-colors.blade.php similarity index 100% rename from styleguide/Views/styleguide-colors.blade.php rename to styleguide/Views/styleguide-cms-colors.blade.php diff --git a/styleguide/Views/styleguide-figure.blade.php b/styleguide/Views/styleguide-cms-figure.blade.php similarity index 100% rename from styleguide/Views/styleguide-figure.blade.php rename to styleguide/Views/styleguide-cms-figure.blade.php diff --git a/styleguide/Views/styleguide-forms-error.blade.php b/styleguide/Views/styleguide-cms-forms-error.blade.php similarity index 100% rename from styleguide/Views/styleguide-forms-error.blade.php rename to styleguide/Views/styleguide-cms-forms-error.blade.php diff --git a/styleguide/Views/styleguide-forms.blade.php b/styleguide/Views/styleguide-cms-forms.blade.php similarity index 100% rename from styleguide/Views/styleguide-forms.blade.php rename to styleguide/Views/styleguide-cms-forms.blade.php diff --git a/styleguide/Views/styleguide-heading-styles.blade.php b/styleguide/Views/styleguide-cms-heading-styles.blade.php similarity index 100% rename from styleguide/Views/styleguide-heading-styles.blade.php rename to styleguide/Views/styleguide-cms-heading-styles.blade.php diff --git a/styleguide/Views/styleguide-tables.blade.php b/styleguide/Views/styleguide-cms-tables.blade.php similarity index 100% rename from styleguide/Views/styleguide-tables.blade.php rename to styleguide/Views/styleguide-cms-tables.blade.php diff --git a/styleguide/Views/styleguide-video.blade.php b/styleguide/Views/styleguide-cms-video.blade.php similarity index 100% rename from styleguide/Views/styleguide-video.blade.php rename to styleguide/Views/styleguide-cms-video.blade.php diff --git a/styleguide/Views/styleguide-button-set.blade.php b/styleguide/Views/styleguide-component-buttons.blade.php similarity index 53% rename from styleguide/Views/styleguide-button-set.blade.php rename to styleguide/Views/styleguide-component-buttons.blade.php index 98f5f48e..21146e5a 100644 --- a/styleguide/Views/styleguide-button-set.blade.php +++ b/styleguide/Views/styleguide-component-buttons.blade.php @@ -21,27 +21,6 @@

-

Best use cases for buttons

-

Call-to-Action (CTA) buttons

-
    -
  • Purpose: Encourage specific actions from users. -
  • Examples: "Apply now," "Request information," "Speak with an advisor," etc. -
  • Placement: CTAs are most effective on landing pages and frequently visited sections with important information. -
-

Under-menu button column

-
    -
  • Purpose: Facilitate easy navigation to pages not within one step of the menu or to resources not within the website but relevant to the page content.
  • -
  • Examples: "Schedule appointment" "Make a payment," "Check application status," "Program requirements" etc.
  • -
  • Note: On mobile, the under-menu buttons are inserted beneath the first paragraph.
  • -
- -

Guidelines for button usage

-
    -
  • Consistency: Ensure a consistent button design and placement across the website.
  • -
  • Button styling: We have multiple button styles. Make sure to not mix button styles in one setting to maintain a consistent visual appearance across the website. Jump to button appearance examples to see how to configure buttons in a promotion group.
  • -
  • Accessibility: Buttons should have sufficient color contrast and visual clarity to accommodate users with visual impairments. This ensures that button text and graphics are easily distinguishable from the background. The button styles we offer meet these requirements.
  • -
-

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. diff --git a/styleguide/Views/styleguide-using-components.blade.php b/styleguide/Views/styleguide-component-guide.blade.php similarity index 100% rename from styleguide/Views/styleguide-using-components.blade.php rename to styleguide/Views/styleguide-component-guide.blade.php diff --git a/styleguide/Views/styleguide-promo-column.blade.php b/styleguide/Views/styleguide-component-promo-column.blade.php similarity index 100% rename from styleguide/Views/styleguide-promo-column.blade.php rename to styleguide/Views/styleguide-component-promo-column.blade.php diff --git a/styleguide/menu.json b/styleguide/menu.json index b33212ee..7df9afe0 100644 --- a/styleguide/menu.json +++ b/styleguide/menu.json @@ -25,7 +25,7 @@ "target": "", "display_name": "Basic layouts", "class_name": "", - "relative_url": "/styleguide/basiclayouts", + "relative_url": "/styleguide/cms/basiclayouts", "submenu": [] }, "100900": { @@ -35,7 +35,7 @@ "target": "", "display_name": "Heading styles", "class_name": "", - "relative_url": "/styleguide/headingstyles", + "relative_url": "/styleguide/cms/headingstyles", "submenu": [] }, "100400": { @@ -45,7 +45,7 @@ "target": "", "display_name": "Buttons", "class_name": "", - "relative_url": "/styleguide/buttons", + "relative_url": "/styleguide/cms/buttons", "submenu": [] }, "117100": { @@ -55,7 +55,7 @@ "target": "", "display_name": "Video", "class_name": "", - "relative_url": "/styleguide/video", + "relative_url": "/styleguide/cms/video", "submenu": [] }, "113100": { @@ -65,7 +65,7 @@ "target": "", "display_name": "Tables", "class_name": "", - "relative_url": "/styleguide/tables", + "relative_url": "/styleguide/cms/tables", "submenu": [] }, "115100": { @@ -75,7 +75,7 @@ "target": "", "display_name": "Figure", "class_name": "", - "relative_url": "/styleguide/figure", + "relative_url": "/styleguide/cms/figure", "submenu": [] }, "111100": { @@ -85,7 +85,7 @@ "target": "", "display_name": "Forms", "class_name": "", - "relative_url": "/styleguide/forms", + "relative_url": "/styleguide/cms/forms", "submenu": { "111100100": { "menu_item_id": 111100100, @@ -94,7 +94,7 @@ "target": "", "display_name": "Forms", "class_name": "", - "relative_url": "/styleguide/forms", + "relative_url": "/styleguide/cms/forms", "submenu": [] }, "111100101": { @@ -104,7 +104,7 @@ "target": "", "display_name": "Form Errors", "class_name": "", - "relative_url": "/styleguide/forms/error", + "relative_url": "/styleguide/cms/forms/error", "submenu": [] }, "111100102": { @@ -114,7 +114,7 @@ "target": "", "display_name": "Form Slate", "class_name": "", - "relative_url": "/styleguide/forms/slate", + "relative_url": "/styleguide/cms/forms/slate", "submenu": [] } } @@ -126,7 +126,7 @@ "target": "", "display_name": "Colors", "class_name": "", - "relative_url": "/styleguide/colors", + "relative_url": "/styleguide/cms/colors", "submenu": [] } } @@ -138,7 +138,7 @@ "target": "", "display_name": "Components", "class_name": "", - "relative_url": "/styleguide/usingcomponents", + "relative_url": "/styleguide/component/guide", "submenu": { "101110600": { "menu_item_id": 101110600, @@ -147,7 +147,7 @@ "target": "", "display_name": "Using components", "class_name": "", - "relative_url": "/styleguide/usingcomponents", + "relative_url": "/styleguide/component/guide", "submenu": [] }, "107100": { @@ -157,7 +157,7 @@ "target": "", "display_name": "Accordion", "class_name": "", - "relative_url": "/styleguide/accordion", + "relative_url": "/styleguide/component/accordion", "submenu": [] }, "114100": { @@ -167,7 +167,7 @@ "target": "", "display_name": "Buttons", "class_name": "", - "relative_url": "/styleguide/buttonset", + "relative_url": "/styleguide/component/buttons", "submenu": [] }, "118100": { @@ -177,7 +177,7 @@ "target": "", "display_name": "Catalog", "class_name": "", - "relative_url": "/styleguide/catalog", + "relative_url": "/styleguide/component/catalog", "submenu": [] }, "109100": { @@ -187,7 +187,7 @@ "target": "", "display_name": "Event listing", "class_name": "", - "relative_url": "/styleguide/eventlisting", + "relative_url": "/styleguide/component/eventlisting", "submenu": [] }, "122100": { @@ -197,7 +197,7 @@ "target": "", "display_name": "Heading", "class_name": "", - "relative_url": "/styleguide/headingcomponent", + "relative_url": "/styleguide/component/heading", "submenu": [] }, "105100": { @@ -207,7 +207,7 @@ "target": "", "display_name": "Hero image", "class_name": "", - "relative_url": "/styleguide/hero/bannersmall", + "relative_url": "/styleguide/component/hero/bannersmall", "submenu": { "105100108": { "menu_item_id": 105100108, @@ -216,7 +216,7 @@ "target": "", "display_name": "Banner small", "class_name": "", - "relative_url": "/styleguide/hero/bannersmall", + "relative_url": "/styleguide/component/hero/bannersmall", "submenu": [] }, "105100103": { @@ -226,7 +226,7 @@ "target": "", "display_name": "Banner large", "class_name": "", - "relative_url": "/styleguide/hero/bannerlarge", + "relative_url": "/styleguide/component/hero/bannerlarge", "submenu": [] }, "105100104": { @@ -236,7 +236,7 @@ "target": "", "display_name": "Carousel", "class_name": "", - "relative_url": "/styleguide/hero/carousel", + "relative_url": "/styleguide/component/hero/carousel", "submenu": [] }, "105100105": { @@ -246,7 +246,7 @@ "target": "", "display_name": "Text overlay", "class_name": "", - "relative_url": "/styleguide/hero/textoverlay", + "relative_url": "/styleguide/component/hero/textoverlay", "submenu": [] }, "105100106": { @@ -256,7 +256,7 @@ "target": "", "display_name": "SVG overlay", "class_name": "", - "relative_url": "/styleguide/hero/svgoverlay", + "relative_url": "/styleguide/component/hero/svgoverlay", "submenu": [] }, "105100107": { @@ -266,7 +266,7 @@ "target": "", "display_name": "Logo overlay", "class_name": "", - "relative_url": "/styleguide/hero/logooverlay", + "relative_url": "/styleguide/component/hero/logooverlay", "submenu": [] }, "105100109": { @@ -276,7 +276,7 @@ "target": "", "display_name": "Half", "class_name": "", - "relative_url": "/styleguide/hero/half", + "relative_url": "/styleguide/component/hero/half", "submenu": [] } } @@ -288,7 +288,7 @@ "target": "", "display_name": "Icons", "class_name": "", - "relative_url": "/styleguide/iconscomponent", + "relative_url": "/styleguide/component/icons", "submenu": [] }, "123100": { @@ -298,7 +298,7 @@ "target": "", "display_name": "Page content", "class_name": "", - "relative_url": "/styleguide/components/pagecontent", + "relative_url": "/styleguide/component/pagecontent", "submenu": [] }, "108100": { @@ -308,7 +308,7 @@ "target": "", "display_name": "News listing", "class_name": "", - "relative_url": "/styleguide/articlelisting", + "relative_url": "/styleguide/component/articlelisting", "submenu": [] }, "116100": { @@ -318,7 +318,7 @@ "target": "", "display_name": "Single promo", "class_name": "", - "relative_url": "/styleguide/singlepromo", + "relative_url": "/styleguide/component/singlepromo", "submenu": [] }, "119100": { @@ -328,7 +328,7 @@ "target": "", "display_name": "Spotlight", "class_name": "", - "relative_url": "/styleguide/spotlightcomponent", + "relative_url": "/styleguide/component/spotlight", "submenu": [] } } From c8d9b188bbad428049d51fcfc48edb6f6092e041 Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Tue, 30 Apr 2024 17:55:05 -0400 Subject: [PATCH 06/14] chore: continuing to organize component files --- .../Http/Controllers/CMSColorsController.php | 2 +- .../Http/Controllers/CMSFigureController.php | 2 +- .../Http/Controllers/CMSFormsController.php | 2 +- .../Controllers/CMSFormsErrorController.php | 2 +- .../CMSHeadingStylesController.php | 2 +- .../Http/Controllers/CMSTablesController.php | 2 +- .../Http/Controllers/CMSVideoController.php | 2 +- ... => ChildpageWithComponentsController.php} | 0 .../ComponentAccordionController.php | 18 +------- ...roller.php => ComponentFlagController.php} | 2 +- .../Controllers/ComponentGuideController.php | 2 +- ...3Controller.php => Error403Controller.php} | 0 ...4Controller.php => Error404Controller.php} | 0 ...0Controller.php => Error500Controller.php} | 0 ...Controller.php => FullWidthController.php} | 0 .../LayoutFooterContactFourController.php | 2 +- .../LayoutFooterContactOneController.php | 2 +- .../LayoutFooterContactThreeController.php | 2 +- .../LayoutFooterContactTwoController.php | 2 +- .../LayoutHeaderTitleDoubleController.php | 2 +- .../LayoutHeaderTitleSingleController.php | 2 +- .../Controllers/LayoutMenuLeftController.php | 2 +- ...onents.php => ChildpageWithComponents.php} | 0 .../{LayoutFlag.php => ComponentFlag.php} | 4 +- ...ateContactTables.php => ContactTables.php} | 0 ...TablesNoTOC.php => ContactTablesNoTOC.php} | 0 .../{TemplateDirectory.php => Directory.php} | 0 ...ectoryOrdered.php => DirectoryOrdered.php} | 0 .../Pages/{LayoutError.php => Error.php} | 0 .../{LayoutError403.php => Error403.php} | 0 .../{LayoutError404.php => Error404.php} | 0 .../{LayoutError500.php => Error500.php} | 0 .../{TemplateFullwidth.php => Fullwidth.php} | 0 .../{TemplateHomepage.php => Homepage.php} | 0 styleguide/Pages/LayoutFooterContactFour.php | 4 +- styleguide/Pages/LayoutFooterContactOne.php | 4 +- styleguide/Pages/LayoutFooterContactThree.php | 4 +- styleguide/Pages/LayoutFooterContactTwo.php | 4 +- styleguide/Pages/LayoutHeaderTitleDouble.php | 4 +- styleguide/Pages/LayoutHeaderTitleSingle.php | 4 +- styleguide/Pages/LayoutMenuExternal.php | 4 +- styleguide/Pages/LayoutMenuLeft.php | 4 +- styleguide/Pages/LayoutNoMenu.php | 4 +- styleguide/menu.json | 46 +++++++++---------- 44 files changed, 60 insertions(+), 76 deletions(-) rename styleguide/Http/Controllers/{TemplateChildpageWithComponentsController.php => ChildpageWithComponentsController.php} (100%) rename styleguide/Http/Controllers/{LayoutFlagController.php => ComponentFlagController.php} (89%) rename styleguide/Http/Controllers/{LayoutError403Controller.php => Error403Controller.php} (100%) rename styleguide/Http/Controllers/{LayoutError404Controller.php => Error404Controller.php} (100%) rename styleguide/Http/Controllers/{LayoutError500Controller.php => Error500Controller.php} (100%) rename styleguide/Http/Controllers/{TemplateFullWidthController.php => FullWidthController.php} (100%) rename styleguide/Pages/{TemplateChildpageWithComponents.php => ChildpageWithComponents.php} (100%) rename styleguide/Pages/{LayoutFlag.php => ComponentFlag.php} (78%) rename styleguide/Pages/{TemplateContactTables.php => ContactTables.php} (100%) rename styleguide/Pages/{TemplateContactTablesNoTOC.php => ContactTablesNoTOC.php} (100%) rename styleguide/Pages/{TemplateDirectory.php => Directory.php} (100%) rename styleguide/Pages/{TemplateDirectoryOrdered.php => DirectoryOrdered.php} (100%) rename styleguide/Pages/{LayoutError.php => Error.php} (100%) rename styleguide/Pages/{LayoutError403.php => Error403.php} (100%) rename styleguide/Pages/{LayoutError404.php => Error404.php} (100%) rename styleguide/Pages/{LayoutError500.php => Error500.php} (100%) rename styleguide/Pages/{TemplateFullwidth.php => Fullwidth.php} (100%) rename styleguide/Pages/{TemplateHomepage.php => Homepage.php} (100%) diff --git a/styleguide/Http/Controllers/CMSColorsController.php b/styleguide/Http/Controllers/CMSColorsController.php index 523c782b..27617dcb 100644 --- a/styleguide/Http/Controllers/CMSColorsController.php +++ b/styleguide/Http/Controllers/CMSColorsController.php @@ -13,6 +13,6 @@ class CMSColorsController extends Controller */ public function index(Request $request): View { - return view('styleguide-colors', merge($request->data)); + return view('styleguide-cms-colors', merge($request->data)); } } diff --git a/styleguide/Http/Controllers/CMSFigureController.php b/styleguide/Http/Controllers/CMSFigureController.php index 24643d6e..8239cfec 100644 --- a/styleguide/Http/Controllers/CMSFigureController.php +++ b/styleguide/Http/Controllers/CMSFigureController.php @@ -22,6 +22,6 @@ public function __construct(Factory $faker) */ public function index(Request $request): View { - return view('styleguide-figure', merge($request->data, $this->faker)); + return view('styleguide-cms-figure', merge($request->data, $this->faker)); } } diff --git a/styleguide/Http/Controllers/CMSFormsController.php b/styleguide/Http/Controllers/CMSFormsController.php index 20f58cc3..289866cd 100644 --- a/styleguide/Http/Controllers/CMSFormsController.php +++ b/styleguide/Http/Controllers/CMSFormsController.php @@ -13,6 +13,6 @@ class CMSFormsController extends Controller */ public function index(Request $request): View { - return view('styleguide-forms', merge($request->data)); + return view('styleguide-cms-forms', merge($request->data)); } } diff --git a/styleguide/Http/Controllers/CMSFormsErrorController.php b/styleguide/Http/Controllers/CMSFormsErrorController.php index b4aa73f8..a55620c9 100644 --- a/styleguide/Http/Controllers/CMSFormsErrorController.php +++ b/styleguide/Http/Controllers/CMSFormsErrorController.php @@ -13,6 +13,6 @@ class CMSFormsErrorController extends Controller */ public function index(Request $request): View { - return view('styleguide-forms-error', merge($request->data)); + return view('styleguide-cms-forms-error', merge($request->data)); } } diff --git a/styleguide/Http/Controllers/CMSHeadingStylesController.php b/styleguide/Http/Controllers/CMSHeadingStylesController.php index 6561aa43..d79dfee4 100644 --- a/styleguide/Http/Controllers/CMSHeadingStylesController.php +++ b/styleguide/Http/Controllers/CMSHeadingStylesController.php @@ -22,6 +22,6 @@ public function __construct(Factory $faker) */ public function index(Request $request): View { - return view('styleguide-heading-styles', merge($request->data, $this->faker)); + return view('styleguide-cms-heading-styles', merge($request->data, $this->faker)); } } diff --git a/styleguide/Http/Controllers/CMSTablesController.php b/styleguide/Http/Controllers/CMSTablesController.php index ccf1c44a..2f64f45c 100644 --- a/styleguide/Http/Controllers/CMSTablesController.php +++ b/styleguide/Http/Controllers/CMSTablesController.php @@ -22,6 +22,6 @@ public function __construct(Factory $faker) */ public function index(Request $request): View { - return view('styleguide-tables', merge($request->data, $this->faker)); + return view('styleguide-cms-tables', merge($request->data, $this->faker)); } } diff --git a/styleguide/Http/Controllers/CMSVideoController.php b/styleguide/Http/Controllers/CMSVideoController.php index 42d33983..23b06f32 100644 --- a/styleguide/Http/Controllers/CMSVideoController.php +++ b/styleguide/Http/Controllers/CMSVideoController.php @@ -16,6 +16,6 @@ public function index(Request $request): View { $promos['video'] = app(Video::class)->create(1, true); - return view('styleguide-video', merge($request->data, $promos)); + return view('styleguide-cms-video', merge($request->data, $promos)); } } diff --git a/styleguide/Http/Controllers/TemplateChildpageWithComponentsController.php b/styleguide/Http/Controllers/ChildpageWithComponentsController.php similarity index 100% rename from styleguide/Http/Controllers/TemplateChildpageWithComponentsController.php rename to styleguide/Http/Controllers/ChildpageWithComponentsController.php diff --git a/styleguide/Http/Controllers/ComponentAccordionController.php b/styleguide/Http/Controllers/ComponentAccordionController.php index b996d336..61e1deb4 100644 --- a/styleguide/Http/Controllers/ComponentAccordionController.php +++ b/styleguide/Http/Controllers/ComponentAccordionController.php @@ -15,23 +15,7 @@ class ComponentAccordionController extends Controller public function index(Request $request): View { $request->data['base']['page']['content']['main'] = ' -

Accordions are helpful for pages where a person needs to scan a number of (more than 8) headings and choosing a single item to get information. If there is a need to directly link to this one item or for someone to print a single item, an accordion is not helpful. Accordions may shorten pages and reduce scrolling, but they increase the time and effort spent by requiring people to select various topic headings in order to locate the information they need.

-

Accordions should be treated as a last resort, if and only if the content meets ALL of the following criteria.

-
    -
  1. The list has more than five to eight items on it.
  2. -
  3. The user would be scanning the list for one, at max two, items.
  4. -
  5. Opening the accordion reveals the content of 1-2 paragraphs, no more.
  6. -
  7. The content in the accordions does not need to be linked to (no deep-linking).
  8. -
-

If there are more than five to eight headings, consider using a table of contents that anchors/links to each heading.

-

Having all the content on the screen provides a better user experience, allowing users to:

-
    -
  • reference multiple pieces of information at once
  • -
  • utilize the CTRL+F find on the page
  • -
  • scan headings
  • -
  • determine if they are on the right page without having to take any action (click).
  • -
- +

Accordions are helpful for pages where a person needs to scan a number of (more than 8) headings and choosing a single item to get information.

'; $promotion_group_details = ' diff --git a/styleguide/Http/Controllers/LayoutFlagController.php b/styleguide/Http/Controllers/ComponentFlagController.php similarity index 89% rename from styleguide/Http/Controllers/LayoutFlagController.php rename to styleguide/Http/Controllers/ComponentFlagController.php index 76417eeb..e50240e8 100644 --- a/styleguide/Http/Controllers/LayoutFlagController.php +++ b/styleguide/Http/Controllers/ComponentFlagController.php @@ -7,7 +7,7 @@ use Factories\Flag; use Illuminate\Http\Request; -class FlagController extends Controller +class ComponentFlagController extends Controller { /** * Display the flag at the top of the page. diff --git a/styleguide/Http/Controllers/ComponentGuideController.php b/styleguide/Http/Controllers/ComponentGuideController.php index 1c23d47a..e7050069 100644 --- a/styleguide/Http/Controllers/ComponentGuideController.php +++ b/styleguide/Http/Controllers/ComponentGuideController.php @@ -47,6 +47,6 @@ public function index(Request $request): View ], ]; - return view('styleguide-using-components', merge($request->data, $components)); + return view('styleguide-component-guide', merge($request->data, $components)); } } diff --git a/styleguide/Http/Controllers/LayoutError403Controller.php b/styleguide/Http/Controllers/Error403Controller.php similarity index 100% rename from styleguide/Http/Controllers/LayoutError403Controller.php rename to styleguide/Http/Controllers/Error403Controller.php diff --git a/styleguide/Http/Controllers/LayoutError404Controller.php b/styleguide/Http/Controllers/Error404Controller.php similarity index 100% rename from styleguide/Http/Controllers/LayoutError404Controller.php rename to styleguide/Http/Controllers/Error404Controller.php diff --git a/styleguide/Http/Controllers/LayoutError500Controller.php b/styleguide/Http/Controllers/Error500Controller.php similarity index 100% rename from styleguide/Http/Controllers/LayoutError500Controller.php rename to styleguide/Http/Controllers/Error500Controller.php diff --git a/styleguide/Http/Controllers/TemplateFullWidthController.php b/styleguide/Http/Controllers/FullWidthController.php similarity index 100% rename from styleguide/Http/Controllers/TemplateFullWidthController.php rename to styleguide/Http/Controllers/FullWidthController.php diff --git a/styleguide/Http/Controllers/LayoutFooterContactFourController.php b/styleguide/Http/Controllers/LayoutFooterContactFourController.php index 53956030..b2678d07 100644 --- a/styleguide/Http/Controllers/LayoutFooterContactFourController.php +++ b/styleguide/Http/Controllers/LayoutFooterContactFourController.php @@ -7,7 +7,7 @@ use Factories\FooterContact; use Illuminate\Http\Request; -class FooterContactFourController extends Controller +class LayoutFooterContactFourController extends Controller { /** * Display four column footer view. diff --git a/styleguide/Http/Controllers/LayoutFooterContactOneController.php b/styleguide/Http/Controllers/LayoutFooterContactOneController.php index 984a15b6..c31cdfa8 100644 --- a/styleguide/Http/Controllers/LayoutFooterContactOneController.php +++ b/styleguide/Http/Controllers/LayoutFooterContactOneController.php @@ -7,7 +7,7 @@ use Factories\FooterContact; use Illuminate\Http\Request; -class FooterContactOneController extends Controller +class LayoutFooterContactOneController extends Controller { /** * Display the one column footer view. diff --git a/styleguide/Http/Controllers/LayoutFooterContactThreeController.php b/styleguide/Http/Controllers/LayoutFooterContactThreeController.php index b052403f..ff74503d 100644 --- a/styleguide/Http/Controllers/LayoutFooterContactThreeController.php +++ b/styleguide/Http/Controllers/LayoutFooterContactThreeController.php @@ -7,7 +7,7 @@ use Factories\FooterContact; use Illuminate\Http\Request; -class FooterContactThreeController extends Controller +class LayoutFooterContactThreeController extends Controller { /** * Display three column footer view. diff --git a/styleguide/Http/Controllers/LayoutFooterContactTwoController.php b/styleguide/Http/Controllers/LayoutFooterContactTwoController.php index 2d7c4c19..889f25fe 100644 --- a/styleguide/Http/Controllers/LayoutFooterContactTwoController.php +++ b/styleguide/Http/Controllers/LayoutFooterContactTwoController.php @@ -7,7 +7,7 @@ use Factories\FooterContact; use Illuminate\Http\Request; -class FooterContactTwoController extends Controller +class LayoutFooterContactTwoController extends Controller { /** * Display the two column footer view. diff --git a/styleguide/Http/Controllers/LayoutHeaderTitleDoubleController.php b/styleguide/Http/Controllers/LayoutHeaderTitleDoubleController.php index 738652fb..9673f57d 100644 --- a/styleguide/Http/Controllers/LayoutHeaderTitleDoubleController.php +++ b/styleguide/Http/Controllers/LayoutHeaderTitleDoubleController.php @@ -7,7 +7,7 @@ use Illuminate\Http\Request; use Faker\Factory; -class HeaderTitleDoubleController extends Controller +class LayoutHeaderTitleDoubleController extends Controller { /** * Construct the controller. diff --git a/styleguide/Http/Controllers/LayoutHeaderTitleSingleController.php b/styleguide/Http/Controllers/LayoutHeaderTitleSingleController.php index 5be67dfb..9f3aac7d 100644 --- a/styleguide/Http/Controllers/LayoutHeaderTitleSingleController.php +++ b/styleguide/Http/Controllers/LayoutHeaderTitleSingleController.php @@ -7,7 +7,7 @@ use Illuminate\Http\Request; use Faker\Factory; -class HeaderTitleSingleController extends Controller +class LayoutHeaderTitleSingleController extends Controller { /** * Construct the controller. diff --git a/styleguide/Http/Controllers/LayoutMenuLeftController.php b/styleguide/Http/Controllers/LayoutMenuLeftController.php index 52f79e34..298939a3 100644 --- a/styleguide/Http/Controllers/LayoutMenuLeftController.php +++ b/styleguide/Http/Controllers/LayoutMenuLeftController.php @@ -6,7 +6,7 @@ use App\Http\Controllers\Controller; use Illuminate\Http\Request; -class MenuLeftController extends Controller +class LayoutMenuLeftController extends Controller { /** * Display menu left view. diff --git a/styleguide/Pages/TemplateChildpageWithComponents.php b/styleguide/Pages/ChildpageWithComponents.php similarity index 100% rename from styleguide/Pages/TemplateChildpageWithComponents.php rename to styleguide/Pages/ChildpageWithComponents.php diff --git a/styleguide/Pages/LayoutFlag.php b/styleguide/Pages/ComponentFlag.php similarity index 78% rename from styleguide/Pages/LayoutFlag.php rename to styleguide/Pages/ComponentFlag.php index d4b4833a..39fd8e40 100644 --- a/styleguide/Pages/LayoutFlag.php +++ b/styleguide/Pages/ComponentFlag.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class Flag extends Page +class ComponentFlag extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'FlagController', + 'controller' => 'ComponentFlagController', 'title' => 'Flag', 'id' => 112100, ], diff --git a/styleguide/Pages/TemplateContactTables.php b/styleguide/Pages/ContactTables.php similarity index 100% rename from styleguide/Pages/TemplateContactTables.php rename to styleguide/Pages/ContactTables.php diff --git a/styleguide/Pages/TemplateContactTablesNoTOC.php b/styleguide/Pages/ContactTablesNoTOC.php similarity index 100% rename from styleguide/Pages/TemplateContactTablesNoTOC.php rename to styleguide/Pages/ContactTablesNoTOC.php diff --git a/styleguide/Pages/TemplateDirectory.php b/styleguide/Pages/Directory.php similarity index 100% rename from styleguide/Pages/TemplateDirectory.php rename to styleguide/Pages/Directory.php diff --git a/styleguide/Pages/TemplateDirectoryOrdered.php b/styleguide/Pages/DirectoryOrdered.php similarity index 100% rename from styleguide/Pages/TemplateDirectoryOrdered.php rename to styleguide/Pages/DirectoryOrdered.php diff --git a/styleguide/Pages/LayoutError.php b/styleguide/Pages/Error.php similarity index 100% rename from styleguide/Pages/LayoutError.php rename to styleguide/Pages/Error.php diff --git a/styleguide/Pages/LayoutError403.php b/styleguide/Pages/Error403.php similarity index 100% rename from styleguide/Pages/LayoutError403.php rename to styleguide/Pages/Error403.php diff --git a/styleguide/Pages/LayoutError404.php b/styleguide/Pages/Error404.php similarity index 100% rename from styleguide/Pages/LayoutError404.php rename to styleguide/Pages/Error404.php diff --git a/styleguide/Pages/LayoutError500.php b/styleguide/Pages/Error500.php similarity index 100% rename from styleguide/Pages/LayoutError500.php rename to styleguide/Pages/Error500.php diff --git a/styleguide/Pages/TemplateFullwidth.php b/styleguide/Pages/Fullwidth.php similarity index 100% rename from styleguide/Pages/TemplateFullwidth.php rename to styleguide/Pages/Fullwidth.php diff --git a/styleguide/Pages/TemplateHomepage.php b/styleguide/Pages/Homepage.php similarity index 100% rename from styleguide/Pages/TemplateHomepage.php rename to styleguide/Pages/Homepage.php diff --git a/styleguide/Pages/LayoutFooterContactFour.php b/styleguide/Pages/LayoutFooterContactFour.php index deb006de..eb458b22 100644 --- a/styleguide/Pages/LayoutFooterContactFour.php +++ b/styleguide/Pages/LayoutFooterContactFour.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class FooterContactFour extends Page +class LayoutFooterContactFour extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'FooterContactFourController', + 'controller' => 'LayoutFooterContactFourController', 'title' => 'Four column', 'id' => 104100103, 'content' => [ diff --git a/styleguide/Pages/LayoutFooterContactOne.php b/styleguide/Pages/LayoutFooterContactOne.php index 4036b942..8ae6c4ca 100644 --- a/styleguide/Pages/LayoutFooterContactOne.php +++ b/styleguide/Pages/LayoutFooterContactOne.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class FooterContactOne extends Page +class LayoutFooterContactOne extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'FooterContactOneController', + 'controller' => 'LayoutFooterContactOneController', 'title' => 'One column', 'id' => 104100100, 'content' => [ diff --git a/styleguide/Pages/LayoutFooterContactThree.php b/styleguide/Pages/LayoutFooterContactThree.php index 81ccc763..05584be2 100644 --- a/styleguide/Pages/LayoutFooterContactThree.php +++ b/styleguide/Pages/LayoutFooterContactThree.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class FooterContactThree extends Page +class LayoutFooterContactThree extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'FooterContactThreeController', + 'controller' => 'LayoutFooterContactThreeController', 'title' => 'Three column', 'id' => 104100102, 'content' => [ diff --git a/styleguide/Pages/LayoutFooterContactTwo.php b/styleguide/Pages/LayoutFooterContactTwo.php index 68c7b93e..635b22b8 100644 --- a/styleguide/Pages/LayoutFooterContactTwo.php +++ b/styleguide/Pages/LayoutFooterContactTwo.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class FooterContactTwo extends Page +class LayoutFooterContactTwo extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'FooterContactTwoController', + 'controller' => 'LayoutFooterContactTwoController', 'title' => 'Two column', 'id' => 104100101, 'content' => [ diff --git a/styleguide/Pages/LayoutHeaderTitleDouble.php b/styleguide/Pages/LayoutHeaderTitleDouble.php index 7289ab02..c8b39da2 100644 --- a/styleguide/Pages/LayoutHeaderTitleDouble.php +++ b/styleguide/Pages/LayoutHeaderTitleDouble.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class HeaderTitleDouble extends Page +class LayoutHeaderTitleDouble extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeaderTitleDoubleController', + 'controller' => 'LayoutHeaderTitleDoubleController', 'title' => 'Header title double', 'id' => 102100101, ], diff --git a/styleguide/Pages/LayoutHeaderTitleSingle.php b/styleguide/Pages/LayoutHeaderTitleSingle.php index 9beeb1af..53c7e6e5 100644 --- a/styleguide/Pages/LayoutHeaderTitleSingle.php +++ b/styleguide/Pages/LayoutHeaderTitleSingle.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class HeaderTitleSingle extends Page +class LayoutHeaderTitleSingle extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'HeaderTitleSingleController', + 'controller' => 'LayoutHeaderTitleSingleController', 'title' => 'Header title single', 'id' => 102100100, ], diff --git a/styleguide/Pages/LayoutMenuExternal.php b/styleguide/Pages/LayoutMenuExternal.php index 202d8496..a62fcebe 100644 --- a/styleguide/Pages/LayoutMenuExternal.php +++ b/styleguide/Pages/LayoutMenuExternal.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class MenuExternal extends Page +class LayoutMenuExternal extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'MenuTopController', + 'controller' => 'LayoutMenuTopController', 'title' => 'External menu icon', 'id' => 103100102, 'content' => [ diff --git a/styleguide/Pages/LayoutMenuLeft.php b/styleguide/Pages/LayoutMenuLeft.php index ff4d4994..3d1f1cda 100644 --- a/styleguide/Pages/LayoutMenuLeft.php +++ b/styleguide/Pages/LayoutMenuLeft.php @@ -4,7 +4,7 @@ use Factories\Page as PageFactory; -class MenuLeft extends Page +class LayoutMenuLeft extends Page { /** * {@inheritdoc} @@ -13,7 +13,7 @@ public function getPageData() { return app(PageFactory::class)->create(1, true, [ 'page' => [ - 'controller' => 'MenuLeftController', + 'controller' => 'LayoutMenuLeftController', 'title' => 'Menu left', 'id' => 103100100, ], diff --git a/styleguide/Pages/LayoutNoMenu.php b/styleguide/Pages/LayoutNoMenu.php index 0dd39657..dc82e378 100644 --- a/styleguide/Pages/LayoutNoMenu.php +++ b/styleguide/Pages/LayoutNoMenu.php @@ -4,10 +4,10 @@ use Factories\Page as PageFactory; -class NoMenu extends Page +class LayoutNoMenu extends Page { /** {@inheritdoc} **/ - public $path = '/styleguide/no/menu'; + public $path = '/styleguide/layout/nomenu'; /** * {@inheritdoc} diff --git a/styleguide/menu.json b/styleguide/menu.json index 7df9afe0..7628f26c 100644 --- a/styleguide/menu.json +++ b/styleguide/menu.json @@ -190,6 +190,16 @@ "relative_url": "/styleguide/component/eventlisting", "submenu": [] }, + "112100": { + "menu_item_id": 112100, + "is_active": 1, + "page_id": 112100, + "target": "", + "display_name": "Flag", + "class_name": "", + "relative_url": "/styleguide/component/flag", + "submenu": [] + }, "122100": { "menu_item_id": 122100, "is_active": 1, @@ -574,7 +584,7 @@ "target": "", "display_name": "Header title", "class_name": "", - "relative_url": "/styleguide/header/title/single", + "relative_url": "/styleguide/layout/header/title/single", "submenu": { "102100100": { "menu_item_id": 102100100, @@ -583,7 +593,7 @@ "target": "", "display_name": "Header title single", "class_name": "", - "relative_url": "/styleguide/header/title/single", + "relative_url": "/styleguide/layout/header/title/single", "submenu": [] }, "102100101": { @@ -593,7 +603,7 @@ "target": "", "display_name": "Header title double", "class_name": "", - "relative_url": "/styleguide/header/title/double/", + "relative_url": "/styleguide/layout/header/title/double/", "submenu": [] } } @@ -605,7 +615,7 @@ "target": "", "display_name": "Menu", "class_name": "", - "relative_url": "/styleguide/menu/left", + "relative_url": "/styleguide/layout/menu/left", "submenu": { "103100100": { "menu_item_id": 103100100, @@ -614,7 +624,7 @@ "target": "", "display_name": "Menu left", "class_name": "", - "relative_url": "/styleguide/menu/left", + "relative_url": "/styleguide/layout/menu/left", "submenu": [] }, "103100101": { @@ -624,7 +634,7 @@ "target": "", "display_name": "Menu top", "class_name": "", - "relative_url": "/styleguide/menu/top", + "relative_url": "/styleguide/layout/menu/top", "submenu": [] }, "103100102": { @@ -634,21 +644,11 @@ "target": "", "display_name": "External icon", "class_name": "external", - "relative_url": "/styleguide/menu/external", + "relative_url": "/styleguide/layout/menu/external", "submenu": [] } } }, - "112100": { - "menu_item_id": 112100, - "is_active": 1, - "page_id": 112100, - "target": "", - "display_name": "Flag", - "class_name": "", - "relative_url": "/styleguide/flag", - "submenu": [] - }, "104100": { "menu_item_id": 104100, "is_active": 1, @@ -656,7 +656,7 @@ "target": "", "display_name": "Footer contact", "class_name": "", - "relative_url": "/styleguide/footer/contact/one", + "relative_url": "/styleguide/layout/footer/contact/one", "submenu": { "104100100": { "menu_item_id": 104100100, @@ -665,7 +665,7 @@ "target": "", "display_name": "One column", "class_name": "", - "relative_url": "/styleguide/footer/contact/one", + "relative_url": "/styleguide/layout/footer/contact/one", "submenu": [] }, "104100101": { @@ -675,7 +675,7 @@ "target": "", "display_name": "Two column", "class_name": "", - "relative_url": "/styleguide/footer/contact/two", + "relative_url": "/styleguide/layout/footer/contact/two", "submenu": [] }, "104100102": { @@ -685,7 +685,7 @@ "target": "", "display_name": "Three column", "class_name": "", - "relative_url": "/styleguide/footer/contact/three", + "relative_url": "/styleguide/layout/footer/contact/three", "submenu": [] }, "104100103": { @@ -695,7 +695,7 @@ "target": "", "display_name": "Four column", "class_name": "", - "relative_url": "/styleguide/footer/contact/four", + "relative_url": "/styleguide/layout/footer/contact/four", "submenu": [] } } @@ -716,7 +716,7 @@ "target": "", "display_name": "Error 403", "class_name": "", - "relative_url": "/styleguide/error/403", + "relative_url": "/styleguide/error403", "submenu": [] }, "106100101": { From 29de969887daee3300438cb232785a83735d187f Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Tue, 30 Apr 2024 23:20:00 -0400 Subject: [PATCH 07/14] feat: Setting up an easier way to provide component details through a specific styleguide accordion --- .../components/accordion-styleguide.blade.php | 73 ++++++++----------- .../ComponentAccordionController.php | 65 ++++------------- 2 files changed, 47 insertions(+), 91 deletions(-) diff --git a/resources/views/components/accordion-styleguide.blade.php b/resources/views/components/accordion-styleguide.blade.php index 1d297ea1..f085d786 100644 --- a/resources/views/components/accordion-styleguide.blade.php +++ b/resources/views/components/accordion-styleguide.blade.php @@ -1,57 +1,48 @@ {{-- $items => array // ['title', 'description'] --}} -
    +
      @foreach($data as $item) -
      - -
      -
      -
      -
      -

      {!! $item['description'] !!}

      +
    • + {{ $item['title'] }} +
      +

      {!! $item['description'] !!}

      - - @if($loop->first) +
      + @if($item['promo_item_id'] === 'componentConfiguration') + + + + @foreach($item as $key => $detail) + @if($key != 'title' && $key != 'description' && $key != 'promo_item_id') + + @endif + @endforeach + + @endif + @if($item['promo_item_id'] === 'promoGroupDetails') + - @foreach($item as $key => $detail) - @if($key != 'title' && $key != 'description') - - @endif - @endforeach - - - @foreach($item as $key => $detail) - @if($key != 'title' && $key != 'description') - - @endif - @endforeach + - @else + + @foreach($item as $key => $detail) + @if($key != 'title' && $key != 'description' && $key != 'promo_item_id') - + + - @foreach($item as $key => $detail) - @if($key != 'title' && $key != 'description') - - - - - @endif - @endforeach - @endif -
      Page field Data
      + {!! $detail !!} +
      {{ $key }}
      {!! $detail !!}Available fields
      Available fields{{ $key }}{!! $detail !!}
      {{ $key }}{!! $detail !!}
      -
      + @endif + @endforeach + @endif +
    • -
      + @endforeach
    diff --git a/styleguide/Http/Controllers/ComponentAccordionController.php b/styleguide/Http/Controllers/ComponentAccordionController.php index 61e1deb4..c0668093 100644 --- a/styleguide/Http/Controllers/ComponentAccordionController.php +++ b/styleguide/Http/Controllers/ComponentAccordionController.php @@ -15,52 +15,7 @@ class ComponentAccordionController extends Controller public function index(Request $request): View { $request->data['base']['page']['content']['main'] = ' -

    Accordions are helpful for pages where a person needs to scan a number of (more than 8) headings and choosing a single item to get information.

    -'; - - $promotion_group_details = ' - - - - - - - - - - - - - - - - -
    Available fields
    TitleText on the closed accordion.
    DescriptionContent when the accordion is clicked open.
    -'; - $component_configuration = ' - - - - - - - - - - - - - -
    Page fieldData
    -
    modular-accordion-1
    -
    -
    -{
    -"id":000000,
    -"heading":"Accordion"
    -}
    -
    -
    +

    Use accordions on pages where a person needs to scan a number of headings and choosing a single item to get information.

    '; $components = [ @@ -69,16 +24,26 @@ public function index(Request $request): View 0 => [ 'promo_item_id' => 'componentConfiguration', 'title' => 'Component configuration', - 'description' => $component_configuration, + 'description' => '', + 'Page field' => 'modular-accordion', + 'Data' => '
    {
    +"id":0000,
    +"heading":"My accordion"
    +}
    ', ], 1 => [ 'promo_item_id' => 'promoGroupDetails', - 'title' => 'Promotion group details', - 'description' => $promotion_group_details, + 'title' => 'Promo group details', + 'description' => '', + 'Title' => 'Text on closed accordion', + 'Description' => 'Content when the accordion is clicked open', + 'Filename' => 'Optional image, variable size', + 'Excerpt' => 'Image caption', + 'Option' => 'Image orientation: Right, Left, Center', ], ], 'component' => [ - 'filename' => 'accordion', + 'filename' => 'accordion-styleguide', ], ], 'accordion-2' => [ From 70c8842bc0051142aa95e1b46b36ff49db0b6431 Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Wed, 1 May 2024 12:52:49 -0400 Subject: [PATCH 08/14] chore: Switching more components over to using the styleguide accordion --- .../components/accordion-styleguide.blade.php | 24 ++-- .../ComponentButtonsController.php | 111 +++++------------- .../ComponentCatalogController.php | 89 ++++---------- .../styleguide-component-buttons.blade.php | 2 +- 4 files changed, 64 insertions(+), 162 deletions(-) diff --git a/resources/views/components/accordion-styleguide.blade.php b/resources/views/components/accordion-styleguide.blade.php index f085d786..bacad426 100644 --- a/resources/views/components/accordion-styleguide.blade.php +++ b/resources/views/components/accordion-styleguide.blade.php @@ -6,9 +6,9 @@
  • {{ $item['title'] }}
    -

    {!! $item['description'] !!}

    + {!! $item['description'] !!} - +
    @if($item['promo_item_id'] === 'componentConfiguration') @@ -16,29 +16,29 @@ - - @foreach($item as $key => $detail) - @if($key != 'title' && $key != 'description' && $key != 'promo_item_id') - + + @foreach($item as $tr => $details) + @if(strpos($tr, 'tr') !== false) + + + + @endif @endforeach - + @endif + @if($item['promo_item_id'] === 'promoGroupDetails') - @foreach($item as $key => $detail) - @if($key != 'title' && $key != 'description' && $key != 'promo_item_id') + @foreach($item['table'] as $key => $detail) - @endif @endforeach @endif
    Data
    - {!! $detail !!} -
    {!! $details['Page field'] !!}
    {!! $details['Data'] !!}
    Available fields
    {{ $key }} {!! $detail !!}
    diff --git a/styleguide/Http/Controllers/ComponentButtonsController.php b/styleguide/Http/Controllers/ComponentButtonsController.php index 2ee94be9..e6ed3407 100644 --- a/styleguide/Http/Controllers/ComponentButtonsController.php +++ b/styleguide/Http/Controllers/ComponentButtonsController.php @@ -26,86 +26,6 @@ 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":"limit:3"
    -}
    -
    -
    -
    modular-button-row-1
    -
    -
    -{
    -"id":000000,
    -"heading":"Buttons",
    -"config":"limit:3",
    -"columns":3
    -}
    -
    -
    '; // Default button @@ -183,16 +103,41 @@ public function index(Request $request): View 2 => [ 'promo_item_id' => 'componentConfiguration', 'title' => 'Component configuration', - 'description' => $component_configuration, + 'description' => '', + 'tr1' => [ + 'Page field' => 'modular-button-column-1', + 'Data' => '{ +"id":000000, +"heading":"Buttons", +"config":"limit:3" +}', + ], + 'tr2' => [ + 'Page field' => 'modular-button-row-1', + 'Data' => '{ +"id":000000, +"heading":"Buttons", +"config":"limit:3", +"columns":3 +}', + ], ], 1 => [ 'promo_item_id' => 'promoGroupDetails', 'title' => 'Promotion group details', - 'description' => $promotion_group_details, + 'description' => '', + 'table' => [ + 'Title' => 'Text to appear on the button.', + 'Link' => 'Your URL. When linking to a pdf, "(pdf)" is added automatically.', + 'Excerpt' => 'Add a 2-3 word second line of text.', + 'Options' => 'Default: Default, Green, Image, Green gradient', + 'Primary image' => 'Icons: 40x40px PNG, SVG
    Images: 600x218px JPG, PNG recommended with descriptive alternative text.
    Text within the image is not allowed; it cannot maintain readability when scaled.', + 'Secondary image' => 'SVG 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' => [ - 'filename' => 'accordion', + 'filename' => 'accordion-styleguide', ], ], 'button_row_1' => [ diff --git a/styleguide/Http/Controllers/ComponentCatalogController.php b/styleguide/Http/Controllers/ComponentCatalogController.php index 8d8bb090..931627ef 100644 --- a/styleguide/Http/Controllers/ComponentCatalogController.php +++ b/styleguide/Http/Controllers/ComponentCatalogController.php @@ -36,22 +36,16 @@ public function index(Request $request): View

    The catalog component is ideal for showcasing a collection of items from a single promo group in a multiple-column grid or single-column list format.

    '; - $component_configuration = ' - - - - - - - - - - - - - -
    Page fieldData
    -
    modular-catalog-1
    -
    -
    -{
    +        $components = [
    +            'accordion' => [
    +                'data' => [
    +                    2 => [
    +                        'promo_item_id' => 'componentConfiguration',
    +                        'title' => 'Component configuration',
    +                        'description' => '

    Image size can only be used with a one-column catalog.

    ', + 'tr1' => [ + 'Page field' => 'modular-catalog-1', + 'Data' => '{ "id":000000, "heading":"Catalog", "config":"randomize|limit:3", @@ -61,62 +55,25 @@ public function index(Request $request): View "showDescription":false, "groupByOptions":false, "gradientOverlay":false, -"imageSize":small -} -
    -
    -'; - $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 catalog component.
    Primary imageMinimum width of 600px jpg, png.
    -'; - - $components = [ - 'accordion' => [ - 'data' => [ - 0 => [ - 'title' => 'Component configuration', - 'promo_item_id' => 'componentConfiguration', - 'description' => $component_configuration, +"imageSize":"small" +}', + ], ], 1 => [ + 'promo_item_id' => 'promoGroupDetails', 'title' => 'Promotion group details', - 'promo_item_id' => 'promotionGroupDetails', - 'description' => $promotion_group_details, + 'description' => '', + 'table' => [ + 'Title' => 'Bold text.', + 'Link' => 'Optional external link. Component flag "singlePromoView" sets the link to the individual promo item view.', + 'Excerpt' => 'Optional 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 image' => 'Minimum width of 600px jpg, png.', + ], ], ], 'component' => [ - 'filename' => 'accordion', + 'filename' => 'accordion-styleguide', ], ], 'catalog-1' => [ diff --git a/styleguide/Views/styleguide-component-buttons.blade.php b/styleguide/Views/styleguide-component-buttons.blade.php index 21146e5a..92bf41d2 100644 --- a/styleguide/Views/styleguide-component-buttons.blade.php +++ b/styleguide/Views/styleguide-component-buttons.blade.php @@ -9,7 +9,7 @@
    - @include('components/accordion', ['data' => $accordion['data'], 'component' => $accordion['component']]) + @include('components/accordion-styleguide', ['data' => $accordion['data'], 'component' => $accordion['component']])

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

    From adcad23958bfa74b73f4ffdbbd25597a5f4c9992 Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Wed, 1 May 2024 14:17:55 -0400 Subject: [PATCH 09/14] feat: Moving and updating the flag back into the components menu --- factories/Flag.php | 4 +- resources/scss/components/_flag.scss | 94 +++++++++++++------ resources/views/components/flag.blade.php | 6 +- resources/views/layouts/main.blade.php | 6 +- .../Controllers/ComponentFlagController.php | 29 +++++- 5 files changed, 98 insertions(+), 41 deletions(-) diff --git a/factories/Flag.php b/factories/Flag.php index 1a89019c..2fff71fa 100644 --- a/factories/Flag.php +++ b/factories/Flag.php @@ -23,9 +23,9 @@ public function create($limit = 1, $flatten = false, $options = []) for ($i = 1; $i <= $limit; $i++) { $data[$i] = [ 'class' => 'flag', - 'title' => 'Make a', + 'title' => 'Make a Gift', 'link' => 'https://wayne.edu', - 'excerpt' => 'Gift', + //'excerpt' => 'Gift', ]; $data[$i] = array_replace_recursive($data[$i], $options); diff --git a/resources/scss/components/_flag.scss b/resources/scss/components/_flag.scss index 6c0eaef6..5d404d29 100644 --- a/resources/scss/components/_flag.scss +++ b/resources/scss/components/_flag.scss @@ -1,41 +1,73 @@ -.flag { - @apply absolute hidden mt:flex z-40 bg-gold text-green-800 hover:text-green-900 items-center justify-center mr-4 right-0 pt-0 duration-500; - - transition-property: height, padding; - width: 140px; - height: 30px; - - // Pointy bottom - &::after { - @apply border-gold absolute duration-500; - - transition-property: top; - border-left-color: transparent; - border-right-color: transparent; - border-style: solid; - border-width: 12px 70px 0; - top: 30px; - content: ""; - left: 0; +.flag__container { + .flag { + &__title { + @apply uppercase text-sm tracking-wide leading-3 relative z-50; + } + + em, + &__excerpt { + @apply normal-case text-xl italic font-serif pl-0.5 leading-3; + } } - &:hover { - @apply duration-500; + &.flag--sm { + @apply mx-4; - transition-property: height, padding; - height: 38px; - padding-top: 8px; + .flag { + @extend .gold-gradient-button; - &::after { - top: 38px; + @apply w-full font-normal mt:hidden; } } - &__title { - @apply uppercase text-sm tracking-wide pt-1.5 pt-1; - } + &.flag--mt { + @apply row relative; + + .flag { + @apply absolute hidden mt:flex z-40 bg-gold text-green-800 hover:text-green-900 items-center justify-center mr-4 right-0 px-2 duration-500; + + transition-property: height, padding; + min-width: 140px; + height: 28px; + + &__container { + @apply row relative; + } - &__excerpt { - @apply normal-case text-xl italic font-serif pt-0.5 pl-1; + // Pointy bottom + &::after { + @apply bg-gold absolute duration-500; + + clip-path: polygon(0 0, 100% 0, 100% 4%, 50% 14%, 0 4%); + //clip-path: polygon(0 0, 100% 0, 100% 12%, 50% 4%, 0 12%); + transition-property: top; + width: 100%; + height: 8rem; + top: 24px; + content: ""; + left: 0; + + /* + @apply border-gold absolute duration-500; + + border-left-color: transparent; + border-right-color: transparent; + border-style: solid; + border-width: 12px 70px 0; + */ + } + + &:hover { + @apply duration-500; + + transition-property: height, padding; + height: 30px; + padding-top: 8px; + + &::after { + top: 28px; + } + } + } } } diff --git a/resources/views/components/flag.blade.php b/resources/views/components/flag.blade.php index 6e75b4ab..4ff97a30 100644 --- a/resources/views/components/flag.blade.php +++ b/resources/views/components/flag.blade.php @@ -1,10 +1,10 @@ {{-- $flag => array // [['title', 'link', 'excerpt']] --}} -
    +
    - {{ $flag['title'] }} - @if($flag['excerpt'] != '') + {!! $flag['title'] !!} + @if(!empty($flag['excerpt'])) {{ $flag['excerpt'] }} @endif diff --git a/resources/views/layouts/main.blade.php b/resources/views/layouts/main.blade.php index 4201c5f4..8a4bd770 100644 --- a/resources/views/layouts/main.blade.php +++ b/resources/views/layouts/main.blade.php @@ -31,7 +31,7 @@ @endif @if(!empty($base['flag'])) - @include('components.flag', ['flag' => $base['flag']]) + @include('components.flag', ['flag' => $base['flag'], 'class' => 'flag--mt']) @endif @@ -67,9 +67,7 @@ @endif @if(!empty($base['flag'])) - + @include('components.flag', ['flag' => $base['flag'], 'class' => 'flag--sm']) @endif @yield('below_menu') diff --git a/styleguide/Http/Controllers/ComponentFlagController.php b/styleguide/Http/Controllers/ComponentFlagController.php index e50240e8..fb50fe04 100644 --- a/styleguide/Http/Controllers/ComponentFlagController.php +++ b/styleguide/Http/Controllers/ComponentFlagController.php @@ -14,8 +14,35 @@ class ComponentFlagController extends Controller */ public function index(Request $request): View { + $request->data['base']['page']['content']['main'] = ' +

    Flag is a global component that cannot be enabled by page field.

    +'; + + $components = [ + 'accordion' => [ + 'data' => [ + 0 => [ + 'promo_item_id' => 'promoGroupDetails', + 'title' => 'Promo group details', + 'description' => '', + 'table' => [ + 'Title' => 'Smaller upercase text', + 'Excerpt' => 'Larger italicized text', + 'Link' => 'URL', + ], + ], + ], + 'component' => [ + 'filename' => 'accordion-styleguide', + ], + ], + ]; + + // Assign components globally + $request->data['base']['components'] = $components; + $request->data['base']['flag'] = app(Flag::class)->create(1, true); - return view('styleguide-childpage', merge($request->data)); + return view('childpage', merge($request->data)); } } From 7f85a656756cba6985f72bad92098b361fe0bdef Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Wed, 1 May 2024 14:18:46 -0400 Subject: [PATCH 10/14] chore: Switching more components over to using the styleguide accordion --- .../components/accordion-styleguide.blade.php | 2 +- .../ComponentAccordionController.php | 22 +++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/resources/views/components/accordion-styleguide.blade.php b/resources/views/components/accordion-styleguide.blade.php index bacad426..ec9ffac7 100644 --- a/resources/views/components/accordion-styleguide.blade.php +++ b/resources/views/components/accordion-styleguide.blade.php @@ -8,7 +8,7 @@
    {!! $item['description'] !!} - +
    @if($item['promo_item_id'] === 'componentConfiguration') diff --git a/styleguide/Http/Controllers/ComponentAccordionController.php b/styleguide/Http/Controllers/ComponentAccordionController.php index c0668093..b6fc1632 100644 --- a/styleguide/Http/Controllers/ComponentAccordionController.php +++ b/styleguide/Http/Controllers/ComponentAccordionController.php @@ -25,21 +25,25 @@ public function index(Request $request): View 'promo_item_id' => 'componentConfiguration', 'title' => 'Component configuration', 'description' => '', - 'Page field' => 'modular-accordion', - 'Data' => '
    {
    -"id":0000,
    +                        'tr1' => [
    +                            'Page field' => 'modular-accordion-1',
    +                            'Data' => '{
    +"id":000000,
     "heading":"My accordion"
    -}
    ', +}', + ], ], 1 => [ 'promo_item_id' => 'promoGroupDetails', 'title' => 'Promo group details', 'description' => '', - 'Title' => 'Text on closed accordion', - 'Description' => 'Content when the accordion is clicked open', - 'Filename' => 'Optional image, variable size', - 'Excerpt' => 'Image caption', - 'Option' => 'Image orientation: Right, Left, Center', + 'table' => [ + 'Title' => 'Text on closed accordion', + 'Description' => 'Content when the accordion is clicked open', + 'Filename' => 'Optional image, variable size', + 'Excerpt' => 'Image caption', + 'Option' => 'Image orientation: Right, Left, Center', + ], ], ], 'component' => [ From a4b1c231610e5b5800edc1d980c459c19261e4a6 Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Wed, 1 May 2024 14:58:50 -0400 Subject: [PATCH 11/14] chore: Switching more components over to using the styleguide accordion --- .../components/accordion-styleguide.blade.php | 2 +- .../ComponentAccordionController.php | 2 +- .../ComponentButtonsController.php | 2 +- .../ComponentCatalogController.php | 2 +- .../Controllers/ComponentFlagController.php | 2 +- .../ComponentHeadingController.php | 35 ++---- .../Controllers/ComponentHeroController.php | 81 +++--------- .../Controllers/ComponentIconsController.php | 119 +++++------------- .../ComponentSinglePromoController.php | 110 ++++------------ .../ComponentSpotlightController.php | 93 ++++---------- 10 files changed, 111 insertions(+), 337 deletions(-) diff --git a/resources/views/components/accordion-styleguide.blade.php b/resources/views/components/accordion-styleguide.blade.php index ec9ffac7..8431399e 100644 --- a/resources/views/components/accordion-styleguide.blade.php +++ b/resources/views/components/accordion-styleguide.blade.php @@ -28,7 +28,7 @@ @endif - @if($item['promo_item_id'] === 'promoGroupDetails') + @if($item['promo_item_id'] === 'promotionGroupDetails') diff --git a/styleguide/Http/Controllers/ComponentAccordionController.php b/styleguide/Http/Controllers/ComponentAccordionController.php index b6fc1632..6fdc2294 100644 --- a/styleguide/Http/Controllers/ComponentAccordionController.php +++ b/styleguide/Http/Controllers/ComponentAccordionController.php @@ -34,7 +34,7 @@ public function index(Request $request): View ], ], 1 => [ - 'promo_item_id' => 'promoGroupDetails', + 'promo_item_id' => 'promotionGroupDetails', 'title' => 'Promo group details', 'description' => '', 'table' => [ diff --git a/styleguide/Http/Controllers/ComponentButtonsController.php b/styleguide/Http/Controllers/ComponentButtonsController.php index e6ed3407..d609ad51 100644 --- a/styleguide/Http/Controllers/ComponentButtonsController.php +++ b/styleguide/Http/Controllers/ComponentButtonsController.php @@ -123,7 +123,7 @@ public function index(Request $request): View ], ], 1 => [ - 'promo_item_id' => 'promoGroupDetails', + 'promo_item_id' => 'promotionGroupDetails', 'title' => 'Promotion group details', 'description' => '', 'table' => [ diff --git a/styleguide/Http/Controllers/ComponentCatalogController.php b/styleguide/Http/Controllers/ComponentCatalogController.php index 931627ef..254b0d7c 100644 --- a/styleguide/Http/Controllers/ComponentCatalogController.php +++ b/styleguide/Http/Controllers/ComponentCatalogController.php @@ -60,7 +60,7 @@ public function index(Request $request): View ], ], 1 => [ - 'promo_item_id' => 'promoGroupDetails', + 'promo_item_id' => 'promotionGroupDetails', 'title' => 'Promotion group details', 'description' => '', 'table' => [ diff --git a/styleguide/Http/Controllers/ComponentFlagController.php b/styleguide/Http/Controllers/ComponentFlagController.php index fb50fe04..2e6c4c0c 100644 --- a/styleguide/Http/Controllers/ComponentFlagController.php +++ b/styleguide/Http/Controllers/ComponentFlagController.php @@ -22,7 +22,7 @@ public function index(Request $request): View 'accordion' => [ 'data' => [ 0 => [ - 'promo_item_id' => 'promoGroupDetails', + 'promo_item_id' => 'promotionGroupDetails', 'title' => 'Promo group details', 'description' => '', 'table' => [ diff --git a/styleguide/Http/Controllers/ComponentHeadingController.php b/styleguide/Http/Controllers/ComponentHeadingController.php index af0a84fe..080bf0c3 100644 --- a/styleguide/Http/Controllers/ComponentHeadingController.php +++ b/styleguide/Http/Controllers/ComponentHeadingController.php @@ -17,42 +17,25 @@ public function index(Request $request): View { $request->data['base']['page']['content']['main'] = '

    Add a page heading that spans an entire row. Suggested to use over two related columns, like an "Events" heading over a promo-column featured image, and an events-column. You would not use this when you can add a heading to an individual component.

    -'; - - $component_configuration = ' -
    Available fields
    - - - - - - - - - - -
    Page fieldData
    -
    modular-heading
    -
    -
    -{
    -"heading": "My heading"
    -}
    -
    -
    '; $components = [ - 'accordion-1' => [ + 'accordion' => [ 'data' => [ 0 => [ 'title' => 'Component configuration', 'promo_item_id' => 'componentConfiguration', - 'description' => $component_configuration, + 'description' => '', + 'tr1' => [ + 'Page field' => 'modular-heading-1', + 'Data' => '{ +"heading":"My heading" +}', + ], ], ], 'component' => [ - 'filename' => 'accordion', + 'filename' => 'accordion-styleguide', ], ], 'heading-1' => [ diff --git a/styleguide/Http/Controllers/ComponentHeroController.php b/styleguide/Http/Controllers/ComponentHeroController.php index 3ff66f52..7e63fd37 100644 --- a/styleguide/Http/Controllers/ComponentHeroController.php +++ b/styleguide/Http/Controllers/ComponentHeroController.php @@ -22,81 +22,36 @@ public function __construct(Factory $faker) */ public function index(Request $request): View { - - $component_configuration = ' - - - - - - - - - - - -
    Page fieldData
    -
    modular-hero-1
    -
    -
    -{
    -"id":0000,
    -"config":"randomize|limit:1"
    -}
    -
    -Note: Any limit above 1 will enable rotate. -
    -'; - - $promotion_group_details = ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    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
    OptionsBanner small, Banner large, Text overlay, Half, Logo overlay, SVG overlay
    '; - $components = [ - 'accordion-1' => [ + 'accordion' => [ 'data' => [ 0 => [ 'title' => 'Component configuration', 'promo_item_id' => 'componentConfiguration', - 'description' => $component_configuration, + 'description' => '

    Note: Any limit above 1 will enable the carousel.

    ', + 'tr1' => [ + 'Page field' => 'modular-hero-1', + 'Data' => '{ +"id":0000, +"config":"randomize|limit:1" +}', + ], ], 1 => [ 'title' => 'Promotion group details', 'promo_item_id' => 'promotionGroupDetails', - 'description' => $promotion_group_details, + 'description' => '', + 'table' => [ + 'Title' => 'Displayed using options "Text overlay," "Logo overlay" and will become a link if link field is used.', + 'Link' => 'URL', + 'Description' => 'Formattable text. If the link field is set, description links will be stripped out.', + 'Filename' => '1600x580px or 3200x1160px saved at low quality', + 'Options' => 'Banner small, Banner large, Text overlay, Half, Logo overlay, SVG overlay', + ], ], ], 'component' => [ - 'filename' => 'accordion', - 'columns' => '4', - 'showDescription' => false, + 'filename' => 'accordion-styleguide', ], ], ]; diff --git a/styleguide/Http/Controllers/ComponentIconsController.php b/styleguide/Http/Controllers/ComponentIconsController.php index 1786c30c..a800e5da 100644 --- a/styleguide/Http/Controllers/ComponentIconsController.php +++ b/styleguide/Http/Controllers/ComponentIconsController.php @@ -27,110 +27,53 @@ public function index(Request $request): View

    Present a list of promotional items accompanied by icons, offering a visually appealing and informative display.

    '; - $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 = ' - - - - - - - - - - - - - - - - - - - - - -
    Page fieldData
    -
    modular-icons-column-1
    -
    -
    -{
    +        $components = [
    +            'accordion' => [
    +                'data' => [
    +                    0 => [
    +                        'title' => 'Component configuration',
    +                        'promo_item_id' => 'componentConfiguration',
    +                        'description' => '',
    +                        'tr1' => [
    +                            'Page field' => 'modular-icons-column-1',
    +                            'Data' => '{
     "id":000000,
     "heading":"Icons column"
    -}
    -
    -
    -
    modular-icons-row-1
    -
    -
    -{
    +}',
    +                        ],
    +                        'tr2' => [
    +                            'Page field' => 'modular-icons-row-1',
    +                            'Data' => '{
     "id":000000,
     "heading":"Icons row",
     "columns":2
    -}
    -
    -
    -
    modular-icons-top-row-1
    -
    -
    -{
    +}',
    +                        ],
    +                        'tr3' => [
    +                            'Page field' => 'modular-icons-top-row-1',
    +                            'Data' => '{
     "id":000000,
     "heading":"Icons top row",
     "columns":4,
     "showDescription":true
    -}
    -
    -
    -'; - - $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, + 'description' => '', + 'table' => [ + 'Title' => 'Bold text.', + 'Link' => 'Optional external link. Component flag "singlePromoView" sets the link to the individual promo item view.', + 'Excerpt' => 'Optional 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 component.', + 'Primary image' => 'Minimum width of 160px svg, png, jpg.', + ], ], ], 'component' => [ - 'filename' => 'accordion', - 'showDescription' => false, + 'filename' => 'accordion-styleguide', ], ], 'icons-column-1' => [ diff --git a/styleguide/Http/Controllers/ComponentSinglePromoController.php b/styleguide/Http/Controllers/ComponentSinglePromoController.php index d39398a3..5c0a9e46 100644 --- a/styleguide/Http/Controllers/ComponentSinglePromoController.php +++ b/styleguide/Http/Controllers/ComponentSinglePromoController.php @@ -25,60 +25,16 @@ public function index(Request $request): View { $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 = ' - - - - - - - - - - - - - - - - - -
    Page fieldData
    -
    modular-promo-column-1
    -
    -
    -{
    +        $components = [
    +            'accordion' => [
    +                'data' => [
    +                    0 => [
    +                        'title' => 'Component configuration',
    +                        'promo_item_id' => 'componentConfiguration',
    +                        'description' => '',
    +                        'tr1' => [
    +                            'Page field' => 'modular-promo-column-1',
    +                            'Data' => '{
     "id":000000,
     "heading":"Promo column",
     "config":"randomize|limit:1|youtube",
    @@ -86,48 +42,36 @@ public function index(Request $request): View
     "showExcerpt":true,
     "showDescription":false,
     "gradientOverlay":false
    -}
    -
    -
    -
    modular-promo-row-1
    -
    -
    -{
    +}',
    +                        ],
    +                        'tr2' => [
    +                            'Page field' => 'modular-promo-row-1',
    +                            'Data' => '{
     "id":000000,
     "heading":"Promo row",
     "config":"randomize|limit:1|youtube",
     "singlePromoView":true,
     "showExcerpt":true,
     "showDescription":false,
    -"imagePosition":alternate,
    -}
    -
    -
    -'; - - $components = [ - 'accordion' => [ - 'data' => [ - 0 => [ - 'title' => 'Component configuration', - 'promo_item_id' => 'componentConfiguration', - 'description' => $component_configuration, +"imagePosition":"alternate" +}', + ], ], 1 => [ 'title' => 'Promotion group details', 'promo_item_id' => 'promotionGroupDetails', - 'description' => $promotion_group_details, + 'description' => '', + 'table' => [ + 'Title' => 'Bold text.', + 'Link' => 'Optional external link.
    Component flag "singlePromoView" sets the link to the individual promo item view.', + 'Excerpt' => 'Optional 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 image' => 'Minimum width of 600px jpg, png.', + ], ], ], 'component' => [ - 'filename' => 'accordion', + 'filename' => 'accordion-styleguide', ], ], 'promo-column-1' => [ diff --git a/styleguide/Http/Controllers/ComponentSpotlightController.php b/styleguide/Http/Controllers/ComponentSpotlightController.php index 9f5ba1c5..506a8715 100644 --- a/styleguide/Http/Controllers/ComponentSpotlightController.php +++ b/styleguide/Http/Controllers/ComponentSpotlightController.php @@ -25,75 +25,6 @@ public function __construct(Factory $faker) public function index(Request $request): View { $request->data['base']['page']['content']['main'] = ' -

    Utilize a spotlight to highlight a compelling quote from a student, a prominent figure within the university or an influential source.

    -

    Content placement and timing

    -
      -
    • Strategic placement: Determine strategic placement within the webpage layout, perhaps near the top of a landing page or within a prominent section that receives high traffic.
    • -
    • Rotational or static display: You may choose to have a many spotlights in rotation, or a static spotlight if the highlighted content doesn\'t frequently change.
    • -
    - -'; - - $promotion_group_details = ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Available fields
    TitleDisplays as a cited name below the quote.
    LinkOptional external link. Component flag "singlePromoView" sets the link to the individual promo item view.
    ExcerptMain quote area by default. If component flag "showDescription" is set to true, excerpt can display underneath the name like a degree or job title.
    Accepts only these html entities: &ldquo;&rdquo;<em><strong><br />.
    DescriptionCan be used as the quote area if the component flag "showDescription" is set to true.
    FilenamePrimary 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|limit:1",
    -"singlePromoView":false,
    -"showDescription":false
    -}
    -
    -
    '; $components = [ @@ -102,16 +33,34 @@ public function index(Request $request): View 0 => [ 'title' => 'Component configuration', 'promo_item_id' => 'componentConfiguration', - 'description' => $component_configuration, + 'description' => '', + 'tr1' => [ + 'Page field' => 'modular-spotlight-column-1
    modular-spotlight-row-1',
    +                            'Data' => '{
    +"id":000000,
    +"heading":"Spotlight",
    +"config":"randomize|limit:1",
    +"singlePromoView":false,
    +"showDescription":false
    +}',
    +                        ],
                         ],
                         1 => [
                             'title' => 'Promotion group details',
                             'promo_item_id' => 'promotionGroupDetails',
    -                        'description' => $promotion_group_details,
    +                        'description' => '',
    +                        'table' => [
    +                            'Title' => 'Displays as a cited name below the quote.',
    +                            'Link' => 'Optional external link. Component flag "singlePromoView" sets the link to the individual promo item view.',
    +                            'Excerpt' => 'Main quote area by default. If component flag "showDescription" is set to true, excerpt can display underneath the name like a degree or job title. 
    + Accepts only these html entities: “ ” <em> <strong>', + 'Description' => 'Can be used as the quote area if the component flag "showDescription" is set to true.', + 'Filename' => 'Primary promo image, 600x600px or any square size. Other sizes will be centered to fit in the circle.', + ], ], ], 'component' => [ - 'filename' => 'accordion', + 'filename' => 'accordion-styleguide', ], ], 'spotlight-1' => [ From 1d86dc91d7adf45b65d9d42c91d9a8f18ad1ec97 Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Wed, 1 May 2024 23:08:45 -0400 Subject: [PATCH 12/14] chore: Tidying component pages --- .../ChildpageWithComponentsController.php | 100 +----------------- .../Controllers/ComponentFlagController.php | 4 +- 2 files changed, 6 insertions(+), 98 deletions(-) diff --git a/styleguide/Http/Controllers/ChildpageWithComponentsController.php b/styleguide/Http/Controllers/ChildpageWithComponentsController.php index 3a4ea1c5..31215b81 100644 --- a/styleguide/Http/Controllers/ChildpageWithComponentsController.php +++ b/styleguide/Http/Controllers/ChildpageWithComponentsController.php @@ -21,90 +21,9 @@ class ChildpageWithComponentsController extends Controller public function index(Request $request): View { $request->data['base']['page']['content']['main'] = ' -

    Page body

    -

    This an example of CMS page content on a childpage with components, moved to the placement of a page field.

    -'; - $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 = ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    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.
    +

    This an example of CMS page content on a childpage with 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', - ], - ], 'hero-1' => [ 'data' => app(HeroImage::class)->create(1, false, [ 'relative_url' => '/styleguide/image/3200x600', @@ -269,19 +188,11 @@ public function index(Request $request): View 'filename' => 'button-column', ], ], - - 'page-content-row' => [ - 'data' => [ - 0 => [ - 'title' => 'Page content', - ] - ], - 'component' => [ - 'filename' => 'page-content-row', - ] - ] ]; + // Assign components globally + $request->data['base']['components'] = $components; + if(!empty($request->data['base']['components'])) { // Set hero from components $hero = collect($request->data['base']['components'])->reject(function ($data, $component_name) { @@ -299,9 +210,6 @@ public function index(Request $request): View config(['base.hero_full_controllers' => [$request->data['base']['page']['controller']]]); } - // Assign components globally - $request->data['base']['components'] = $components; - return view('childpage', merge($request->data)); } } diff --git a/styleguide/Http/Controllers/ComponentFlagController.php b/styleguide/Http/Controllers/ComponentFlagController.php index 2e6c4c0c..8df4f8e5 100644 --- a/styleguide/Http/Controllers/ComponentFlagController.php +++ b/styleguide/Http/Controllers/ComponentFlagController.php @@ -26,8 +26,8 @@ public function index(Request $request): View 'title' => 'Promo group details', 'description' => '', 'table' => [ - 'Title' => 'Smaller upercase text', - 'Excerpt' => 'Larger italicized text', + 'Title' => 'Smaller upercase text. Emphasize part of your title with <em> for larger, italicized text.', + 'Excerpt' => 'Optional larger italicized text, if not using em in the title.', 'Link' => 'URL', ], ], From 9bf6407a3d6777dab3b09d3e78aa3243c34b6a25 Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Wed, 1 May 2024 23:18:16 -0400 Subject: [PATCH 13/14] chore: moving these to their own branch --- factories/Flag.php | 4 +- resources/scss/components/_flag.scss | 94 ++++++++--------------- resources/views/components/flag.blade.php | 6 +- resources/views/layouts/main.blade.php | 6 +- 4 files changed, 40 insertions(+), 70 deletions(-) diff --git a/factories/Flag.php b/factories/Flag.php index 2fff71fa..1a89019c 100644 --- a/factories/Flag.php +++ b/factories/Flag.php @@ -23,9 +23,9 @@ public function create($limit = 1, $flatten = false, $options = []) for ($i = 1; $i <= $limit; $i++) { $data[$i] = [ 'class' => 'flag', - 'title' => 'Make a Gift', + 'title' => 'Make a', 'link' => 'https://wayne.edu', - //'excerpt' => 'Gift', + 'excerpt' => 'Gift', ]; $data[$i] = array_replace_recursive($data[$i], $options); diff --git a/resources/scss/components/_flag.scss b/resources/scss/components/_flag.scss index 5d404d29..6c0eaef6 100644 --- a/resources/scss/components/_flag.scss +++ b/resources/scss/components/_flag.scss @@ -1,73 +1,41 @@ -.flag__container { - .flag { - &__title { - @apply uppercase text-sm tracking-wide leading-3 relative z-50; - } - - em, - &__excerpt { - @apply normal-case text-xl italic font-serif pl-0.5 leading-3; - } +.flag { + @apply absolute hidden mt:flex z-40 bg-gold text-green-800 hover:text-green-900 items-center justify-center mr-4 right-0 pt-0 duration-500; + + transition-property: height, padding; + width: 140px; + height: 30px; + + // Pointy bottom + &::after { + @apply border-gold absolute duration-500; + + transition-property: top; + border-left-color: transparent; + border-right-color: transparent; + border-style: solid; + border-width: 12px 70px 0; + top: 30px; + content: ""; + left: 0; } - &.flag--sm { - @apply mx-4; + &:hover { + @apply duration-500; - .flag { - @extend .gold-gradient-button; + transition-property: height, padding; + height: 38px; + padding-top: 8px; - @apply w-full font-normal mt:hidden; + &::after { + top: 38px; } } - &.flag--mt { - @apply row relative; - - .flag { - @apply absolute hidden mt:flex z-40 bg-gold text-green-800 hover:text-green-900 items-center justify-center mr-4 right-0 px-2 duration-500; - - transition-property: height, padding; - min-width: 140px; - height: 28px; - - &__container { - @apply row relative; - } - - // Pointy bottom - &::after { - @apply bg-gold absolute duration-500; - - clip-path: polygon(0 0, 100% 0, 100% 4%, 50% 14%, 0 4%); - //clip-path: polygon(0 0, 100% 0, 100% 12%, 50% 4%, 0 12%); - transition-property: top; - width: 100%; - height: 8rem; - top: 24px; - content: ""; - left: 0; - - /* - @apply border-gold absolute duration-500; - - border-left-color: transparent; - border-right-color: transparent; - border-style: solid; - border-width: 12px 70px 0; - */ - } - - &:hover { - @apply duration-500; - - transition-property: height, padding; - height: 30px; - padding-top: 8px; + &__title { + @apply uppercase text-sm tracking-wide pt-1.5 pt-1; + } - &::after { - top: 28px; - } - } - } + &__excerpt { + @apply normal-case text-xl italic font-serif pt-0.5 pl-1; } } diff --git a/resources/views/components/flag.blade.php b/resources/views/components/flag.blade.php index 4ff97a30..6e75b4ab 100644 --- a/resources/views/components/flag.blade.php +++ b/resources/views/components/flag.blade.php @@ -1,10 +1,10 @@ {{-- $flag => array // [['title', 'link', 'excerpt']] --}} -
    +
    - {!! $flag['title'] !!} - @if(!empty($flag['excerpt'])) + {{ $flag['title'] }} + @if($flag['excerpt'] != '') {{ $flag['excerpt'] }} @endif diff --git a/resources/views/layouts/main.blade.php b/resources/views/layouts/main.blade.php index 8a4bd770..4201c5f4 100644 --- a/resources/views/layouts/main.blade.php +++ b/resources/views/layouts/main.blade.php @@ -31,7 +31,7 @@ @endif @if(!empty($base['flag'])) - @include('components.flag', ['flag' => $base['flag'], 'class' => 'flag--mt']) + @include('components.flag', ['flag' => $base['flag']]) @endif @@ -67,7 +67,9 @@ @endif @if(!empty($base['flag'])) - @include('components.flag', ['flag' => $base['flag'], 'class' => 'flag--sm']) + @endif @yield('below_menu') From 6e134dadf931b7051947a4787f2e7cc359587fbe Mon Sep 17 00:00:00 2001 From: Jenny Porada Date: Thu, 2 May 2024 00:03:50 -0400 Subject: [PATCH 14/14] Version 8.10.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a7af6b67..6e1bcc26 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "base", "private": true, - "version": "8.10.1", + "version": "8.10.2", "description": "", "scripts": { "dev": "npm run development",