diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx index a31cd1f3..6e963633 100644 --- a/src/app/dashboard/page.tsx +++ b/src/app/dashboard/page.tsx @@ -11,7 +11,7 @@ export default function Dashboard() { return (
{/* Header */} -
+

Dashboard

diff --git a/src/app/globals.css b/src/app/globals.css index 7379faf4..b2298708 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -1,4 +1,11 @@ @import 'tailwindcss'; +@import '../styles/print.css'; + +@media print { + .no-print { + display: none !important; + } +} :root { --background: #ffffff; diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsx index 50d19d3f..9adfe9c0 100644 --- a/src/components/layout/Header.tsx +++ b/src/components/layout/Header.tsx @@ -25,7 +25,7 @@ export const Header: React.FC = () => { }; return ( -
+
{/* Logo */} @@ -73,6 +73,13 @@ export const Header: React.FC = () => { > {t('navigation.dashboard')} + {/* Theme Toggle, Language Switcher and Mobile Menu Button */} diff --git a/src/styles/print.css b/src/styles/print.css new file mode 100644 index 00000000..613a1fd9 --- /dev/null +++ b/src/styles/print.css @@ -0,0 +1,105 @@ +@media print { + /* ── Hide screen-only elements ─────────────────────────────────────── */ + nav, + header, + footer, + aside, + button, + dialog, + [role='dialog'], + [role='tooltip'], + [data-radix-popper-content-wrapper], + [data-print='false'], + [class*='no-print'], + .no-print { + display: none !important; + } + + /* ── Page setup ────────────────────────────────────────────────────── */ + @page { + margin: 1.5cm; + } + + /* ── Reset layout ──────────────────────────────────────────────────── */ + *, + *::before, + *::after { + background: #fff !important; + color: #000 !important; + box-shadow: none !important; + border-radius: 0 !important; + gap: 0 !important; + } + + html, + body { + width: 100%; + font-family: Georgia, 'Times New Roman', Times, serif; + font-size: 12pt; + line-height: 1.5; + } + + body > *, + main, + article, + section, + .container, + [class*='max-w-'], + [class*='mx-auto'] { + display: block !important; + width: 100% !important; + max-width: 100% !important; + margin: 0 !important; + padding: 0 !important; + float: none !important; + } + + /* ── Page-break rules ──────────────────────────────────────────────── */ + h1, + h2, + h3, + tr { + page-break-inside: avoid; + break-inside: avoid; + } + + h1, + h2, + h3 { + page-break-after: avoid; + break-after: avoid; + } + + img, + table, + figure { + page-break-inside: avoid; + break-inside: avoid; + } + + /* ── Show link URLs ────────────────────────────────────────────────── */ + a[href]::after { + content: ' (' attr(href) ')'; + font-size: 10pt; + color: #444 !important; + } + + /* Don't expand internal/anchor links or javascript: links */ + a[href^='#']::after, + a[href^='javascript:']::after { + content: ''; + } + + /* ── Tables ────────────────────────────────────────────────────────── */ + table { + border-collapse: collapse; + width: 100%; + } + + th, + td { + border: 1px solid #999 !important; + padding: 4pt 6pt; + text-align: left; + } +}