From 410391672aa3b60a46491bef71f64504842ef416 Mon Sep 17 00:00:00 2001
From: Jenny Porada Visit the modular documentation for more information The last array item cannot have a comma. Visit the modular documentation for more information Visit the modular documentation for more information Visit the modular documentation for more information Visit the modular documentation for more information Visit the modular documentation for more information Display one or more accordions to your page. This component serves as the buttons under the side menu and as button components on your page. Default options: modular-hero-1
-
-{
-"id":0000,
-}
-
-
+
+
';
+
+ $promo_group_setup_title = 'Hero promo group setup';
+ $promo_group_setup_description = '
+
+
+
+ Page field
+ Data
+
+
+
+
+ modular-hero-1
+
+
+
+{
+"id":0000,
+"config":"randomize|page_id|limit:1"
+}
+
+
+
+
';
+
+ $components['components'] = [
+ 'accordion-1' => [
+ 'data' => [
+ 0 => [
+ 'title' => $component_config_title,
+ 'description' => $component_config_description,
+ 'promo_item_id' => 0,
+ ],
+ 1 => [
+ 'title' => $promo_group_setup_title,
+ 'description' => $promo_group_setup_description,
+ 'promo_item_id' => 1,
+ ],
+ ],
+ 'component' => [
+ 'filename' => 'accordion',
+ 'columns' => '4',
+ 'showDescription' => false,
+ ],
+ ],
+ ];
+
+ return view('modularpage', merge($request->data, $components));
+ }
+}
diff --git a/styleguide/Http/Controllers/HeroFullController.php b/styleguide/Http/Controllers/HeroFullController.php
deleted file mode 100644
index 316230c8..00000000
--- a/styleguide/Http/Controllers/HeroFullController.php
+++ /dev/null
@@ -1,71 +0,0 @@
-faker['faker'] = $faker->create();
- }
-
- /**
- * Article Listing Controller
- */
- public function index(Request $request): View
- {
- config([
- 'base.hero_contained' => false,
- 'base.hero_full_controllers' => ['HeroFullController'],
- ]);
-
- $components['components'] = [
- 'accordion-1' => [
- 'data' => [
- 0 => [
- 'title' => 'Configuration',
- 'description' => '
-
+
+
+
+ Available fields
+
+
+ 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
+ None, Text overlay, Logo overlay, SVG overlay
+ modular-hero-1
-
-{
-"id":0000,
-}
-
- modular-hero-1
-
-{
-"id":0000,
-}
-
- modular-hero-1
-
-{
-"id":0000,
-}
-
- modular-hero-1
-
-{
-"id":0000,
-}
-
- modular-hero-1
-
-{
-"id":0000,
-}
-
-
+
+
',
],
],
diff --git a/styleguide/Http/Controllers/ButtonSetController.php b/styleguide/Http/Controllers/ButtonSetController.php
index a8def1d0..daacbf1d 100644
--- a/styleguide/Http/Controllers/ButtonSetController.php
+++ b/styleguide/Http/Controllers/ButtonSetController.php
@@ -7,7 +7,6 @@
use Illuminate\Http\Request;
use Faker\Factory;
use Factories\Button;
-use Factories\GenericPromo;
class ButtonSetController extends Controller
{
@@ -24,6 +23,11 @@ public function __construct(Factory $faker)
*/
public function index(Request $request): View
{
+
+ $request->data['base']['page']['content']['main'] = '
+
+
+
+
+ Available fields
+
+
+ Title
+ Label on the closed accordion
+
+
+
Description
+ Content when the accordion is clicked open
+ Default
, Green
, Image
Green gradient
, Gold
, Gold gradient
. View these colors on the Buttons page.
When linking to a pdf, "(pdf)" is added automatically.
+Available fields | +|
---|---|
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 options: Default, Green, Image +Options available by request: Green gradient, Gold, Gold gradient View these colors on the Buttons page. + |
+
Primary image | +
+Icons: 40x40px PNG, SVG Images: 600x218px JPG, PNG recommended with descriptive alternative text. Text within the image is not recommended because it cannot maintain readability when scaled. |
+
Secondary 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. |
+
Visit the modular documentation for more information
-modular-hero-1-
-{ -"id":0000 -} --
Visit the modular documentation for more information
-modular-hero-1-
-{ -"id":0000 -} --
Visit the modular documentation for more information
-modular-hero-1-
-{ -"id":0000 -} --
Visit the modular documentation for more information
-modular-hero-1-
-{ -"id":0000 -} --
Visit the modular documentation for more information
-modular-hero-1-
-{ -"id":0000 -} --
List of promo items with small icons.
+'; + + $promotion_group_details = ' +Available fields | +|
---|---|
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. | +
Page field | -Data | -
---|---|
- modular-image-column-1- |
-
--{ -"id":000000, -"heading":"Image column", -"config":"randomize|limit:1|page_id", -"singlePromoView":true -} -- |
-
Available fields | +|
---|---|
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. | +
Page field | -Data | -
---|---|
- modular-spotlight-column-1- modular-spotlight-row-1- |
-
--{ -"id":000000, -"heading":"Spotlight", -"config":"randomize|page_id|limit:1", -"singlePromoView":false, -"showDescription":false -} -- |
-
Single promo item for a quote with a citation and image.
+'; + + $promotion_group_details = 'Primary promo image, 600x600px or any square size. Other sizes will be centered to fit in the circle. |
Page field | +Data | +
---|---|
+ modular-spotlight-column-1+ modular-spotlight-row-1+ |
+
++{ +"id":000000, +"heading":"Spotlight", +"config":"randomize|page_id|limit:1", +"singlePromoView":false, +"showDescription":false +} ++ |
+
List of promo items with small icons.
', + 'main' => '', ], ], ]); diff --git a/styleguide/Pages/ImageComponent.php b/styleguide/Pages/ImageComponent.php deleted file mode 100644 index bc43117e..00000000 --- a/styleguide/Pages/ImageComponent.php +++ /dev/null @@ -1,25 +0,0 @@ -create(1, true, [ - 'page' => [ - 'controller' => 'ImageController', - 'title' => 'Image', - 'id' => 120100, - 'content' => [ - 'main' => 'Single image with a title and gradient overlay.
', - ], - ], - ]); - } -} diff --git a/styleguide/Pages/SpotlightComponent.php b/styleguide/Pages/SpotlightComponent.php index cd716f56..1f63c5e4 100644 --- a/styleguide/Pages/SpotlightComponent.php +++ b/styleguide/Pages/SpotlightComponent.php @@ -17,7 +17,7 @@ public function getPageData() 'title' => 'Spotlight', 'id' => 119100, 'content' => [ - 'main' => 'Single promo item for a quote with a citation and image.
', + 'main' => '', ], ], ]); diff --git a/styleguide/Views/styleguide-using-components.blade.php b/styleguide/Views/styleguide-using-components.blade.php index 711c1947..87e5fc72 100644 --- a/styleguide/Views/styleguide-using-components.blade.php +++ b/styleguide/Views/styleguide-using-components.blade.php @@ -33,7 +33,7 @@ "showExcerpt":true, "showDescription":false, "singlePromoView":true, -"config":"randomize|limit:5|page_id" +"config":"randomize|page_id|limit:5" }') !!} @@ -65,39 +65,88 @@' . $this->faker->text(100) . ' '. $this->faker->sentence(3) .'
', - 'link' => 'https://wayne.edu', + 'link' => (!empty($video) && $video === true) ? 'https://www.youtube.com/watch?v=PHqfwq033yQ' : '#', + 'youtube_id' => (!empty($video) && $video === true) ? 'PHqfwq033yQ' : null, 'promo_item_id' => $i, 'promo_group_id' => strval($promo_group_id), - 'relative_url' => '/styleguide/image/600x450?text=600x450:'.$i, // 4:3 - //'relative_url' => '/styleguide/image/450x600', // 3:4 - //'relative_url' => '/styleguide/image/600x338', // 16:9 - //'relative_url' => '/styleguide/image/600x600', // 1:1 - //'relative_url' => '/styleguide/image/600x217', // 2.76:1 - //'relative_url' => '/styleguide/image/600x200', // 3:1 - 'filename_url' => '/styleguide/image/600x450?text=600x450:'.$i, // 4:3 + 'relative_url' => $relative_url.':'.$i, + 'filename_url' => $relative_url.':'.$i, 'filename_alt_text' => 'Placeholder image '.$i, - 'secondary_image' => '', - 'secondary_relative_url' => '/styleguide/image/150x150?text=150x150:'.$i, // 4:3 + 'secondary_relative_url' => '', 'secondary_filename_url' => '', 'secondary_alt_text' => 'Secondary placeholder image '.$i, - 'option' => '', - //'option' => $this->faker->randomElement(['Gold', 'Green', '']), + 'option' => '', // $option 'start_date' => $this->faker->dateTimeThisMonth('now')->format('Y-m-d H:i:s'), 'end_date' => '', 'display_start_date' => '0000-00-00 00:00:00', @@ -53,7 +71,7 @@ public function create($limit = 1, $flatten = false, $options = []) 'start_time_hide' => '0', 'end_time_hide' => '0', 'group' => [ - 'title' => 'Promo group title', + 'title' => 'Generic Promo Group', ], ]; diff --git a/factories/Grid.php b/factories/Grid.php deleted file mode 100644 index a82adb43..00000000 --- a/factories/Grid.php +++ /dev/null @@ -1,46 +0,0 @@ -faker = $faker->create(); - } - - /** - * {@inheritdoc} - */ - public function create($limit = 1, $flatten = false, $options = []) - { - $promo_group_id = $this->faker->randomDigitNotNull(); - - for ($i = 1; $i <= $limit; $i++) { - $data[$i] = [ - 'relative_url' => '/styleguide/image/550x400?text=550x400', - 'title' => $this->faker->text(20), - 'link' => 'https://wayne.edu', - 'excerpt' => $this->faker->text(20), - 'promo_group_id' => $promo_group_id, - 'promo_item_id' => $i, - 'filename_alt_text' => 'Example grid image', - 'start_date' => $this->faker->dateTimeThisMonth()->format('Y-m-d H:i:s'), - ]; - - $data[$i] = array_replace_recursive($data[$i], $options); - } - - if ($limit === 1 && $flatten === true) { - return current($data); - } - - return $data; - } -} diff --git a/factories/PromoPage.php b/factories/PromoPage.php deleted file mode 100644 index d10a3085..00000000 --- a/factories/PromoPage.php +++ /dev/null @@ -1,70 +0,0 @@ -faker = $faker->create(); - } - - /** - * {@inheritdoc} - */ - public function create($limit = 1, $flatten = false, $options = []) - { - $promo_group_id = $this->faker->randomNumber(5); - $image = '/styleguide/image/' . $this->faker->randomElement([ - '600x450?text=600x450', // 4:3 - '450x600?text=450x600', // 3:4 - '600x338?text=600x338', // 16:9 - '600x600?text=600x600', // 1:1 - //'600x217', // 2.76:1 - //'600x200', // 3:1 - ]); - - for ($i = 1; $i <= $limit; $i++) { - $data[$i] = [ - 'title' => $this->faker->name(), - 'excerpt' => $this->faker->jobTitle(), - 'description' => '' . $this->faker->text(70) . ' '. $this->faker->sentence(3) .'
', - 'link' => 'https://wayne.edu', - 'promo_item_id' => strval($this->faker->randomNumber(5)), - 'promo_group_id' => strval($promo_group_id), - 'option' => $this->faker->randomElement(['Gold', 'Green', '']), - 'relative_url' => $image.':'.$i, - 'filename_url' => $image.':'.$i, - 'filename_alt_text' => 'Placeholder image '.$i, - 'secondary_image' => '', - 'secondary_relative_url' => '/styleguide/image/150x150?text=150x150:'.$i, // 4:3 - 'secondary_filename_url' => '', - 'secondary_alt_text' => 'Secondary placeholder image '.$i, - 'option' => '', - 'start_date' => $this->faker->dateTimeThisMonth('now')->format('Y-m-d H:i:s'), - 'end_date' => '', - 'display_start_date' => '0000-00-00 00:00:00', - 'display_end_date' => '0000-00-00 00:00:00', - 'start_time_hide' => '0', - 'end_time_hide' => '0', - 'group' => [ - 'title' => 'Promo group title', - ], - ]; - - $data[$i] = array_replace_recursive($data[$i], $options); - } - - if ($limit === 1 && $flatten === true) { - return current($data); - } - - return $data; - } -} diff --git a/factories/PromoWithOptions.php b/factories/PromoWithOptions.php index 35cdbb8f..06556843 100644 --- a/factories/PromoWithOptions.php +++ b/factories/PromoWithOptions.php @@ -21,6 +21,7 @@ public function __construct(Factory $faker) public function create($limit = 1, $flatten = false, $options = []) { $promo_group_id = $this->faker->randomNumber(5); + $image = '/styleguide/image/' . $this->faker->randomElement([ '600x450?text=600x450', // 4:3 '450x600?text=450x600', // 3:4 @@ -32,7 +33,7 @@ public function create($limit = 1, $flatten = false, $options = []) 'title' => $this->faker->name(), 'excerpt' => $this->faker->jobTitle(), 'description' => '' . $this->faker->text(70) . ' '. $this->faker->sentence(3) .'
', - 'link' => 'https://wayne.edu', + 'link' => '#', 'promo_item_id' => strval($this->faker->randomNumber(5)), 'promo_group_id' => strval($promo_group_id), 'relative_url' => $image.':'.$i, diff --git a/factories/Video.php b/factories/Video.php index 91417ef7..cd90d1c9 100644 --- a/factories/Video.php +++ b/factories/Video.php @@ -27,7 +27,7 @@ public function create($limit = 1, $flatten = false, $options = []) 'relative_url' => '', //'relative_url' => $this->faker->randomElement(['/styleguide/image/800x450?text=Video', '']), 'title' => $this->faker->sentence(), - 'excerpt' => $this->faker->sentence(), + 'excerpt' => $this->faker->sentence(20), 'filename_alt_text' => 'Example video image', ]; diff --git a/resources/scss/components/_text-shadow.scss b/resources/scss/components/_text-shadow.scss deleted file mode 100644 index 03667e10..00000000 --- a/resources/scss/components/_text-shadow.scss +++ /dev/null @@ -1,5 +0,0 @@ -@layer utilities { - .text-shadow-darkest { - text-shadow: 0 1px 1px theme('colors.green.900'); - } -} diff --git a/resources/scss/main.scss b/resources/scss/main.scss index fcdb8f9a..f5407942 100644 --- a/resources/scss/main.scss +++ b/resources/scss/main.scss @@ -26,7 +26,6 @@ @import "components/row"; @import "components/skip"; @import "components/slate"; -@import "components/text-shadow"; @import "components/visually-hidden"; @import "components/table-of-contents"; @import "components/print"; diff --git a/resources/views/components/hero/logo-overlay.blade.php b/resources/views/components/hero/logo-overlay.blade.php index f919137d..bb59b34f 100644 --- a/resources/views/components/hero/logo-overlay.blade.php +++ b/resources/views/components/hero/logo-overlay.blade.php @@ -3,7 +3,7 @@