mirror of
https://github.com/HananoshikaYomaru/openfreebooks.git
synced 2026-11-12 20:45:52 +00:00
Refactor mathematics curriculum structure: update math-related templates to use new curriculum JSON, enhance navigation links, and remove outdated references. Adjust chapter descriptions and improve catalog redirection for a streamlined user experience.
This commit is contained in:
parent
992275cc29
commit
778b2093f8
12 changed files with 52 additions and 83 deletions
|
|
@ -1,6 +1,6 @@
|
|||
+++
|
||||
title = "Hong Kong Mathematics"
|
||||
description = "DSE Compulsory Part mathematics — Number & Algebra, Measures Shape & Space, and Data Handling."
|
||||
template = "math/book.html"
|
||||
title = "Mathematics"
|
||||
description = "Browse mathematics chapters in the curriculum catalog."
|
||||
template = "math-redirect.html"
|
||||
sort_by = "weight"
|
||||
+++
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
+++
|
||||
title = "Quadratic equations"
|
||||
description = "The discriminant, nature of roots, and the graph of y = ax² + bx + c — DSE Compulsory Part."
|
||||
description = "The discriminant, nature of roots, and the graph of y = ax² + bx + c."
|
||||
template = "math/chapter.html"
|
||||
weight = 1
|
||||
[extra]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"title": "Hong Kong Mathematics",
|
||||
"subtitle": "DSE Compulsory Part (S4–S6)",
|
||||
"intro": "Structured around the three core strands of the Hong Kong mathematics curriculum. Chapters marked as available can be read now; others are on the roadmap.",
|
||||
"title": "Mathematics",
|
||||
"subtitle": "Secondary level (S4–S6)",
|
||||
"intro": "Structured around three core strands. Chapters marked as available can be read now; others are on the roadmap.",
|
||||
"strands": [
|
||||
{
|
||||
"id": "number-algebra",
|
||||
2
spec.md
2
spec.md
|
|
@ -12,4 +12,4 @@ we don't i18n. i18n will be solved in future by big companies.
|
|||
|
||||
search is supported by pagefind.
|
||||
|
||||
we have a catalog of subjects. Each subject will have chapters. Each chapters can be labelled (multiple) cirriculum. E.g. DSE, IB, A level. so that user knows if a chapter is needed in a cirriculum. Each subject should show all chapters by default (all cirriculum). chapters should be sequential in a tree structure. users can filter by themselves.
|
||||
we have a catalog of subjects. Each subject will have chapters. Each chapters can be labelled (multiple) cirriculum. E.g. DSE, IB, A level. so that user knows if a chapter is needed in a cirriculum. Each subject should show all chapters by default (all cirriculum). chapters should be sequential in a tree structure. users can filter by themselves. in the chapter we don't specify or mention the cirriculum anymore.
|
||||
2
static/_redirects
Normal file
2
static/_redirects
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/math/ /catalog/?subject=math 301
|
||||
/math /catalog/?subject=math 301
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
{% block content %}
|
||||
{% set catalog = load_data(path="data/catalog.json", format="json") %}
|
||||
{% set math = load_data(path="data/math-dse-curriculum.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 }},
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
{
|
||||
"id": {{ subject.id | json_encode() | safe }},
|
||||
"name": {{ subject.name | json_encode() | safe }},
|
||||
"strands": {% if subject.id == "math" %}{{ math.strands | json_encode() | safe }}{% else %}[]{% endif %}
|
||||
"strands": {% if subject.id == "math" %}{{ math_catalog.strands | json_encode() | safe }}{% else %}[]{% endif %}
|
||||
}{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
]
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
<p>{{ catalog.subtitle }}</p>
|
||||
<p>
|
||||
JavaScript is required for the interactive catalog. You can read
|
||||
<a href="{{ get_url(path='/math/') | safe }}">Hong Kong Mathematics</a> directly.
|
||||
<a href="{{ get_url(path='/catalog/') | safe }}?subject=math">Mathematics in the catalog</a> directly.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -49,10 +49,10 @@
|
|||
<h2 class="section-title">Browse by subject</h2>
|
||||
<div class="work-grid" data-scroll-reveal>
|
||||
<article class="work-card work-card--link" data-scroll-reveal-card>
|
||||
<a class="work-card__anchor" href="{{ get_url(path='/math/') | safe }}">
|
||||
<a class="work-card__anchor" href="{{ get_url(path='/catalog/') | safe }}?subject=math">
|
||||
<h3>Mathematics</h3>
|
||||
<p class="card-subtitle">DSE Compulsory — live</p>
|
||||
<p>Hong Kong secondary mathematics: three curriculum strands, starting with quadratic equations.</p>
|
||||
<p class="card-subtitle">Live chapters</p>
|
||||
<p>Three strands from number and algebra through data handling — starting with quadratic equations.</p>
|
||||
</a>
|
||||
</article>
|
||||
<article class="work-card" data-scroll-reveal-card>
|
||||
|
|
@ -81,10 +81,10 @@
|
|||
<h2 class="section-title">Featured books</h2>
|
||||
<div class="work-grid" data-scroll-reveal>
|
||||
<article class="work-card work-card--link" data-scroll-reveal-card>
|
||||
<a class="work-card__anchor" href="{{ get_url(path='/math/') | safe }}">
|
||||
<h3>Hong Kong Mathematics</h3>
|
||||
<p class="card-subtitle">DSE Compulsory Part</p>
|
||||
<p>Number & Algebra, Measures Shape & Space, and Data Handling — with an interactive quadratic explorer.</p>
|
||||
<a class="work-card__anchor" href="{{ get_url(path='/math/quadratic-equations/') | safe }}">
|
||||
<h3>Quadratic equations</h3>
|
||||
<p class="card-subtitle">Featured chapter</p>
|
||||
<p>Discriminant, nature of roots, and an interactive graph explorer — read in the browser.</p>
|
||||
</a>
|
||||
</article>
|
||||
<article class="work-card" data-scroll-reveal-card>
|
||||
|
|
|
|||
27
themes/openfreebooks/templates/math-redirect.html
Normal file
27
themes/openfreebooks/templates/math-redirect.html
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ section.title }} | {{ config.extra.site_title }}{% endblock title %}
|
||||
{% block meta_description %}
|
||||
<meta name="description" content="Redirecting to the curriculum catalog." />
|
||||
{% endblock meta_description %}
|
||||
|
||||
{% block extra_head %}
|
||||
{% set catalog_url = get_url(path="/catalog/") ~ "?subject=math" %}
|
||||
<meta http-equiv="refresh" content="0; url={{ catalog_url | safe }}" />
|
||||
<link rel="canonical" href="{{ catalog_url | safe }}" />
|
||||
{% endblock extra_head %}
|
||||
|
||||
{% block content %}
|
||||
{% set catalog_url = get_url(path="/catalog/") ~ "?subject=math" %}
|
||||
<section class="catalog-page">
|
||||
<div class="container">
|
||||
<p class="section-kicker">Redirecting</p>
|
||||
<h1 class="section-title">{{ section.title }}</h1>
|
||||
<p>
|
||||
The mathematics catalog has moved.
|
||||
<a href="{{ catalog_url | safe }}">Continue to the catalog</a>
|
||||
if you are not redirected automatically.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock content %}
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ section.title }} | {{ config.extra.site_title }}{% endblock title %}
|
||||
{% block meta_description %}
|
||||
<meta name="description" content="{{ section.description | default(value=config.description) }}" />
|
||||
{% endblock meta_description %}
|
||||
|
||||
{% block content %}
|
||||
{% set curriculum = load_data(path="data/math-dse-curriculum.json", format="json") %}
|
||||
<section class="book-page">
|
||||
<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>
|
||||
<span aria-current="page">{{ curriculum.title }}</span>
|
||||
</nav>
|
||||
|
||||
<header class="book-header">
|
||||
<p class="section-kicker">Mathematics</p>
|
||||
<h1 class="section-title">{{ curriculum.title }}</h1>
|
||||
<p class="book-subtitle">{{ curriculum.subtitle }}</p>
|
||||
<p class="book-intro">{{ curriculum.intro }}</p>
|
||||
</header>
|
||||
|
||||
<div class="book-strands">
|
||||
{% for strand in curriculum.strands %}
|
||||
<section class="book-strand" aria-labelledby="strand-{{ strand.id }}">
|
||||
<h2 id="strand-{{ strand.id }}" class="book-strand__title">{{ strand.title }}</h2>
|
||||
<ul class="book-chapter-list">
|
||||
{% for chapter in strand.chapters %}
|
||||
<li class="book-chapter-item{% if chapter.status != 'live' %} book-chapter-item--planned{% endif %}">
|
||||
{% if chapter.status == 'live' %}
|
||||
<a class="book-chapter-link" href="{{ get_url(path='math/' ~ chapter.slug ~ '/') | safe }}">
|
||||
<span class="book-chapter-link__title">{{ chapter.title }}</span>
|
||||
<span class="book-chapter-badge book-chapter-badge--live">Available</span>
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="book-chapter-link book-chapter-link--disabled">
|
||||
<span class="book-chapter-link__title">{{ chapter.title }}</span>
|
||||
<span class="book-chapter-badge book-chapter-badge--planned">Coming soon</span>
|
||||
</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock content %}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ section.title }} | Hong Kong Mathematics | {{ config.extra.site_title }}{% endblock title %}
|
||||
{% block title %}{{ section.title }} | Mathematics | {{ config.extra.site_title }}{% endblock title %}
|
||||
{% block meta_description %}
|
||||
<meta name="description" content="{{ section.description | default(value=config.description) }}" />
|
||||
{% endblock meta_description %}
|
||||
|
|
@ -10,13 +10,14 @@
|
|||
{% endblock extra_head %}
|
||||
|
||||
{% block content %}
|
||||
{% set curriculum = load_data(path="data/math-dse-curriculum.json", format="json") %}
|
||||
{% set math_catalog = load_data(path="data/math-curriculum.json", format="json") %}
|
||||
{% set catalog_math_url = get_url(path="/catalog/") ~ "?subject=math" %}
|
||||
<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="{{ get_url(path='/math/') | safe }}">{{ curriculum.title }}</a>
|
||||
<a href="{{ catalog_math_url | safe }}">{{ math_catalog.title }}</a>
|
||||
<span class="book-breadcrumb__sep" aria-hidden="true">/</span>
|
||||
<span aria-current="page">{{ section.title }}</span>
|
||||
</nav>
|
||||
|
|
@ -33,7 +34,6 @@
|
|||
{% if section.extra.chapter_id == "quadratic-equations" %}
|
||||
{% include "partials/math/quadratic-equations-content.html" %}
|
||||
<div id="quadratic-explorer" class="math-widget-mount"></div>
|
||||
{% include "partials/math/quadratic-equations-dse-callout.html" %}
|
||||
{% endif %}
|
||||
</article>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="book-prose">
|
||||
<p>
|
||||
A quadratic equation in one unknown has the form \(ax^2 + bx + c = 0\), where
|
||||
\(a \neq 0\). On the DSE Compulsory Part you solve these by factorisation, the quadratic
|
||||
\(a \neq 0\). You can solve these by factorisation, the quadratic
|
||||
formula, or by reading information from the graph of \(y = ax^2 + bx + c\).
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
<aside class="book-callout book-callout--dse" role="note">
|
||||
<p class="book-callout__label">DSE note — Foundation vs Non-foundation</p>
|
||||
<p>
|
||||
For a maximum grade around <strong>Level 4</strong>, focus on solving quadratics,
|
||||
interpreting \(\Delta\), and linking graphs to equations (Foundation topics). Candidates aiming at
|
||||
<strong>Level 5*</strong> and above also need fluency with reverse-engineering: given the nature of
|
||||
roots, solve inequalities such as \(\Delta \geq 0\) for an unknown constant.
|
||||
</p>
|
||||
</aside>
|
||||
Loading…
Add table
Add a link
Reference in a new issue