FEDX-118 Adding header to test page
This commit is contained in:
committed by
Clinton Blackburn
parent
717b56a7b2
commit
3cbb2d1a08
16
lms/static/js/header_factory.js
Normal file
16
lms/static/js/header_factory.js
Normal file
@@ -0,0 +1,16 @@
|
||||
;(function (define) {
|
||||
'use strict';
|
||||
|
||||
define([
|
||||
'edx-ui-toolkit/js/dropdown-menu/dropdown-menu-view'
|
||||
],
|
||||
function (DropdownMenuView) {
|
||||
return function() {
|
||||
var dropdownMenuView = new DropdownMenuView({
|
||||
el: '.js-header-user-menu'
|
||||
}).postRender();
|
||||
|
||||
return dropdownMenuView;
|
||||
};
|
||||
});
|
||||
}).call(this, define || RequireJS.define);
|
||||
@@ -23,6 +23,7 @@
|
||||
'js/edxnotes/views/page_factory',
|
||||
'js/financial-assistance/financial_assistance_form_factory',
|
||||
'js/groups/views/cohorts_dashboard_factory',
|
||||
'js/header_factory',
|
||||
'js/search/course/course_search_factory',
|
||||
'js/search/dashboard/dashboard_search_factory',
|
||||
'js/student_account/logistration_factory',
|
||||
|
||||
@@ -5,5 +5,9 @@
|
||||
|
||||
// Configuration
|
||||
@import 'config';
|
||||
@import 'base/variables';
|
||||
|
||||
// Extensions
|
||||
@import 'shared-v2/base';
|
||||
@import 'shared-v2/navigation';
|
||||
@import 'shared-v2/header';
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
.verification-process {
|
||||
|
||||
//overriding reset link style for nav/header
|
||||
header.global {
|
||||
.header-global {
|
||||
|
||||
.logo a:hover, .logo:active, .logo a:focus {
|
||||
border: none;
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
color: rgb(255, 255, 255);
|
||||
}
|
||||
|
||||
.global {
|
||||
.header-global {
|
||||
h2 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -12,11 +12,11 @@ body.view-in-course {
|
||||
}
|
||||
|
||||
// courseware header
|
||||
header.global,
|
||||
header.global.slim {
|
||||
.header-global,
|
||||
.header-global.slim {
|
||||
width: auto;
|
||||
|
||||
.nav-wrapper {
|
||||
.wrapper-header {
|
||||
min-width: auto;
|
||||
padding-right: 2%;
|
||||
padding-left: 2%;
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
header.global.slim {
|
||||
.header-global.slim {
|
||||
box-shadow: 0 1px 2px $shadow-l1;
|
||||
height: auto;
|
||||
padding: ($baseline/4) 0 ($baseline/2) 0;
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
// aside
|
||||
aside {
|
||||
|
||||
.cta {
|
||||
.btn {
|
||||
margin: 0 0 ($baseline*2) 0;
|
||||
|
||||
&:last-child {
|
||||
@@ -230,7 +230,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.cta-login {
|
||||
.btn-login {
|
||||
|
||||
h3.title,
|
||||
.instructions {
|
||||
@@ -238,7 +238,7 @@
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.cta-login-action {
|
||||
.btn-login-action {
|
||||
@extend %btn-secondary-grey-outline;
|
||||
padding: ($baseline/10) ($baseline*0.75);
|
||||
@include margin-left($baseline/4);
|
||||
@@ -631,7 +631,7 @@
|
||||
// login
|
||||
.view-login {
|
||||
|
||||
header.global .nav-courseware .cta-login {
|
||||
.header-global .nav-courseware .btn-login {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -657,7 +657,7 @@
|
||||
// password reset
|
||||
.view-passwordreset {
|
||||
|
||||
header.global .nav-courseware .cta-login {
|
||||
.header-global .nav-courseware .btn-login {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
}
|
||||
|
||||
// TYPE: facebook share
|
||||
&.action-facebook, {
|
||||
&.action-facebook {
|
||||
color: $facebook-blue;
|
||||
}
|
||||
|
||||
@@ -931,7 +931,7 @@
|
||||
@include float(left);
|
||||
@include margin(0, 15px, 0, 0);
|
||||
|
||||
.btn, .cta {
|
||||
.btn {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@@ -954,7 +954,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.cta {
|
||||
.btn {
|
||||
@include float(left);
|
||||
font: normal 0.8rem/1.2rem $sans-serif;
|
||||
letter-spacing: 1px;
|
||||
@@ -1013,7 +1013,7 @@
|
||||
|
||||
&.course-status-certrendering {
|
||||
|
||||
.cta {
|
||||
.btn {
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
@@ -1093,7 +1093,7 @@
|
||||
@include float(left);
|
||||
position: relative;
|
||||
|
||||
.cta {
|
||||
.btn {
|
||||
@extend %btn-pl-green-base;
|
||||
@include float(right);
|
||||
}
|
||||
|
||||
6
lms/static/sass/shared-v2/_base.scss
Normal file
6
lms/static/sass/shared-v2/_base.scss
Normal file
@@ -0,0 +1,6 @@
|
||||
// LMS base styles
|
||||
|
||||
.content-wrapper {
|
||||
margin: 0 auto;
|
||||
padding: 10px;
|
||||
}
|
||||
83
lms/static/sass/shared-v2/_header.scss
Normal file
83
lms/static/sass/shared-v2/_header.scss
Normal file
@@ -0,0 +1,83 @@
|
||||
// LMS header styles
|
||||
|
||||
.header-global {
|
||||
@extend %ui-depth1;
|
||||
@include box-sizing(border-box);
|
||||
position: relative;
|
||||
width: 100%;
|
||||
border-bottom: 4px solid $courseware-border-bottom-color;
|
||||
box-shadow: 0 1px 5px 0 $shadow-l1;
|
||||
background: $header-bg;
|
||||
|
||||
.wrapper-header {
|
||||
@include clearfix();
|
||||
@include box-sizing(border-box);
|
||||
height: 74px;
|
||||
margin: 0 auto;
|
||||
padding: 10px 10px 0;
|
||||
width: 100%;
|
||||
max-width: 1180px;
|
||||
|
||||
.logo {
|
||||
@include float(left);
|
||||
@include margin-right(39px);
|
||||
@include margin-left(10px);
|
||||
margin-top: 4px;
|
||||
margin-bottom: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.left {
|
||||
@include float(left);
|
||||
}
|
||||
|
||||
.right {
|
||||
@include float(right);
|
||||
}
|
||||
|
||||
.wrapper-user-menu {
|
||||
@include float(right);
|
||||
margin-top: 4px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
@include text-align(left);
|
||||
top: inherit;
|
||||
}
|
||||
|
||||
.list-inline {
|
||||
margin-top: 12px;
|
||||
|
||||
.item {
|
||||
display: inline-block;
|
||||
font-size: font-size(small);
|
||||
font-weight: font-weight(semi-bold);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0 !important;
|
||||
|
||||
&.active {
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: $link-color;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: $courseware-navigation-color;
|
||||
padding: 3px 10px;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background: inherit;
|
||||
color: $courseware-hover-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav-courseware.list-inline {
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
23
lms/static/sass/shared-v2/_navigation.scss
Normal file
23
lms/static/sass/shared-v2/_navigation.scss
Normal file
@@ -0,0 +1,23 @@
|
||||
// LMS navigation styles
|
||||
|
||||
// skip navigation
|
||||
.nav-skip {
|
||||
font-size: font-size(small);
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: -($baseline*30);
|
||||
overflow: hidden;
|
||||
background: $white;
|
||||
border-bottom: 1px solid palette(grayscale, white);
|
||||
padding: ($baseline*0.75) ($baseline/2);
|
||||
|
||||
&:focus,
|
||||
&:active {
|
||||
position: relative;
|
||||
top: auto;
|
||||
width: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
@import '../base/grid-settings';
|
||||
@import 'neat/neat'; // lib - Neat
|
||||
|
||||
header.global {
|
||||
.header-global {
|
||||
@extend %ui-depth1;
|
||||
border-bottom: 1px solid $gray-l1;
|
||||
box-shadow: 0 1px 5px 0 $shadow-l1;
|
||||
@@ -330,7 +330,7 @@ header.global {
|
||||
li, div {
|
||||
display: inline-block;
|
||||
|
||||
.cta {
|
||||
.btn {
|
||||
@extend %m-btn-primary;
|
||||
}
|
||||
}
|
||||
@@ -340,7 +340,7 @@ header.global {
|
||||
// marketing site design syncing
|
||||
.view-register, .view-login, .view-passwordreset {
|
||||
|
||||
header.global nav {
|
||||
.header-global nav {
|
||||
width: 960px;
|
||||
}
|
||||
}
|
||||
@@ -360,7 +360,7 @@ header.global {
|
||||
// ====================
|
||||
|
||||
// CASE: marketing/course discovery
|
||||
header.global-new {
|
||||
.header-global-new {
|
||||
@extend %ui-depth1;
|
||||
/* Temp. fix until applied globally */
|
||||
@include box-sizing(border-box);
|
||||
@@ -852,13 +852,13 @@ header.global-new {
|
||||
}
|
||||
}
|
||||
|
||||
.view-register header.global-new .cta-register {
|
||||
.view-register .header-global-new .btn-register {
|
||||
text-decoration: none;
|
||||
color: $courseware-hover-color;
|
||||
border-bottom-color: $courseware-border-bottom-color;
|
||||
}
|
||||
|
||||
.view-login header.global-new .cta-login {
|
||||
.view-login .header-global-new .btn-login {
|
||||
text-decoration: none;
|
||||
color: $courseware-hover-color;
|
||||
}
|
||||
@@ -866,7 +866,7 @@ header.global-new {
|
||||
// marketing site design syncing
|
||||
.view-register, .view-login {
|
||||
|
||||
header.global nav {
|
||||
.header-global nav {
|
||||
width: 960px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,12 +109,12 @@
|
||||
}
|
||||
|
||||
// reset: navigation (needed due to edX's new global-header styling)
|
||||
.global-new .nav-global a {
|
||||
.header-global-new .nav-global a {
|
||||
padding-bottom: ($baseline +1);
|
||||
}
|
||||
|
||||
// HACK: fix global header height in verification flow ECOM-1808
|
||||
header.global {
|
||||
.header-global {
|
||||
height: 76px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user