From 6cd4eaa731595605472bc85ee9187e4c58d220f3 Mon Sep 17 00:00:00 2001 From: Caio SBA Date: Fri, 17 Apr 2015 18:08:54 -0300 Subject: [PATCH] Fixed tabs --- .gitignore | 4 ++++ index.html | 2 -- js/layout.js | 76 ++++------------------------------------------------------------------------ sass/_nav.scss | 17 ++++++++--------- 4 files changed, 16 insertions(+), 83 deletions(-) diff --git a/.gitignore b/.gitignore index bd12e29..7b58d6c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ *.swp .sass-cache style.css +sass/styles.scss +style.css.map +styles.css +styles.css.map diff --git a/index.html b/index.html index 6ed1d91..b7fa577 100644 --- a/index.html +++ b/index.html @@ -7,9 +7,7 @@ - diff --git a/js/layout.js b/js/layout.js index 0f00203..1dc49ee 100644 --- a/js/layout.js +++ b/js/layout.js @@ -3,79 +3,11 @@ (function($) { 'use strict'; - $(document).ready(function() { - - /* Broken after last updates on HTML - needs to be fixed - // Tabs behavior - - $('nav a').click(function() { - var $that = $(this); - $('nav a#active').attr('id', ''); - $that.attr('id', 'active'); - - $($that.attr('href')).fadeIn(); - - if (isMobile()) { - $('#content').fadeOut(); - } - else { - $('#content').fadeIn(); - } - $('body').removeClass('mobile'); - }); - - // Responsiveness - - var isMobile = function() { - return ($(window).width() < 500); - }; - - var responsiveness = function() { - if (isMobile()) { - $('#subjects').hide(); - $('nav a#active').attr('id', ''); - $('body').addClass('mobile'); - } - else { - $('nav a').first().click(); - $('body').removeClass('mobile'); - } - }; - - $(window).load(responsiveness); - $(window).resize(responsiveness); - */ - - var adjust = function() { - - // Adjust header image size - - var bgsz = '100%'; - if ($(window).width() > 768) { - bgsz = '768px 147px'; - } - $('#content').css('background-size', bgsz); - - // Calculate inner subject width and position of expanded subject - - var $c = $('.proposal-category'), - $i = $('.proposal-category-items'), - w = $c.width() * $c.length - 20, - pos = $c.length; - if (w > $(window).width()) { - console.log('More than one line of items'); - w = '100%'; - pos = $(window).width() / $c.width(); - } - $i.width(w); - $i.each(function() { - var $that = $(this); - $('#proposal-categories-container').append($that); - }); - - }; + var adjust = function() { + }; + $(document).ready(function() { $(window).resize(adjust); - $(window).load(adjust); + adjust(); }); }(jQuery)); diff --git a/sass/_nav.scss b/sass/_nav.scss index 0fb9350..78df599 100644 --- a/sass/_nav.scss +++ b/sass/_nav.scss @@ -7,18 +7,22 @@ nav { nav ul { padding: 0; margin: 0; + width: 100%; } nav li { - display: inline; + display: inline-block; list-style: none; padding: 0; margin: 0; + width: 50%; + background: #03316f; + float: left; } nav li a { display: block; - width: 48%; + width: 97.6%; float: left; text-align: center; text-decoration: none; @@ -26,7 +30,7 @@ nav li a { font-weight: bold; color: #fff; background: #03316f; - margin: 0; + margin: 1px 0.2% 0 0.2%; padding: 20px 1%; text-transform: uppercase; border-bottom: 3px solid #001129; @@ -36,10 +40,5 @@ nav li a.active { position: relative; background: #fff; color: #03316f; - border-bottom: 3px solid #fff; - border-top: 1px solid #03316f; - border-left: 1px solid #03316f; - border-right: 1px solid #03316f; - padding-left: 10px; - + border-bottom: 3px solid transparent; } -- libgit2 0.21.2