mirror of
https://github.com/HananoshikaYomaru/openfreebooks.git
synced 2026-11-12 20:45:52 +00:00
63 lines
2.6 KiB
HTML
63 lines
2.6 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}
|
|
{% set subject_catalog = load_data(path="data/math-curriculum.json", format="json") %}
|
|
{{ section.title }} | {{ subject_catalog.title }} | {{ config.extra.site_title }}
|
|
{% endblock title %}
|
|
|
|
{% block meta_description %}
|
|
<meta name="description" content="{{ section.description | default(value=config.description) }}" />
|
|
{% endblock meta_description %}
|
|
|
|
{% block extra_head %}
|
|
{% set subject = section.extra.subject %}
|
|
{% set slug = section.extra.chapter_id | default(value=section.slug) %}
|
|
{% set chapter_key = subject ~ "/" ~ slug %}
|
|
{% set chapters_meta = load_data(path="data/_generated/chapters-meta.json", format="json") %}
|
|
{% set chapter_meta = chapters_meta.chapters[chapter_key] %}
|
|
{% if chapter_meta.hasCss %}
|
|
<link rel="stylesheet" href="{{ get_url(path='css/chapters/' ~ subject ~ '-' ~ slug ~ '.css', trailing_slash=false) | safe }}" />
|
|
{% endif %}
|
|
{% endblock extra_head %}
|
|
|
|
{% block content %}
|
|
{% set subject = section.extra.subject %}
|
|
{% set slug = section.extra.chapter_id | default(value=section.slug) %}
|
|
{% set chapter_key = subject ~ "/" ~ slug %}
|
|
{% set subject_catalog = load_data(path="data/math-curriculum.json", format="json") %}
|
|
{% set catalog_subject_url = get_url(path="/catalog/") ~ "?subject=" ~ subject %}
|
|
<section class="book-page book-page--chapter">
|
|
<div class="container">
|
|
<nav class="book-breadcrumb" aria-label="Breadcrumb">
|
|
<a href="{{ get_url(path='/') | safe }}">Home</a>
|
|
<span class="book-breadcrumb__sep" aria-hidden="true">/</span>
|
|
<a href="{{ catalog_subject_url | safe }}">{{ subject_catalog.title }}</a>
|
|
<span class="book-breadcrumb__sep" aria-hidden="true">/</span>
|
|
<span aria-current="page">{{ section.title }}</span>
|
|
</nav>
|
|
|
|
<article
|
|
class="book-chapter"
|
|
data-pagefind-body
|
|
data-chapter="{{ chapter_key }}"
|
|
>
|
|
<header class="book-chapter__header">
|
|
<div class="book-chapter__header-main">
|
|
{% if section.extra.strand %}
|
|
<p class="section-kicker">{{ section.extra.strand }}</p>
|
|
{% endif %}
|
|
<h1 class="section-title">{{ section.title }}</h1>
|
|
{% if section.description %}
|
|
<p class="book-chapter__lead">{{ section.description }}</p>
|
|
{% endif %}
|
|
</div>
|
|
<div id="copy-page-button" class="book-chapter__actions" data-pagefind-ignore></div>
|
|
</header>
|
|
|
|
<div id="chapter-heading-nav" data-pagefind-ignore></div>
|
|
{{ section.content | safe }}
|
|
{% include "partials/chapter-footer-nav.html" %}
|
|
</article>
|
|
</div>
|
|
</section>
|
|
{% endblock content %}
|