From 8ba19a0155d7570b25cec875e6c7f8197310f0e2 Mon Sep 17 00:00:00 2001 From: Ben Word Date: Sat, 9 Feb 2013 17:41:45 -0600 Subject: [PATCH] Static top navbar instead of fixed This change allows us to simplify the code in both app.css and cleanup.php --- assets/css/app.css | 13 +++---------- lib/cleanup.php | 6 ------ lib/config.php | 2 +- templates/header-top-navbar.php | 4 ++-- 4 files changed, 6 insertions(+), 19 deletions(-) diff --git a/assets/css/app.css b/assets/css/app.css index 7446a03..fa695eb 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -12,10 +12,6 @@ body { } .banner { } -/* Fixed Topbar Navigation */ -body.top-navbar { padding-top: 60px; } -body.admin-bar .navbar-fixed-top { top: 28px; } - /* ========================================================================== @@ -78,9 +74,6 @@ figure.alignnone { margin-left: 0; margin-right: 0; } Media Queries ========================================================================== */ -@media (max-width: 979px) { - /* Fix top padding when using the responsive grid with the fixed topbar */ - body.top-navbar { - padding-top: 0; - } -} \ No newline at end of file +@media (max-width: 767px) { + +} diff --git a/lib/cleanup.php b/lib/cleanup.php index eed98d2..45a48ea 100644 --- a/lib/cleanup.php +++ b/lib/cleanup.php @@ -99,12 +99,6 @@ add_filter('style_loader_tag', 'roots_clean_style_tag'); * Add and remove body_class() classes */ function roots_body_class($classes) { - // Add 'top-navbar' class if using Bootstrap's Navbar - // Used to add styling to account for the WordPress admin bar - if (current_theme_supports('bootstrap-top-navbar')) { - $classes[] = 'top-navbar'; - } - // Add post/page slug if (is_single() || is_page() && !is_front_page()) { $classes[] = basename(get_permalink()); diff --git a/lib/config.php b/lib/config.php index 1521b66..ae11d9b 100644 --- a/lib/config.php +++ b/lib/config.php @@ -6,7 +6,7 @@ add_theme_support('root-relative-urls'); // Enable relative URLs add_theme_support('rewrites'); // Enable URL rewrites add_theme_support('h5bp-htaccess'); // Enable HTML5 Boilerplate's .htaccess -add_theme_support('bootstrap-top-navbar'); // Enable Bootstrap's fixed navbar +add_theme_support('bootstrap-top-navbar'); // Enable Bootstrap's top navbar add_theme_support('bootstrap-gallery'); // Enable Bootstrap's thumbnails component on [gallery] add_theme_support('nice-search'); // Enable /?s= to /search/ redirect diff --git a/templates/header-top-navbar.php b/templates/header-top-navbar.php index a4f27f7..31398f8 100644 --- a/templates/header-top-navbar.php +++ b/templates/header-top-navbar.php @@ -1,4 +1,4 @@ -