mirror of
https://github.com/HananoshikaYomaru/openfreebooks.git
synced 2026-11-13 13:05:51 +00:00
49 lines
1.9 KiB
HTML
49 lines
1.9 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}{{ page.title }} | {{ config.extra.site_title }}{% endblock title %}
|
|
{% block meta_description %}
|
|
<meta name="description" content="Browse Open Free Books chapters by subject and curriculum." />
|
|
{% endblock meta_description %}
|
|
|
|
{% block content %}
|
|
{% set catalog = load_data(path="data/catalog.json", format="json") %}
|
|
{% set math_catalog = load_data(path="data/math-curriculum.json", format="json") %}
|
|
<script id="catalog-data" type="application/json">
|
|
{
|
|
"title": {{ catalog.title | json_encode() | safe }},
|
|
"subtitle": {{ catalog.subtitle | json_encode() | safe }},
|
|
"curriculums": {{ catalog.curriculums | json_encode() | safe }},
|
|
"subjects": [
|
|
{% for subject in catalog.subjects %}
|
|
{% set subject_curriculum = load_data(path="data/" ~ subject.id ~ "-curriculum.json", format="json") %}
|
|
{
|
|
"id": {{ subject.id | json_encode() | safe }},
|
|
"name": {{ subject.name | json_encode() | safe }}{% if subject.banner %},
|
|
"banner": {{ subject.banner | json_encode() | safe }}{% endif %},
|
|
"strands": {{ subject_curriculum.strands | default(value=[]) | json_encode() | safe }}{% if subject_curriculum.graph %},
|
|
"graph": {{ subject_curriculum.graph | json_encode() | safe }}{% endif %}
|
|
}{% if not loop.last %},{% endif %}
|
|
{% endfor %}
|
|
]
|
|
}
|
|
</script>
|
|
|
|
<noscript>
|
|
<div class="catalog-page">
|
|
<div class="container">
|
|
<h1 class="section-title">{{ catalog.title }}</h1>
|
|
<p>{{ catalog.subtitle }}</p>
|
|
<p>
|
|
JavaScript is required for the interactive catalog. You can read
|
|
<a href="{{ get_url(path='/catalog/') | safe }}?subject=math">Mathematics in the catalog</a> directly.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</noscript>
|
|
|
|
<template id="catalog-compare-template" hidden>
|
|
{% include "partials/math-curricula-compare.html" %}
|
|
</template>
|
|
|
|
<div id="catalog-app" class="catalog-page"></div>
|
|
{% endblock content %}
|