From 9b09d043bd02d323565a74eb96f7bc93dfabc5de Mon Sep 17 00:00:00 2001 From: Brian Talbot Date: Thu, 14 Feb 2013 12:49:58 -0500 Subject: [PATCH] studio - adding introduction areas to all templates and infrastructure for its contnet --- cms/static/js/base.js | 6 ++ cms/static/sass/_base.scss | 89 +++++++++++++++++++++++++++++ cms/static/sass/_dashboard.scss | 1 + cms/static/sass/_index.scss | 65 +-------------------- cms/templates/course_info.html | 8 +++ cms/templates/edit-tabs.html | 26 ++++++++- cms/templates/howitworks.html | 14 ----- cms/templates/index.html | 8 +++ cms/templates/settings.html | 2 +- cms/templates/settings_graders.html | 2 +- cms/templates/widgets/header.html | 2 +- 11 files changed, 139 insertions(+), 84 deletions(-) diff --git a/cms/static/js/base.js b/cms/static/js/base.js index caf6df940e..2b0efd370d 100644 --- a/cms/static/js/base.js +++ b/cms/static/js/base.js @@ -41,6 +41,12 @@ $(document).ready(function() { $('body').addClass('js'); + // lean/simple modal + $('a[rel*=modal]').leanModal({overlay : 0.80, closeButton: '.action-modal-close' }); + $('a.action-modal-close').click(function(e){ + (e).preventDefault(); + }); + // nav - dropdown related $body.click(function(e){ $('.nav-dropdown .nav-item .wrapper-nav-sub').removeClass('is-shown'); diff --git a/cms/static/sass/_base.scss b/cms/static/sass/_base.scss index 52fa481cb7..4462109b88 100644 --- a/cms/static/sass/_base.scss +++ b/cms/static/sass/_base.scss @@ -225,7 +225,30 @@ h1 { .introduction { @include font-size(14); + width: flex-grid(12); margin: 0 0 $baseline 0; + + .copy strong { + font-weight: 600; + } + + &.has-links { + @include clearfix(); + + .copy { + float: left; + width: flex-grid(8,12); + margin-right: flex-gutter(); + } + + .nav-introduction-supplementary { + @include font-size(13); + float: right; + width: flex-grid(4,12); + display: block; + text-align: right; + } + } } } @@ -743,6 +766,72 @@ hr.divide { // ==================== +// js dependant +body.js { + + // lean/simple modal window + .content-modal { + @include border-bottom-radius(2px); + @include box-sizing(border-box); + @include box-shadow(0 2px 4px $shadow-d1); + position: relative; + display: none; + width: 700px; + overflow: hidden; + border: 1px solid $gray-d1; + padding: ($baseline); + background: $white; + + .action-modal-close { + @include transition(top .25s ease-in-out); + @include border-bottom-radius(3px); + position: absolute; + top: -3px; + right: $baseline; + padding: ($baseline/4) ($baseline/2) 0 ($baseline/2); + background: $gray-l3; + text-align: center; + + .label { + @include text-sr(); + } + + .ss-icon { + @include font-size(18); + color: $white; + } + + &:hover { + background: $blue; + top: 0; + } + } + + img { + @include box-sizing(border-box); + width: 100%; + overflow-y: scroll; + padding: ($baseline/10); + border: 1px solid $gray-l4; + } + + .title { + @include font-size(18); + margin: 0 0 ($baseline/2) 0; + font-weight: 600; + color: $gray-d3; + } + + .description { + @include font-size(13); + margin-top: ($baseline/2); + color: $gray-l1; + } + } +} + +// ==================== + // works in progress body.hide-wip { diff --git a/cms/static/sass/_dashboard.scss b/cms/static/sass/_dashboard.scss index 68b147d370..0d4d046e57 100644 --- a/cms/static/sass/_dashboard.scss +++ b/cms/static/sass/_dashboard.scss @@ -43,6 +43,7 @@ color: #3c3c3c; } + // view live button .view-live-button { z-index: 10000; position: absolute; diff --git a/cms/static/sass/_index.scss b/cms/static/sass/_index.scss index b5d042b5cc..e0f6d0f2b7 100644 --- a/cms/static/sass/_index.scss +++ b/cms/static/sass/_index.scss @@ -350,67 +350,4 @@ } } } - - // js dependant - &.js { - - .content-modal { - @include border-bottom-radius(2px); - @include box-sizing(border-box); - @include box-shadow(0 2px 4px $shadow-d1); - position: relative; - display: none; - width: 700px; - overflow: hidden; - border: 1px solid $gray-d1; - padding: ($baseline); - background: $white; - - .action-modal-close { - @include transition(top .25s ease-in-out); - @include border-bottom-radius(3px); - position: absolute; - top: -3px; - right: $baseline; - padding: ($baseline/4) ($baseline/2) 0 ($baseline/2); - background: $gray-l3; - text-align: center; - - .label { - @include text-sr(); - } - - .ss-icon { - @include font-size(18); - color: $white; - } - - &:hover { - background: $blue; - top: 0; - } - } - - img { - @include box-sizing(border-box); - width: 100%; - overflow-y: scroll; - padding: ($baseline/10); - border: 1px solid $gray-l4; - } - - .title { - @include font-size(18); - margin: 0 0 ($baseline/2) 0; - font-weight: 600; - color: $gray-d3; - } - - .description { - @include font-size(13); - margin-top: ($baseline/2); - color: $gray-l1; - } - } - } -} +} \ No newline at end of file diff --git a/cms/templates/course_info.html b/cms/templates/course_info.html index 203173f724..b838876f4e 100644 --- a/cms/templates/course_info.html +++ b/cms/templates/course_info.html @@ -60,6 +60,14 @@ +
+
+
+

Course updates are announcements or notifications you want to share with your class. Other course authors have used them for important exam/date reminders, change in schedules, and to call out any important step students need to take while enrolled in the course.

+
+
+
+
diff --git a/cms/templates/edit-tabs.html b/cms/templates/edit-tabs.html index 5cb633b053..a3d4f43dca 100644 --- a/cms/templates/edit-tabs.html +++ b/cms/templates/edit-tabs.html @@ -35,8 +35,15 @@
-
-

On this page, you can add and manage additional pages for your course. These pages will be added to the primary navigation menu alongside Courseware, Course Info, Discussion, etc.

+
@@ -44,7 +51,7 @@
- +
    % for id in components: @@ -59,4 +66,17 @@
+ +
+

How Static Pages are Used in Your Course

+
+ Preview of how Static Pages are used in your course +
These pages will be presented in your course's main navigation alongside Courseware, Course Info, Discussion, etc.
+
+ + + + close modal + +
\ No newline at end of file diff --git a/cms/templates/howitworks.html b/cms/templates/howitworks.html index a090381203..d9f94ef992 100644 --- a/cms/templates/howitworks.html +++ b/cms/templates/howitworks.html @@ -182,18 +182,4 @@ close modal
- - -<%block name="jsextra"> - \ No newline at end of file diff --git a/cms/templates/index.html b/cms/templates/index.html index 60318f1dbc..a70ef16a6c 100644 --- a/cms/templates/index.html +++ b/cms/templates/index.html @@ -54,6 +54,14 @@
+
+
+
+

Welcome, ${ user.username }. Here are all of the courses you are currently authoring in Studio:

+
+
+
+
diff --git a/cms/templates/settings.html b/cms/templates/settings.html index 92d5d5d99a..47cb315d21 100644 --- a/cms/templates/settings.html +++ b/cms/templates/settings.html @@ -55,7 +55,7 @@ from contentstore import utils
diff --git a/cms/templates/settings_graders.html b/cms/templates/settings_graders.html index c53a7af834..759a6340ec 100644 --- a/cms/templates/settings_graders.html +++ b/cms/templates/settings_graders.html @@ -52,7 +52,7 @@ from contentstore import utils
diff --git a/cms/templates/widgets/header.html b/cms/templates/widgets/header.html index 53c5193f3d..7b516ececd 100644 --- a/cms/templates/widgets/header.html +++ b/cms/templates/widgets/header.html @@ -17,7 +17,7 @@