-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/refactor-3' into develop
- Loading branch information
Showing
40 changed files
with
784 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php | ||
|
||
namespace Factories; | ||
|
||
use Contracts\Factories\FactoryContract; | ||
use Faker\Factory; | ||
|
||
class EventFullListing implements FactoryContract | ||
{ | ||
/** | ||
* Construct the factory. | ||
*/ | ||
public function __construct(Factory $faker) | ||
{ | ||
$this->faker = $faker->create(); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function create($limit = 1, $flatten = false, $options = []) | ||
{ | ||
for ($i = 1; $i <= $limit; $i++) { | ||
$date = $this->faker->dateTimeBetween('+10 days', '+15 days')->format('Y-m-d'); | ||
$title = $this->faker->sentence(rand(6, 10)); | ||
$imagex = $this->faker->randomElement([ | ||
'/styleguide/image/600x600?text=600x600:'.$i, | ||
'' | ||
]); | ||
$description = $this->faker->text(100); | ||
$image = '/styleguide/image/600x600?text=600x600:'.$i; | ||
|
||
$event = [ | ||
'event_id' => $i, | ||
'url' => 'https://wayne.edu', | ||
'title' => $title, | ||
'date' => $date, | ||
'start_time' => $this->faker->time('H:i:s', 'now'), | ||
'end_time' => $this->faker->time('H:i:s', '+5 hours'), | ||
'repeat_end_date' => $this->faker->dateTimeBetween('+1 month', '+2 months')->format('Y-m-d'), | ||
'end_date' => $this->faker->dateTimeBetween('+10 days', '+15 days')->format('Y-m-d'), | ||
'images' => [ | ||
0 => [ | ||
'full_url' => $image, | ||
'description' => $description, | ||
], | ||
], | ||
'display_image' => [ | ||
'full_url' => $image, | ||
'description' => $description, | ||
], | ||
'is_all_day' => $this->faker->boolean, | ||
]; | ||
$event = array_replace_recursive($event, $options); | ||
|
||
$data[$i] = $event; | ||
} | ||
|
||
return $data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
namespace Factories; | ||
|
||
use Contracts\Factories\FactoryContract; | ||
use Faker\Factory; | ||
|
||
class EventFullListingNoImage implements FactoryContract | ||
{ | ||
/** | ||
* Construct the factory. | ||
*/ | ||
public function __construct(Factory $faker) | ||
{ | ||
$this->faker = $faker->create(); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function create($limit = 1, $flatten = false, $options = []) | ||
{ | ||
for ($i = 1; $i <= $limit; $i++) { | ||
$date = $this->faker->dateTimeBetween('+10 days', '+15 days')->format('Y-m-d'); | ||
$title = $this->faker->sentence(rand(6, 10)); | ||
|
||
$event = [ | ||
'event_id' => $i, | ||
'url' => 'https://wayne.edu', | ||
'title' => $title, | ||
'date' => $date, | ||
'start_time' => $this->faker->time('H:i:s', 'now'), | ||
'end_time' => $this->faker->time('H:i:s', '+5 hours'), | ||
'repeat_end_date' => $this->faker->dateTimeBetween('+1 month', '+2 months')->format('Y-m-d'), | ||
'end_date' => $this->faker->dateTimeBetween('+10 days', '+15 days')->format('Y-m-d'), | ||
'images' => '', | ||
'is_all_day' => $this->faker->boolean, | ||
]; | ||
$event = array_replace_recursive($event, $options); | ||
|
||
$data[$i] = $event; | ||
} | ||
|
||
return $data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
resources/views/components/events-featured-column.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<ul> | ||
@if(!empty($data)) | ||
@foreach($data as $item) | ||
<li class="mb-6"> | ||
<a href="{{$item['url']}}" class="flex w-full group"> | ||
<div class="w-1/3 shrink-0"> | ||
<img data-src="{{$item['display_image']['full_url']}}" alt="{{($item['display_image']['description']) ? $item['display_image']['description'] : ''}}" class="lazy" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="> | ||
</div> | ||
<div class="ml-4 pt-3 font-bold"> | ||
@if(!empty($item['date'])) | ||
<div class="text-sm uppercase mb-1">{{ date('F j', strtotime($item['date'])) }}</div> | ||
@endif | ||
<div class="group-hover:underline">{{$item['title']}}</div> | ||
</div> | ||
</a> | ||
</li> | ||
@endforeach | ||
@endif | ||
</ul> | ||
@if(!empty($component['cal_name']) || !empty($base['site']['events']['path'])) | ||
<div class="mt-4"> | ||
<a class="button" href="//events.wayne.edu/{{ $component['cal_name'] ?? $base['site']['events']['path'].'main/' }}upcoming">{{ $component['link_text'] ?? 'More events' }}</a> | ||
</div> | ||
@endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<ul class="grid gap-4 {{ !empty($component['columns']) && $component['columns'] % 2 == 0 ? (count($data) >= 4 ? ' sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-'.($component['columns']) : ' md:grid-cols-'.$component['columns']) : (count($data) >= 3 ? ' sm:grid-cols-1 md:grid-cols-3' : ' md:grid-cols-'.$component['columns']) }}"> | ||
@if(!empty($data)) | ||
@foreach($data as $item) | ||
<li> | ||
<a href="{{$item['url']}}" class="block w-full group"> | ||
<div class="w-full"> | ||
<img data-src="{{$item['display_image']['full_url']}}" alt="{{($item['display_image']['description']) ? $item['display_image']['description'] : ''}}" class="lazy" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="> | ||
</div> | ||
<div class="mt-2 font-bold"> | ||
@if(!empty($item['date'])) | ||
<div class="text-sm uppercase mb-1">{{ date('F j', strtotime($item['date'])) }}</div> | ||
@endif | ||
<div class="group-hover:underline">{{$item['title']}}</div> | ||
</div> | ||
</a> | ||
</li> | ||
@endforeach | ||
@endif | ||
</ul> | ||
@if(!empty($component['cal_name']) || !empty($base['site']['events']['path'])) | ||
<div class="text-center mt-6"> | ||
<a class="button" href="//events.wayne.edu/{{ $component['cal_name'] ?? $base['site']['events']['path'].'main/' }}upcoming">{{ $component['link_text'] ?? 'More events' }}</a> | ||
</div> | ||
@endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{-- | ||
Label: "heading-1" | ||
Data: { | ||
"heading": "My heading" | ||
} | ||
--}} | ||
|
||
@foreach ($data as $item) | ||
<h2 class="mt-0 -mb-3" id="{{ Str::slug($item['heading']) }}">{{ $item['heading'] }}</h2> | ||
@endforeach |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...s/views/components/hero/default.blade.php → ...ws/components/hero/banner-large.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
{{-- | ||
$hero => array // ['relative_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> |
1 change: 0 additions & 1 deletion
1
...es/views/components/hero/banner.blade.php → ...ws/components/hero/banner-small.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.