feat: add new slid dev element
This commit is contained in:
parent
d6b19b21a0
commit
9ac7c4d16e
102
index.html
102
index.html
@ -250,15 +250,101 @@
|
||||
<button class="nav-button next-btn" id="nextBtn" aria-label="Next slide"></button>
|
||||
</div>
|
||||
</section>
|
||||
<section id="slide">
|
||||
<section class="hover-slider">
|
||||
<div class="container-slider">
|
||||
<div class="container-slider-baby container-slider-1"></div>
|
||||
<div class="container-slider-baby container-slider-2"></div>
|
||||
<div class="container-slider-baby container-slider-3"></div>
|
||||
<div class="container-slider-baby container-slider-4"></div>
|
||||
<section class="move-slider-ruby">
|
||||
<div class="move-slider-container">
|
||||
<div class="move-slider-box-static">
|
||||
<div class="slide-content-static">
|
||||
<h1 class="slide-static-h1"> Kodepilot </h1>
|
||||
<p class="slide-static-text">
|
||||
Helping the world withcreative
|
||||
</p>
|
||||
<p class="slide-static-text">
|
||||
designs
|
||||
</p>
|
||||
<p class="slide-static-footer">
|
||||
92% Client Retention
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="move-slider-animation-box">
|
||||
<div class="move-slider-box">
|
||||
<div class="slide-content">
|
||||
<p class="slide-text-cot">
|
||||
"
|
||||
</p>
|
||||
<p class="slide-text">
|
||||
"From farm inventory to eco-shipment tracking, OpsMonsters built us a green-tech backbone.
|
||||
Their system lets us trace every organic ingredient and prove our sustainability story to
|
||||
conscious customers."
|
||||
</p>
|
||||
<div class="slide-logo-box">
|
||||
<div class="profile-box">
|
||||
<img src="https://images.unsplash.com/photo-1542744094-24638eff58bb?w=500&h=400&fit=crop&crop=entropy&cs=tinysrgb"
|
||||
alt="Client Logo" class="slide-logo">
|
||||
<div class="profile-info">
|
||||
<p class="slide-name">John Doe</p>
|
||||
<p class="slide-role">CEO</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="move-slider-box">
|
||||
<div class="slide-content">
|
||||
<p class="slide-text-cot">
|
||||
"
|
||||
</p>
|
||||
<p class="slide-text">
|
||||
"OpsMonsters understood our mission: simple, honest, organic. They delivered a clean,
|
||||
lightning-fast e-commerce engine that scales with our growth."
|
||||
</p>
|
||||
<div class="slide-logo-box">
|
||||
<div class="profile-box">
|
||||
<img src="https://images.unsplash.com/photo-1542744094-24638eff58bb?w=500&h=400&fit=crop&crop=entropy&cs=tinysrgb"
|
||||
alt="Client Logo" class="slide-logo">
|
||||
<div class="profile-info">
|
||||
<p class="slide-name">John Doe</p>
|
||||
<p class="slide-role">CEO</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Slide 3 -->
|
||||
<div class="move-slider-box">
|
||||
<div class="slide-content">
|
||||
<p class="slide-text-cot">
|
||||
"
|
||||
</p>
|
||||
<p class="slide-text">
|
||||
"Loan processing used to take weeks. OpsMonsters’ smart engine made approvals happen in days
|
||||
without compromising security."
|
||||
</p>
|
||||
<div class="slide-logo-box">
|
||||
<div class="profile-box">
|
||||
<img src="https://images.unsplash.com/photo-1542744094-24638eff58bb?w=500&h=400&fit=crop&crop=entropy&cs=tinysrgb"
|
||||
alt="Client Logo" class="slide-logo">
|
||||
<div class="profile-info">
|
||||
<p class="slide-name">John Doe</p>
|
||||
<p class="slide-role">CEO</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="move-slider">
|
||||
<div class="container-slider">
|
||||
<div class="container-slider-baby container-slider-1"></div>
|
||||
<div class="container-slider-baby container-slider-2"></div>
|
||||
<div class="container-slider-baby container-slider-3"></div>
|
||||
<div class="container-slider-baby container-slider-4"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="our-numbers">
|
||||
|
||||
175
main.css
175
main.css
@ -209,6 +209,7 @@
|
||||
margin: 0;
|
||||
flex: 1 1 352px;
|
||||
max-height: 100px;
|
||||
width: 342px;
|
||||
}
|
||||
|
||||
.crd img {
|
||||
@ -229,7 +230,6 @@
|
||||
|
||||
.crd p {
|
||||
-webkit-line-clamp: 2;
|
||||
/* show max 2 lines */
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: 12px;
|
||||
line-height: 140%;
|
||||
@ -338,6 +338,11 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.nameContainer {
|
||||
display: block;
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.stat-number {
|
||||
display: block;
|
||||
font-size: clamp(1.8rem, 2.5vw, 3rem);
|
||||
@ -1128,4 +1133,172 @@
|
||||
.action-buttons {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.move-slider-ruby {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.move-slider-box-static {
|
||||
background: #1e90ff;
|
||||
height: 350px;
|
||||
min-width: 350px;
|
||||
border-radius: 10px;
|
||||
padding: 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
gap: 10px;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.slide-static-text {
|
||||
color: #fff;
|
||||
line-height: 3px;
|
||||
}
|
||||
|
||||
.slide-static-footer {
|
||||
color: #fff;
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.slide-static-h1 {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.slide-content-static {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.move-slider-container {
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
max-width: 1200px;
|
||||
}
|
||||
|
||||
.move-slider-animation-box {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
animation: scroll 20s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes scroll {
|
||||
from {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.move-slider-box {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.move-slider-box {
|
||||
flex: 1 0 30%;
|
||||
background: #fff;
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
min-width: 350px;
|
||||
}
|
||||
|
||||
.move-slider-box .slide-content>*:not(.slide-text) {
|
||||
transition: opacity 0.3s ease 0s;
|
||||
}
|
||||
|
||||
.move-slider-box:hover .slide-content>*:not(.slide-text) {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.move-slider-box .slide-text {
|
||||
opacity: 1;
|
||||
transform: translateY(0) scale(1);
|
||||
transition: transform 0.6s ease 0.5s, opacity 0.6s ease 0.5s;
|
||||
}
|
||||
|
||||
.move-slider-box:hover .slide-text {
|
||||
transform: translateY(100px) scale(1.1);
|
||||
}
|
||||
|
||||
.slide-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
justify-content: start;
|
||||
}
|
||||
|
||||
.slide-text-cot {
|
||||
font-size: 40px;
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.slide-text-cot,
|
||||
.slide-text {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.slide-logo-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.profile-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.profile-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.slide-logo {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
object-fit: cover;
|
||||
border-radius: 50%;
|
||||
border: 3px solid #fff;
|
||||
}
|
||||
|
||||
.slide-name {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.slide-role {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.slide-text {
|
||||
font-size: 20px;
|
||||
color: #333;
|
||||
margin-bottom: 20px;
|
||||
line-height: 1.5;
|
||||
margin-top: -23px;
|
||||
}
|
||||
25
main.js
25
main.js
@ -189,3 +189,28 @@ function goToLogin() {
|
||||
|
||||
new Slide1rSlider();
|
||||
})();
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const track = document.querySelector(".move-slider-track");
|
||||
const boxes = Array.from(track.children);
|
||||
|
||||
// Clone all slides once
|
||||
boxes.forEach(box => {
|
||||
const clone = box.cloneNode(true);
|
||||
track.appendChild(clone);
|
||||
});
|
||||
|
||||
let position = 0;
|
||||
const speed = 1; // pixels per frame, adjust for faster/slower scroll
|
||||
|
||||
function animate() {
|
||||
position -= speed;
|
||||
if (Math.abs(position) >= track.scrollWidth / 2) {
|
||||
position = 0; // reset after first set slides out
|
||||
}
|
||||
track.style.transform = `translateX(${position}px)`;
|
||||
requestAnimationFrame(animate);
|
||||
}
|
||||
|
||||
animate();
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user