-
Notifications
You must be signed in to change notification settings - Fork 65
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 #770 from Automattic/simplify/mobile-menu
Refactor: Simplify the mobile menu files
- Loading branch information
Showing
3 changed files
with
25 additions
and
47 deletions.
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
26 changes: 0 additions & 26 deletions
26
newspack-theme/template-parts/header/mobile-sidebar-fallback.php
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,26 +1,36 @@ | ||
<?php | ||
/** | ||
* Template for display the AMP mobile navigation. | ||
* Template to display the mobile navigation, either AMP or fallback. | ||
* | ||
* @package Newspack | ||
*/ | ||
?> | ||
|
||
<amp-sidebar id="mobile-sidebar" layout="nodisplay" side="right" class="mobile-sidebar"> | ||
if ( newspack_is_amp() ) : ?> | ||
<amp-sidebar id="mobile-sidebar" layout="nodisplay" side="right" class="mobile-sidebar"> | ||
<button class="mobile-menu-toggle" on='tap:mobile-sidebar.toggle'> | ||
<?php echo wp_kses( newspack_get_icon_svg( 'close', 20 ), newspack_sanitize_svgs() ); ?> | ||
<?php esc_html_e( 'Close', 'newspack' ); ?> | ||
</button> | ||
<?php else : ?> | ||
<aside id="mobile-sidebar-fallback" class="mobile-sidebar"> | ||
<button class="mobile-menu-toggle"> | ||
<?php echo wp_kses( newspack_get_icon_svg( 'close', 20 ), newspack_sanitize_svgs() ); ?> | ||
<?php esc_html_e( 'Close', 'newspack' ); ?> | ||
</button> | ||
<?php endif; ?> | ||
|
||
<button class="mobile-menu-toggle" on='tap:mobile-sidebar.toggle'> | ||
<?php echo wp_kses( newspack_get_icon_svg( 'close', 20 ), newspack_sanitize_svgs() ); ?> | ||
<?php esc_html_e( 'Close', 'newspack' ); ?> | ||
</button> | ||
<?php newspack_tertiary_menu(); ?> | ||
|
||
<?php newspack_tertiary_menu(); ?> | ||
<?php get_search_form(); ?> | ||
|
||
<?php get_search_form(); ?> | ||
<?php newspack_primary_menu(); ?> | ||
|
||
<?php newspack_primary_menu(); ?> | ||
<?php newspack_secondary_menu(); ?> | ||
|
||
<?php newspack_secondary_menu(); ?> | ||
<?php newspack_social_menu_header(); ?> | ||
|
||
<?php newspack_social_menu_header(); ?> | ||
|
||
</amp-sidebar> | ||
<?php if ( newspack_is_amp() ) : ?> | ||
</amp-sidebar> | ||
<?php else : ?> | ||
</aside> | ||
<?php endif; ?> |