Skip to content

Unit 7: single/list/home refactor + shared icons + print partial#9

Open
stradichenko wants to merge 1 commit intomainfrom
unit-07-single-list-home-refactor
Open

Unit 7: single/list/home refactor + shared icons + print partial#9
stradichenko wants to merge 1 commit intomainfrom
unit-07-single-list-home-refactor

Conversation

@stradichenko
Copy link
Copy Markdown
Owner

Summary

  • single.html: drop the in-template asset bundler (now lives in head/styles.html). Replace inline metadata SVGs with calls to a new partials/icons.html. i18n Created / Updated / TableOfContents. Add loading=lazy + decoding=async + responsive srcset to the header image. Move inline <style media=print> into partials/print-vars.html.
  • list.html: i18n TableOfContents; reuse the shared truncation pattern.
  • home.html: verify recent-posts-grid + filters partial dict args.
  • NEW partials/icons.html: reusable icon partial keyed by name (calendar, clock, share, social icons) — centralizes ~20 inline SVGs scattered across templates.
  • NEW partials/print-vars.html: extracted from single.html.

Test plan

  • Build exampleSite/content/posts/example.md — verify Created: is i18n'd, no duplicate CSS bundle.
  • Header image is lazy-loaded with srcset.
  • Print stylesheet works in print-preview.
  • All icon callsites resolve via partials/icons.html.

Part of the PKB-theme modernization batch (15 units).

- single.html: drop the in-template asset bundler (now lives in
  head/styles.html). Replace inline metadata SVGs with calls to a new
  partials/icons.html. i18n Created / Updated / TableOfContents.
  Add loading=lazy + decoding=async + responsive srcset to the header
  image. Move inline <style media=print> into a partials/print-vars.html
  partial.
- list.html: i18n TableOfContents; reuse the shared truncation partial.
- home.html: verify recent-posts-grid + filters partial dict args.
- NEW partials/icons.html: reusable icon partial (calendar, clock,
  share, social icons) keyed by name; centralizes inline SVGs that were
  scattered across templates.
- NEW partials/print-vars.html: extracted from single.html.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant