-
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.
- Loading branch information
Showing
36 changed files
with
2,364 additions
and
1,621 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
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
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,53 @@ | ||
<?php | ||
|
||
namespace Factories; | ||
|
||
use Contracts\Factories\FactoryContract; | ||
use Faker\Factory; | ||
|
||
class Catalog implements FactoryContract | ||
{ | ||
/** | ||
* Construct the factory. | ||
*/ | ||
public function __construct(Factory $faker) | ||
{ | ||
$this->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; | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,41 +1,73 @@ | ||
.flag { | ||
@apply absolute hidden mt:flex z-40 bg-gold text-green-800 hover:text-green-900 items-center justify-center mr-4 right-0 pt-0 duration-500; | ||
|
||
transition-property: height, padding; | ||
width: 140px; | ||
height: 30px; | ||
|
||
// Pointy bottom | ||
&::after { | ||
@apply border-gold absolute duration-500; | ||
|
||
transition-property: top; | ||
border-left-color: transparent; | ||
border-right-color: transparent; | ||
border-style: solid; | ||
border-width: 12px 70px 0; | ||
top: 30px; | ||
content: ""; | ||
left: 0; | ||
.flag__container { | ||
.flag { | ||
&__title { | ||
@apply uppercase text-sm tracking-wide leading-3 relative z-50; | ||
} | ||
|
||
em, | ||
&__excerpt { | ||
@apply normal-case text-xl italic font-serif pl-0.5 leading-3; | ||
} | ||
} | ||
|
||
&:hover { | ||
@apply duration-500; | ||
&.flag--sm { | ||
@apply mx-4; | ||
|
||
transition-property: height, padding; | ||
height: 38px; | ||
padding-top: 8px; | ||
.flag { | ||
@extend .gold-gradient-button; | ||
|
||
&::after { | ||
top: 38px; | ||
@apply w-full font-normal mt:hidden; | ||
} | ||
} | ||
|
||
&__title { | ||
@apply uppercase text-sm tracking-wide pt-1.5 pt-1; | ||
} | ||
&.flag--mt { | ||
@apply row relative; | ||
|
||
.flag { | ||
@apply absolute hidden mt:flex z-40 bg-gold text-green-800 hover:text-green-900 items-center justify-center mr-4 right-0 px-2 duration-500; | ||
|
||
transition-property: height, padding; | ||
min-width: 140px; | ||
height: 28px; | ||
|
||
&__container { | ||
@apply row relative; | ||
} | ||
|
||
&__excerpt { | ||
@apply normal-case text-xl italic font-serif pt-0.5 pl-1; | ||
// Pointy bottom | ||
&::after { | ||
@apply bg-gold absolute duration-500; | ||
|
||
clip-path: polygon(0 0, 100% 0, 100% 4%, 50% 14%, 0 4%); | ||
//clip-path: polygon(0 0, 100% 0, 100% 12%, 50% 4%, 0 12%); | ||
transition-property: top; | ||
width: 100%; | ||
height: 8rem; | ||
top: 24px; | ||
content: ""; | ||
left: 0; | ||
|
||
/* | ||
@apply border-gold absolute duration-500; | ||
border-left-color: transparent; | ||
border-right-color: transparent; | ||
border-style: solid; | ||
border-width: 12px 70px 0; | ||
*/ | ||
} | ||
|
||
&:hover { | ||
@apply duration-500; | ||
|
||
transition-property: height, padding; | ||
height: 30px; | ||
padding-top: 8px; | ||
|
||
&::after { | ||
top: 28px; | ||
} | ||
} | ||
} | ||
} | ||
} |
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.