Commit 34ef0ec8 by Kyle Fiedler

Added styles for collapsable navigation

parent 3e7afe7f
<%page args="active_page" /> <%page args="active_page" />
<div class="header-wrapper"> <div class="header-wrapper">
<header> <header>
<h1><em>MITx</em></h1> <hgroup>
<h1><em>MITx</em></h1>
<h2><a href="/courseware">Circuits and Electronics</a></h2>
</hgroup>
<nav class="${active_page}"> <nav class="${active_page}">
<h2><a href="/courseware">Circuits and Electronics</a></h2>
<ul class="coursenav"> <ul class="coursenav">
<li class="courseware"><a href="/courseware">Courseware</a></li> <li class="courseware"><a href="/courseware">Courseware</a></li>
......
...@@ -20,33 +20,29 @@ html { ...@@ -20,33 +20,29 @@ html {
@include box-sizing(border-box); @include box-sizing(border-box);
padding: 0 $body-line-height; padding: 0 $body-line-height;
h1 { hgroup {
border-right: 1px solid darken($mit-red, 5%);
color: #000;
display: block;
float: left; float: left;
font-size: 20px; @extend .clearfix;
font-weight: 800;
margin: 0 lh() 0 0;
padding: 17px lh() 14px 0;
text-shadow: 0 1px 0 lighten($mit-red, 10%);
line-height: lh();
}
nav { h1 {
float: left; border-right: 1px solid darken($mit-red, 5%);
display: block; color: darken($mit-red, 20%);
margin: 0; font-size: 20px;
padding: 0; font-weight: 800;
text-shadow: 0 -1px 0 darken($mit-red, 10%); margin: 0 lh() 0 0;
-webkit-font-smoothing: antialiased; padding: 17px lh() 14px 0;
text-shadow: 0 1px 0 lighten($mit-red, 10%);
line-height: lh();
@include inline-block();
}
h2 { h2 {
float: left; @include inline-block();
margin: 0 lh() 0 0; margin: 0 lh() 0 0;
padding: 19px lh() 9px 0; padding: 19px lh() 9px 0;
line-height: lh(); line-height: lh();
border-right: 1px solid darken($mit-red, 5%); border-right: 1px solid darken($mit-red, 5%);
-webkit-font-smoothing: antialiased;
a { a {
color: #fff; color: #fff;
...@@ -58,6 +54,34 @@ html { ...@@ -58,6 +54,34 @@ html {
} }
} }
@media screen and (max-width: 920px) {
border-bottom: 1px solid darken($mit-red, 5%);
display: block;
float: none;
h1 {
float: left;
border: 0;
}
h2 {
float: right;
border: 0;
margin-right: 0;
padding-right: 0;
}
}
}
nav {
float: left;
display: block;
margin: 0;
padding: 0;
text-shadow: 0 -1px 0 darken($mit-red, 10%);
-webkit-font-smoothing: antialiased;
ul { ul {
@extend .clearfix; @extend .clearfix;
display: inline-block; display: inline-block;
......
...@@ -48,6 +48,7 @@ div.book-wrapper { ...@@ -48,6 +48,7 @@ div.book-wrapper {
a { a {
@extend .block-link; @extend .block-link;
padding: 14px;
} }
ul { ul {
...@@ -74,10 +75,11 @@ div.book-wrapper { ...@@ -74,10 +75,11 @@ div.book-wrapper {
} }
section.page { section.page {
text-align: center;
img { img {
border: 1px solid $border-color; border: 1px solid $border-color;
max-width: 100%; max-width: 100%;
min-width: 100%;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment