view details
This commit is contained in:
@@ -49,17 +49,17 @@
|
||||
Banner
|
||||
-------------------------------------------------------------------------- */
|
||||
|
||||
.course-details .details-hero {
|
||||
.course-details .course-details__hero {
|
||||
padding: calc(var(--header-h) + 54px) 0 44px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
||||
background-color: #0D0D0D;
|
||||
}
|
||||
|
||||
.course-details .details-hero__content {
|
||||
.course-details .course-details__hero__content {
|
||||
max-width: 900px;
|
||||
}
|
||||
|
||||
.course-details .details-hero__tag {
|
||||
.course-details .course-details__hero__tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 6px 12px;
|
||||
@@ -73,7 +73,7 @@
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.course-details .details-hero__title {
|
||||
.course-details .course-details__hero__title {
|
||||
margin: 16px 0 0;
|
||||
color: var(--white);
|
||||
font-family: 'Roboto', sans-serif;
|
||||
@@ -130,40 +130,40 @@
|
||||
About
|
||||
-------------------------------------------------------------------------- */
|
||||
|
||||
.course-details .details-about {
|
||||
.course-details .course-details__about {
|
||||
background-color: #0D0D0D;
|
||||
}
|
||||
|
||||
.course-details .details-grid {
|
||||
.course-details .course-details__grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1.05fr 1fr;
|
||||
align-items: start;
|
||||
gap: 48px;
|
||||
}
|
||||
|
||||
.course-details .details-media {
|
||||
.course-details .course-details__media {
|
||||
overflow: hidden;
|
||||
border-radius: 20px;
|
||||
box-shadow: 0 22px 48px rgba(0, 0, 0, 0.48);
|
||||
}
|
||||
|
||||
.course-details .details-media img {
|
||||
.course-details .course-details__media img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
aspect-ratio: 4 / 3;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.course-details .details-about__content {
|
||||
.course-details .course-details__about__content {
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
.course-details .details-about__title {
|
||||
.course-details .course-details__about__title {
|
||||
margin: 12px 0 14px;
|
||||
font-size: clamp(26px, 3vw, 34px);
|
||||
}
|
||||
|
||||
.course-details .details-about__text {
|
||||
.course-details .course-details__about__text {
|
||||
margin: 0;
|
||||
color: var(--text-muted);
|
||||
font-family: 'Roboto', sans-serif;
|
||||
@@ -172,14 +172,14 @@
|
||||
line-height: 1.75;
|
||||
}
|
||||
|
||||
.course-details .details-meta {
|
||||
.course-details .course-details__meta {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
margin-top: 26px;
|
||||
}
|
||||
|
||||
.course-details .details-meta__item {
|
||||
.course-details .course-details__meta__item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
@@ -193,7 +193,7 @@
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.course-details .details-meta__icon {
|
||||
.course-details .course-details__meta__icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -205,12 +205,12 @@
|
||||
color: var(--red);
|
||||
}
|
||||
|
||||
.course-details .details-meta__icon .icon {
|
||||
.course-details .course-details__meta__icon .icon {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.course-details .details-meta__item strong {
|
||||
.course-details .course-details__meta__item strong {
|
||||
display: block;
|
||||
color: var(--white);
|
||||
font-size: 11px;
|
||||
@@ -218,7 +218,7 @@
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.course-details .details-actions {
|
||||
.course-details .course-details__actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
@@ -239,17 +239,17 @@
|
||||
What you will learn
|
||||
-------------------------------------------------------------------------- */
|
||||
|
||||
.course-details .details-learn {
|
||||
.course-details .course-details__learn {
|
||||
background-color: var(--bg-section);
|
||||
}
|
||||
|
||||
.course-details .details-learn__list {
|
||||
.course-details .course-details__learn__list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.course-details .details-learn__item {
|
||||
.course-details .course-details__learn__item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
@@ -263,7 +263,7 @@
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.course-details .details-learn__icon {
|
||||
.course-details .course-details__learn__icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -275,19 +275,19 @@
|
||||
color: var(--white);
|
||||
}
|
||||
|
||||
.course-details .details-learn__icon .icon {
|
||||
.course-details .course-details__learn__icon .icon {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.course-details .details-learn__item.reveal {
|
||||
.course-details .course-details__learn__item.reveal {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
transition: opacity 0.55s ease, transform 0.55s ease;
|
||||
transition-delay: calc(var(--i, 0) * 0.06s);
|
||||
}
|
||||
|
||||
.course-details .details-learn__item.reveal.is-visible {
|
||||
.course-details .course-details__learn__item.reveal.is-visible {
|
||||
opacity: 1;
|
||||
transform: none;
|
||||
}
|
||||
@@ -296,17 +296,17 @@
|
||||
Who is this for
|
||||
-------------------------------------------------------------------------- */
|
||||
|
||||
.course-details .details-audience {
|
||||
.course-details .course-details__audience {
|
||||
background-color: #0D0D0D;
|
||||
}
|
||||
|
||||
.course-details .details-audience__grid {
|
||||
.course-details .course-details__audience__grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.course-details .details-audience__card {
|
||||
.course-details .course-details__audience__card {
|
||||
padding: 24px 22px;
|
||||
border: 0;
|
||||
border-radius: 18px;
|
||||
@@ -315,12 +315,12 @@
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
}
|
||||
|
||||
.course-details .details-audience__card:hover {
|
||||
.course-details .course-details__audience__card:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 18px 38px rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.course-details .details-audience__icon {
|
||||
.course-details .course-details__audience__icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -332,12 +332,12 @@
|
||||
color: var(--red);
|
||||
}
|
||||
|
||||
.course-details .details-audience__icon .icon {
|
||||
.course-details .course-details__audience__icon .icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.course-details .details-audience__title {
|
||||
.course-details .course-details__audience__title {
|
||||
margin: 0 0 8px;
|
||||
color: var(--white);
|
||||
font-family: 'Roboto', sans-serif;
|
||||
@@ -346,7 +346,7 @@
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.course-details .details-audience__text {
|
||||
.course-details .course-details__audience__text {
|
||||
margin: 0;
|
||||
color: rgba(255, 255, 255, 0.82);
|
||||
font-family: 'Roboto', sans-serif;
|
||||
@@ -354,19 +354,19 @@
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
.course-details .details-audience__card.reveal {
|
||||
.course-details .course-details__audience__card.reveal {
|
||||
opacity: 0;
|
||||
transform: translateY(22px);
|
||||
transition: opacity 0.55s ease, transform 0.55s ease, box-shadow 0.3s ease;
|
||||
transition-delay: calc(var(--i, 0) * 0.08s);
|
||||
}
|
||||
|
||||
.course-details .details-audience__card.reveal.is-visible {
|
||||
.course-details .course-details__audience__card.reveal.is-visible {
|
||||
opacity: 1;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.course-details .details-audience__card.reveal.is-visible:hover {
|
||||
.course-details .course-details__audience__card.reveal.is-visible:hover {
|
||||
transform: translateY(-4px);
|
||||
transition-delay: 0s;
|
||||
}
|
||||
@@ -375,7 +375,7 @@
|
||||
Related courses
|
||||
-------------------------------------------------------------------------- */
|
||||
|
||||
.course-details .details-related {
|
||||
.course-details .course-details__related {
|
||||
background-color: var(--bg-section);
|
||||
}
|
||||
|
||||
@@ -509,7 +509,7 @@
|
||||
transition-delay: 0s;
|
||||
}
|
||||
|
||||
.course-details .details-related__empty {
|
||||
.course-details .course-details__related__empty {
|
||||
padding: 28px;
|
||||
border: 1px dashed rgba(255, 255, 255, 0.18);
|
||||
border-radius: 16px;
|
||||
@@ -519,7 +519,7 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.course-details .details-related__empty .btn {
|
||||
.course-details .course-details__related__empty .btn {
|
||||
margin-top: 18px;
|
||||
}
|
||||
|
||||
@@ -527,27 +527,27 @@
|
||||
404
|
||||
-------------------------------------------------------------------------- */
|
||||
|
||||
.course-details .details-missing {
|
||||
.course-details .course-details__missing {
|
||||
padding: calc(var(--header-h) + 80px) 0 100px;
|
||||
background-color: #0D0D0D;
|
||||
}
|
||||
|
||||
.course-details .details-missing__inner {
|
||||
.course-details .course-details__missing__inner {
|
||||
max-width: 620px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.course-details .details-missing__inner .eyebrow::before {
|
||||
.course-details .course-details__missing__inner .eyebrow::before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.course-details .details-missing__title {
|
||||
.course-details .course-details__missing__title {
|
||||
margin: 14px 0 16px;
|
||||
font-size: clamp(28px, 4vw, 40px);
|
||||
}
|
||||
|
||||
.course-details .details-missing__inner .section__lead {
|
||||
.course-details .course-details__missing__inner .section__lead {
|
||||
max-width: 520px;
|
||||
margin: 0 auto 26px;
|
||||
color: var(--text-muted);
|
||||
@@ -560,12 +560,12 @@
|
||||
-------------------------------------------------------------------------- */
|
||||
|
||||
@media (max-width: 992px) {
|
||||
.course-details .details-grid {
|
||||
.course-details .course-details__grid {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 32px;
|
||||
}
|
||||
|
||||
.course-details .details-audience__grid {
|
||||
.course-details .course-details__audience__grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
@@ -575,15 +575,15 @@
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.course-details .details-meta {
|
||||
.course-details .course-details__meta {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.course-details .details-learn__list {
|
||||
.course-details .course-details__learn__list {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.course-details .details-audience__grid {
|
||||
.course-details .course-details__audience__grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
@@ -609,8 +609,8 @@
|
||||
.course-details .course-card,
|
||||
.course-details .course-card.reveal,
|
||||
.course-details .course-card.reveal.is-visible,
|
||||
.course-details .details-learn__item.reveal,
|
||||
.course-details .details-audience__card.reveal {
|
||||
.course-details .course-details__learn__item.reveal,
|
||||
.course-details .course-details__audience__card.reveal {
|
||||
opacity: 1 !important;
|
||||
transform: none !important;
|
||||
}
|
||||
@@ -618,8 +618,8 @@
|
||||
.course-details .course-card:hover,
|
||||
.course-details .course-card.reveal.is-visible:hover,
|
||||
.course-details .course-card__media img,
|
||||
.course-details .details-audience__card:hover,
|
||||
.course-details .details-audience__card.reveal.is-visible:hover {
|
||||
.course-details .course-details__audience__card:hover,
|
||||
.course-details .course-details__audience__card.reveal.is-visible:hover {
|
||||
transform: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
+70
-49
@@ -1,8 +1,18 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/includes/data.php';
|
||||
|
||||
$id = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT);
|
||||
$course = (is_int($id) && array_key_exists($id, $courses)) ? $courses[$id] : null;
|
||||
$requestedSlug = isset($_GET['course']) && is_string($_GET['course'])
|
||||
? strtolower(trim($_GET['course']))
|
||||
: '';
|
||||
$requestedSlug = preg_replace('/[^a-z0-9-]/', '', $requestedSlug);
|
||||
|
||||
$course = null;
|
||||
foreach ($courses as $courseItem) {
|
||||
if (($courseItem['slug'] ?? '') === $requestedSlug) {
|
||||
$course = $courseItem;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$activePage = 'courses';
|
||||
$extraCss = ['assets/css/course-details.css'];
|
||||
@@ -23,7 +33,8 @@ if ($course === null) {
|
||||
http_response_code(404);
|
||||
$pageTitle = 'Course not found | AI Institute';
|
||||
} else {
|
||||
$pageTitle = $course['title'] . ' | AI Institute';
|
||||
$courseTitle = $course['title'] ?? 'Course';
|
||||
$pageTitle = $courseTitle . ' | AI Institute';
|
||||
}
|
||||
|
||||
include 'includes/header.php';
|
||||
@@ -33,6 +44,15 @@ $categoryLabel = $categoryLabels[$categorySlug]
|
||||
?? ($courseFilters[$categorySlug] ?? ($course['category_label'] ?? 'Course'));
|
||||
$categoryHref = $categoryHrefs[$categorySlug] ?? 'courses.php';
|
||||
|
||||
$courseTitle = $course['title'] ?? 'Course';
|
||||
$courseCategoryLabel = $course['category_label'] ?? ($categoryLabel ?? 'Course');
|
||||
$courseImage = $course['image'] ?? 'assets/img/heroimage.png';
|
||||
$courseAlt = $course['alt'] ?? $courseTitle;
|
||||
$courseOverview = $course['overview'] ?? $course['description'] ?? 'This programme combines practical lessons, guided practice, and project work so you can apply what you learn with confidence. You will explore the ideas behind the topic, use the tools involved, and build examples you can discuss with employers, clients, or collaborators.';
|
||||
$courseDuration = $course['duration'] ?? '8 to 24 weeks';
|
||||
$courseLevel = $course['level'] ?? 'Beginner friendly';
|
||||
$courseFormat = $course['format'] ?? 'Live + projects';
|
||||
|
||||
$learnItems = [
|
||||
'Understand the core concepts and how they apply to real work.',
|
||||
'Practise with guided exercises, examples, and project briefs.',
|
||||
@@ -63,76 +83,76 @@ $audience = [
|
||||
|
||||
<?php if ($course === null): ?>
|
||||
|
||||
<section class="details-missing">
|
||||
<section class="course-details__missing">
|
||||
<div class="container">
|
||||
<div class="details-missing__inner reveal">
|
||||
<div class="course-details__missing__inner reveal">
|
||||
<span class="eyebrow">Course not found</span>
|
||||
<h1 class="section__title details-missing__title">We could not find that course</h1>
|
||||
<h1 class="section__title course-details__missing__title">We could not find that course</h1>
|
||||
<p class="section__lead">The course you are looking for may have moved or no longer exists. Browse all courses to find another programme that fits your goals.</p>
|
||||
<a class="btn btn--primary" href="courses.php">Back to Courses</a>
|
||||
<a class="btn btn--primary" href="index.php#courses">Back to Courses</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<section class="details-hero">
|
||||
<section class="course-details__hero">
|
||||
<div class="container">
|
||||
<div class="details-hero__content reveal">
|
||||
<span class="details-hero__tag"><?= e($course['category_label']) ?></span>
|
||||
<h1 class="section__title details-hero__title"><?= e($course['title']) ?></h1>
|
||||
<div class="course-details__hero__content reveal">
|
||||
<span class="course-details__hero__tag"><?= e($courseCategoryLabel) ?></span>
|
||||
<h1 class="section__title course-details__hero__title"><?= e($courseTitle) ?></h1>
|
||||
|
||||
<nav class="breadcrumb" aria-label="Breadcrumb">
|
||||
<ol class="breadcrumb__list">
|
||||
<li class="breadcrumb__item"><a href="index.php">Home</a></li>
|
||||
<li class="breadcrumb__item"><a href="courses.php">Courses</a></li>
|
||||
<li class="breadcrumb__item"><a href="<?= e($categoryHref) ?>"><?= e($categoryLabel) ?></a></li>
|
||||
<li class="breadcrumb__item" aria-current="page"><?= e($course['title']) ?></li>
|
||||
<li class="breadcrumb__item" aria-current="page"><?= e($courseTitle) ?></li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="details-about section">
|
||||
<section class="course-details__about section">
|
||||
<div class="container">
|
||||
<div class="details-grid">
|
||||
<div class="details-media reveal">
|
||||
<div class="course-details__grid">
|
||||
<div class="course-details__media reveal">
|
||||
<img
|
||||
src="<?= e($course['image']) ?>"
|
||||
alt="<?= e($course['alt']) ?>"
|
||||
src="<?= e($courseImage) ?>"
|
||||
alt="<?= e($courseAlt) ?>"
|
||||
width="720"
|
||||
height="500"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="details-about__content reveal">
|
||||
<div class="course-details__about__content reveal">
|
||||
<span class="eyebrow">Course overview</span>
|
||||
<h2 class="section__title details-about__title">About this course</h2>
|
||||
<p class="details-about__text">
|
||||
This programme combines practical lessons, guided practice, and project work so you can apply what you learn with confidence. You will explore the ideas behind the topic, use the tools involved, and build examples you can discuss with employers, clients, or collaborators.
|
||||
<h2 class="section__title course-details__about__title">About this course</h2>
|
||||
<p class="course-details__about__text">
|
||||
<?= e($courseOverview) ?>
|
||||
</p>
|
||||
|
||||
<ul class="details-meta">
|
||||
<li class="details-meta__item">
|
||||
<span class="details-meta__icon"><?= icon('graduation') ?></span>
|
||||
<span><strong>Level</strong> Beginner friendly</span>
|
||||
<ul class="course-details__meta">
|
||||
<li class="course-details__meta__item">
|
||||
<span class="course-details__meta__icon"><?= icon('graduation') ?></span>
|
||||
<span><strong>Level</strong> <?= e($courseLevel) ?></span>
|
||||
</li>
|
||||
<li class="details-meta__item">
|
||||
<span class="details-meta__icon"><?= icon('video') ?></span>
|
||||
<span><strong>Format</strong> Live + projects</span>
|
||||
<li class="course-details__meta__item">
|
||||
<span class="course-details__meta__icon"><?= icon('video') ?></span>
|
||||
<span><strong>Format</strong> <?= e($courseFormat) ?></span>
|
||||
</li>
|
||||
<li class="details-meta__item">
|
||||
<span class="details-meta__icon"><?= icon('award') ?></span>
|
||||
<span><strong>Certificate</strong> Yes</span>
|
||||
<li class="course-details__meta__item">
|
||||
<span class="course-details__meta__icon"><?= icon('award') ?></span>
|
||||
<span><strong>Certificate</strong> <?= e($course['certificate'] ?? 'Yes') ?></span>
|
||||
</li>
|
||||
<li class="details-meta__item">
|
||||
<span class="details-meta__icon"><?= icon('book') ?></span>
|
||||
<span><strong>Duration</strong> 8 to 24 weeks</span>
|
||||
<li class="course-details__meta__item">
|
||||
<span class="course-details__meta__icon"><?= icon('book') ?></span>
|
||||
<span><strong>Duration</strong> <?= e($courseDuration) ?></span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="details-actions">
|
||||
<div class="course-details__actions">
|
||||
<a class="btn btn--primary" href="index.php#apply">Apply Now</a>
|
||||
<a class="btn btn--light" href="index.php#contact">Talk to an Advisor</a>
|
||||
</div>
|
||||
@@ -141,17 +161,17 @@ $audience = [
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="details-learn section">
|
||||
<section class="course-details__learn section">
|
||||
<div class="container">
|
||||
<div class="section__head reveal">
|
||||
<span class="eyebrow">Learning outcomes</span>
|
||||
<h2 class="section__title">What you will learn</h2>
|
||||
</div>
|
||||
|
||||
<ul class="details-learn__list">
|
||||
<ul class="course-details__learn__list">
|
||||
<?php foreach ($learnItems as $learnIndex => $item): ?>
|
||||
<li class="details-learn__item reveal" style="--i: <?= (int) $learnIndex ?>">
|
||||
<span class="details-learn__icon"><?= icon('check-circle') ?></span>
|
||||
<li class="course-details__learn__item reveal" style="--i: <?= (int) $learnIndex ?>">
|
||||
<span class="course-details__learn__icon"><?= icon('check-circle') ?></span>
|
||||
<span><?= e($item) ?></span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
@@ -159,19 +179,19 @@ $audience = [
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="details-audience section">
|
||||
<section class="course-details__audience section">
|
||||
<div class="container">
|
||||
<div class="section__head reveal">
|
||||
<span class="eyebrow">Who is this for</span>
|
||||
<h2 class="section__title">Who is this for</h2>
|
||||
</div>
|
||||
|
||||
<div class="details-audience__grid">
|
||||
<div class="course-details__audience__grid">
|
||||
<?php foreach ($audience as $audienceIndex => $audienceItem): ?>
|
||||
<article class="details-audience__card reveal" style="--i: <?= (int) $audienceIndex ?>">
|
||||
<span class="details-audience__icon"><?= icon($audienceItem['icon']) ?></span>
|
||||
<h3 class="details-audience__title"><?= e($audienceItem['title']) ?></h3>
|
||||
<p class="details-audience__text"><?= e($audienceItem['text']) ?></p>
|
||||
<article class="course-details__audience__card reveal" style="--i: <?= (int) $audienceIndex ?>">
|
||||
<span class="course-details__audience__icon"><?= icon($audienceItem['icon']) ?></span>
|
||||
<h3 class="course-details__audience__title"><?= e($audienceItem['title']) ?></h3>
|
||||
<p class="course-details__audience__text"><?= e($audienceItem['text']) ?></p>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
@@ -181,15 +201,16 @@ $audience = [
|
||||
<?php
|
||||
$related = array_filter(
|
||||
$courses,
|
||||
function ($relatedCourse, $relatedIndex) use ($id, $course) {
|
||||
return $relatedIndex !== $id && $relatedCourse['category'] === $course['category'];
|
||||
function ($relatedCourse, $relatedIndex) use ($course) {
|
||||
return ($relatedCourse['slug'] ?? '') !== ($course['slug'] ?? '')
|
||||
&& $relatedCourse['category'] === $course['category'];
|
||||
},
|
||||
ARRAY_FILTER_USE_BOTH
|
||||
);
|
||||
$related = array_slice($related, 0, 3, true);
|
||||
?>
|
||||
|
||||
<section class="details-related section">
|
||||
<section class="course-details__related section">
|
||||
<div class="container">
|
||||
<div class="section__head reveal">
|
||||
<span class="eyebrow">Keep exploring</span>
|
||||
@@ -197,7 +218,7 @@ $audience = [
|
||||
</div>
|
||||
|
||||
<?php if (empty($related)): ?>
|
||||
<div class="details-related__empty reveal">
|
||||
<div class="course-details__related__empty reveal">
|
||||
<p>More courses in this pathway are coming soon.</p>
|
||||
<a class="btn btn--primary" href="courses.php">Browse All Courses</a>
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,7 @@ $card = is_array($course ?? null) ? $course : [];
|
||||
<div class="course-card__body">
|
||||
<span class="course-card__tag"><?= e($card['category_label'] ?? '') ?></span>
|
||||
<h3 class="course-card__title"><?= e($card['title'] ?? '') ?></h3>
|
||||
<a class="course-card__link" href="course-details.php?id=<?= $cardIndex ?>">
|
||||
<a class="course-card__link" href="course-details.php?course=<?= urlencode($card['slug'] ?? '') ?>">
|
||||
View Details <?= icon('arrow-right') ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -88,6 +88,7 @@ $courseFilters = [
|
||||
$courses = [
|
||||
[
|
||||
'title' => 'Python with Artificial Intelligence (AI) Training',
|
||||
'slug' => 'python-with-artificial-intelligence',
|
||||
'category' => 'ai-professional',
|
||||
'category_label' => 'Programming',
|
||||
'image' => 'https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?auto=format&fit=crop&w=720&q=80',
|
||||
@@ -95,6 +96,7 @@ $courses = [
|
||||
],
|
||||
[
|
||||
'title' => 'Digital Marketing 360° with AI Mastery',
|
||||
'slug' => 'digital-marketing-360-with-ai-mastery',
|
||||
'category' => 'digital-marketing',
|
||||
'category_label' => 'Full Stack',
|
||||
'image' => 'https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?auto=format&fit=crop&w=720&q=80',
|
||||
@@ -102,6 +104,7 @@ $courses = [
|
||||
],
|
||||
[
|
||||
'title' => 'Python with Artificial Intelligence (AI) Training',
|
||||
'slug' => 'python-with-ai-data-projects',
|
||||
'category' => 'ai-professional',
|
||||
'category_label' => 'Programming',
|
||||
'image' => 'https://images.unsplash.com/photo-1460925895917-afdab827c52f?auto=format&fit=crop&w=720&q=80',
|
||||
@@ -109,6 +112,7 @@ $courses = [
|
||||
],
|
||||
[
|
||||
'title' => 'Python with Artificial Intelligence (AI) Training',
|
||||
'slug' => 'python-with-ai-freelancing',
|
||||
'category' => 'freelancer',
|
||||
'category_label' => 'Programming',
|
||||
'image' => 'https://images.unsplash.com/photo-1642790106117-e829e14a795f?auto=format&fit=crop&w=720&q=80',
|
||||
@@ -116,6 +120,7 @@ $courses = [
|
||||
],
|
||||
[
|
||||
'title' => 'Python with Artificial Intelligence (AI) Training',
|
||||
'slug' => 'python-with-ai-content-creation',
|
||||
'category' => 'content-creator',
|
||||
'category_label' => 'Programming',
|
||||
'image' => 'https://images.unsplash.com/photo-1551836022-d5d88e9218df?auto=format&fit=crop&w=720&q=80',
|
||||
@@ -123,6 +128,7 @@ $courses = [
|
||||
],
|
||||
[
|
||||
'title' => 'Python with Artificial Intelligence (AI) Training',
|
||||
'slug' => 'python-with-ai-entrepreneurship',
|
||||
'category' => 'entrepreneur',
|
||||
'category_label' => 'Programming',
|
||||
'image' => 'https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=720&q=80',
|
||||
@@ -130,6 +136,7 @@ $courses = [
|
||||
],
|
||||
[
|
||||
'title' => 'Python with Artificial Intelligence (AI) Training',
|
||||
'slug' => 'python-with-ai-business',
|
||||
'category' => 'business-professional',
|
||||
'category_label' => 'Programming',
|
||||
'image' => 'https://images.unsplash.com/photo-1552581234-26160f608093?auto=format&fit=crop&w=720&q=80',
|
||||
@@ -137,6 +144,7 @@ $courses = [
|
||||
],
|
||||
[
|
||||
'title' => 'Python with Artificial Intelligence (AI) Training',
|
||||
'slug' => 'python-with-ai-advanced-applications',
|
||||
'category' => 'ai-professional',
|
||||
'category_label' => 'Programming',
|
||||
'image' => 'https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?auto=format&fit=crop&w=720&q=80',
|
||||
|
||||
@@ -133,7 +133,7 @@ require __DIR__ . '/includes/header.php';
|
||||
<div class="course-card__body">
|
||||
<span class="course-card__tag"><?= e($course['category_label']) ?></span>
|
||||
<h3 class="course-card__title"><?= e($course['title']) ?></h3>
|
||||
<a class="course-card__link" href="#apply">
|
||||
<a class="course-card__link" href="course-details.php?course=<?= urlencode($course['slug']) ?>">
|
||||
View Details <?= icon('arrow-right') ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user