diff --git a/CHANGELOG.md b/CHANGELOG.md index d5b60ccf..9bbbfbba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. ## v0.2.13 - :tada: Feat: add Artalk comment support ([#54](https://github.com/Lruihao/FixIt/issues/54)) +- :sparkles: Style: add media style for print view ([#61](https://github.com/Lruihao/FixIt/issues/61)) - :sparkles: Feat: update watermark 1.0.3-RC (fontFamily support) - :pencil2: Style: fix typo discription should be: description ([#60](https://github.com/Lruihao/FixIt/issues/60)) - :fire: Feat: remove shortcode cardlink diff --git a/assets/css/_core/_media.scss b/assets/css/_core/_media.scss index d8de49a1..c937b0a9 100644 --- a/assets/css/_core/_media.scss +++ b/assets/css/_core/_media.scss @@ -81,3 +81,43 @@ } } } + +@media only print { + @page { + size: A4 portrait; + margin: 1.27cm; + page-break-after: auto; + } + + .page { + width: 100%; + padding-top: 0!important; + + .single-title, + .single-subtitle, + .post-meta { + text-align: center; + } + + h1:not(.single-title), + .page-break-before { + page-break-before: always; + } + + .page-break-after { + page-break-after: always; + } + } + + header, + footer .footer-line:not(.powered):not(.copyright), + #toc-auto, + .post-info-share, + .post-info-more section:last-child, + .post-nav, + #fixed-buttons, + #comments { + display: none!important; + } +} + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index c203a080..1bc0ec38 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -3,14 +3,14 @@