Skip to content

Commit

Permalink
fix: incorrect url back to course detail page
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesx00 committed Dec 19, 2024
1 parent 10c4720 commit 91cc365
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions _includes/layouts/lesson.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ layout: layouts/base.njk
<div class="md:flex-1 max-w-prose overflow-y-hidden">
<div class="mb-6 mx-auto bg-white dark:bg-zinc-950 p-4 {% if not code_editor %}max-w-prose{% endif %}">
<p class="text-gray-500 dark:text-slate-300 text-xs font-light mb-2">
<a href="/courses/{{ course_slug }}" class="hover:underline">{{ course_name }}</a>
<a href="/courses/{{ course_slug }}/" class="hover:underline">{{ course_name }}</a>
</p>
<div id="lesson-content" class="prose">
{{ content|safe }}
Expand All @@ -28,7 +28,7 @@ layout: layouts/base.njk
id="next-container-below-content"
class="complete-and-next-form-container {% if code_editor %}hidden {% endif %}md:block">
<div class="{% if code_editor %}hidden{% endif %}">
<a @click="completedLesson = true" href="{% if nextLesson %}{{ nextLesson.url }}{% else %}/courses/{{ course_slug }}{% endif %}" class="mb-4 mt-6 flex w-full items-center justify-center bg-blue-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-blue-800 focus:outline-none md:mb-0">
<a @click="completedLesson = true" href="{% if nextLesson %}{{ nextLesson.url }}{% else %}/courses/{{ course_slug }}/{% endif %}" class="mb-4 mt-6 flex w-full items-center justify-center bg-blue-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-blue-800 focus:outline-none md:mb-0">
{% if nextLesson %}Next{% else %}Complete the course{% endif %}
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -117,7 +117,7 @@ layout: layouts/base.njk
{% endif %}
<div id="next-container-below-editor" class="complete-and-next-form-container block md:hidden">
<div class="hidden">
<a @click="completedLesson = true" href="{% if nextLesson %}{{ nextLesson.url }}{% else %}/courses/{{ course_slug }}{% endif %}" class="mb-4 mt-6 flex w-full items-center justify-center bg-blue-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-blue-800 focus:outline-none md:mb-0">
<a @click="completedLesson = true" href="{% if nextLesson %}{{ nextLesson.url }}{% else %}/courses/{{ course_slug }}/{% endif %}" class="mb-4 mt-6 flex w-full items-center justify-center bg-blue-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-blue-800 focus:outline-none md:mb-0">
{% if nextLesson %}Next{% else %}Complete the course{% endif %}
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -192,7 +192,7 @@ layout: layouts/base.njk
</div>
</div>
<div class="mt-5 sm:mt-6">
<a @click="completedLesson = true" href="{% if nextLesson %}{{ nextLesson.url }}{% else %}/courses/{{ course_slug }}{% endif %}" type="submit" class="mb-4 mt-6 flex w-full items-center justify-center bg-blue-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-blue-800 focus:outline-none md:mb-0">
<a @click="completedLesson = true" href="{% if nextLesson %}{{ nextLesson.url }}{% else %}/courses/{{ course_slug }}/{% endif %}" type="submit" class="mb-4 mt-6 flex w-full items-center justify-center bg-blue-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-blue-800 focus:outline-none md:mb-0">
{% if nextLesson %}Next{% else %}Complete the course{% endif %}
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down

0 comments on commit 91cc365

Please sign in to comment.