- {{ $flag['title'] }}
- @if($flag['excerpt'] != '')
+ {!! $flag['title'] !!}
+ @if(!empty($flag['excerpt']))
{{ $flag['excerpt'] }}
@endif
diff --git a/resources/views/layouts/contained-hero.blade.php b/resources/views/layouts/contained-hero.blade.php
index 3eeb5cad..97426768 100644
--- a/resources/views/layouts/contained-hero.blade.php
+++ b/resources/views/layouts/contained-hero.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/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
new file mode 100644
index 00000000..8df4f8e5
--- /dev/null
+++ b/styleguide/Http/Controllers/ComponentFlagController.php
@@ -0,0 +1,48 @@
+data['base']['page']['content']['main'] = '
+
Flag is a global component that cannot be enabled by page field.
+';
+
+ $components = [
+ 'accordion' => [
+ 'data' => [
+ 0 => [
+ 'promo_item_id' => 'promotionGroupDetails',
+ 'title' => 'Promo group details',
+ 'description' => '',
+ 'table' => [
+ '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',
+ ],
+ ],
+ ],
+ 'component' => [
+ 'filename' => 'accordion-styleguide',
+ ],
+ ],
+ ];
+
+ // Assign components globally
+ $request->data['base']['components'] = $components;
+
+ $request->data['base']['flag'] = app(Flag::class)->create(1, true);
+
+ return view('childpage', merge($request->data));
+ }
+}
From ecde6676797f881429e72ffbcc77c9f4f669a190 Mon Sep 17 00:00:00 2001
From: Jenny Porada
Date: Thu, 2 May 2024 00:02:44 -0400
Subject: [PATCH 03/36] chore: Updating promo setup info
---
styleguide/Http/Controllers/ComponentAccordionController.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/styleguide/Http/Controllers/ComponentAccordionController.php b/styleguide/Http/Controllers/ComponentAccordionController.php
index 6fdc2294..282f5f28 100644
--- a/styleguide/Http/Controllers/ComponentAccordionController.php
+++ b/styleguide/Http/Controllers/ComponentAccordionController.php
@@ -40,9 +40,9 @@ public function index(Request $request): View
'table' => [
'Title' => 'Text on closed accordion',
'Description' => 'Content when the accordion is clicked open',
- 'Filename' => 'Optional image, variable size',
+ 'Primary image' => 'Optional image',
'Excerpt' => 'Image caption',
- 'Option' => 'Image orientation: Right, Left, Center',
+ 'Option' => 'Image orientation: Left, Center, Right(default)',
],
],
],
From e7bf35e29cd829376d664a0a42cbb79246b45b5d Mon Sep 17 00:00:00 2001
From: Ambyr
Date: Thu, 2 May 2024 12:30:11 -0400
Subject: [PATCH 04/36] feat: add catalog component to homepage styleguide
---
app/Http/Controllers/HomepageController.php | 53 ++++++++++++++++++-
resources/views/components/footer.blade.php | 0
resources/views/homepage.blade.php | 5 ++
.../Repositories/HomepageRepository.php | 16 ++++--
4 files changed, 70 insertions(+), 4 deletions(-)
mode change 100644 => 100755 resources/views/components/footer.blade.php
diff --git a/app/Http/Controllers/HomepageController.php b/app/Http/Controllers/HomepageController.php
index b0dadbe3..b26212e2 100644
--- a/app/Http/Controllers/HomepageController.php
+++ b/app/Http/Controllers/HomepageController.php
@@ -32,11 +32,62 @@ public function index(Request $request): View
{
// $request->data['base']['show_site_menu'] = false;
// $promos = $this->promo->getHomepagePromos();
+
+ $components =
+
+promo = $promo;
+ $this->modularComponent = $modularComponent;
+ $this->article = $article;
+ $this->event = $event;
+ }
+
+ /**
+ * Display the homepage view.
+ */
+ public function index(Request $request): View
+ {
+ // $request->data['base']['show_site_menu'] = false;
+
+ $promos = $this->promo->getHomepagePromos($request->data);
+
+ $modularComponents['modularComponents'] = [];
+
+ if(!empty($request->data['base']['data'])) {
+ $modularComponents['modularComponents'] = $this->modularComponent->getModularComponents($request->data['base']);
+ $promos['components'] = $modularComponents['modularComponents'];
+ }
$articles = $this->article->listing($request->data['base']['site']['news']['application_id']);
$events = $this->event->getEvents($request->data['base']['site']['id']);
- return view('homepage', merge($request->data, $articles, $events));
+ return view('homepage', merge($request->data, $promos, $articles, $events));
}
}
diff --git a/resources/views/components/footer.blade.php b/resources/views/components/footer.blade.php
old mode 100644
new mode 100755
diff --git a/resources/views/homepage.blade.php b/resources/views/homepage.blade.php
index 258f4b96..6d92d0f5 100644
--- a/resources/views/homepage.blade.php
+++ b/resources/views/homepage.blade.php
@@ -7,6 +7,11 @@
{!! $base['page']['content']['main'] !!}
+ @include('components.catalog', ['data' => $components['catalog-1']['data'], 'component' => $components['catalog-1']['component'], 'class' => 'my-class'])
+
@if(!empty($articles['data']))
diff --git a/styleguide/Repositories/HomepageRepository.php b/styleguide/Repositories/HomepageRepository.php
index ff7c9b1b..34f5301b 100644
--- a/styleguide/Repositories/HomepageRepository.php
+++ b/styleguide/Repositories/HomepageRepository.php
@@ -20,9 +20,19 @@ public function __construct(Factory $faker)
*/
public function getHomepagePromos(int $page_id = null)
{
- return [
- //'key' => app(\Factories\YourFactory::class)->create(5),
- 'promos' => app(\Factories\GenericPromo::class)->create(5),
+ $promos => [
+ 'homepageItems' => app(\Factories\GenericPromo::class)->create(5, false),
+ 'components' => [
+ 'catalog-1'=> [
+ 'data' => app(\Factories\CatalogPromo::class)->create(4, false),
+ 'component' => [
+ 'filename' => 'catalog-1',
+ 'gradientOverlay' => true,
+ ],
+ ],
+ ],
];
+
+ return $promos;
}
}
From 8a7e28b1ea76e557ccd33274959b5f57bebbd26a Mon Sep 17 00:00:00 2001
From: Ambyr
Date: Thu, 2 May 2024 12:30:28 -0400
Subject: [PATCH 05/36] chore: composer update
---
composer.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/composer.lock b/composer.lock
index 71ea8a41..90f842e2 100644
--- a/composer.lock
+++ b/composer.lock
@@ -9129,5 +9129,5 @@
"php": "^8.1"
},
"platform-dev": [],
- "plugin-api-version": "2.2.0"
+ "plugin-api-version": "2.6.0"
}
From 924de479002616562902474da7fa8b3b7e5db152 Mon Sep 17 00:00:00 2001
From: Ambyr
Date: Thu, 2 May 2024 14:28:49 -0400
Subject: [PATCH 06/36] fix: remove unnecessary code
---
app/Http/Controllers/HomepageController.php | 45 ++-------------------
1 file changed, 4 insertions(+), 41 deletions(-)
diff --git a/app/Http/Controllers/HomepageController.php b/app/Http/Controllers/HomepageController.php
index b26212e2..153f2694 100644
--- a/app/Http/Controllers/HomepageController.php
+++ b/app/Http/Controllers/HomepageController.php
@@ -7,43 +7,6 @@
namespace App\Http\Controllers;
-use Illuminate\View\View;
-use Illuminate\Http\Request;
-use Contracts\Repositories\HomepageRepositoryContract;
-use Contracts\Repositories\EventRepositoryContract;
-use Contracts\Repositories\ArticleRepositoryContract;
-
-class HomepageController extends Controller
-{
- /**
- * Construct the controller.
- */
- public function __construct(HomepageRepositoryContract $promo, ArticleRepositoryContract $article, EventRepositoryContract $event)
- {
- $this->promo = $promo;
- $this->article = $article;
- $this->event = $event;
- }
-
- /**
- * Display the homepage view.
- */
- public function index(Request $request): View
- {
- // $request->data['base']['show_site_menu'] = false;
- // $promos = $this->promo->getHomepagePromos();
-
- $components =
-
-promo = $promo;
@@ -78,10 +41,10 @@ public function index(Request $request): View
$promos = $this->promo->getHomepagePromos($request->data);
$modularComponents['modularComponents'] = [];
-
+
if(!empty($request->data['base']['data'])) {
$modularComponents['modularComponents'] = $this->modularComponent->getModularComponents($request->data['base']);
- $promos['components'] = $modularComponents['modularComponents'];
+ $promos['components'] = $modularComponents['modularComponents'];
}
$articles = $this->article->listing($request->data['base']['site']['news']['application_id']);
From 529d961a066b7606730cc5d69028dcddd4364fab Mon Sep 17 00:00:00 2001
From: Ambyr
Date: Thu, 2 May 2024 14:30:16 -0400
Subject: [PATCH 07/36] feat: update homepage to accept array & update test
case
---
app/Repositories/HomepageRepository.php | 4 ++--
contracts/Repositories/HomepageRepositoryContract.php | 2 +-
styleguide/Repositories/HomepageRepository.php | 8 ++++----
tests/Unit/Repositories/HomepageRepositoryTest.php | 7 +++++--
4 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/app/Repositories/HomepageRepository.php b/app/Repositories/HomepageRepository.php
index 8d0010d7..aae70df4 100644
--- a/app/Repositories/HomepageRepository.php
+++ b/app/Repositories/HomepageRepository.php
@@ -31,14 +31,14 @@ public function __construct(Connector $wsuApi, ParsePromos $parsePromos, Reposit
/**
* {@inheritdoc}
*/
- public function getHomepagePromos(int $page_id = 0)
+ public function getHomepagePromos(array $data): array
{
$group_reference = [
123 => 'example',
];
$group_config = [
- 'example' => 'page_id:'.$page_id.'|randomize|first',
+ 'example' => 'randomize|first',
];
$params = [
diff --git a/contracts/Repositories/HomepageRepositoryContract.php b/contracts/Repositories/HomepageRepositoryContract.php
index e6072547..949f013c 100644
--- a/contracts/Repositories/HomepageRepositoryContract.php
+++ b/contracts/Repositories/HomepageRepositoryContract.php
@@ -7,5 +7,5 @@ interface HomepageRepositoryContract
/**
* {@inheritdoc}
*/
- public function getHomepagePromos(int $page_id = 0);
+ public function getHomepagePromos(array $data): array;
}
diff --git a/styleguide/Repositories/HomepageRepository.php b/styleguide/Repositories/HomepageRepository.php
index 34f5301b..13b89245 100644
--- a/styleguide/Repositories/HomepageRepository.php
+++ b/styleguide/Repositories/HomepageRepository.php
@@ -18,13 +18,13 @@ public function __construct(Factory $faker)
/**
* {@inheritdoc}
*/
- public function getHomepagePromos(int $page_id = null)
+ public function getHomepagePromos(array $data): array
{
- $promos => [
+ $promos = [
'homepageItems' => app(\Factories\GenericPromo::class)->create(5, false),
'components' => [
- 'catalog-1'=> [
- 'data' => app(\Factories\CatalogPromo::class)->create(4, false),
+ 'catalog-1' => [
+ 'data' => app(\Factories\GenericPromo::class)->create(4, false),
'component' => [
'filename' => 'catalog-1',
'gradientOverlay' => true,
diff --git a/tests/Unit/Repositories/HomepageRepositoryTest.php b/tests/Unit/Repositories/HomepageRepositoryTest.php
index de079fd2..ff06a0a2 100644
--- a/tests/Unit/Repositories/HomepageRepositoryTest.php
+++ b/tests/Unit/Repositories/HomepageRepositoryTest.php
@@ -4,6 +4,7 @@
use PHPUnit\Framework\Attributes\Test;
use App\Repositories\HomepageRepository;
+use Factories\GenericPromo;
use Tests\TestCase;
use Mockery as Mockery;
use Waynestate\Api\Connector;
@@ -13,9 +14,11 @@ final class HomepageRepositoryTest extends TestCase
#[Test]
public function getting_homepage_promos_should_return_array(): void
{
+ $promo_return = app(GenericPromo::class)->create(4, false);
+
// Fake return
$return = [
- 'promotions' => [],
+ 'promotion' => $promo_return,
];
// Mock the connector and set the return
@@ -23,7 +26,7 @@ public function getting_homepage_promos_should_return_array(): void
$wsuApi->shouldReceive('sendRequest')->with('cms.promotions.listing', Mockery::type('array'))->once()->andReturn($return);
// Get the promos
- $promos = app(HomepageRepository::class, ['wsuApi' => $wsuApi])->getHomepagePromos($this->faker->randomDigit());
+ $promos = app(HomepageRepository::class, ['wsuApi' => $wsuApi])->getHomepagePromos($promo_return);
$this->assertTrue(is_array($promos));
}
From 4ed19a7add9d8323bae474f3ce004e94c3fc6b63 Mon Sep 17 00:00:00 2001
From: Ambyr
Date: Fri, 17 May 2024 10:55:09 -0400
Subject: [PATCH 08/36] refactor: update comment to say profile
---
tests/Unit/Http/Controllers/ProfileControllerTest.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Unit/Http/Controllers/ProfileControllerTest.php b/tests/Unit/Http/Controllers/ProfileControllerTest.php
index 873f09b3..3ac22beb 100644
--- a/tests/Unit/Http/Controllers/ProfileControllerTest.php
+++ b/tests/Unit/Http/Controllers/ProfileControllerTest.php
@@ -55,7 +55,7 @@ public function invalid_profile_should_404_using_profile_repository(): void
// Construct the profile repository
$profileRepository = app(ProfileRepository::class, ['wsuApi' => $wsuApi]);
- // Construct the news controller
+ // Construct the profile controller
$this->profileController = app(ProfileController::class, ['profile' => $profileRepository]);
// Call the profile listing
From 12b0afa18dd237b0639ce3450795274dec0b4b4a Mon Sep 17 00:00:00 2001
From: Ambyr
Date: Fri, 17 May 2024 10:55:41 -0400
Subject: [PATCH 09/36] fix: test coverage for homepage controller
---
factories/Catalog.php | 53 ++++++++++++++
.../Controllers/HomepageControllerTest.php | 73 +++++++++++++++++++
2 files changed, 126 insertions(+)
create mode 100644 factories/Catalog.php
create mode 100644 tests/Unit/Http/Controllers/HomepageControllerTest.php
diff --git a/factories/Catalog.php b/factories/Catalog.php
new file mode 100644
index 00000000..1260ca0d
--- /dev/null
+++ b/factories/Catalog.php
@@ -0,0 +1,53 @@
+faker = $faker->create();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function create($limit = 1, $flatten = false, $options = [])
+ {
+ // Doc https://github.com/fzaninotto/Faker
+
+ $promo_group_id = $this->faker->randomNumber(5);
+
+ $relative_url = '/styleguide/image/600x600?text=600x600'; // 1:1
+
+
+ for ($i = 0; $i <= $limit - 1; $i++) {
+ $data[$i] = [
+ 'title' => 'Call to action',
+ 'link' => '#',
+ 'promo_item_id' => $i,
+ 'promo_group_id' => strval($promo_group_id),
+ 'relative_url' => $relative_url.':'.$i,
+ 'filename_url' => $relative_url.':'.$i,
+ 'filename_alt_text' => 'Placeholder image '.$i,
+ 'group' => [
+ 'title' => 'Modular Catalog Promotion Group',
+ ],
+ ];
+
+ $data[$i] = array_replace_recursive($data[$i], $options);
+ }
+
+ if ($limit === 1 && $flatten === true) {
+ return current($data);
+ }
+
+ return $data;
+ }
+}
diff --git a/tests/Unit/Http/Controllers/HomepageControllerTest.php b/tests/Unit/Http/Controllers/HomepageControllerTest.php
new file mode 100644
index 00000000..b7c464ce
--- /dev/null
+++ b/tests/Unit/Http/Controllers/HomepageControllerTest.php
@@ -0,0 +1,73 @@
+getPageData();
+ $request->data = $base;
+
+ $promo_group_id = $this->faker->numberbetween(1, 3);
+
+ // Create a fake data request
+ $data = app(Page::class)->create(1, true, [
+ 'page' => [
+ 'controller' => 'HomepageController',
+ ],
+ 'data' => [
+ 'modular-catalog-1' => json_encode([
+ 'id' => $promo_group_id,
+ 'config' => 'randomize|limit:2',
+ ]),
+ ],
+ ]);
+
+ // Fake return
+ $return['promotions'] = app(GenericPromo::class)->create(3, false, [
+ 'promo_group_id' => $promo_group_id,
+ 'group' => [
+ 'promo_group_id' => $promo_group_id,
+ ],
+ ]);
+
+ // Mock the connector and set the return
+ $wsuApi = Mockery::mock(Connector::class);
+ $wsuApi->shouldReceive('sendRequest')->with('cms.promotions.listing', Mockery::type('array'))->once()->andReturn($return);
+
+ // Pass in the modular repository component data
+ // $modularComponents['modularComponents'] = app(ModularPageRepository::class, ['wsuApi' => $wsuApi])->getModularComponents($data);
+
+ // Create a modular catalog component
+ $request->data['base']['data']['modular-catalog-1'] = json_encode(['id' => $promo_group_id]);
+
+ // Construct the modular repository
+ $modularRepository = app(ModularPageRepository::class, ['wsuApi' => $wsuApi]);
+
+ // Construct the homepage controller
+ $this->modularComponent = app(HomepageController::class, ['modularComponent' => $modularRepository]);
+
+ // Create the view
+ $view = $this->modularComponent->index($request);
+ // $this->assertTrue(is_array($HomepageController));
+ }
+}
From 9a6f5ca08529f8e0f3683e7d1f562457a42b32b5 Mon Sep 17 00:00:00 2001
From: Ambyr
Date: Fri, 17 May 2024 10:57:45 -0400
Subject: [PATCH 10/36] refactor: phplint
---
tests/Unit/Http/Controllers/HomepageControllerTest.php | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/tests/Unit/Http/Controllers/HomepageControllerTest.php b/tests/Unit/Http/Controllers/HomepageControllerTest.php
index b7c464ce..04b360c7 100644
--- a/tests/Unit/Http/Controllers/HomepageControllerTest.php
+++ b/tests/Unit/Http/Controllers/HomepageControllerTest.php
@@ -7,7 +7,6 @@
use Illuminate\Http\Request;
use App\Http\Controllers\HomepageController;
use App\Repositories\ModularPageRepository;
-use App\Repositories\PromoRepository;
use Styleguide\Pages\Homepage;
use Factories\Page;
use Factories\GenericPromo;
@@ -17,8 +16,7 @@
final class HomepageControllerTest extends TestCase
{
-
- #[Test]
+ #[Test]
#[Description('Test if the homepage controller is returning the modular component array data.')]
public function homepage_with_modular_components_should_return_to_the_view(): void
{
@@ -53,9 +51,9 @@ public function homepage_with_modular_components_should_return_to_the_view(): vo
// Mock the connector and set the return
$wsuApi = Mockery::mock(Connector::class);
$wsuApi->shouldReceive('sendRequest')->with('cms.promotions.listing', Mockery::type('array'))->once()->andReturn($return);
-
+
// Pass in the modular repository component data
- // $modularComponents['modularComponents'] = app(ModularPageRepository::class, ['wsuApi' => $wsuApi])->getModularComponents($data);
+ // $modularComponents['modularComponents'] = app(ModularPageRepository::class, ['wsuApi' => $wsuApi])->getModularComponents($data);
// Create a modular catalog component
$request->data['base']['data']['modular-catalog-1'] = json_encode(['id' => $promo_group_id]);
From 8dfdcdfee9c823e42ffdf9a94d1a80bebc9063ea Mon Sep 17 00:00:00 2001
From: Ambyr
Date: Fri, 7 Jun 2024 16:46:37 -0400
Subject: [PATCH 11/36] feat: add list styles pg with policy-numbering
---
resources/scss/components/_content.scss | 90 ++++++++++++++++++
.../Controllers/CMSListStylesController.php | 27 ++++++
styleguide/Pages/CMSListStyles.php | 22 +++++
.../styleguide-cms-list-styles.blade.php | 95 +++++++++++++++++++
styleguide/Views/styleguide.blade.php | 24 +++++
styleguide/menu.json | 10 ++
6 files changed, 268 insertions(+)
create mode 100644 styleguide/Http/Controllers/CMSListStylesController.php
create mode 100644 styleguide/Pages/CMSListStyles.php
create mode 100644 styleguide/Views/styleguide-cms-list-styles.blade.php
diff --git a/resources/scss/components/_content.scss b/resources/scss/components/_content.scss
index ef67847b..7c55a047 100644
--- a/resources/scss/components/_content.scss
+++ b/resources/scss/components/_content.scss
@@ -94,3 +94,93 @@
}
}
}
+
+.content > ol.policy-numbering {
+ counter-reset: section;
+ list-style-type: none;
+ line-height: 1.5;
+
+ p {
+ font-size: 0.9rem;
+ margin-bottom: 1rem;
+ margin-top: 1rem;
+ }
+
+ li {
+ position: relative;
+ padding-left: 4rem;
+ margin-top: 1rem;
+ margin-bottom: 1rem;
+ font-size: 0.9rem;
+ &::before {
+ counter-increment: section;
+ content: counters(section, ".") ".0 ";
+ position: absolute;
+ left: 0;
+ }
+ }
+
+ // Reset the counter for nested lists
+ ol {
+ counter-reset: section;
+ list-style-type: none;
+
+ li {
+ padding-left: 4rem;
+ margin-top: 1rem;
+ margin-bottom: 1rem;
+ font-size: 0.9rem;
+ }
+ &::before {
+ counter-increment: section;
+ content: counters(section, ".") " ";
+ }
+ }
+
+ // Avoid incremeting ul bullets
+ ul {
+ counter-reset: section;
+
+ li {
+ padding-left: 2rem;
+ margin-top: 1rem;
+ margin-bottom: 1rem;
+ font-size: 0.9rem;
+ list-style-type: lower-alpha;
+ }
+ &::before {
+ display: none;
+ }
+ }
+
+ ul li ul {
+ li {
+ padding-left: 2rem;
+ margin-top: 1rem;
+ margin-bottom: 1rem;
+ font-size: 0.9rem;
+ list-style-type: lower-roman;
+ }
+ &::before {
+ display: none;
+ }
+ }
+
+ // Third level
+ ol li ol li {
+ padding-left: 4rem;
+ margin-top: 1rem;
+ margin-bottom: 1rem;
+ font-size: 0.9rem;
+ list-style-type: none;
+ }
+
+ // Fourth level
+ ol li ol li ol li {
+ padding-left: 4rem;
+ margin-top: 1rem;
+ margin-bottom: 1rem;
+ font-size: 0.9rem;
+ list-style-type: none;
+ }
+}
diff --git a/styleguide/Http/Controllers/CMSListStylesController.php b/styleguide/Http/Controllers/CMSListStylesController.php
new file mode 100644
index 00000000..8c3a92dd
--- /dev/null
+++ b/styleguide/Http/Controllers/CMSListStylesController.php
@@ -0,0 +1,27 @@
+faker['faker'] = $faker->create();
+ }
+
+ /**
+ * Display the view.
+ */
+ public function index(Request $request): View
+ {
+ return view('styleguide-cms-list-styles', merge($request->data, $this->faker));
+ }
+}
diff --git a/styleguide/Pages/CMSListStyles.php b/styleguide/Pages/CMSListStyles.php
new file mode 100644
index 00000000..432f2c73
--- /dev/null
+++ b/styleguide/Pages/CMSListStyles.php
@@ -0,0 +1,22 @@
+create(1, true, [
+ 'page' => [
+ 'controller' => 'CMSListStylesController',
+ 'title' => 'List styles',
+ 'id' => 100300,
+ ],
+ ]);
+ }
+}
diff --git a/styleguide/Views/styleguide-cms-list-styles.blade.php b/styleguide/Views/styleguide-cms-list-styles.blade.php
new file mode 100644
index 00000000..aa1e7bdf
--- /dev/null
+++ b/styleguide/Views/styleguide-cms-list-styles.blade.php
@@ -0,0 +1,95 @@
+@extends('layouts.' . (!empty($base['layout']) ? $base['layout'] : 'main'))
+
+@section('content')
+ @include('components.page-title', ['title' => $base['page']['title']])
+
+
+
Unordered lists
+
+
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+
+
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+
+
+
Ordered lists
+
+
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+
+
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+
+
+
Policy lists
+
+
Policy numbering list style is a nested ordered and unordered list style.
+ Apply the policy-numbering
class to the opening ordered list element.
+ Each new nested list should start within the previous list item.
+
+
+
+ - <ol class="policy-numbering">
+ - <li>Item 1.0</li>
+ - <li>Item 2.0</li>
+ - <li>Item 3.0
+ - <ol>
+ - <li>Item 3.1</li>
+ - <li>Item 3.2
+ - <ul>
+ - <li>Item a</li>
+ - <li>Item b
+ - <li>Item i</li>
+ - <li>Item ii</li>
+ - </li>
+ - </ul>
+ - </li>
+ - </ol>
+ - </li>
+ - </ol>
+
+
+
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+
+
+
+
+
+
+
+
+
+@endsection
diff --git a/styleguide/Views/styleguide.blade.php b/styleguide/Views/styleguide.blade.php
index 99cdcea0..eb250796 100644
--- a/styleguide/Views/styleguide.blade.php
+++ b/styleguide/Views/styleguide.blade.php
@@ -82,6 +82,30 @@
{{ $faker->sentence() }}
+ Policy lists
+
+
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+
+ - {{ $faker->sentence() }}
+ - {{ $faker->sentence() }}
+
+
+
+
+
+
+
+
+
Blockquote
{{ $faker->paragraph(6) }}
diff --git a/styleguide/menu.json b/styleguide/menu.json
index 7628f26c..2346d3c6 100644
--- a/styleguide/menu.json
+++ b/styleguide/menu.json
@@ -38,6 +38,16 @@
"relative_url": "/styleguide/cms/headingstyles",
"submenu": []
},
+ "100300": {
+ "menu_item_id": 100300,
+ "is_active": 1,
+ "page_id": 100300,
+ "target": "",
+ "display_name": "List styles",
+ "class_name": "",
+ "relative_url": "/styleguide/cms/liststyles",
+ "submenu": []
+ },
"100400": {
"menu_item_id": 100400,
"is_active": 1,
From 2e432e737ceff671009fb1d7c10930b8a6b6a161 Mon Sep 17 00:00:00 2001
From: Ambyr
Date: Fri, 7 Jun 2024 16:55:52 -0400
Subject: [PATCH 12/36] fix: list elements
---
resources/scss/components/_content.scss | 103 ++++++++++++++++++++++--
1 file changed, 98 insertions(+), 5 deletions(-)
diff --git a/resources/scss/components/_content.scss b/resources/scss/components/_content.scss
index 7c55a047..9c42ac3b 100644
--- a/resources/scss/components/_content.scss
+++ b/resources/scss/components/_content.scss
@@ -105,13 +105,14 @@
margin-bottom: 1rem;
margin-top: 1rem;
}
-
+
li {
position: relative;
padding-left: 4rem;
margin-top: 1rem;
margin-bottom: 1rem;
font-size: 0.9rem;
+
&::before {
counter-increment: section;
content: counters(section, ".") ".0 ";
@@ -131,12 +132,12 @@
margin-bottom: 1rem;
font-size: 0.9rem;
}
- &::before {
+
+ li::before {
counter-increment: section;
content: counters(section, ".") " ";
}
}
-
// Avoid incremeting ul bullets
ul {
counter-reset: section;
@@ -148,12 +149,14 @@
font-size: 0.9rem;
list-style-type: lower-alpha;
}
- &::before {
+
+ li::before {
display: none;
}
}
ul li ul {
+
li {
padding-left: 2rem;
margin-top: 1rem;
@@ -161,7 +164,8 @@
font-size: 0.9rem;
list-style-type: lower-roman;
}
- &::before {
+
+ li::before {
display: none;
}
}
@@ -184,3 +188,92 @@
list-style-type: none;
}
}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 844ba26556e29bbe2a75623effa06c495acdbb0f Mon Sep 17 00:00:00 2001
From: Ambyr
Date: Fri, 7 Jun 2024 16:58:53 -0400
Subject: [PATCH 13/36] fix: remove additonal space at eof
---
resources/scss/components/_content.scss | 89 -------------------------
1 file changed, 89 deletions(-)
diff --git a/resources/scss/components/_content.scss b/resources/scss/components/_content.scss
index 9c42ac3b..1295133b 100644
--- a/resources/scss/components/_content.scss
+++ b/resources/scss/components/_content.scss
@@ -188,92 +188,3 @@
list-style-type: none;
}
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
From b460a02151780fb56a9578a92bf967e0e3b42177 Mon Sep 17 00:00:00 2001
From: Ambyr
Date: Mon, 10 Jun 2024 11:17:18 -0400
Subject: [PATCH 14/36] refactor: scss whitespace
---
resources/scss/components/_content.scss | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/resources/scss/components/_content.scss b/resources/scss/components/_content.scss
index 1295133b..2eea2f49 100644
--- a/resources/scss/components/_content.scss
+++ b/resources/scss/components/_content.scss
@@ -105,7 +105,7 @@
margin-bottom: 1rem;
margin-top: 1rem;
}
-
+
li {
position: relative;
padding-left: 4rem;
@@ -156,7 +156,6 @@
}
ul li ul {
-
li {
padding-left: 2rem;
margin-top: 1rem;
From a00570e89ceec762a7e363f44e3bfe83648a5ef7 Mon Sep 17 00:00:00 2001
From: Nick DeNardis
Date: Mon, 8 Jul 2024 08:08:53 -0400
Subject: [PATCH 15/36] fix(Buttons): Styleguide button elements now work when
pasted into CMS WYSIWYG
---
styleguide/Views/styleguide-cms-buttons.blade.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/styleguide/Views/styleguide-cms-buttons.blade.php b/styleguide/Views/styleguide-cms-buttons.blade.php
index 1ffa2c0d..fae25914 100644
--- a/styleguide/Views/styleguide-cms-buttons.blade.php
+++ b/styleguide/Views/styleguide-cms-buttons.blade.php
@@ -60,8 +60,8 @@