Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Use Mobile menu layout for Tablet and Mobile #953

Closed
Radizzt opened this issue Mar 9, 2017 · 3 comments
Closed

Use Mobile menu layout for Tablet and Mobile #953

Radizzt opened this issue Mar 9, 2017 · 3 comments

Comments

@Radizzt
Copy link

Radizzt commented Mar 9, 2017

How can this bug be reproduced?

  1. Tried changing the code in _navigation.scss @include show-for(medium); to @include show-for(large);

What did you expect to happen?
The Tablet doesn't have any menu display now

What happened instead?
The mobile layout to be displaying

Please List the Following:

  • OS & version: OS X Yosemite 10.10.3
  • Node version (node -v) [Node v4+ is required] : v6.3.1
  • Foundation version (bower list) : ~6.2.0 (in the style.css it says: Friday, December 16th, 2016)
@Radizzt
Copy link
Author

Radizzt commented Mar 9, 2017

Actually I think I might be able to find a solution if someone can tell me how I can stop the script from adding display: none on the wrapper for mobile menu <?php get_template_part('template-parts/mobile-top-bar'); ?>

so in my header the call to the mobile menu is within this wrapper

<div class="title-bar hide-for-large" data-responsive-toggle="site-navigation">
	<div class="logo"><a href="<?php echo get_home_url(); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/images/pb-black.png" alt="Purpose/Built"></a></div>


	<button id="toggle" type="button" data-toggle="offCanvas" class="menu-btn-dropdown toggle-nav js-nav">
		<i class="fa fa-bars fa-2x"></i>
	</button>
	<div class="offCanvas hide">
		<?php get_template_part('template-parts/mobile-top-bar'); ?>
	</div>

</div>

There seem to be a script of some sort that adds the style display: none when the window is not at 640px or less as show in the attach image

screen shot 2017-03-09 at 3 40 42 pm

If i can get that script to only run for desktop width only and not tablet and desktop I think i'll be ok.

Thanks

@EricRihlmann
Copy link
Contributor

EricRihlmann commented Mar 11, 2017

The Responsive Toggle script is dynamically adding the inline display: none. To remove it, make the following edits in header.php; at line 31 remove the attribute data-responsive-toggle="site-navigation" and on line 32 remove data-toggle="mobile-menu". It appears the use of Responsive Toggle is redundant when used in combination with the existing SASS mixin show-for and hide-for in _navigation.scss. One of them should probably be removed in FoundationPress.

Documentation
http://foundation.zurb.com/sites/docs/responsive-navigation.html#responsive-toggle

@Radizzt
Copy link
Author

Radizzt commented Mar 12, 2017 via email

@Radizzt Radizzt closed this as completed Mar 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants