Skip to content

Commit 910a4f0

Browse files
Copilot0xrinegade
andcommitted
Added mobile responsiveness and print styles for book-like experience
Co-authored-by: 0xrinegade <[email protected]>
1 parent fde88ed commit 910a4f0

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

docs.html

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,22 @@
218218
margin: 0 auto;
219219
}
220220

221+
@media (max-width: 768px) {
222+
.chart-container {
223+
height: 250px;
224+
}
225+
226+
.infographic-grid {
227+
grid-template-columns: 1fr;
228+
}
229+
230+
.book-nav {
231+
flex-direction: column;
232+
gap: 1rem;
233+
align-items: center;
234+
}
235+
}
236+
221237
.infographic-grid {
222238
display: grid;
223239
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
@@ -239,6 +255,47 @@
239255
border-bottom: 1px solid #D4D4D4;
240256
padding-bottom: 0.25rem;
241257
}
258+
259+
/* Print styles for book-like printing */
260+
@media print {
261+
body {
262+
font-size: 12pt;
263+
}
264+
265+
.header, .footer, #sidebar, .book-nav {
266+
display: none !important;
267+
}
268+
269+
#content {
270+
width: 100% !important;
271+
margin: 0 !important;
272+
padding: 0 !important;
273+
}
274+
275+
#markdown-content {
276+
box-shadow: none !important;
277+
padding: 0 !important;
278+
background-color: white !important;
279+
}
280+
281+
.book-chapter {
282+
page-break-after: always;
283+
border-bottom: none;
284+
}
285+
286+
.chart-container {
287+
height: 400px !important;
288+
page-break-inside: avoid;
289+
}
290+
291+
.diagram-container {
292+
page-break-inside: avoid;
293+
}
294+
295+
.infographic-grid {
296+
page-break-inside: avoid;
297+
}
298+
}
242299
</style>
243300
</head>
244301
<body>
@@ -414,6 +471,8 @@ <h2 class="font-bold">Error Loading Document</h2>
414471
}
415472

416473
// Override the original loadMarkdown function to add our enhancement logic
474+
// We no longer need this since we modified the original loadMarkdown function
475+
/*
417476
const originalLoadMarkdown = loadMarkdown;
418477
loadMarkdown = async function(path) {
419478
await originalLoadMarkdown(path);
@@ -422,6 +481,7 @@ <h2 class="font-bold">Error Loading Document</h2>
422481
checkAndEnhanceContent();
423482
}, 100);
424483
};
484+
*/
425485

426486
// Functions to add specific diagrams
427487
function addServiceEscrowDiagram() {

0 commit comments

Comments
 (0)