Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responsive menu? #93

Closed
jemostrom opened this issue Oct 9, 2018 · 12 comments
Closed

Responsive menu? #93

jemostrom opened this issue Oct 9, 2018 · 12 comments

Comments

@jemostrom
Copy link

I've been playing with the theme and to me it looks like the menu doesn't display as an "hamburger menu" for narrow screens. Is this the intended design or am I missing something? (yep Hugo newbie)

@luizdepra
Copy link
Owner

Yes, we have and mobile menu. It should display in 768px or less screens.

@jemostrom
Copy link
Author

Hmmm, I must be missing something ... it looks like this for me.
screen shot 2018-10-09 at 21 42 56

@khos2ow
Copy link
Contributor

khos2ow commented Oct 9, 2018

@jemostrom how did you test this? I mean is this a local clone of this theme? Are you sure you have the updated theme in your site?
For the sake of comparison you can take a look at https://deploy-preview-90--hugo-coder.netlify.com/ which is based of almost the latest of the master HEAD.

@jemostrom
Copy link
Author

Yep, I downloaded a zip yesterday (I'm just playing around at the moment) and use it locally. But I see the same thing on the preview site. Here are screenshots from Safari and Firefox

screen shot 2018-10-09 at 22 10 35

screen shot 2018-10-09 at 22 11 01

@luizdepra
Copy link
Owner

We use max-width in the CSS rule for responsiveness.

@media only screen and (max-device-width : 768px)

Looks like you are resizing our browser window, and this will not trigger the mobile menu because your max-screen-width is still bigger than 768px.

You can test the mobile menu using the Developers Tools from your browser.

@jemostrom
Copy link
Author

I'm probably too stupid to do things correctly (I'm not doing any web design so ...) but on Safari I enter the responsive mode and select one of the available iPhones ... and it looks like this

screen shot 2018-10-09 at 22 34 52

Am I doing something wrong here. Also, if I make my window narrow on my laptop shouldn't I also get the responsive menu? My thinking is that I might have several windows open and have made windows narrow so they can be viewed at the same time.

@jemostrom
Copy link
Author

jemostrom commented Oct 9, 2018

Firefox seem to do it correctly. I also checked the example site using my 6s Plus and it looks OK there also. So apparently it's Safari on my laptop that is doing something wrong.

But I'm still curious why the decision not show a "hamburger menu" on my laptop for narrow windows.

@jemostrom
Copy link
Author

FWIW - I did change max-device-width to max-width and it displays as I first expected. But I don't know if I'm doing things correctly. Is there some description somewhere how I should work to make changes to CSS/SCSS (I have no previous experience of SCSS)?

@luizdepra
Copy link
Owner

Wierd. Can you give me the version of your Safari? Maybe we need to add an extra rule or something to make it work on Safari. Need some research.

Is there some description somewhere how I should work to make changes to CSS/SCSS (I have no previous experience of SCSS)?

Not yet. I need to write something. But you will need to use Hugo Extended v0.43 or more to compile the SCSS into CSS. The command make release will to this job for you. And, about changing the SCSS, it is very straightforward I think.

@jemostrom
Copy link
Author

Yes, it's basically how to build the css files I need help with, the scss files looks almost like normal css files so I think handle that part.

Safari: Version 12.0 (14606.1.36.1.9)

@josephting
Copy link
Contributor

I did some quick research and it seems like device-width have been deprecated.

To query for the size of the viewport (or the page box on page media), the width, height and aspect-ratio media features should be used, rather than device-width, device-height and device-aspect-ratio, which refer to the physical size of the the device regardless of how much space is available for the document being laid out.

Ref: W3C | MDN

With that said, all max-device-width should be replaced with max-width.

I can create a PR for this if you're OK with the proposed change.

@luizdepra
Copy link
Owner

@josephting sure. I would appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants