fix: url
This commit is contained in:
parent
0346054398
commit
112ba89b04
7
main.css
7
main.css
@ -1480,6 +1480,13 @@
|
|||||||
.course-description {
|
.course-description {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #333;
|
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 {
|
.corces {
|
||||||
|
|||||||
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);
|
console.table(allCourses);
|
||||||
|
|
||||||
|
|
||||||
@ -391,17 +276,14 @@ function renderCourses(allCourses) {
|
|||||||
|
|
||||||
container.innerHTML = '';
|
container.innerHTML = '';
|
||||||
|
|
||||||
// Group courses by category
|
|
||||||
const grouped = {};
|
const grouped = {};
|
||||||
allCourses.forEach(course => {
|
allCourses.forEach(course => {
|
||||||
if (!grouped[course.category]) grouped[course.category] = [];
|
if (!grouped[course.category]) grouped[course.category] = [];
|
||||||
grouped[course.category].push(course);
|
grouped[course.category].push(course);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Convert grouped object to array for merging
|
|
||||||
let sections = Object.entries(grouped).map(([category, courses]) => ({ category, courses }));
|
let sections = Object.entries(grouped).map(([category, courses]) => ({ category, courses }));
|
||||||
|
|
||||||
// Merge sections with less than 4 courses
|
|
||||||
let mergedSections = [];
|
let mergedSections = [];
|
||||||
let temp = { category: '', courses: [] };
|
let temp = { category: '', courses: [] };
|
||||||
|
|
||||||
@ -409,12 +291,10 @@ function renderCourses(allCourses) {
|
|||||||
if (section.courses.length >= 4) {
|
if (section.courses.length >= 4) {
|
||||||
mergedSections.push(section);
|
mergedSections.push(section);
|
||||||
} else {
|
} else {
|
||||||
// Merge into temp
|
|
||||||
if (temp.category) temp.category += '/' + section.category;
|
if (temp.category) temp.category += '/' + section.category;
|
||||||
else temp.category = section.category;
|
else temp.category = section.category;
|
||||||
temp.courses.push(...section.courses);
|
temp.courses.push(...section.courses);
|
||||||
|
|
||||||
// If merged has 4 or more, push it
|
|
||||||
if (temp.courses.length >= 4) {
|
if (temp.courses.length >= 4) {
|
||||||
mergedSections.push({ category: temp.category, courses: temp.courses });
|
mergedSections.push({ category: temp.category, courses: temp.courses });
|
||||||
temp = { category: '', courses: [] };
|
temp = { category: '', courses: [] };
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user