SHX-Theme/snippets/shx-landingpage.liquid

93 lines
1.8 KiB
Plaintext

{% assign videoURL = "https://cdn.shopify.com/videos/c/o/v/37f714939aef4036aa9fc14f7c18ab46.mp4" %}
<style>
.landingPage {}
.shx-landingPage__video__element {
width: 100%;
height: 100%;
object-fit: cover;
max-height: 50vh;
}
.shx-landingPage__video {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
@media screen and (max-width: 768px) {
.shx-landingPage__video {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
/* Hide the part of the video that's outside the div */
}
.shx-landingPage__video__element {
width: 200%;
/* Make the video twice as wide as the div */
height: 100%;
object-fit: cover;
transform: translateX(-50%);
/* Shift the video to the right */
}
}
.shx-landingPage__video__content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: white;
}
.shx-landingPage__video__title {
font-size: 4rem;
margin-bottom: 3rem;
color: white;
}
@media screen and (max-width: 768px) {
.shx-landingPage__video__title {
font-size: 2.3rem;
}
.landingPage__video__content {
width: 90%;
}
}
.shx-landingPage__video__description {
font-size: 1rem;
margin-bottom: 1rem;
}
.shx-landingPage__video__cta {}
</style>
<div class="landingPage">
<div class="shx-landingPage__video">
<video
class="shx-landingPage__video__element"
autoplay
loop
muted
playsinline>
<source src="{{ videoURL }}" type="video/mp4">
Your browser does not support the video tag.
</video>
<div class="shx-landingPage__video__content">
<h1 class="shx-landingPage__video__title">Entdecke magische Kreationen</h1>
<a href="#" class="button shx-landingPage__video__cta">Jetzt Einkaufen</a>
</div>
</div>
</div>