about, bootcamps, certificate, course page, interview
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Shared course card.
|
||||
*
|
||||
* Expected variables:
|
||||
* $course - course array from data.php
|
||||
* $index - original key from $courses (used for the details link)
|
||||
*/
|
||||
$cardIndex = isset($index) ? (int) $index : 0;
|
||||
$card = is_array($course ?? null) ? $course : [];
|
||||
?>
|
||||
<article class="course-card card reveal" data-category="<?= e($card['category'] ?? '') ?>" style="--i: <?= $cardIndex ?>">
|
||||
<div class="course-card__media">
|
||||
<img
|
||||
src="<?= e($card['image'] ?? '') ?>"
|
||||
alt="<?= e($card['alt'] ?? '') ?>"
|
||||
width="720"
|
||||
height="500"
|
||||
loading="lazy"
|
||||
>
|
||||
</div>
|
||||
<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 ?>">
|
||||
View Details <?= icon('arrow-right') ?>
|
||||
</a>
|
||||
</div>
|
||||
</article>
|
||||
Reference in New Issue
Block a user