mirror of
https://github.com/HananoshikaYomaru/openfreebooks.git
synced 2026-11-13 13:05:51 +00:00
Enhance chapter content and metadata: Update SKILL.md to include requirements for chart axes in all widgets. Implement axis labels, arrowheads, and graduations in the simultaneous graph explorer widget. Update math curriculum JSON to reflect the status change of multiple chapters to live. Add last modified timestamps to chapter templates and generate corresponding metadata for improved site navigation and SEO.
This commit is contained in:
parent
353b129533
commit
eee5d109d5
31 changed files with 3093 additions and 17 deletions
|
|
@ -457,6 +457,19 @@ a.book-chapter-link:focus-visible {
|
|||
margin: 0.75rem 0 0;
|
||||
}
|
||||
|
||||
.book-chapter__lastmod {
|
||||
margin: 2.25rem 0 0;
|
||||
font-family: var(--mono);
|
||||
font-size: 0.72rem;
|
||||
letter-spacing: 0.06em;
|
||||
text-transform: uppercase;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.book-chapter__lastmod time {
|
||||
color: var(--soft-ink);
|
||||
}
|
||||
|
||||
.ratio-demo__bars {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@
|
|||
{% set chapter_key = subject ~ "/" ~ slug %}
|
||||
{% set chapters_meta = load_data(path="data/_generated/chapters-meta.json", format="json") %}
|
||||
{% set subjects_meta = load_data(path="data/_generated/subjects-meta.json", format="json") %}
|
||||
{% set chapter_meta = chapters_meta.chapters[chapter_key] %}
|
||||
{% set chapter_meta = chapters_meta.chapters | get(key=chapter_key, default=false) %}
|
||||
{% set subject_meta = subjects_meta.subjects[subject] | default(value=false) %}
|
||||
{% if subject_meta and subject_meta.hasCss %}
|
||||
<link rel="stylesheet" href="{{ get_url(path='css/subjects/' ~ subject ~ '.css', trailing_slash=false) | safe }}" />
|
||||
{% endif %}
|
||||
{% if chapter_meta.hasCss %}
|
||||
{% if chapter_meta and chapter_meta.hasCss %}
|
||||
<link rel="stylesheet" href="{{ get_url(path='css/chapters/' ~ subject ~ '-' ~ slug ~ '.css', trailing_slash=false) | safe }}" />
|
||||
{% endif %}
|
||||
{% endblock extra_head %}
|
||||
|
|
@ -31,6 +31,8 @@
|
|||
{% set slug = section.extra.chapter_id | default(value=section.slug) %}
|
||||
{% set chapter_key = subject ~ "/" ~ slug %}
|
||||
{% set subject_catalog = load_data(path="data/" ~ subject ~ "-curriculum.json", format="json") %}
|
||||
{% set chapter_lastmod_data = load_data(path="data/_generated/chapter-lastmod.json", format="json") %}
|
||||
{% set chapter_lastmod = chapter_lastmod_data.byKey[chapter_key] | default(value=false) %}
|
||||
{% set catalog_subject_url = get_url(path="/catalog/") ~ "?subject=" ~ subject %}
|
||||
<section class="book-page book-page--chapter">
|
||||
<div class="container">
|
||||
|
|
@ -62,6 +64,16 @@
|
|||
|
||||
<div id="chapter-heading-nav" data-pagefind-ignore></div>
|
||||
{{ section.content | safe }}
|
||||
{% if chapter_lastmod %}
|
||||
<p class="book-chapter__lastmod" data-pagefind-ignore>
|
||||
Last modified:
|
||||
<time
|
||||
datetime="{{ chapter_lastmod.iso }}"
|
||||
data-localize-lastmod
|
||||
data-utc-fallback="{{ chapter_lastmod.display }}"
|
||||
>{{ chapter_lastmod.display }}</time>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% include "partials/chapter-footer-nav.html" %}
|
||||
</article>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@
|
|||
<section class="tree-cta" aria-labelledby="tree-cta-title">
|
||||
<div class="container tree-cta__inner">
|
||||
<p class="section-kicker">For Every Learner</p>
|
||||
<h2 id="tree-cta-title" class="tree-cta__title">The next generation is the future.</h2>
|
||||
<h2 id="tree-cta-title" class="tree-cta__title">The next generation is our future.</h2>
|
||||
<p class="tree-cta__lead">Let's provide good, free education that anyone can read, share, and improve.</p>
|
||||
<div class="tree-cta__actions">
|
||||
<a class="button button-primary" href="{{ config.extra.browse_url | safe }}">Start reading</a>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue