Commit 6cd4eaa731595605472bc85ee9187e4c58d220f3

Authored by Caio Almeida
1 parent eb225cf6

Fixed tabs

.gitignore
1 1 *.swp
2 2 .sass-cache
3 3 style.css
  4 +sass/styles.scss
  5 +style.css.map
  6 +styles.css
  7 +styles.css.map
... ...
index.html
... ... @@ -7,9 +7,7 @@
7 7 <script src='js/handlebars-v3.0.1.js'></script>
8 8 <script src='js/handlebars-helpers.js'></script>
9 9 <script src='js/jquery.dotdotdot.min.js'></script>
10   -<!--
11 10 <script src='js/layout.js'></script>
12   --->
13 11 </head>
14 12 <body>
15 13  
... ...
js/layout.js
... ... @@ -3,79 +3,11 @@
3 3 (function($) {
4 4 'use strict';
5 5  
6   - $(document).ready(function() {
7   -
8   - /* Broken after last updates on HTML - needs to be fixed
9   - // Tabs behavior
10   -
11   - $('nav a').click(function() {
12   - var $that = $(this);
13   - $('nav a#active').attr('id', '');
14   - $that.attr('id', 'active');
15   -
16   - $($that.attr('href')).fadeIn();
17   -
18   - if (isMobile()) {
19   - $('#content').fadeOut();
20   - }
21   - else {
22   - $('#content').fadeIn();
23   - }
24   - $('body').removeClass('mobile');
25   - });
26   -
27   - // Responsiveness
28   -
29   - var isMobile = function() {
30   - return ($(window).width() < 500);
31   - };
32   -
33   - var responsiveness = function() {
34   - if (isMobile()) {
35   - $('#subjects').hide();
36   - $('nav a#active').attr('id', '');
37   - $('body').addClass('mobile');
38   - }
39   - else {
40   - $('nav a').first().click();
41   - $('body').removeClass('mobile');
42   - }
43   - };
44   -
45   - $(window).load(responsiveness);
46   - $(window).resize(responsiveness);
47   - */
48   -
49   - var adjust = function() {
50   -
51   - // Adjust header image size
52   -
53   - var bgsz = '100%';
54   - if ($(window).width() > 768) {
55   - bgsz = '768px 147px';
56   - }
57   - $('#content').css('background-size', bgsz);
58   -
59   - // Calculate inner subject width and position of expanded subject
60   -
61   - var $c = $('.proposal-category'),
62   - $i = $('.proposal-category-items'),
63   - w = $c.width() * $c.length - 20,
64   - pos = $c.length;
65   - if (w > $(window).width()) {
66   - console.log('More than one line of items');
67   - w = '100%';
68   - pos = $(window).width() / $c.width();
69   - }
70   - $i.width(w);
71   - $i.each(function() {
72   - var $that = $(this);
73   - $('#proposal-categories-container').append($that);
74   - });
75   -
76   - };
  6 + var adjust = function() {
  7 + };
77 8  
  9 + $(document).ready(function() {
78 10 $(window).resize(adjust);
79   - $(window).load(adjust);
  11 + adjust();
80 12 });
81 13 }(jQuery));
... ...
sass/_nav.scss
... ... @@ -7,18 +7,22 @@ nav {
7 7 nav ul {
8 8 padding: 0;
9 9 margin: 0;
  10 + width: 100%;
10 11 }
11 12  
12 13 nav li {
13   - display: inline;
  14 + display: inline-block;
14 15 list-style: none;
15 16 padding: 0;
16 17 margin: 0;
  18 + width: 50%;
  19 + background: #03316f;
  20 + float: left;
17 21 }
18 22  
19 23 nav li a {
20 24 display: block;
21   - width: 48%;
  25 + width: 97.6%;
22 26 float: left;
23 27 text-align: center;
24 28 text-decoration: none;
... ... @@ -26,7 +30,7 @@ nav li a {
26 30 font-weight: bold;
27 31 color: #fff;
28 32 background: #03316f;
29   - margin: 0;
  33 + margin: 1px 0.2% 0 0.2%;
30 34 padding: 20px 1%;
31 35 text-transform: uppercase;
32 36 border-bottom: 3px solid #001129;
... ... @@ -36,10 +40,5 @@ nav li a.active {
36 40 position: relative;
37 41 background: #fff;
38 42 color: #03316f;
39   - border-bottom: 3px solid #fff;
40   - border-top: 1px solid #03316f;
41   - border-left: 1px solid #03316f;
42   - border-right: 1px solid #03316f;
43   - padding-left: 10px;
44   -
  43 + border-bottom: 3px solid transparent;
45 44 }
... ...