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

Nav bar as part of milligram? #70

Closed
alexjj opened this issue Feb 1, 2016 · 26 comments
Closed

Nav bar as part of milligram? #70

alexjj opened this issue Feb 1, 2016 · 26 comments

Comments

@alexjj
Copy link

alexjj commented Feb 1, 2016

Love the look of this framework, great job!

Upon trying it out I realised that the nav bar that's part of the homepage isn't actually part of milligram. Actually, a few things of the homepage aren't part of milligram. It was easy for me to add it to my project, but are there plans to incorporate it as part of milligram?

@hiroppy
Copy link
Contributor

hiroppy commented Feb 1, 2016

The idea is great but my intention is to keep the Milligram as light as possible, supporting the feature minimum necessary to initialize a project. BTW, what you are proposing would be a very specific component. I'm closing your request and appreciate their efforts to improve this project.

#46

@cjpatoilo
Copy link
Member

Hi @alexjj @abouthiroppy

In fact, my intention is to keep Milligram as light as possible, supporting the feature minimum necessary to initialize a project.

You helped me have a great idea! I will create a repository with components produced with Milligram. This should help many people, a place where they can more easily find something that can help it in everyday life.

http://codepen.io/milligram/

@EmilMoe
Copy link

EmilMoe commented May 17, 2016

Doesn't seem to be well known or used, but I would like a range of navbars too

@Kcchouette
Copy link

Kcchouette commented Oct 1, 2016

Same here, navbar and menus are the minimum feature necessary to a project, isn't it?

@gwleuverink
Copy link

Heya, I'm looking for a framework that can replace bootstrap for me and milligram is a serious contender.

I could really do with some more examples since I'm not familiar with the framework yet but the codepen link you posed does not work. Do you have another link?

Thanks!

@cjpatoilo
Copy link
Member

You are giving me great ideas. 😍

@cjpatoilo cjpatoilo reopened this Jun 28, 2017
@jrondorf
Copy link

Any outcome on the navbar ideas?

@minimallinux
Copy link

Milligram is pretty good but I would definitely like to see more Nav options, especially for using with Sage 9 (Wordpress) builds, which usually need a nav walker unless someone can correct me on that?, Thanks

@popey456963
Copy link

@cjpatoilo's link seems dead. The new link is https://codepen.io/milligramcss/

(Plus, I would definitely be for adding a navbar to Milligram. I disagree with others saying that it's a narrow thing for people to want, 90% of websites have a navbar.)

@gyasikn
Copy link

gyasikn commented Apr 6, 2018

nav bar would be great

@mhedrick
Copy link

I would like to add that the fact that the github.io site has a navbar led me to believe that the package itself had a navbar. it's pretty disingenuous.

@gwleuverink
Copy link

I disagree. The pages document doesn’t state a navbar is a core component anywhere. The fact the page has a navbar does not mean it is part of the framework. It isn’t disingenuous, you simply made a wrong assumption.

@mhedrick
Copy link

mhedrick commented Aug 3, 2018

Yes, I thought the package had a navbar until I started reading and found out it didn't. It honestly surprised me - my expectation in looking at ui packages is that they generally only use the tools they provide. I looked through the site css - simply styling the nav tag and adding some styling for nav links doesn't seem like it would add too much overhead?

@chuckreynolds
Copy link

chuckreynolds commented Jan 9, 2019

^^ all that said... has anybody implemented a fairly simple navbar w/ logo and menu items that responsively breaks down to a hamburger-type menu on mobile as an example?
EDIT: adding here that JS is not preferred... ESPECIALLY jquery. nope. CSS only heavily preferred. allowable cheat would be a small amount of vanilla JS but rather not have any JS at all.

@yebo29
Copy link

yebo29 commented Jan 28, 2019

^^ all that said... has anybody implemented a fairly simple navbar w/ logo and menu items that responsively breaks down to a hamburger-type menu on mobile as an example?

I'm trying my hand on that now using the example included in milligram, using https://github.com/shuedna/Milligram-baseSite-withMenu as reference. I too am very inexperienced with this so may not succeed.

But I agree with above; a responsive nav is pretty foundational.

@chuckreynolds
Copy link

updated previous request... CSS only, no JS, especially no jQuery.

@popey456963
Copy link

popey456963 commented Jan 29, 2019

CSS Only Milligram NavBar

Source
Example
MIT License

Depends upon the base library.

@yebo29
Copy link

yebo29 commented Jan 30, 2019

Good work @popey456963. The only thing is that it doesn't break down to a hamburger style menu.
I missed the requirement of no JS/jquery, or vanilla JS. Either way I haven't had much success on my end.. yet.

@yebo29
Copy link

yebo29 commented Jan 31, 2019

I halted my search for a css-only nav that collapses to a hamburger menu for now due to time; I simply replaced the text with font-awesome icons which are more compact and display nicely when scaled down. Also, for the element 'navigation-item' I decreased margin-left to 1.5rem.

Once I complete this project I'll try again... if someone else didn't already complete it.

@yebo29
Copy link

yebo29 commented Feb 1, 2019

Also, hide navbar on scroll up:
For navigation class add: transition: top 0.3s;
Add id="navbar"
JS at bottom:

var prevScrollpos = window.pageYOffset;
window.onscroll = function() {
  var currentScrollPos = window.pageYOffset;
  if (prevScrollpos > currentScrollPos) {
    document.getElementById("navbar").style.top = "0";
  } else {
    document.getElementById("navbar").style.top = "-50px";
  }
  prevScrollpos = currentScrollPos;
}

No Jquery or other deps required

@popey456963
Copy link

I think normally you want to hide the navigation bar on scroll down, not scroll up?

@yebo29
Copy link

yebo29 commented Mar 26, 2019

The code is for scroll down. Sorry, I misspoke

@chuckreynolds
Copy link

Following up on css-only responsive nav... this one is simple and works great:
https://codepen.io/chuckreynolds/pen/ROaeXv

@hbast
Copy link

hbast commented Apr 30, 2019

Following up on css-only responsive nav... this one is simple and works great:
codepen.io/chuckreynolds/pen/ROaeXv

Thanks for the link. But how do I put that together? The content of my container scrolls 'behind' the header. There should be some kind of padding.

@seia-soto
Copy link

seia-soto commented Aug 9, 2019

Just a comment.

If there are pre-built navbar things, building UI will quite faster.
However, don't you guys think the navbar is something useless? I prefer to providing navbar like Semantic-UI style(using the menu to provide navbar).

I think not too much is good. :)

@cjpatoilo
Copy link
Member

Guys, thank you for helping @. For now, I will close this issue.
If someone needs help feel free to reopen or open a new!

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

No branches or pull requests