Compare commits
6 Commits
51b4628562
...
f5459eb206
| Author | SHA1 | Date | |
|---|---|---|---|
| f5459eb206 | |||
| ba87dbc9e6 | |||
| a7e28defbc | |||
| 112ba89b04 | |||
| 0346054398 | |||
|
|
97b9eb21b9 |
20
main.css
20
main.css
@ -1282,6 +1282,7 @@
|
||||
background-color: #F6F8FA;
|
||||
border-radius: 20px;
|
||||
overflow: hidden;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.card-easy-left {
|
||||
@ -1480,6 +1481,13 @@
|
||||
.course-description {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
line-height: 1.4;
|
||||
max-height: 2.8em;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.corces {
|
||||
@ -1574,6 +1582,14 @@
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.practice-cards-container {
|
||||
background-color: #ffffff;
|
||||
color: #1f2937;
|
||||
padding: 40px 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.practice-title {
|
||||
font-size: 32px;
|
||||
@ -1683,7 +1699,7 @@
|
||||
|
||||
.practice-card-svg {
|
||||
width: 0;
|
||||
height: 10%;
|
||||
height: 60%;
|
||||
bottom: 0px;
|
||||
display: block;
|
||||
align-items: center;
|
||||
@ -1697,7 +1713,7 @@
|
||||
|
||||
|
||||
.practice-cards-wrapper:hover .practice-card:hover .practice-card-svg {
|
||||
width: 35%;
|
||||
width: 20%;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
120
main.js
120
main.js
@ -264,121 +264,6 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
});
|
||||
}
|
||||
}
|
||||
// const allCourses = [
|
||||
// {
|
||||
// category: "Software Development & Engineering",
|
||||
// link: "https://kodepilot.in/course/view.php?id=16",
|
||||
// image: "https://kodepilot.in/pluginfile.php/53/course/overviewfiles/UiUx.png",
|
||||
// name: "UI/UX Design",
|
||||
// description: "Learn the fundamentals of user interface and user experience design."
|
||||
// },
|
||||
// {
|
||||
// category: "Software Development & Engineering",
|
||||
// link: "https://kodepilot.in/course/view.php?id=9",
|
||||
// image: "https://kodepilot.in/pluginfile.php/39/course/overviewfiles/IOS.png",
|
||||
// name: "iOS Development",
|
||||
// description: "Build iOS apps using Swift and Apple’s development tools."
|
||||
// },
|
||||
// {
|
||||
// category: "Software Development & Engineering",
|
||||
// link: "https://kodepilot.in/course/view.php?id=7",
|
||||
// image: "https://kodepilot.in/pluginfile.php/35/course/overviewfiles/RD.png",
|
||||
// name: "React Development",
|
||||
// description: "Master React.js for building fast and scalable web apps."
|
||||
// },
|
||||
// {
|
||||
// category: "Software Development & Engineering",
|
||||
// link: "https://kodepilot.in/course/view.php?id=5",
|
||||
// image: "https://kodepilot.in/pluginfile.php/31/course/overviewfiles/PFS.png",
|
||||
// name: "Full Stack Development",
|
||||
// description: "End-to-end training in frontend, backend, and databases."
|
||||
// },
|
||||
// {
|
||||
// category: "Software Development & Engineering",
|
||||
// link: "https://kodepilot.in/course/view.php?id=3",
|
||||
// image: "https://kodepilot.in/pluginfile.php/25/course/overviewfiles/JFS.png",
|
||||
// name: "Java Full Stack",
|
||||
// description: "Become a full stack developer with Java, Spring, and modern tools."
|
||||
// },
|
||||
// {
|
||||
// category: "Quality & Testing",
|
||||
// link: "https://kodepilot.in/course/view.php?id=13",
|
||||
// image: "https://kodepilot.in/pluginfile.php/46/course/overviewfiles/PT.png",
|
||||
// name: "Performance Testing",
|
||||
// description: "Learn tools and techniques for testing system performance."
|
||||
// },
|
||||
// {
|
||||
// category: "Quality & Testing",
|
||||
// link: "https://kodepilot.in/course/view.php?id=10",
|
||||
// image: "https://kodepilot.in/pluginfile.php/41/course/overviewfiles/QA.png",
|
||||
// name: "QA Testing",
|
||||
// description: "Understand quality assurance practices for reliable software."
|
||||
// },
|
||||
// {
|
||||
// category: "Cloud & DevOps",
|
||||
// link: "https://kodepilot.in/course/view.php?id=17",
|
||||
// image: "https://kodepilot.in/pluginfile.php/55/course/overviewfiles/GC.png",
|
||||
// name: "Google Cloud",
|
||||
// description: "Get hands-on with Google Cloud Platform services and tools."
|
||||
// },
|
||||
// {
|
||||
// category: "Cloud & DevOps",
|
||||
// link: "https://kodepilot.in/course/view.php?id=4",
|
||||
// image: "https://kodepilot.in/pluginfile.php/28/course/overviewfiles/AWSA.png",
|
||||
// name: "AWS Associate",
|
||||
// description: "Prepare for AWS certifications and cloud computing skills."
|
||||
// },
|
||||
// {
|
||||
// category: "AI, Data & Emerging Tech (On-demand & trending)",
|
||||
// link: "https://kodepilot.in/course/view.php?id=26",
|
||||
// image: "https://kodepilot.in/pluginfile.php/73/course/overviewfiles/DE.png",
|
||||
// name: "Data Engineering",
|
||||
// description: "Build pipelines and manage data at scale for analytics."
|
||||
// },
|
||||
// {
|
||||
// category: "AI, Data & Emerging Tech (On-demand & trending)",
|
||||
// link: "https://kodepilot.in/course/view.php?id=18",
|
||||
// image: "https://kodepilot.in/pluginfile.php/58/course/overviewfiles/PE.png",
|
||||
// name: "Prompt Engineering",
|
||||
// description: "Learn to design prompts for AI models like ChatGPT."
|
||||
// },
|
||||
// {
|
||||
// category: "AI, Data & Emerging Tech (On-demand & trending)",
|
||||
// link: "https://kodepilot.in/course/view.php?id=12",
|
||||
// image: "https://kodepilot.in/pluginfile.php/44/course/overviewfiles/AI%28Ess%29.png",
|
||||
// name: "AI Essentials",
|
||||
// description: "Introduction to AI, ML concepts, and real-world use cases."
|
||||
// },
|
||||
// {
|
||||
// category: "Enterprise & Business Tech",
|
||||
// link: "https://kodepilot.in/course/view.php?id=24",
|
||||
// image: "https://kodepilot.in/pluginfile.php/70/course/overviewfiles/ServiceNow.png",
|
||||
// name: "ServiceNow",
|
||||
// description: "Learn ITSM and workflow automation with ServiceNow."
|
||||
// },
|
||||
// {
|
||||
// category: "Enterprise & Business Tech",
|
||||
// link: "https://kodepilot.in/course/view.php?id=19",
|
||||
// image: "https://kodepilot.in/pluginfile.php/61/course/overviewfiles/SAP.png",
|
||||
// name: "SAP",
|
||||
// description: "Master SAP ERP modules for enterprise solutions."
|
||||
// },
|
||||
// {
|
||||
// category: "Cybersecurity & Compliance",
|
||||
// link: "https://kodepilot.in/course/view.php?id=23",
|
||||
// image: "https://kodepilot.in/pluginfile.php/69/course/overviewfiles/Security.png",
|
||||
// name: "Security Fundamentals",
|
||||
// description: "Understand core concepts of IT security and defense."
|
||||
// },
|
||||
// {
|
||||
// category: "Cybersecurity & Compliance",
|
||||
// link: "https://kodepilot.in/course/view.php?id=22",
|
||||
// image: "https://kodepilot.in/pluginfile.php/68/course/overviewfiles/CyE.png",
|
||||
// name: "Cyber Essentials",
|
||||
// description: "Learn the basics of cybersecurity and compliance standards."
|
||||
// }
|
||||
// ];
|
||||
|
||||
console.table(allCourses);
|
||||
|
||||
|
||||
@ -391,17 +276,14 @@ function renderCourses(allCourses) {
|
||||
|
||||
container.innerHTML = '';
|
||||
|
||||
// Group courses by category
|
||||
const grouped = {};
|
||||
allCourses.forEach(course => {
|
||||
if (!grouped[course.category]) grouped[course.category] = [];
|
||||
grouped[course.category].push(course);
|
||||
});
|
||||
|
||||
// Convert grouped object to array for merging
|
||||
let sections = Object.entries(grouped).map(([category, courses]) => ({ category, courses }));
|
||||
|
||||
// Merge sections with less than 4 courses
|
||||
let mergedSections = [];
|
||||
let temp = { category: '', courses: [] };
|
||||
|
||||
@ -409,12 +291,10 @@ function renderCourses(allCourses) {
|
||||
if (section.courses.length >= 4) {
|
||||
mergedSections.push(section);
|
||||
} else {
|
||||
// Merge into temp
|
||||
if (temp.category) temp.category += '/' + section.category;
|
||||
else temp.category = section.category;
|
||||
temp.courses.push(...section.courses);
|
||||
|
||||
// If merged has 4 or more, push it
|
||||
if (temp.courses.length >= 4) {
|
||||
mergedSections.push({ category: temp.category, courses: temp.courses });
|
||||
temp = { category: '', courses: [] };
|
||||
|
||||
Loading…
Reference in New Issue
Block a user