Skip to content

Commit

Permalink
Improve print layout
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledhosny committed Nov 10, 2024
1 parent 851e301 commit 807d134
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 63 deletions.
2 changes: 1 addition & 1 deletion _includes/contact.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="contact">
<h2>{{ messages.contact }}</h2>
<p>{{ messages.contact-detail }} <a href="mailto:[email protected]"><code>[email protected]</code></a></p>
<p>
<p class="links">
<a href="https://github.com/aliftype">{{ messages.github }}</a><br />
<a href="https://www.facebook.com/AlifTypeFoundry">{{ messages.facebook }}</a><br />
<!--a href="https://www.instagram.com/khaledhosny.type">{{ messages.instagram }}</a></br-->
Expand Down
55 changes: 55 additions & 0 deletions _sass/print.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
@media print {

nav,
.downloads,
.links,
.lang-switcher-side,
.lang-switcher-top,
#sitedesigner {
display: none !important;
}

body {
background-color: revert !important;
grid-template-columns: auto !important;
max-width: 100% !important;
padding: 0 8% !important;
grid-template-areas:
"title"
"section"
;
}

#title {
width: 100% !important;
font-size: 10vw !important;
}

* {
font-palette: light !important;
}

a {
text-decoration: revert !important;
}

header,
footer {
padding: 0 !important;
border: none !important;
}

blockquote.kufi {
break-after: default;
}

h1,
h2,
h3,
h4,
h5,
h6,
blockquote {
break-after: avoid-page;
}
}
1 change: 1 addition & 0 deletions assets/css/amiri.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
@import "colors";
@import "fonts";
@import "nav";
@import "print";

body {
max-width: 1240px;
Expand Down
1 change: 1 addition & 0 deletions assets/css/qahiri.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
@import "fonts";
@import "nav";
@import "button";
@import "print";

body {
max-width: 1240px;
Expand Down
63 changes: 1 addition & 62 deletions assets/css/raqq.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
@import "colors";
@import "fonts";
@import "nav";
@import "print";

body {
max-width: 1240px;
Expand Down Expand Up @@ -319,68 +320,6 @@ footer p {
}
}

@media print {
body {
background-color: revert;
grid-template-columns: auto;
max-width: 100%;
padding: 0 8%;
grid-template-areas:
"title"
"section"
"footer"
"header"
;
}

body * {
font-palette: light;
}

body,
.kufi p,
.كوفي p,
h1,
h2,
h3,
h4,
h5,
h6,
#title,
#logo {
color: revert;
}

section {
break-after: page;
}

h1,
h2,
h3,
h4,
h5,
h6,
blockquote {
break-after: avoid-page;
}

blockquote.kufi {
break-after: default;
}

footer {
border: none;
}

.lang-switcher-top,
.lang-switcher-side,
#sitedesigner {
display: none;
}

}

{% for i in (1..125) %}
{% assign ai = i
| replace: "0", "٠"
Expand Down

0 comments on commit 807d134

Please sign in to comment.