next-wordpress-starter icon indicating copy to clipboard operation
next-wordpress-starter copied to clipboard

Responsive Site Navigation

Open colbyfayock opened this issue 5 years ago • 14 comments

I'm happy with the "desktop" experience for larger devices, but I didn't put a ton of thought into how mobile should look.

We should figure out a good way to present the navigation for all device sizes.

Things to consider:

  • How does this look on smaller devices (mobile)
  • How does this look on larger devices (desktop)
  • Is a hamburger menu appropriate? maybe instead do a sideways scrolling menu like how Google does it on mobile? image
  • How would search look on mobile?

A solution should be proposed before this Issue gets picked up to get worked on, ideally with a design mockup of sorts (doesn't need to be perfect for the mockup)

colbyfayock avatar Oct 19 '20 03:10 colbyfayock

image ^ position: fixed; justify-content: flex-start; top: 0; left: 0; display: flex; flex-flow: column; background: whitesmoke; padding: 10px; height: 100vh; z-index: 2; overflow-y: auto; width: 70vw; transition: left 0.45s ease-in-out

have a toggle menu that sets left to 70vw onclick with simple js click Its all a really Simple css media screen break

if you wanted to go menu scroll way, You could just have an overflow-x: auto; But this isnt really pretty.

Search bar Could be a very simple toggle overlay, Or just have it relocate below the header with positioning

Arxhtects avatar Oct 20 '20 11:10 Arxhtects

Just realised ive not specifed where the code should be placed. Would be best on the nav UL tag

Arxhtects avatar Oct 20 '20 11:10 Arxhtects

hi

rabishprasad190 avatar Oct 21 '20 06:10 rabishprasad190

hey @Arxhtects thanks for putting that together - was that just a mockup or did you make a proof of concept somewhere? id be curious to see an example of how that would look when it's not open for instance

colbyfayock avatar Oct 22 '20 03:10 colbyfayock

hey @Arxhtects thanks for putting that together - was that just a mockup or did you make a proof of concept somewhere? id be curious to see an example of how that would look when it's not open for instance

Hey it was a proof of concept from the inspect window. and the x button was just a quick paint job.

Tbh making a toggle button is easy, i normaly do it with a div as a wrapper and 3 divs or spans inside. Some people do it with one div and before and afters, but i don't like doing it that way, I'm currently swamped work wise if i had time i would have forked and made a working concept, Maybe if i get some time ill make something, but tbh any one could pick this up and work from the code ive roughly put to geather.

A simple $("nav").toggleClass("show") [or w/e code you wana do it in] on the toggle button would work bringin the menu out from the left, hell you could add it to the body if you wanted and move the body over for a extra bit of fancy 👍

Its just a basic of canvas menu.

image

just put the code

position: fixed;
justify-content: flex-start;
top: 0;
left: 0;
display: flex;
flex-flow: column;
background: whitesmoke;
padding: 10px;
height: 100vh;
z-index: 2;
overflow-y: auto;
width: 70vw;
transition: left 0.45s ease-in-out

into the element style and you will see it, all it would need is a media tag [mobile first, for that tasty google rankings] on the ul for it to change between resolutions :)

Arxhtects avatar Oct 22 '20 09:10 Arxhtects

@Arxhtects I would like to pick it up and work with the ground work you have laid.

allenjamesvinoy14 avatar Oct 22 '20 15:10 allenjamesvinoy14

@Arxhtects I would like to pick it up and work with the ground work you have laid.

I have no issue with that 👍 However I'm not the owner of this repo :D Might want to check with them first

Arxhtects avatar Oct 22 '20 15:10 Arxhtects

as long as @Arxhtects didn't want to do the work and submit the PR that sounds good

when working through it we'll want to make sure that we're providing a good experience for both mobile and desktop :)

colbyfayock avatar Oct 23 '20 12:10 colbyfayock

@allenjamesvinoy14 - let me know if you'd like any support with this. :)

doingandlearning avatar Oct 24 '20 08:10 doingandlearning

Hey, if this issue is still relevant, I'd like to work on this.

Ambareen09 avatar Oct 04 '22 10:10 Ambareen09

@Ambareen09 sure that would be great! let me know if you have any questions

colbyfayock avatar Oct 04 '22 10:10 colbyfayock

Can you please help me with setting up the WORDPRESS_GRAPHQL_ENDPOINT? I am unable to follow the documentation for this part.

Ambareen09 avatar Oct 06 '22 15:10 Ambareen09

@Ambareen09 check these tutorials out:

https://spacejelly.dev/posts/how-to-create-a-headless-wordpress-blog-with-next-js-wordpress-starter/ https://www.youtube.com/watch?v=X8fY011u0tE

colbyfayock avatar Oct 06 '22 15:10 colbyfayock

you could try using a local wordpress instance: https://localwp.com/

there's also a service to spin up a temporary one but i can't find it right now, ill comment back if i find it

colbyfayock avatar Oct 06 '22 21:10 colbyfayock