Commit bb789e75 by Brian Talbot

studio - course nav: general flex-grid layout - WIP

parent 280de111
//studio global header and navigation // studio global header and navigation
// ====================
.wrapper-header { .wrapper-header {
margin: 0 0 ($baseline*1.5) 0; margin: 0 0 ($baseline*1.5) 0;
padding: $baseline; padding: $baseline;
...@@ -29,6 +31,27 @@ ...@@ -29,6 +31,27 @@
} }
} }
// ====================
// basic layout
.wrapper-left, .wrapper-right {
@include box-sizing(border-box);
}
.wrapper-left {
width: flex-grid(10, 12);
float: left;
margin-right: flex-gutter();
}
.wrapper-right {
width: flex-grid(2, 12);
float: right;
}
// ====================
// specific elements - branding
.branding, .info-course, .nav-course, .nav-account, .nav-unauth, .nav-pitch { .branding, .info-course, .nav-course, .nav-account, .nav-unauth, .nav-pitch {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
...@@ -51,6 +74,9 @@ ...@@ -51,6 +74,9 @@
} }
} }
// ====================
// specific elements - course name/info
.info-course { .info-course {
position: relative; position: relative;
max-width: 200px; max-width: 200px;
...@@ -98,7 +124,9 @@ ...@@ -98,7 +124,9 @@
} }
} }
// course info // ====================
// specific elements - course nav
.nav-course { .nav-course {
width: 335px; width: 335px;
margin-top: -($baseline/4); margin-top: -($baseline/4);
...@@ -160,9 +188,10 @@ ...@@ -160,9 +188,10 @@
} }
} }
// account-based nav // ====================
// specific elements - account-based nav
.nav-account { .nav-account {
float: right;
max-width: 300px; max-width: 300px;
min-width: 175px; min-width: 175px;
width: 20%; width: 20%;
...@@ -188,7 +217,9 @@ ...@@ -188,7 +217,9 @@
} }
} }
// dropdown UI // ====================
// UI - dropdown
.nav-dropdown { .nav-dropdown {
.nav-item { .nav-item {
...@@ -236,7 +267,7 @@ ...@@ -236,7 +267,7 @@
} }
} }
// vendor // UI - dropdown - vendor
.arrow_box { .arrow_box {
position: relative; position: relative;
background: #fff; background: #fff;
...@@ -267,7 +298,7 @@ ...@@ -267,7 +298,7 @@
margin-left: -11px; margin-left: -11px;
} }
// specific navs // UI - dropdown - specific navs
&.nav-account { &.nav-account {
.nav-sub { .nav-sub {
...@@ -305,7 +336,9 @@ ...@@ -305,7 +336,9 @@
} }
} }
// is-signed in // ====================
// STATE: is-signed in
.is-signedin { .is-signedin {
&.course .branding { &.course .branding {
...@@ -334,10 +367,12 @@ ...@@ -334,10 +367,12 @@
} }
} }
// not signed in // ====================
// STATE: not signed in
.not-signedin { .not-signedin {
// unauthenticated nav // STATE: not signed in - unauthenticated nav
.nav-not-signedin { .nav-not-signedin {
float: right; float: right;
margin-top: ($baseline/4); margin-top: ($baseline/4);
...@@ -347,7 +382,6 @@ ...@@ -347,7 +382,6 @@
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
margin: 0 $baseline 0 0; margin: 0 $baseline 0 0;
font-weight: 500;
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
...@@ -360,7 +394,7 @@ ...@@ -360,7 +394,7 @@
} }
} }
// specific items // STATE: not signed in - specific items
.nav-not-signedin-help { .nav-not-signedin-help {
} }
...@@ -374,7 +408,7 @@ ...@@ -374,7 +408,7 @@
@include font-size(14); @include font-size(14);
padding: ($baseline/4) ($baseline/2); padding: ($baseline/4) ($baseline/2);
text-transform: uppercase; text-transform: uppercase;
font-weight: 600 !important; font-weight: 600;
} }
} }
...@@ -386,14 +420,15 @@ ...@@ -386,14 +420,15 @@
@include font-size(14); @include font-size(14);
padding: ($baseline/4) ($baseline/2); padding: ($baseline/4) ($baseline/2);
text-transform: uppercase; text-transform: uppercase;
font-weight: 600 !important; font-weight: 600;
} }
} }
} }
} }
// ====================
// active/current nav states // STATE: active/current nav states
body.howitworks .nav-not-signedin-hiw, body.howitworks .nav-not-signedin-hiw,
body.signin .nav-not-signedin-signin, body.signin .nav-not-signedin-signin,
body.signup .nav-not-signedin-signup, body.signup .nav-not-signedin-signup,
...@@ -405,7 +440,9 @@ body.course.outline .nav-course-courseware ...@@ -405,7 +440,9 @@ body.course.outline .nav-course-courseware
} }
} }
// js enabled // ====================
// STATE: js enabled
.js { .js {
.nav-dropdown { .nav-dropdown {
......
...@@ -3,10 +3,7 @@ ...@@ -3,10 +3,7 @@
<div class="wrapper-header wrapper"> <div class="wrapper-header wrapper">
<header class="primary" role="banner"> <header class="primary" role="banner">
<span class="wrapper wrapper-flex"> <div class="wrapper wrapper-left ">
</span>
<h1 class="branding"><a href="/">edX Studio</a></h1> <h1 class="branding"><a href="/">edX Studio</a></h1>
% if context_course: % if context_course:
...@@ -62,7 +59,9 @@ ...@@ -62,7 +59,9 @@
</ol> </ol>
</nav> </nav>
% endif % endif
</div>
<div class="wrapper wrapper-right">
% if user.is_authenticated(): % if user.is_authenticated():
<nav class="nav-account nav-is-signedin nav-dropdown"> <nav class="nav-account nav-is-signedin nav-dropdown">
<h2 class="sr">Currently logged in as:</h2> <h2 class="sr">Currently logged in as:</h2>
...@@ -105,5 +104,6 @@ ...@@ -105,5 +104,6 @@
</ol> </ol>
</nav> </nav>
% endif % endif
</div>
</header> </header>
</div> </div>
\ No newline at end of file
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