68 lines
2.0 KiB
HTML
68 lines
2.0 KiB
HTML
{% extends "templates/base.html" %}
|
|
{% from "www/macros/livecode.html" import LiveCodeEditorJS, LiveCodeEditor with context %}
|
|
{% block title %}{{ lesson.title }}{% endblock %}
|
|
|
|
{% block head_include %}
|
|
<meta name="description" content="{{lesson.title}} - {{course.title}}" />
|
|
<meta name="keywords" content="{{lesson.title}} - {{course.title}}" />
|
|
<style>
|
|
</style>
|
|
|
|
<link rel="stylesheet" href="/assets/frappe/css/font-awesome.css">
|
|
<link rel="stylesheet" href="/assets/css/lms.css">
|
|
<link rel="stylesheet" href="/assets/frappe/css/hljs-night-owl.css">
|
|
|
|
{% for ext in page_extensions %}
|
|
{{ ext.render_header() }}
|
|
{% endfor %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="container">
|
|
{{ widgets.BatchTabs(course=course, membership=membership) }}
|
|
<div class="lesson-page">
|
|
|
|
<h2 class="title {% if course.is_mentor(frappe.session.user) %} is_mentor {% endif %}" data-lesson="{{ lesson.name }}"
|
|
data-course="{{ course.name }}" {% if membership%} data-membership="{{membership.name}}" {% endif %}>{{ lesson.title }}</h2>
|
|
|
|
{% if membership or lesson.include_in_preview %}
|
|
{{ lesson.render_html() }}
|
|
{% else %}
|
|
<div class="no-preview-message">
|
|
<span>This lesson is not available for Preview. Please join the course to access this lesson.</span>
|
|
<a href="/courses/{{ course.name }}">Checkout Course Details.</a>
|
|
</div>
|
|
{% endif %}
|
|
{% if membership %}
|
|
{{ pagination(prev_chap, prev_url, next_chap, next_url) }}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% macro pagination(prev_chap, prev_url, next_chap, next_url) %}
|
|
<div class="lesson-pagination">
|
|
{% if prev_url %}
|
|
<span>
|
|
Prev: <a href="{{prev_url}}">{{prev_chap}}</a>
|
|
</span>
|
|
{% endif %}
|
|
{% if next_url %}
|
|
<span class="pull-right">
|
|
Next: <a href="{{next_url}}">{{next_chap}}</a>
|
|
</span>
|
|
{% endif %}
|
|
<div style="clear: both;"></div>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{%- block script %}
|
|
{{ super() }}
|
|
{% for ext in page_extensions %}
|
|
{{ ext.render_footer() }}
|
|
{% endfor %}
|
|
{%- endblock %}
|