Skip to content

Commit

Permalink
Fix print layout
Browse files Browse the repository at this point in the history
  • Loading branch information
jotonedev committed Mar 6, 2024
1 parent d62f458 commit f908f16
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h2><a href="{{ '/feed' | relative_url }}" class="hidden-link">Latest Posts</a><
{% endfor %}
</div>

<div style="height: fit-content; align-items: center; text-align: center; margin: 3rem auto 0rem;">
<div class="no_print" style="height: fit-content; align-items: center; text-align: center; margin: 3rem auto 0rem;">
<a href="{{ '/feed' | relative_url }}" class="hidden-link hover-underline center">
<span>Read all posts →</span>
</a>
Expand Down
28 changes: 28 additions & 0 deletions assets/css/print.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,39 @@
@media print {
@page {
size: A4;
}

html, body, .page-main {
margin: 0 !important;
padding: 0 !important;
}

header {
display: none !important;
}

footer {
display: none !important;
}

blockquote, pre {
display: block;

page-break-before: avoid;
page-break-inside: avoid;
}

.post-card-container {
gap: 1.5rem;
}

.post-card {
max-width: max-content;
}

.post-card img {
max-width: 80% !important;
}
}


Expand Down

0 comments on commit f908f16

Please sign in to comment.