feat: notebook-style templates + handwritten fonts (closes #101) - #102
Merged
Merged
Conversation
- Kalam Light/Regular/Bold + Caveat Medium/Bold (OFL, from Google Fonts, TrueType magic verified) - registered in build_font_db for notebook-style templates - bundled font count 10 -> 15
- notebook-cover: handwritten hero, tagline banner, 6-step pipeline with inline SVG icons (no emoji), dashed intro box, 9-row TOC with dot leaders - notebook-page: chapter title box, star bullets, dashed example box, dynamic-height cloud punchline, optional second dashed box, brand line - shrink-to-fit hero/chapter/tagline titles; schema max-length guards - light paper theme (defaults deviate from Catppuccin dark by design) - docs pages + gallery cards + sidebar + changelog; MinIO previews live - closes #101
| }, | ||
| }, | ||
| }) | ||
| 'notebook-cover', |
| <text x="160" y="1022" font-family="Kalam,cursive" font-size="25" font-weight="700" fill="{{ brand.accent_color | default('#1e3a8a') }}">{{ slide.extra_title }}</text> | ||
| <text x="160" y="1062" font-family="Kalam,cursive" font-size="22" fill="{{ brand.accent_color | default('#1e3a8a') }}">{% for ln in slide.extra_text|default('')|wordwrap(60)|split('\n') %}<tspan x="160" dy="{{ 0 if loop.first else 32 }}">{{ ln }}</tspan>{% endfor %}</text> | ||
| {% endif %} | ||
| <!-- bottom brandline --> |
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
- config.ts: move notebook sidebar entries INSIDE defineConfig() theme config (appended after the closing paren before, syntax error) - notebook-page footer: Patrick Hand is not bundled; use Kalam - notebook-cover defaults: clamp TOC entries to schema max 22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two-part feature implementing #101:
PR part 1 (fonts): bundle Kalam (Light/Regular/Bold) + Caveat (Medium/Bold), OFL licensed, downloaded via Google Fonts CSS API with TrueType magic-byte verification. Registered in
build_font_db(10 -> 15 bundled fonts).PR part 2 (templates):
notebook-cover(1080x1350): handwritten hero (Caveat), uppercase subtitle, tagline banner, 6-step pipeline with inline SVG icons (note/phone/brain/search/spark/rocket - no emoji per Cosy mandate), dashed intro box, 9-row TOC with dot leaders, topics footernotebook-page(1080x1350): chapter title box, star SVG bullets, dashed example box (optional, dynamic height), cloud punchline bubble (dynamic height), optional second dashed box, bottom brand lineWhy
Educational study-notes carousels are a proven viral IG format (reference: viral @abhi_techhub handwritten-notes post). Until now only reproducible via the external HTML pipeline; this brings it into Cosy as API-renderable templates.
Testing
cargo fmt+cargo clippy -D warningsclean; full test suite 174/174 greenCloses #101