Skip to content

Commit

Permalink
Merge branch 'feature/component-updates' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
breakdancingcat committed Dec 13, 2023
2 parents f306a05 + 7ff6a2e commit 71d0c44
Show file tree
Hide file tree
Showing 66 changed files with 1,216 additions and 1,536 deletions.
2 changes: 1 addition & 1 deletion config/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
| as if it was in this array.
|
*/
'hero_full_controllers' => [],
'hero_full_controllers' => ['HomepageController'],

/*
|--------------------------------------------------------------------------
Expand Down
41 changes: 0 additions & 41 deletions factories/FeaturedPromo.php

This file was deleted.

48 changes: 33 additions & 15 deletions factories/GenericPromo.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,54 @@ public function create($limit = 1, $flatten = false, $options = [])

$promo_group_id = $this->faker->randomNumber(5);

$relative_url = '/styleguide/image/' . $this->faker->randomElement([
'600x450?text=600x450', // 4:3
'450x600?text=450x600', // 3:4
'600x338?text=600x338', // 16:9
'600x600?text=600x600', // 1:1
//'600x217', // 2.76:1
//'600x200', // 3:1
]);


for ($i = 0; $i <= $limit - 1; $i++) {
$video = $this->faker->boolean(33);

$title = $this->faker->randomElement([
ucfirst(implode(' ', $this->faker->words(6))),
$this->faker->name(),
]);

$excerpt = $this->faker->randomElement([
$this->faker->catchPhrase,
$this->faker->jobTitle(),
]);

$option = $this->faker->randomElement(['Green', 'Gold', '']);

$data[$i] = [
'title' => ucfirst(implode(' ', $this->faker->words(6))),
'excerpt' => $this->faker->catchPhrase,
'title' => $title,
'excerpt' => $excerpt,
'description' => '<p>' . $this->faker->text(100) . ' <a href="https://wayne.edu">'. $this->faker->sentence(3) .'</a></p>',
'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',
'display_end_date' => '0000-00-00 00:00:00',
'start_time_hide' => '0',
'end_time_hide' => '0',
'group' => [
'title' => 'Promo group title',
'title' => 'Generic Promo Group',
],
];

Expand Down
46 changes: 0 additions & 46 deletions factories/Grid.php

This file was deleted.

70 changes: 0 additions & 70 deletions factories/PromoPage.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Contracts\Factories\FactoryContract;
use Faker\Factory;

class PromoPageWithOptions implements FactoryContract
class PromoWithOptions implements FactoryContract
{
/**
* Construct the factory.
Expand All @@ -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
Expand All @@ -32,7 +33,7 @@ public function create($limit = 1, $flatten = false, $options = [])
'title' => $this->faker->name(),
'excerpt' => $this->faker->jobTitle(),
'description' => '<p>' . $this->faker->text(70) . ' <a href="https://wayne.edu">'. $this->faker->sentence(3) .'</a></p>',
'link' => 'https://wayne.edu',
'link' => '#',
'promo_item_id' => strval($this->faker->randomNumber(5)),
'promo_group_id' => strval($promo_group_id),
'relative_url' => $image.':'.$i,
Expand Down
2 changes: 1 addition & 1 deletion factories/Video.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
];

Expand Down
5 changes: 0 additions & 5 deletions resources/scss/components/_text-shadow.scss

This file was deleted.

1 change: 0 additions & 1 deletion resources/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/buttons/image.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@if(!empty($button['link']) && !empty($button['relative_url']))
<a href="{{ $button['link'] }}" class="block relative rounded overflow-hidden mb-2 {{ $class ?? '' }}">
@image($button['relative_url'], $button['filename_alt_text'])
@image($button['relative_url'], ($button['filename_alt_text'] ? $button['filename_alt_text'] : $button['title']))
@if(!empty($button['secondary_relative_url']))
<div class="absolute inset-0">@image($button['secondary_relative_url'], $button['secondary_alt_text'], 'w-full')</div>
@endif
Expand Down
20 changes: 14 additions & 6 deletions resources/views/components/catalog.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@
@if(!empty($component['columns']) && $component['columns'] == 1)
<div class="grid gap-6">
@foreach($group_items as $item)
@include('components/promo-list-item')
@include('components/promo/list-item-small')
@endforeach
</div>
@else
<div class="grid gap-6 md:grid-cols-2 lg:grid-cols-{{ !empty($component['columns']) && count($data) % 2 == 0 ? '2' : '3' }} xl:grid-cols-{{ !empty($component['columns']) ? $component['columns'] : '3' }}">
<div class="grid gap-6 sm:grid-cols-2 lg:grid-cols-{{ !empty($component['columns']) && count($data) % 2 == 0 ? '2' : '3' }} xl:grid-cols-{{ !empty($component['columns']) ? $component['columns'] : '3' }}">
@foreach($group_items as $item)
@include('components/promo-grid-item')
@if(!empty($component['gradientOverlay']) && $component['gradientOverlay'] === true)
@include('components/promo/grid-item-gradient-overlay')
@else
@include('components/promo/grid-item')
@endif
@endforeach
</div>
@endif
Expand All @@ -33,13 +37,17 @@
@if(!empty($component['columns']) && $component['columns'] == 1)
<div class="grid gap-6">
@foreach($data as $item)
@include('components/promo-list-item')
@include('components/promo/list-item-small')
@endforeach
</div>
@else
<div class="grid gap-6 md:grid-cols-2 lg:grid-cols-{{ !empty($component['columns']) && count($data) % 2 == 0 ? '2' : '3' }} xl:grid-cols-{{ !empty($component['columns']) ? $component['columns'] : '3' }}">
<div class="grid gap-6 sm:grid-cols-2 lg:grid-cols-{{ !empty($component['columns']) && count($data) % 2 == 0 ? '2' : '3' }} xl:grid-cols-{{ !empty($component['columns']) ? $component['columns'] : '3' }}">
@foreach($data as $item)
@include('components/promo-grid-item')
@if(!empty($component['gradientOverlay']) && $component['gradientOverlay'] === true)
@include('components/promo/grid-item-gradient-overlay')
@else
@include('components/promo/grid-item')
@endif
@endforeach
</div>
@endif
Expand Down
8 changes: 0 additions & 8 deletions resources/views/components/featured-promo.blade.php

This file was deleted.

2 changes: 1 addition & 1 deletion resources/views/components/hero/logo-overlay.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="hero__content-position w-full relative text-white flex flex-col justify-center">
<div class="hero__content row w-full px-4 pt-10 pb-6 text-center md:white-links content">
@if(!empty($hero['secondary_relative_url']))<img class="hero__secondary-image mx-auto mb-4" src="{{ $hero['secondary_relative_url'] }}" alt="{{ $hero['secondary_alt_text'] }}">@endif
<div class="hero__title md:text-shadow-darkest leading-tight text-2xl mb-1 @if(in_array($base['page']['controller'], config('base.hero_full_controllers')))xl:text-5xl @else xl:text-3xl @endif">
<div class="hero__title md:drop-shadow-px leading-tight text-2xl mb-1 @if(in_array($base['page']['controller'], config('base.hero_full_controllers')))xl:text-5xl @else xl:text-3xl @endif">
{{ $hero['title'] }}
</div>
@if(!empty($hero['description']))<div class="hero__description md:text-lg">{!! $hero['description'] !!}</div>@endif
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/hero/text-overlay.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="hero__content-position relative md:absolute print:relative md:bottom-0 md:inset-x-0 md:text-white md:white-links content md:bg-gradient-darkest">
<div class="row">
<div class="hero__content mx-4 relative pb-0 pt-4 @if(in_array($base['page']['controller'], config('base.hero_full_controllers'))) md:pb-2 md:pt-8 md:pt-20 @else md:pt-12 @endif">
<div class="hero__title md:text-shadow-darkest leading-tight text-2xl mb-1 @if(in_array($base['page']['controller'], config('base.hero_full_controllers')))xl:text-5xl @else xl:text-3xl @endif">{{ $hero['title'] }}</div>
<div class="hero__title md:drop-shadow-px leading-tight text-2xl mb-1 @if(in_array($base['page']['controller'], config('base.hero_full_controllers')))xl:text-5xl @else xl:text-3xl @endif">{{ $hero['title'] }}</div>
@if(!empty($hero['description']))<div class="hero__description md:text-lg">{!! $hero['description'] !!}</div>@endif
</div>
</div>
Expand Down
17 changes: 0 additions & 17 deletions resources/views/components/image-column.blade.php

This file was deleted.

6 changes: 5 additions & 1 deletion resources/views/components/promo-column.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@
$image_promo => single // ['title', 'link', 'filename_url', 'filename_alt_text']
--}}
@foreach($data as $item)
@include('components/promo-grid-item')
@if(!empty($component['gradientOverlay']) && $component['gradientOverlay'] === true)
@include('components/promo/grid-item-gradient-overlay')
@else
@include('components/promo/grid-item')
@endif
@endforeach
Loading

0 comments on commit 71d0c44

Please sign in to comment.