add print CSS
· 1 year ago
8f89b86406f154091c5c897ddaa1cd46f5e487b0
Parent:
4ac624f00
1 file changed +190 −1
- judaism.html +190 −1
Diff
--- a/judaism.html +++ b/judaism.html @@ -1,4 +1,3 @@ -```html <!DOCTYPE html> <html lang="en"> <head> @@ -182,6 +181,196 @@ /* padding: 0 2px; */ } </style> + + <!-- print styles: --> + <style> + /* --- START PRINT STYLES --- */ + @media print { + :root { + /* Override colors for print - use system defaults mostly */ + --bs-body-bg: #fff; /* White background */ + --bs-body-color: #000; /* Black text */ + --bs-primary: #000; /* Black for emphasis instead of blue */ + } + + body { + background: var(--bs-body-bg) !important; /* Ensure white background */ + color: var(--bs-body-color) !important; /* Ensure black text */ + font-size: 10pt; /* Adjust base font size for print */ + font-family: serif; /* Serif fonts often better for print */ + padding-bottom: 0; /* Remove extra body padding */ + margin: 1cm; /* Add standard print margins */ + width: auto !important; /* Let browser handle width */ + } + + /* Hide non-essential elements */ + .hebrew-toggle-container, + .details-toggle, + footer .bi /* Hide icons in footer */ + { + display: none !important; + } + + /* Simplify header */ + .page-header { + background: none !important; + border-bottom: 1px solid #ccc !important; + text-align: left; + padding: 0 0 1rem 0; + margin-bottom: 1.5rem; + page-break-after: avoid; + } + .page-header h1 { + color: #000 !important; + font-size: 18pt; + } + .page-header p.lead { + color: #333 !important; + font-size: 11pt; + } + + /* Section titles */ + .section-title { + color: #000 !important; + margin: 2rem 0 1rem 0; + font-size: 14pt; + page-break-before: auto; /* Allow break before sections if needed */ + page-break-after: avoid; /* Try not to break right after title */ + } + + /* Linearize grid layout */ + .row { + display: block !important; /* Override Bootstrap flex */ + } + .row > [class*="col-"] { + width: 100% !important; /* Make columns full width */ + float: none !important; /* Remove floats */ + display: block !important; + margin-bottom: 1rem; /* Add space between stacked items */ + page-break-inside: avoid; /* Try to keep card content together */ + } + + /* Card styling */ + .info-card { + background: none !important; + border: 1px solid #ccc !important; + box-shadow: none !important; + border-radius: 0 !important; + height: auto !important; /* Let content determine height */ + display: block !important; /* Override flex */ + margin-bottom: 1rem; /* Ensure space below card */ + } + .info-card .card-body { + padding: 0.75rem !important; + display: block !important; /* Override flex */ + } + .info-card h5 { + color: #000 !important; + text-align: left; + font-size: 11pt; + margin-bottom: 0.5rem; + font-weight: bold; + } + .info-card p, .info-card li { + font-size: 10pt !important; + color: #000 !important; + line-height: 1.4; + } + .info-card ul { + margin-bottom: 0.5rem; + padding-left: 1.5rem; /* Standard indent */ + } + + /* Ensure collapsed content is visible */ + .collapse { + /* Override Bootstrap's hiding mechanism */ + display: block !important; + visibility: visible !important; + height: auto !important; + overflow: visible !important; + } + .collapse-content { + border-top: 1px dotted #aaa !important; + padding-top: 0.5rem !important; + margin-top: 0.5rem !important; + font-size: 9pt !important; /* Slightly smaller for details */ + } + .collapse-content p, .collapse-content li { + font-size: 9pt !important; /* Ensure consistent size */ + } + + /* Handle Hebrew/English Toggle - Show Both */ + .toggle-term .en, + .toggle-term .he { + display: inline !important; /* Override JS hiding */ + font-style: normal !important; /* Reset any styling */ + } + /* Add parentheses around Hebrew for clarity */ + .toggle-term .he::before { + content: " ("; + font-family: serif; /* Match body font */ + font-style: normal; + } + .toggle-term .he::after { + content: ")"; + font-family: serif; /* Match body font */ + font-style: normal; + } + + /* Link styling for print */ + a, a:visited { + color: #000 !important; /* Black links */ + text-decoration: none !important; /* Remove underline */ + } + /* Optionally show URLs after links */ + a[href^="http"]::after, /* External links */ + a[href^="https"]::after { + content: " [" attr(href) "]"; + font-size: 8pt; + color: #555; + word-wrap: break-word; /* Prevent long URLs overflowing */ + display: inline; /* Ensure it stays inline */ + } + a[href^="#"]::after { + content: "" !important; /* Don't show URL for internal links */ + } + /* Don't show URL for footer links */ + footer a::after { + content: "" !important; + } + + + /* List styling */ + .list-unstyled { + padding-left: 0; + list-style: none; + } + .list-unstyled li { + margin-bottom: 0.3rem; + } + /* Show list item markers if icons were hidden */ + .list-unstyled .bi-caret-right-fill { + display: inline !important; /* Make sure carets still show if used */ + font-size: 0.8em; + margin-right: 0.3em; + } + + + /* Footer */ + footer { + padding-top: 1rem; + font-size: 9pt; + color: #555 !important; + text-align: left; + border-top: 1px solid #ccc; + page-break-before: auto; + } + footer p { + font-size: 9pt !important; + } + } + /* --- END PRINT STYLES --- */ + </style> </head> <body> <header class="page-header">