Skip to content

Commit e62ddac

Browse files
committed
feat: added current lesson
1 parent b0ba2be commit e62ddac

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/components/PostCard.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
import course from '../course.config.ts';
3+
24
export interface Props {
35
lesson: {
46
slug: string;
@@ -24,7 +26,7 @@ const isExternal = !!lesson.data.externalLink;
2426
<article class="post on-list">
2527
<h2 class="post-title">
2628
<a href={lessonUrl} target={isExternal ? "_blank" : undefined} rel={isExternal ? "noopener" : undefined}>
27-
{lesson.data.order}. {lesson.data.title}
29+
{lesson.data.order === course.currentLesson ? '*': ''} {lesson.data.order}. {lesson.data.title}
2830
</a>
2931
</h2>
3032
<div class="post-meta">

src/course.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
currentLesson: 0,
3+
};

0 commit comments

Comments
 (0)