-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #523 from Automattic/build/offline-template
PWA: Add 'offline.php' template
- Loading branch information
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/** | ||
* The PWA Offline template file | ||
* | ||
* @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(); | ||
?> | ||
<section id="primary" class="content-area"> | ||
<header class="entry-header"> | ||
<h1 class="entry-title"><?php esc_html_e( 'Offline', 'newspack' ); ?></h1> | ||
</header><!-- .entry-header --> | ||
<main id="main" class="site-main"> | ||
<?php | ||
if ( function_exists( 'wp_service_worker_error_message_placeholder' ) ) { | ||
wp_service_worker_error_message_placeholder(); | ||
} | ||
?> | ||
</main><!-- .site-main --> | ||
</section><!-- .content-area --> | ||
<?php | ||
get_footer(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
} | ||
|
||
.site-content { | ||
min-height: 30vh; | ||
overflow: hidden; | ||
} | ||
|
||
|