summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5805024)
This makes it clearer that the classes are only for navigation menu
matters. Other things should be done on media queries, or ideally,
using bootstrap components like grids.
This has a side effect of removing the smaller font size from the
body when the navigation menu is in the small-nav state.
var windowWidth = $(window).width();
if (windowWidth < compactWidth) {
var windowWidth = $(window).width();
if (windowWidth < compactWidth) {
- $("body").removeClass("compact").addClass("small");
+ $("body").removeClass("compact-nav").addClass("small-nav");
} else if (windowWidth < headerWidth) {
} else if (windowWidth < headerWidth) {
- $("body").addClass("compact").removeClass("small");
+ $("body").addClass("compact-nav").removeClass("small-nav");
- $("body").removeClass("compact").removeClass("small");
+ $("body").removeClass("compact-nav").removeClass("small-nav");
headerWidth = headerWidth + $(e).outerWidth();
});
headerWidth = headerWidth + $(e).outerWidth();
});
- $("body").addClass("compact");
+ $("body").addClass("compact-nav");
$("header").children(":visible").each(function (i, e) {
compactWidth = compactWidth + $(e).outerWidth();
});
$("header").children(":visible").each(function (i, e) {
compactWidth = compactWidth + $(e).outerWidth();
});
- $("body").removeClass("compact");
+ $("body").removeClass("compact-nav");
#compact-secondary-nav {
display: inline-block;
}
#compact-secondary-nav {
display: inline-block;
}
/* Styles specific to a small screen, such as iPhone, Android, etc... */
/* Styles specific to a small screen, such as iPhone, Android, etc... */
#menu-icon {
display: inline-block !important;
}
#menu-icon {
display: inline-block !important;
}