Skip to content

Commit

Permalink
styling: Configure print page
Browse files Browse the repository at this point in the history
  • Loading branch information
freshavocado7 committed Apr 10, 2024
1 parent 3e5ad9a commit f109971
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,9 @@
.read-the-docs {
color: #888;
}

@media print {
.header {
display: none !important;
}
}
2 changes: 1 addition & 1 deletion frontend/src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {ThemeSwitcher} from "./ThemeSwitcher";

export const Header = () => {
return (
<header className=" text-gray-700 p-4 flex justify-between items-center">
<header className="header text-gray-700 p-4 flex justify-between items-center">
<div><Breadcrumbs /></div>
<div></div>
<div><ThemeSwitcher /></div>
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,10 @@ button:focus-visible {
ul {
@apply list-disc pl-5;
}

@media print {
body, .html-wrapper, .flex-1, .html-content {
overflow: visible !important;
}
@page { margin: 15mm; }
}
2 changes: 1 addition & 1 deletion frontend/src/views/TemplateView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const TemplateView = ({ endpoint }) => {
</aside>
{/* Main Content */}
<main className="flex-1 overflow-hidden p-4">
<div className="w-full p-4 max-w-none lg:max-w-4xl min-w-0 lg:min-w-[850px] overflow-y-hidden h-full flex items-center justify-center">
<div className="html-wrapper w-full p-4 max-w-none lg:max-w-4xl min-w-0 lg:min-w-[850px] overflow-y-hidden h-full flex items-center justify-center">
{" "}
{/* Ensure main content is scrollable and fills the height */}
{!!!objectID && !!!singleObjectID && (
Expand Down

0 comments on commit f109971

Please sign in to comment.