home hero - implement hero link
This commit is contained in:
parent
bfcb25cf09
commit
1c8e47d810
2 changed files with 17 additions and 0 deletions
|
|
@ -5,6 +5,10 @@
|
|||
column-gap: calc(var(--space-m) / 1.5);
|
||||
}
|
||||
|
||||
.hero__text {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.hero__text h2 {
|
||||
font-size: var(--font-size-xl);
|
||||
width: 100%;
|
||||
|
|
@ -26,3 +30,13 @@
|
|||
.hero__text p:first-of-type {
|
||||
margin-top: var(--padding-vertical);
|
||||
}
|
||||
|
||||
.hero__link {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
.hero__link::before {
|
||||
content: "→";
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
<section class="hero">
|
||||
<div class="hero__text">
|
||||
<?= $site->heroText()->toBlocks() ?>
|
||||
<?php if ($site->heroLinkUrl()->isNotEmpty() == 'true'): ?>
|
||||
<a class="hero__link h3" href="<?= $site->heroLinkUrl()->toUrl() ?>"><?php e($site->heroLinkText()->isNotEmpty() == 'true', $site->heroLinkText(), $site->heroLinkUrl()->toUrl()) ?></a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<div class="hero__image">
|
||||
<?php snippet('picture', ['file' => $site->heroImage()->toFile()]) ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue