diff --git a/cms/djangoapps/contentstore/features/component.py b/cms/djangoapps/contentstore/features/component.py index 8adbb0fdae..38fb905bcf 100644 --- a/cms/djangoapps/contentstore/features/component.py +++ b/cms/djangoapps/contentstore/features/component.py @@ -55,9 +55,9 @@ def see_a_multi_step_component(step, category): if category == 'HTML': html_matcher = { 'Text': '\n \n', - 'Announcement': '
This template is similar to the Text template. The only difference is',
}
actual_html = world.css_html(selector, index=idx)
diff --git a/cms/djangoapps/contentstore/features/problem-editor.py b/cms/djangoapps/contentstore/features/problem-editor.py
index c8fc76ed87..b1d7c97159 100644
--- a/cms/djangoapps/contentstore/features/problem-editor.py
+++ b/cms/djangoapps/contentstore/features/problem-editor.py
@@ -125,6 +125,9 @@ def my_display_name_change_is_persisted_on_save(step):
@step('the problem display name is "(.*)"$')
def verify_problem_display_name(step, name):
+ """
+ name is uppercased because the heading styles are uppercase in css
+ """
assert_equal(name, world.browser.find_by_css('.problem-header').text)
diff --git a/cms/static/sass/_build.scss b/cms/static/sass/_build.scss
index dcf8f2bc81..57a133fa83 100644
--- a/cms/static/sass/_build.scss
+++ b/cms/static/sass/_build.scss
@@ -75,6 +75,7 @@
// ====================
@import 'xmodule/modules/css/module-styles.scss';
@import 'xmodule/descriptors/css/module-styles.scss';
+@import 'xmodule/headings';
@import 'elements/xmodules'; // styling for Studio-specific contexts
@import 'developer'; // used for any developer-created scss that needs further polish/refactoring
diff --git a/cms/static/sass/xmodule/_headings.scss b/cms/static/sass/xmodule/_headings.scss
new file mode 100644
index 0000000000..af8402b020
--- /dev/null
+++ b/cms/static/sass/xmodule/_headings.scss
@@ -0,0 +1,121 @@
+/*
+ * This comes from the UXPL, and is modified for use.
+ * The UXPL isn't available retroactively, so this shims
+ * the headings from the UXPL with what we're using in
+ * the platform to better sync things up in the meantime.
+ * It is scoped to #seq_content, specifically for xblock.
+ *
+ * Once the UXPl is fitted retroactively, this can be removed.
+ */
+
+$headings-count: 8;
+
+$headings-font-weight-light: 200;
+$headings-font-weight-normal: 400;
+$headings-font-weight-bold: 600;
+$headings-base-font-family: inherit;
+$headings-base-color: $gray-d2;
+
+%reset-headings {
+ margin: 0;
+ font-weight: $headings-font-weight-normal;
+ font-size: inherit;
+ line-height: inherit;
+ color: $headings-base-color;
+}
+
+%hd-1 {
+ margin-bottom: 1.41575em !important;
+ font-size: 2em !important;
+ line-height: 1.4em !important;
+}
+
+
+%hd-2 {
+ margin-bottom: 1em !important;
+ font-size: 1.5em !important;
+ font-weight: $headings-font-weight-normal !important;
+ line-height: 1.4em !important;
+}
+
+
+%hd-3 {
+ margin-bottom: ($baseline / 2) !important;
+ font-size: 1.35em !important;
+ font-weight: $headings-font-weight-normal !important;
+ line-height: 1.4em !important;
+}
+
+
+%hd-4 {
+ margin-bottom: ($baseline / 2) !important;
+ font-size: 1.25em !important;
+ font-weight: $headings-font-weight-bold !important;
+ line-height: 1.4em !important;
+}
+
+
+%hd-5 {
+ margin-bottom: ($baseline / 2) !important;
+ font-size: 1.1em !important;
+ font-weight: $headings-font-weight-bold !important;
+ line-height: 1.4em !important;
+}
+
+
+%hd-6 {
+ margin-bottom: ($baseline / 2) !important;
+ font-size: 1em !important;
+ font-weight: $headings-font-weight-bold !important;
+ line-height: 1.4em !important;
+}
+
+%hd-7 {
+ margin-bottom: ($baseline / 4);
+ font-size: 14px;
+ font-weight: $headings-font-weight-bold;
+ text-transform: uppercase;
+ line-height: 1.6em;
+ letter-spacing: 1px;
+}
+
+%hd-8 {
+ margin-bottom: ($baseline / 8);
+ font-size: 12px;
+ font-weight: $headings-font-weight-bold;
+ text-transform: uppercase;
+ line-height: 1.5em;
+ letter-spacing: 1px;
+}
+
+.wrapper-xblock {
+
+ .hd-1,
+ .hd-2,
+ .hd-3,
+ .hd-4,
+ .hd-5,
+ .hd-6,
+ .hd-7,
+ .hd-8 {
+ @extend %reset-headings;
+ }
+
+
+ // ----------------------------
+ // #CANNED
+ // ----------------------------
+ // canned heading classes
+ @for $i from 1 through $headings-count {
+ .hd-#{$i} {
+ @extend %hd-#{$i};
+ }
+ }
+
+ h3 {
+ @extend %hd-2;
+ font-weight: $headings-font-weight-normal !important;
+ // override external modules and xblocks that use inline CSS
+ text-transform: initial;
+ }
+}
diff --git a/cms/templates/ux/reference/container.html b/cms/templates/ux/reference/container.html
index 8563122086..6a2632a90d 100644
--- a/cms/templates/ux/reference/container.html
+++ b/cms/templates/ux/reference/container.html
@@ -336,7 +336,7 @@
Not a header Multiple choice w/ parentheticals To use this template, replace the example text with your own text. When you add the component, be sure to select Settings
to specify a Display Name and other values that apply. Short note that introduces the topic Announcement 1 text Announcement 2 text Use the IFrame tool to embed an exercise or tool from any web site into your course content. For example, the tool below allows learners to experiment with how the shape of a triangle affects a line that is derived from the triangle. Exercises in an IFrame are not graded. To embed graded exercises, use a Custom JavaScript Problem. The following code is the HTML format required to use the IFrame tool. For the IFrame in this template, you must replace the values in italics. Use the Full Screen Image tool to allow learners to open and zoom in on a larger version of an image in your course. With the Full Screen Image tool, learners can see the image's details as well as its context within the unit. To enable users to view the larger image, you wrap the smaller image in a link to the larger version of the image. You can write complex equations in LaTeX. When you add the component, be sure to select Settings
to specify a Display Name and other values that apply. Use the Zooming Image Tool to enable learners to see details of large, complex images. With the Zooming Image Tool, the learner can move the mouse pointer over a part of the image to enlarge it and see more detail. To use the Zooming Image Tool, you must first add the jquery.loupeAndLightbox.js JavaScript file to your course. <%- description %>
+
Multiple Choice
diff --git a/common/lib/xmodule/xmodule/css/annotatable/display.scss b/common/lib/xmodule/xmodule/css/annotatable/display.scss
index 6a5e7d88bd..4d438346fc 100644
--- a/common/lib/xmodule/xmodule/css/annotatable/display.scss
+++ b/common/lib/xmodule/xmodule/css/annotatable/display.scss
@@ -13,11 +13,6 @@ $annotatable--body-font-size: em(14);
.annotatable-header {
margin-bottom: .5em;
- .annotatable-title {
- font-size: em(22);
- text-transform: uppercase;
- padding: ($baseline/10) ($baseline/5);
- }
}
.annotatable-section {
diff --git a/common/lib/xmodule/xmodule/js/fixtures/annotatable.html b/common/lib/xmodule/xmodule/js/fixtures/annotatable.html
index 59e77fdf27..5f80304a87 100644
--- a/common/lib/xmodule/xmodule/js/fixtures/annotatable.html
+++ b/common/lib/xmodule/xmodule/js/fixtures/annotatable.html
@@ -1,7 +1,7 @@
First Annotation Exercise
+
Numerical Input
diff --git a/common/lib/xmodule/xmodule/js/fixtures/jsinput_problem.html b/common/lib/xmodule/xmodule/js/fixtures/jsinput_problem.html
index 1d48e92e3a..a0250c5685 100644
--- a/common/lib/xmodule/xmodule/js/fixtures/jsinput_problem.html
+++ b/common/lib/xmodule/xmodule/js/fixtures/jsinput_problem.html
@@ -1,4 +1,4 @@
-Custom Javascript Display and Grading
+Custom Javascript Display and Grading
Problem Header
+Problem Header
diff --git a/common/lib/xmodule/xmodule/js/fixtures/problem_content_1240.html b/common/lib/xmodule/xmodule/js/fixtures/problem_content_1240.html
index cb6aab2541..b87b5e857e 100644
--- a/common/lib/xmodule/xmodule/js/fixtures/problem_content_1240.html
+++ b/common/lib/xmodule/xmodule/js/fixtures/problem_content_1240.html
@@ -1,4 +1,4 @@
-Problem Header
+Problem Header
diff --git a/common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee b/common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee
index a10ad3d4e4..771708d752 100644
--- a/common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee
+++ b/common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee
@@ -710,7 +710,7 @@ describe 'MarkdownEditingDescriptor', ->
""")
expect(data).toEqual("""A header
+ A header
$1
');
+ xml = xml.replace(/(^.*?$)(?=\n\=\=+$)/gm, '$1
');
xml = xml.replace(/\n^\=\=+$/gm, '');
// Pull out demand hints, || a hint ||
diff --git a/common/lib/xmodule/xmodule/templates/html/announcement.yaml b/common/lib/xmodule/xmodule/templates/html/announcement.yaml
index a0f4b07e4e..b1e17153f5 100644
--- a/common/lib/xmodule/xmodule/templates/html/announcement.yaml
+++ b/common/lib/xmodule/xmodule/templates/html/announcement.yaml
@@ -5,14 +5,14 @@ data: |
Announcement Date
+ Announcement Date
Heading for announcement 1
+ Heading for announcement 1
Heading for announcement 2
+ Heading for announcement 2
IFrame Tool
+ IFrame Tool
Full Screen Image Tool
+ Full Screen Image Tool
Example: E-text page
+ Example: E-text page
Zooming Image Tool
+ Zooming Image Tool
${display_name}
% endif
<%- title %>
+ <%- title %>
${display_name}
% endif
+
## Translators: "External resource" means that this learning module is hosted on a platform external to the edX LMS
${display_name} (${_('External resource')})
@@ -51,13 +51,13 @@ from django.utils.translation import ugettext as _
>
% endif
% elif not hide_launch:
-
+
${_('Please provide launch_url. Click "Edit", and fill in the required fields.')}
% endif
% if has_score and comment:
- ${_("Feedback on your work from the grader:")}
+ ${_("Feedback on your work from the grader:")}
+
${ problem['name'] }
diff --git a/lms/templates/textannotation.html b/lms/templates/textannotation.html
index 3c34959370..32f7739243 100644
--- a/lms/templates/textannotation.html
+++ b/lms/templates/textannotation.html
@@ -7,7 +7,7 @@ ${static.css(group='style-xmodule-annotations', raw=True)}
${display_name}
% endif
${display_name}
+ ${display_name}
% endif
${_('No playable video sources found.')}
+ ${_('No playable video sources found.')}
${display_name}
% endif