File: /var/www/quadcode.com/builds/-DFbjr9L/0/foach/quadcode.com/src/components/blocks/about/Hero.svelte
<script lang="ts">
import about from '../../../assets/images/about/hero/about.webp';
import imgMobile from '../../../assets/images/about/hero/about_mobile.webp';
import { loadEvent } from '../../../store';
import loadObserver from '../../../utils/loadObserver';
loadEvent.set(false);
const onload = loadObserver(() => {
loadEvent.set(true);
});
</script>
<div class="block-hero">
<picture>
<source srcset={imgMobile} media="(max-width: 767px)" />
<img use:onload src={about} alt="" class="block-hero__bg" />
</picture>
<div class="block-hero__content">
<h1 class="block-hero__title">We’re Quadcode <br /> Your Gateway to Brokerage Business</h1>
<p class="block-hero__subtitle">Simple yet comprehensive solutions for a smooth brokerage launch!</p>
</div>
</div>
<style lang="scss">
@import 'src/scss/variables';
@import 'src/scss/media';
@import 'src/scss/mixins';
.block-hero {
position: relative;
height: 1049px;
@include breakpoint-down('deskL') {
height: 774px;
}
@include breakpoint-down('deskS') {
height: 544px;
overflow: hidden;
}
@include breakpoint-down('tabM') {
height: 757px;
}
&__bg {
height: 100%;
max-height: 1049px;
object-fit: cover;
object-position: top;
@include breakpoint-down('deskL') {
max-height: 774px;
}
@include breakpoint-down('deskS') {
max-height: 544px;
width: 158%;
position: relative;
left: 50%;
transform: translateX(-50%);
}
@include breakpoint-down('tabM') {
max-height: 757px;
width: 100%;
}
}
&__content {
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 0;
padding-top: 222px;
width: 100%;
@include breakpoint-down('deskL') {
padding-top: 172px;
}
@include breakpoint-down('deskS') {
padding-top: 118px;
}
@include breakpoint-down('tabM') {
padding-top: 99px;
}
}
&__title {
@include titleXL;
width: 100%;
max-width: 920px;
margin-inline: auto;
text-align: center;
margin-bottom: 16px;
@include breakpoint-down('deskL') {
margin-bottom: 30px;
}
@include breakpoint-down('deskS') {
max-width: 530px;
margin-bottom: 8px;
}
@include breakpoint-down('tabM') {
max-width: 90%;
}
}
&__subtitle {
width: 100%;
max-width: 595px;
margin-inline: auto;
text-align: center;
@include breakpoint-down('deskS') {
max-width: 530px;
}
@include breakpoint-down('tabM') {
max-width: 90%;
}
}
}
</style>