fix: mobile
This commit is contained in:
parent
94315ae34d
commit
6b8f7e616b
205
index.html
205
index.html
@ -161,10 +161,8 @@
|
||||
<header class="navbar">
|
||||
<div class="logo">Kodepilot</div>
|
||||
<input type="text" class="search" placeholder="Search Opportunities">
|
||||
<nav>
|
||||
<a href="/login">Log in</a>
|
||||
</nav>
|
||||
<div class="buttons">
|
||||
<a href="/login">Log in</a>
|
||||
<button class="business" onclick="getInTouch()">Get in touch</button>
|
||||
<button class="login" onclick="goToApplay()">Apply</button>
|
||||
</div>
|
||||
@ -178,11 +176,56 @@
|
||||
by
|
||||
your
|
||||
dream company.</p>
|
||||
<button class="button_blue_box"><img
|
||||
src="https://d8it4huxumps7.cloudfront.net/uploads/images/655edc8c1fab9_diamond_1.png?d=82x84"
|
||||
width="41" height="42" alt="diamond" loading="lazy"><span><span
|
||||
class="nameContainer">Aditya</span><strong> Just Went
|
||||
Kodepilot!</strong></span></button>
|
||||
<button class="button_blue_box">
|
||||
<img src="https://d8it4huxumps7.cloudfront.net/uploads/images/655edc8c1fab9_diamond_1.png?d=82x84"
|
||||
width="41" height="42" alt="diamond" loading="lazy">
|
||||
<span>
|
||||
<span class="nameContainer">Aditya</span>
|
||||
<strong class="descContainer"> Just Went Kodepilot!</strong>
|
||||
</span>
|
||||
</button>
|
||||
<style>
|
||||
.nameContainer,
|
||||
.descContainer {
|
||||
transition: opacity 0.5s;
|
||||
}
|
||||
|
||||
.fade-out {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.fade-in {
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const data = [
|
||||
{ name: "Aditya", text: "Just Went Kodepilot!" },
|
||||
{ name: "Priya", text: "won a Hackathon!" },
|
||||
{ name: "Rahul", text: "earned a Scholarship!" },
|
||||
{ name: "Sneha", text: "joined a Festival!" }
|
||||
];
|
||||
let index1 = 0;
|
||||
const nameEl1 = document.querySelector(".nameContainer");
|
||||
const descEl1 = document.querySelector(".descContainer");
|
||||
setInterval(() => {
|
||||
nameEl1.classList.add("fade-out");
|
||||
descEl1.classList.add("fade-out");
|
||||
setTimeout(() => {
|
||||
index1 = (index1 + 1) % data.length;
|
||||
nameEl1.textContent = data[index1].name;
|
||||
descEl1.textContent = " " + data[index1].text;
|
||||
nameEl1.classList.remove("fade-out");
|
||||
descEl1.classList.remove("fade-out");
|
||||
nameEl1.classList.add("fade-in");
|
||||
descEl1.classList.add("fade-in");
|
||||
setTimeout(() => {
|
||||
nameEl1.classList.remove("fade-in");
|
||||
descEl1.classList.remove("fade-in");
|
||||
}, 500);
|
||||
}, 500);
|
||||
}, 2000);
|
||||
</script>
|
||||
</div>
|
||||
<div class="cards">
|
||||
<div class="card green">Internships<br><small>Gain Practical Experience</small></div>
|
||||
@ -475,7 +518,8 @@
|
||||
"
|
||||
</p>
|
||||
<p class="slide-text">
|
||||
"The Kodepilot curriculum is laser-focused on job placement. I mastered the required skills and secured my position at GBL with confidence."
|
||||
"The Kodepilot curriculum is laser-focused on job placement. I mastered the required
|
||||
skills and secured my position at GBL with confidence."
|
||||
</p>
|
||||
<div class="slide-logo-box">
|
||||
<div class="profile-box">
|
||||
@ -496,7 +540,8 @@
|
||||
"
|
||||
</p>
|
||||
<p class="slide-text">
|
||||
"After taking the QA and DevOps courses, Kodepilot made me ready for the global stage. I was immediately placed with a top-tier company: Accenture."
|
||||
"After taking the QA and DevOps courses, Kodepilot made me ready for the global stage. I
|
||||
was immediately placed with a top-tier company: Accenture."
|
||||
</p>
|
||||
<div class="slide-logo-box">
|
||||
<div class="profile-box">
|
||||
@ -516,7 +561,8 @@
|
||||
"
|
||||
</p>
|
||||
<p class="slide-text">
|
||||
"Kodepilot's training in AWS and DevOps was the key to my career breakthrough. I went from learning the skills to successfully landing a role at Infosys."
|
||||
"Kodepilot's training in AWS and DevOps was the key to my career breakthrough. I went
|
||||
from learning the skills to successfully landing a role at Infosys."
|
||||
</p>
|
||||
<div class="slide-logo-box">
|
||||
<div class="profile-box">
|
||||
@ -536,77 +582,79 @@
|
||||
<section>
|
||||
<!-- <div class="practice-cards-container"> -->
|
||||
<div class="practice-container">
|
||||
<h1 class="practice-title">Practice Coding & Ace Hiring Assessments</h1>
|
||||
<p class="practice-subtitle">Level up your coding skills by practicing the hiring assessments of your
|
||||
dream companies & ace your placement game!</p>
|
||||
|
||||
<div class="practice-cards-wrapper">
|
||||
<!-- Coding Practice Card -->
|
||||
<div class="practice-card active">
|
||||
<div class="practice-card-content">
|
||||
<div>
|
||||
<div class="practice-card-icon">💻</div>
|
||||
<h3>Coding Practice</h3>
|
||||
<p>Level up your coding skills by practicing the hiring Questions.</p>
|
||||
<div class="practice-footer-text">400+ Questions</div>
|
||||
</div>
|
||||
<a href="#" class="practice-cta-btn">Start Now ➤</a>
|
||||
</div>
|
||||
<div class="practice-card-svg">
|
||||
<img src="assets/images/codinghiringassesments/nope_1.png" alt="Coding Practice">
|
||||
</div>
|
||||
<div class="practice-container-box">
|
||||
<div class="practice-container-text-box">
|
||||
<h1 class="practice-title">Practice Coding & Ace Hiring Assessments</h1>
|
||||
<p class="practice-subtitle">Level up your coding skills by practicing the hiring assessments of
|
||||
your
|
||||
dream companies & ace your placement game!</p>
|
||||
</div>
|
||||
|
||||
<!-- Interview Preparation Card -->
|
||||
<div class="practice-card">
|
||||
<div class="practice-card-content">
|
||||
<div>
|
||||
<div class="practice-card-icon">📋</div>
|
||||
<h3>Interview Preparation</h3>
|
||||
<p>Crack Top companies in just 5 days with unbelivable learning</p>
|
||||
<div class="practice-footer-text">20+ Companies</div>
|
||||
<div class="practice-cards-wrapper">
|
||||
<div class="practice-card active">
|
||||
<div class="practice-card-content">
|
||||
<div>
|
||||
<div class="practice-card-icon">💻</div>
|
||||
<h3>Coding Practice</h3>
|
||||
<p>Level up your coding skills by practicing the hiring Questions.</p>
|
||||
<div class="practice-footer-text">400+ Questions</div>
|
||||
</div>
|
||||
<a href="#" class="practice-cta-btn">Start Now ➤</a>
|
||||
</div>
|
||||
<a href="#" class="practice-cta-btn">Start Now ➤</a>
|
||||
</div>
|
||||
<div class="practice-card-svg">
|
||||
<img src="assets/images/codinghiringassesments/nope_2.png" alt="Coding Practice">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Projects Card -->
|
||||
<div class="practice-card">
|
||||
<div class="practice-card-content">
|
||||
<div>
|
||||
<div class="practice-card-icon">📂</div>
|
||||
<h3>Projects</h3>
|
||||
<p>Projects epitomize perfect synergy for success.</p>
|
||||
<div class="practice-footer-text">15+ Projects</div>
|
||||
<div class="practice-card-svg">
|
||||
<img src="assets/images/codinghiringassesments/nope_1.png" alt="Coding Practice">
|
||||
</div>
|
||||
<a href="#" class="practice-cta-btn">Start Now ➤</a>
|
||||
</div>
|
||||
<div class="practice-card-svg">
|
||||
<img src="assets/images/codinghiringassesments/nope_3.webp" alt="Coding Practice">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Skill Based Assessments Card -->
|
||||
<div class="practice-card">
|
||||
<div class="practice-card-content">
|
||||
<div>
|
||||
<div class="practice-card-icon">📝</div>
|
||||
<h3>Skill Based Assessments</h3>
|
||||
<p>Assess your skills and get ahead of the curve.</p>
|
||||
<div class="practice-footer-text">2000+ Questions</div>
|
||||
<!-- Interview Preparation Card -->
|
||||
<div class="practice-card">
|
||||
<div class="practice-card-content">
|
||||
<div>
|
||||
<div class="practice-card-icon">📋</div>
|
||||
<h3>Interview Preparation</h3>
|
||||
<p>Crack Top companies in just 5 days with unbelivable learning</p>
|
||||
<div class="practice-footer-text">20+ Companies</div>
|
||||
</div>
|
||||
<a href="#" class="practice-cta-btn">Start Now ➤</a>
|
||||
</div>
|
||||
<div class="practice-card-svg">
|
||||
<img src="assets/images/codinghiringassesments/nope_2.png" alt="Coding Practice">
|
||||
</div>
|
||||
<a href="#" class="practice-cta-btn">Start Now ➤</a>
|
||||
</div>
|
||||
<div class="practice-card-svg">
|
||||
<img src="assets/images/codinghiringassesments/nope_4.webp" alt="Coding Practice">
|
||||
|
||||
<!-- Projects Card -->
|
||||
<div class="practice-card">
|
||||
<div class="practice-card-content">
|
||||
<div>
|
||||
<div class="practice-card-icon">📂</div>
|
||||
<h3>Projects</h3>
|
||||
<p>Projects epitomize perfect synergy for success.</p>
|
||||
<div class="practice-footer-text">15+ Projects</div>
|
||||
</div>
|
||||
<a href="#" class="practice-cta-btn">Start Now ➤</a>
|
||||
</div>
|
||||
<div class="practice-card-svg">
|
||||
<img src="assets/images/codinghiringassesments/nope_3.webp" alt="Coding Practice">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Skill Based Assessments Card -->
|
||||
<div class="practice-card">
|
||||
<div class="practice-card-content">
|
||||
<div>
|
||||
<div class="practice-card-icon">📝</div>
|
||||
<h3>Skill Based Assessments</h3>
|
||||
<p>Assess your skills and get ahead of the curve.</p>
|
||||
<div class="practice-footer-text">2000+ Questions</div>
|
||||
</div>
|
||||
<a href="#" class="practice-cta-btn">Start Now ➤</a>
|
||||
</div>
|
||||
<div class="practice-card-svg">
|
||||
<img src="assets/images/codinghiringassesments/nope_4.webp" alt="Coding Practice">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
|
||||
</section>
|
||||
|
||||
@ -619,7 +667,8 @@
|
||||
</div>
|
||||
<div class="card-easy-right">
|
||||
<h2>The Future of Your Career Starts Now. Learn, Grow, Achieve</h2>
|
||||
<p>Stop waiting for opportunity—create it. Dive into our extensive library to level up your expertise and unlock your next big career move.</p>
|
||||
<p>Stop waiting for opportunity—create it. Dive into our extensive library to level up your
|
||||
expertise and unlock your next big career move.</p>
|
||||
<div class="features">
|
||||
<div class="feature"><span>✓</span>50+ Courses</div>
|
||||
<div class="feature"><span>✓</span>Certificate</div>
|
||||
@ -676,8 +725,8 @@
|
||||
<footer class="footer">
|
||||
<div class="footer-container">
|
||||
<div class="footer-section company-section">
|
||||
<div class="logo" style="text-align: left; margin-left: 0; padding-left: 0;">Kodepilot</div>
|
||||
<p class="tagline">Built with <span class="heart">❤</span> in India for the world</p>
|
||||
<div class="logo" style="text-align: left; margin-left: 0; padding-left: 0;">Kodepilot</div>
|
||||
<p class="tagline">Built with <span class="heart">❤</span> in India for the world</p>
|
||||
<div class="contact-info">
|
||||
<h4>Stay Connected</h4>
|
||||
|
||||
@ -694,14 +743,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div >
|
||||
<strong style="color: white; font-size: 14px; line-height: 30px;">Support Inquiries</strong>
|
||||
<div style="margin-bottom: 20px; line-height: 23px; margin-left: -27px;">
|
||||
<div>
|
||||
<strong style="color: white; font-size: 14px; line-height: 30px;">Support Inquiries</strong>
|
||||
<div style="margin-bottom: 20px; line-height: 23px; margin-left: -27px;">
|
||||
<div class="contact-item">
|
||||
<i class="fas fa-envelope"></i>
|
||||
support@kodepilot.com
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
79
main.js
79
main.js
@ -1,5 +1,5 @@
|
||||
function goToApplay() {
|
||||
window.location.href = "/applay/";
|
||||
window.location.href = "/apply/";
|
||||
}
|
||||
|
||||
function getInTouch() {
|
||||
@ -422,56 +422,73 @@ function renderCourses(allCourses) {
|
||||
}
|
||||
});
|
||||
|
||||
// If temp still has >= 4, push it
|
||||
if (temp.courses.length >= 4) {
|
||||
mergedSections.push(temp);
|
||||
}
|
||||
|
||||
// Render sections
|
||||
mergedSections.forEach(sectionData => {
|
||||
const section = document.createElement('div');
|
||||
section.className = 'course-section';
|
||||
section.innerHTML = `
|
||||
<h2 class="course-category-title">${sectionData.category}</h2>
|
||||
<div class="course-slider-box">
|
||||
<div class="course-slider">
|
||||
<button class="prev-btn nav-button"></button>
|
||||
<div class="course-track"></div>
|
||||
<button class="next-btn nav-button"></button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
<h2 class="course-category-title">${sectionData.category}</h2>
|
||||
<div class="course-slider-box">
|
||||
<div class="course-slider">
|
||||
<button class="prev-btn nav-button"></button>
|
||||
<div class="course-track"></div>
|
||||
<button class="next-btn nav-button"></button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
const track = section.querySelector('.course-track');
|
||||
const prevBtn = section.querySelector('.prev-btn');
|
||||
const nextBtn = section.querySelector('.next-btn');
|
||||
|
||||
sectionData.courses.forEach(course => {
|
||||
const courseDiv = document.createElement('div');
|
||||
courseDiv.className = 'course-card';
|
||||
courseDiv.innerHTML = `
|
||||
<a href="${course.link}" target="_blank">
|
||||
<div class="course-image" style="background-image: url(${course.image});"></div>
|
||||
</a>
|
||||
<div class="course-content">
|
||||
<a href="${course.link}" class="course-name" target="_blank">${course.name}</a>
|
||||
<div class="course-description">${course.description}</div>
|
||||
</div>
|
||||
`;
|
||||
<a href="${course.link}" target="_blank">
|
||||
<div class="course-image" style="background-image: url(${course.image});"></div>
|
||||
</a>
|
||||
<div class="course-content">
|
||||
<a href="${course.link}" class="course-name" target="_blank">${course.name}</a>
|
||||
<div class="course-description">${course.description}</div>
|
||||
</div>
|
||||
`;
|
||||
track.appendChild(courseDiv);
|
||||
});
|
||||
|
||||
// Slider buttons
|
||||
const prevBtn = section.querySelector('.prev-btn');
|
||||
const nextBtn = section.querySelector('.next-btn');
|
||||
// Button scrolling
|
||||
const scrollAmount = 300;
|
||||
prevBtn.addEventListener('click', () => track.scrollBy({ left: -scrollAmount, behavior: 'smooth' }));
|
||||
nextBtn.addEventListener('click', () => track.scrollBy({ left: scrollAmount, behavior: 'smooth' }));
|
||||
|
||||
prevBtn.addEventListener('click', () => {
|
||||
track.scrollBy({ left: -300, behavior: 'smooth' });
|
||||
// Touch swipe
|
||||
let startX = 0;
|
||||
let isDragging = false;
|
||||
|
||||
track.addEventListener('touchstart', e => {
|
||||
startX = e.touches[0].clientX;
|
||||
isDragging = true;
|
||||
});
|
||||
nextBtn.addEventListener('click', () => {
|
||||
track.scrollBy({ left: 300, behavior: 'smooth' });
|
||||
|
||||
track.addEventListener('touchmove', e => {
|
||||
if (!isDragging) return;
|
||||
const x = e.touches[0].clientX;
|
||||
const walk = (startX - x) * 10;
|
||||
track.scrollLeft += walk;
|
||||
startX = x;
|
||||
});
|
||||
|
||||
|
||||
track.addEventListener('touchend', () => {
|
||||
isDragging = false;
|
||||
});
|
||||
|
||||
container.appendChild(section);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -493,7 +510,7 @@ function stepScroll() {
|
||||
track.appendChild(first);
|
||||
track.style.transition = 'none';
|
||||
track.style.transform = 'translateX(0)';
|
||||
void track.offsetWidth; // force reflow
|
||||
void track.offsetWidth;
|
||||
track.style.transition = 'transform 0.5s ease';
|
||||
track.removeEventListener('transitionend', handler);
|
||||
});
|
||||
@ -505,7 +522,7 @@ setInterval(stepScroll, 3000);
|
||||
|
||||
/*--------------------------------------------------------*/
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const cards = document.querySelectorAll('.practice-card');
|
||||
let activeCard = document.querySelector('.practice-card.active');
|
||||
let lastActiveCard = activeCard;
|
||||
@ -531,14 +548,14 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
// Add click event listeners (better for mobile and accessibility)
|
||||
cards.forEach(card => {
|
||||
card.addEventListener('click', function() {
|
||||
card.addEventListener('click', function () {
|
||||
setActiveCard(this);
|
||||
});
|
||||
});
|
||||
|
||||
// Optional: Add hover effect for desktop (complementary to click)
|
||||
cards.forEach(card => {
|
||||
card.addEventListener('mouseenter', function() {
|
||||
card.addEventListener('mouseenter', function () {
|
||||
// Only activate on hover if you want that behavior
|
||||
// setActiveCard(this);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user