From 68c16aae493275a9f70aaeb4bfb76dfc64ea344b Mon Sep 17 00:00:00 2001 From: laurelfulford Date: Thu, 17 Oct 2019 21:33:19 +0000 Subject: [PATCH 1/5] Initial pass at creating bare-bones offline template. --- offline.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 offline.php diff --git a/offline.php b/offline.php new file mode 100644 index 000000000..99541b805 --- /dev/null +++ b/offline.php @@ -0,0 +1,26 @@ + +
+
+ +
+
+ + Date: Thu, 17 Oct 2019 22:01:17 +0000 Subject: [PATCH 2/5] Clean up offline header. --- offline.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/offline.php b/offline.php index 99541b805..96a99187b 100644 --- a/offline.php +++ b/offline.php @@ -1,13 +1,6 @@
+
+

+
From dcd01a19a36924c14ea4c986b7ef03534df050e3 Mon Sep 17 00:00:00 2001 From: laurelfulford Date: Thu, 17 Oct 2019 22:17:53 +0000 Subject: [PATCH 3/5] Update messages; add function_exists check. --- offline.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/offline.php b/offline.php index 96a99187b..7e21c58a9 100644 --- a/offline.php +++ b/offline.php @@ -9,13 +9,16 @@ ?>
-

+

- +
- Date: Tue, 22 Oct 2019 20:43:09 +0000 Subject: [PATCH 4/5] Update title on PWA offline template to be more accurate. --- offline.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offline.php b/offline.php index 7e21c58a9..a1f5fd5f9 100644 --- a/offline.php +++ b/offline.php @@ -9,7 +9,7 @@ ?>
-

+

Date: Tue, 22 Oct 2019 22:32:07 +0000 Subject: [PATCH 5/5] Improvements to PWA template: remove menus, widgets and WordAds; add minimum height for content area. --- header.php | 2 +- offline.php | 10 ++++++++++ sass/layout/_layout.scss | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/header.php b/header.php index 89792cb63..321eb9e32 100755 --- a/header.php +++ b/header.php @@ -172,7 +172,7 @@ diff --git a/offline.php b/offline.php index a1f5fd5f9..02e4d68e5 100644 --- a/offline.php +++ b/offline.php @@ -5,6 +5,16 @@ * @package Newspack */ +// Prevent showing nav menus. +add_filter( 'has_nav_menu', '__return_false' ); + +// Prevent showing widgets. +add_filter( 'is_active_sidebar', '__return_false' ); + +// Disable WordAds in the header. +// See: https://wordads.co/2018/02/07/how-to-control-jetpack-ad-placements-using-hooks/ +add_filter( 'wordads_header_disable', '__return_true' ); + get_header(); ?>
diff --git a/sass/layout/_layout.scss b/sass/layout/_layout.scss index 4aaac395f..d3ccef1df 100755 --- a/sass/layout/_layout.scss +++ b/sass/layout/_layout.scss @@ -20,6 +20,7 @@ } .site-content { + min-height: 30vh; overflow: hidden; }