Initial public commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'defaults' => [
|
||||
'illustration' => false,
|
||||
'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptas repellendus modi ea praesentium totam, earum, accusamus pariatur cumque.</p>'
|
||||
],
|
||||
'preview' => function() {
|
||||
// Use the home illustration if we have one
|
||||
$illustration = page('home')->image('illustration.svg')->url();
|
||||
|
||||
return compact('illustration');
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,21 @@
|
||||
<article class="home-banner">
|
||||
<?php if($illustration): ?>
|
||||
<img class="home-banner__illustration" src="<?= $illustration ?>" alt="">
|
||||
<?php endif ?>
|
||||
|
||||
<div class="home-banner__description">
|
||||
<div class="home-banner__text text"><?= $text ?></div>
|
||||
|
||||
<?php pattern('shared/2-blocks/button', [
|
||||
'text' => l::get('home-banner.learnmore', 'Learn more'),
|
||||
'label' => l::get('home-banner.learnmore.label', 'Learn more about my services'),
|
||||
'link' => url('services'),
|
||||
'modifiers' => 'novisited'
|
||||
]) ?>
|
||||
<?php pattern('shared/2-blocks/button', [
|
||||
'text' => l::get('home-banner.contact', 'Contact'),
|
||||
'link' => url('contact'),
|
||||
'modifiers' => ['novisited', 'secondary']
|
||||
]) ?>
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,36 @@
|
||||
.home-banner {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
|
||||
@media (max-width: 44em) {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.home-banner__illustration {
|
||||
width: 25em;
|
||||
max-width: 100%;
|
||||
margin-right: 4em;
|
||||
|
||||
@media (max-width: 60em) {
|
||||
width: 45%;
|
||||
margin-right: 2em;
|
||||
}
|
||||
|
||||
@media (max-width: 44em) {
|
||||
width: 20em;
|
||||
margin-right: 0;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.home-banner__description {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.home-banner__text {
|
||||
font-size: -cdd-rem(24);
|
||||
line-height: 1.55;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
Reference in New Issue
Block a user