Skip to content

Conversation

@bcordis
Copy link
Member

@bcordis bcordis commented Feb 8, 2026

Summary

  • Adds a Print button to the sermon detail view that triggers window.print()
  • Loads a new proclaim-print.css stylesheet with @media print rules that:
    • Hides non-printable elements: social sharing, comments, podcast subscribe, media players, navigation, footer links
    • Optimizes typography for paper output (12pt body, proper heading sizes, line spacing)
    • Controls page breaks (avoids breaking inside headings, manages orphans/widows)
    • Shows URLs for external links in print
  • Conditionally skips rendering comments, footer, and footer links in print mode (server-side)
  • Wraps social sharing and podcast subscribe sections with print-mode checks
  • Fixes legacy bug in default_fluidsermondetail.php that echoed $this->print as raw content

Files Changed

  • site/src/View/Cwmsermon/HtmlView.php — Sets $this->print from request, loads print CSS
  • site/tmpl/cwmsermon/default.php — Print button, conditional comments/footer
  • site/tmpl/cwmsermon/default_main.php — Conditional social sharing and podcast subscribe
  • site/tmpl/cwmsermon/default_fluidsermondetail.php — Fixed $this->print echo bug
  • media/css/proclaim-print.css — New print stylesheet

Test plan

  • Open a sermon detail page, verify Print button appears top-right
  • Click Print button, verify browser print dialog opens
  • In print preview: social sharing, comments, players, navigation hidden
  • In print preview: title, scripture, date, study text display cleanly
  • Verify print button is hidden in print preview itself
  • Test with custom template (fluidsermondetail) — no raw print value echoed

🤖 Generated with Claude Code

bcordis and others added 7 commits February 8, 2026 10:28
- Set $this->print from request input in HtmlView
- Load proclaim-print.css via WebAssetManager
- Add print button (icon-print) in sermon detail header
- Hide comments, social sharing, podcast subscribe, footer links in print mode
- Print CSS: hide players/iframes/nav, optimize typography for paper
- Fix legacy bug in default_fluidsermondetail.php echoing $this->print as content

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- icon-print only works in admin (Atum), not frontend (Cassiopeia)
- Changed to fas fa-print which works on both via vendor fontawesome
- Switched from WebAssetManager to HTMLHelper::_('stylesheet') to match
  existing pattern used by podcast.css

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Target Cassiopeia grid classes: container-header, container-nav,
  container-sidebar-left/right, container-footer, etc.
- Reset site-grid to block display so component fills page width
- Hide AddToAny social sharing (a2a_kit, a2a_button_* classes)
- Hide comments toggle (#JBScomments), scripture passage toggle
- Hide Joomla modules (.moduletable) that appear in content area
- Hide YouTube icons and iframe embeds
- Scope link URL display to .proclaim-main-content only
- Hide breadcrumbs via Cassiopeia class names

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Register proclaim-print.css in joomla.asset.json as com_proclaim.print
- Use WebAssetManager useStyle() instead of HTMLHelper (CSS was not loading)
- Target .main-bottom for Joomla modules rendered in component area
- Force-show hidden scripture passage content in print
- Hide scripture toggle link/icon but keep passage text visible

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Print button now opens a popup window with tmpl=component, which
  strips all Joomla template chrome (template-agnostic approach)
- In the popup, a second Print button triggers window.print()
- Scripture passage renders as plain text reference in print mode
  instead of BibleGateway iframe (iframes don't render in print)
- Simplified print CSS: removed all Cassiopeia-specific selectors
  since tmpl=component handles template chrome removal
- Added .passage-print styling for the text-based passage block

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Same-chapter references now display as "Luke 7:36-38" instead
  of "Luke 7:36-7:38" (omit redundant chapter number)
- Add proclaim-print-mode class to container in print popup
- Media elements (YouTube, iframes, video, audio) now hidden in
  the popup window view, not just when printing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…friendly

# Conflicts:
#	site/tmpl/cwmsermon/default_main.php
@bcordis bcordis merged commit c845a75 into development Feb 9, 2026
5 checks passed
@bcordis bcordis deleted the feature-print-friendly branch February 9, 2026 04:05
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