Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/filenameurl - Temporarily using filename url instead of relative url for testing purposes #691

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions factories/HeroImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public function create($limit = 1, $flatten = false, $options = [])
'description' => '<p>' . $this->faker->text(100) . ' <a href="https://wayne.edu">'. $this->faker->sentence(3) .'</a></p>',
'link' => 'https://wayne.edu',
'relative_url' => '/styleguide/image/1600x580?text=1600x580%20('.$i.')',
'filename_url' => '/styleguide/image/1600x580?text=1600x580%20('.$i.')',
'filename_alt_text' => 'Example background image',
'secondary_filename_url' => '/styleguide/image/1600x580?text=Secondary%201600x580%20('.$i.')',
'secondary_relative_url' => '/styleguide/image/1600x580?text=Secondary%201600x580%20('.$i.')',
'secondary_alt_text' => 'Example secondary image',
];
Expand Down
2 changes: 2 additions & 0 deletions factories/HeroImageRotate.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public function create($limit = 1, $flatten = false, $options = [])
'description' => '<p>' . $this->faker->text(100) . ' <a href="https://wayne.edu">'. $this->faker->sentence(3) .'</a></p>',
'link' => 'https://wayne.edu',
'relative_url' => '/styleguide/image/1600x580?text=Primary%20image%20('.$i.')',
'filename_url' => '/styleguide/image/1600x580?text=Primary%20image%20('.$i.')',
'filename_alt_text' => 'Example background image',
'secondary_filename_url' => '/styleguide/image/400x250?text=Secondary%20image%20('.$i.')',
'secondary_relative_url' => '/styleguide/image/400x250?text=Secondary%20image%20('.$i.')',
'secondary_alt_text' => 'Example secondary image',
'option' => $this->faker->randomElement(['Text Overlay', 'Half', 'Logo Overlay', 'Banner large']),
Expand Down
1 change: 1 addition & 0 deletions factories/Icon.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public function create($limit = 1, $flatten = false, $options = [])
'description' => '<p>'.ucfirst(implode(' ', $this->faker->words(10))).' <a href="#">'.implode(' ', $this->faker->words(2)).'</a>.</p>',
//'description' => '<p>' . $this->faker->text(20) . ' <a href="https://wayne.edu">'. $this->faker->sentence(3) .'</a></p>',
'promo_item_id' => $i,
'filename_url' => $icon_green,
'relative_url' => $icon_green,
'filename_alt_text' => 'Placeholder icon '.$i,
'option' => '',
Expand Down
4 changes: 2 additions & 2 deletions resources/views/components/hero/banner-large.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{--
$hero => array // ['relative_url', 'title']
$hero => array // ['filename_url', 'title']
--}}
<div class="hero__wrapper w-full">
<div class="hero__bg h-hero max-h-hero w-full bg-cover bg-center relative{{ $loop->first !== true ? ' lazy' : '' }}" @if($loop->first === true) style="background-image: url('{{ $hero['relative_url'] }}')" @else data-src="{{ $hero['relative_url'] }}"@endif></div>
<div class="hero__bg h-hero max-h-hero w-full bg-cover bg-center relative{{ $loop->first !== true ? ' lazy' : '' }}" @if($loop->first === true) style="background-image: url('{{ $hero['filename_url'] }}')" @else data-src="{{ $hero['filename_url'] }}"@endif></div>
</div>
4 changes: 2 additions & 2 deletions resources/views/components/hero/banner-small.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{--
$hero => array // ['relative_url', 'title']
$hero => array // ['filename_url', 'title']
--}}
<div class="hero__wrapper w-full">
<div class="hero__primary-image w-full h-hero-skinny max-h-hero-skinny bg-cover bg-center relative" style="background-image: url('{{ $hero['relative_url'] }}')"></div>
<div class="hero__primary-image w-full h-hero-skinny max-h-hero-skinny bg-cover bg-center relative" style="background-image: url('{{ $hero['filename_url'] }}')"></div>
</div>

4 changes: 2 additions & 2 deletions resources/views/components/hero/half.blade.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{--
$hero => array // ['relative_url', 'title', 'description', 'link']
$hero => array // ['filename_url', 'title', 'description', 'link']
--}}

<div class="hero__wrapper w-full relative xl:flex items-center">
<div class="hero__primary-image w-full xl:w-[60%] shrink-0">
<div class="w-full aspect-video bg-center bg-cover{{ $loop->first !== true ? ' lazy' : '' }}" @if($loop->first === true) style="background-image: url('{{ $hero['relative_url'] }}')" @else data-src="{{ $hero['relative_url'] }}"@endif>
<div class="w-full aspect-video bg-center bg-cover{{ $loop->first !== true ? ' lazy' : '' }}" @if($loop->first === true) style="background-image: url('{{ $hero['filename_url'] }}')" @else data-src="{{ $hero['filename_url'] }}"@endif>
<span class="visually-hidden">{{ $hero['filename_alt_text'] }}
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/components/hero/logo-overlay.blade.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{{--
$hero => array // ['relative_url', 'title', 'description', 'link', 'secondary_relative_url']
$hero => array // ['filename_url', 'title', 'description', 'link', 'secondary_filename_url']
--}}

<div class="hero__wrapper w-full">
<div class="relative overflow-hidden flex bg-green-900 min-h-[500px]">
<div class="hero__primary-image inset-0 absolute print:relative bg-cover bg-top opacity-20 {{ $loop->first !== true ? ' lazy' : '' }}" @if($loop->first === true) style="background-image: url('{{ $hero['relative_url'] }}')" @else data-src="{{ $hero['relative_url'] }}"@endif></div>
<div class="hero__primary-image inset-0 absolute print:relative bg-cover bg-top opacity-20 {{ $loop->first !== true ? ' lazy' : '' }}" @if($loop->first === true) style="background-image: url('{{ $hero['filename_url'] }}')" @else data-src="{{ $hero['filename_url'] }}"@endif></div>
<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 content white-links">
@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
@if(!empty($hero['secondary_filename_url']))<img class="hero__secondary-image mx-auto mb-4" src="{{ $hero['secondary_filename_url'] }}" alt="{{ $hero['secondary_alt_text'] }}">@endif
<div class="hero__title md:drop-shadow-px leading-tight text-2xl mb-1 xl:text-5xl">
{{ $hero['title'] }}
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/components/hero/svg-overlay.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{--
$hero => array // ['relative_url', 'title', 'link', 'secondary_relative_url']
$hero => array // ['filename_url', 'title', 'link', 'secondary_filename_url']
--}}

<div class="hero__wrapper w-full relative overflow-hidden">
@if(!empty($hero['link']))<a class="hero__link" href="{{ $hero['link'] }}">@endif
<div class="hero__primary-image pt-hero w-full bg-cover bg-top {{ $loop->first !== true ? ' lazy' : '' }}" @if($loop->first === true) style="background-image: url('{{ $hero['relative_url'] }}')" @else data-src="{{ $hero['relative_url'] }}"@endif></div>
<div class="hero__primary-image pt-hero w-full bg-cover bg-top {{ $loop->first !== true ? ' lazy' : '' }}" @if($loop->first === true) style="background-image: url('{{ $hero['filename_url'] }}')" @else data-src="{{ $hero['filename_url'] }}"@endif></div>
<div class="hero__content-position absolute print:relative inset-0 flex items-center justify-center">
<img class="hero__secondary-image w-full max-w-full max-h-full" src="{{ $hero['secondary_relative_url'] }}" alt="{{ $hero['secondary_alt_text'] }}">
<img class="hero__secondary-image w-full max-w-full max-h-full" src="{{ $hero['secondary_filename_url'] }}" alt="{{ $hero['secondary_alt_text'] }}">
</div>
@if(!empty($hero['link']))</a>@endif
</div>
4 changes: 2 additions & 2 deletions resources/views/components/hero/text-overlay.blade.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{--
$hero => array // ['relative_url', 'title', 'description']
$hero => array // ['filename_url', 'title', 'description']
--}}

<div class="hero__wrapper w-full relative">
<div class="hero__primary-image h-hero max-h-hero w-full bg-cover bg-center relative{{ $loop->first !== true ? ' lazy' : '' }}" @if($loop->first === true) style="background-image: url('{{ $hero['relative_url'] }}')" @else data-src="{{ $hero['relative_url'] }}"@endif></div>
<div class="hero__primary-image h-hero max-h-hero w-full bg-cover bg-center relative{{ $loop->first !== true ? ' lazy' : '' }}" @if($loop->first === true) style="background-image: url('{{ $hero['filename_url'] }}')" @else data-src="{{ $hero['filename_url'] }}"@endif></div>
<div class="hero__content-position relative md:absolute print:relative md:bottom-0 md:inset-x-0 md:text-white md:white-links md:bg-gradient-darkest">
<div class="row">
<div class="hero__content relative p-4 pb-0 md:pb-2 md:pt-8 md:pt-20">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/icons-column.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@foreach($data as $item)
<li>
<{{ !empty($item['link']) ? 'a href='.$item['link'] : 'div' }} class="flex items-start gap-x-4 {{ !empty($item['link']) ? 'group' : '' }}">
@image($item['relative_url'], $item['filename_alt_text'], 'grow-0 shrink-0 w-16')
@image($item['filename_url'], $item['filename_alt_text'], 'grow-0 shrink-0 w-16')
<div>
<div class="font-bold text-xl mt-0 mb-1 text-green no-underline group-hover:underline">{{ $item['title'] }}</div>
@if(!empty($item['excerpt']))<div class="text-sm text-black">{{ $item['excerpt'] }}</div>@endif
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/icons-row.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@foreach($data as $item)
<li>
<{{ !empty($item['link']) ? 'a href='.$item['link'] : 'div' }} class="flex items-start gap-x-4 {{ !empty($item['link']) ? 'group' : '' }}">
@image($item['relative_url'], $item['filename_alt_text'], 'grow-0 shrink-0 w-16 '.(!empty($component['columns']) && $component['columns'] >= 3 ? ' xl:w-16' : ' xl:w-20'))
@image($item['filename_url'], $item['filename_alt_text'], 'grow-0 shrink-0 w-16 '.(!empty($component['columns']) && $component['columns'] >= 3 ? ' xl:w-16' : ' xl:w-20'))
<div>
<div class="font-bold text-xl xl:text-2xl mt-0 mb-1 no-underline group-hover:underline">{{ $item['title'] }}</div>
@if(!empty($item['excerpt']))<div class="text-sm lg:text-base text-black">{{ $item['excerpt'] }}</div>@endif
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/icons-top-row.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@foreach($data as $item)
<li>
<{{ !empty($item['link']) ? 'a href='.$item['link'] : 'div' }} class="text-center {{ !empty($item['link']) ? ' group' : '' }}">
@image($item['relative_url'], $item['filename_alt_text'], 'block mx-auto grow-0 shrink-0 mb-2 w-16'.(!empty($component['columns']) && $component['columns'] >= 5 ? ' xl:w-16' : ' xl:w-20'))
@image($item['filename_url'], $item['filename_alt_text'], 'block mx-auto grow-0 shrink-0 mb-2 w-16'.(!empty($component['columns']) && $component['columns'] >= 5 ? ' xl:w-16' : ' xl:w-20'))
<div>
<div class="font-bold text-xl mt-0 mb-1 no-underline group-hover:underline">{{ $item['title'] }}</div>
@if(!empty($item['excerpt']))<div class="text-sm text-black">{{ $item['excerpt'] }}</div>@endif
Expand Down
12 changes: 6 additions & 6 deletions resources/views/components/promo/grid-item.blade.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{{--
This component's image is 1/4 width on small views
$item => array // ['title', 'link', 'description', 'excerpt', 'relative_url', 'option']
$item => array // ['title', 'link', 'description', 'excerpt', 'filename_url', 'option']
--}}

<{{ !empty($item['link']) ? 'a href='.$item['link'] : 'div' }} class="block {{ !empty($component['gradientOverlay']) && $component['gradientOverlay'] === true ? 'bg-green-800 relative overflow-hidden' : '' }} {{ !empty($item['link']) ? 'group' : '' }} {{ $loop->last != true && !empty($component['filename']) && $component['filename'] != 'catalog' ? 'mt-6 mb-8' : '' }}">
<div class="{{ !empty($component['gradientOverlay']) ? '' : 'mb-2' }}">
@if(!empty($item['youtube_id']))
<div class="play-video-button">
@if(!empty($item['relative_url']))
@image($item['relative_url'], $item['filename_alt_text'], "lazy block w-full")
@if(!empty($item['filename_url']))
@image($item['filename_url'], $item['filename_alt_text'], "lazy block w-full")
@else
@image('//i.wayne.edu/youtube/'.$item['youtube_id'].'/max', $item['title'], "lazy block w-full")
@endif
</div>
@elseif(!empty($item['relative_url']))
@image($item['relative_url'], $item['filename_alt_text'], "lazy block w-full")
@elseif(!empty($item['filename_url']))
@image($item['filename_url'], $item['filename_alt_text'], "lazy block w-full")
@endif
</div>

<div class="w-full {{ !empty($component['gradientOverlay']) && $component['gradientOverlay'] === true ? 'bg-gradient-darkest absolute inset-x-0 bottom-0' : '' }}">
<div class="content {{ !empty($component['gradientOverlay']) && $component['gradientOverlay'] === true ? 'white-links text-white relative p-4 pt-20 drop-shadow-px' : '' }}">
@if(!empty($item['youtube_id']) || !empty($item['relative_url']))
@if(!empty($item['youtube_id']) || !empty($item['filename_url']))
<div class="my-1 font-bold {{ !empty($component['columns']) ? ($component['columns'] < 4 ? 'text-lg' : 'text-base') : 'text-xl' }} group-hover:underline group-focus:underline leading-snug xl:leading-tight">
{{ $item['title'] }}
</div>
Expand Down
14 changes: 7 additions & 7 deletions resources/views/components/promo/list-item.blade.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{{--
This component's image is full width on small views
$item => array // ['title', 'link', 'description', 'excerpt', 'relative_url', 'option']
$item => array // ['title', 'link', 'description', 'excerpt', 'filename_url', 'option']
--}}

<{{ !empty($item['link']) ? 'a href='.$item['link'] : 'div' }} class="block {{ !empty($component['imageSize']) && $component['imageSize'] === 'small' ? 'flex items-start' : 'md:flex xl:items-center' }} gap-x-3 lg:gap-x-6 {{ !empty($item['link']) ? 'group' : '' }} {{ $loop->iteration > 1 && !empty($component['filename']) && $component['filename'] != 'catalog' ? 'mt-6' : '' }}">
@if(!empty($item['youtube_id']) || !empty($item['relative_url']))
@if(!empty($item['youtube_id']) || !empty($item['filename_url']))
<div class="shrink-0 grow-0 {{ !empty($component['imageSize']) && $component['imageSize'] === 'small' ? 'w-1/4' : 'md:w-2/5' }}
@if(!empty($component['imagePosition']) && ($component['imagePosition'] === 'right' || ($component['imagePosition'] === 'alternate' && $loop->even))) md:order-2 @endif">
@if(!empty($item['youtube_id']))
<div class="play-video-button">
@if(!empty($item['relative_url']))
@image($item['relative_url'], $item['filename_alt_text'], "w-full lazy")
@if(!empty($item['filename_url']))
@image($item['filename_url'], $item['filename_alt_text'], "w-full lazy")
@else
@image('//i.wayne.edu/youtube/'.$item['youtube_id'].'/max', $item['title'], "w-full lazy")
@endif
</div>
@elseif(!empty($item['relative_url']))
@image($item['relative_url'], $item['filename_alt_text'], "lazy w-full")
@elseif(!empty($item['filename_url']))
@image($item['filename_url'], $item['filename_alt_text'], "lazy w-full")
@endif
</div>
@endif

<div class="content w-full">
@if(!empty($item['youtube_id']) || !empty($item['relative_url']))
@if(!empty($item['youtube_id']) || !empty($item['filename_url']))
<div class="mb-1 font-bold group-hover:underline group-focus:underline leading-tight text-lg lg:text-xl {{ !empty($component['imageSize']) && $component['imageSize'] === 'small' ? '' : 'mt-2 lg:mt-0' }}">{{ $item['title'] }}</div>
@elseif (!empty($component['heading']))
<h3 class="mt-0 mb-3 group-hover:underline group-focus:underline leading-tight">{{ $item['title'] }}</h3>
Expand Down
Loading