From 71fc2b08b3334a0806b2535527c79a295a4a2c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=8E=E6=99=A8?= Date: Fri, 14 Jun 2019 15:12:39 +0800 Subject: [PATCH] fix: tweak header and pager in print view (#241) * fix: hide header and pager in print view * fix: remvoe the weird top padding on the first page in print style * fix: remvoe all top padding of .Main in print style * fix: unset `position: fixed` for header in print style * fix: hide search bar in print style --- src/components/Header.vue | 4 ++++ src/components/PrevNextLinks.vue | 4 ++++ src/plugins/search/SearchBar.vue | 4 ++++ src/views/Home.vue | 1 + 4 files changed, 13 insertions(+) diff --git a/src/components/Header.vue b/src/components/Header.vue index acdbe490..c82f3e66 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -81,6 +81,10 @@ export default { z-index: 33; border-bottom: 1px solid var(--border-color); background: var(--header-background); + + @media print { + position: static; + } } .Wrap { diff --git a/src/components/PrevNextLinks.vue b/src/components/PrevNextLinks.vue index 584357d5..9a1b5de4 100644 --- a/src/components/PrevNextLinks.vue +++ b/src/components/PrevNextLinks.vue @@ -60,6 +60,10 @@ export default { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--border-color); + + @media print { + display: none; + } } .prev-link { diff --git a/src/plugins/search/SearchBar.vue b/src/plugins/search/SearchBar.vue index aa6a06fb..7a42d463 100644 --- a/src/plugins/search/SearchBar.vue +++ b/src/plugins/search/SearchBar.vue @@ -111,6 +111,10 @@ export default { display: block; } } + + @media print { + display: none; + } } .search-input-wrapper { diff --git a/src/views/Home.vue b/src/views/Home.vue index 89dcab24..6e98e2b6 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -195,6 +195,7 @@ export default { @media print { padding-left: 0; + padding-top: 30px; } }