Commit 80126fc7 by Andy Armstrong Committed by GitHub

Merge pull request #16232 from edx/andya/bootstrap-support-modal

Make the support modal responsive
parents fb820f9b af4d4198
...@@ -215,77 +215,6 @@ mark { ...@@ -215,77 +215,6 @@ mark {
} }
} }
.help-tab {
@include transform(rotate(-90deg));
@include transform-origin(0 0);
@extend %ui-depth2;
@extend %ui-print-excluded;
position: fixed;
top: 250px;
left: 0;
a:link,
a:visited {
border: 1px solid $gray-l3;
border-top-style: none;
border-radius: 0 0 ($baseline/2) ($baseline/2);
background: transparentize($white, 0.25);
color: transparentize($base-font-color, 0.25);
font-weight: bold;
text-decoration: none;
padding: 6px 22px 11px;
display: inline-block;
&:hover,
&:focus {
color: $white;
background: $link-color;
}
}
}
.help-buttons {
padding: ($baseline/2) ($baseline*2.5);
text-align: center;
button {
@extend %btn-secondary-blue-outline;
margin: .5rem 0;
font-weight: initial;
text-shadow: none;
letter-spacing: initial !important;
text-transform: normal !important;
vertical-align: initial;
&:hover,
&:focus {
background: $link-color !important;
color: $white;
box-shadow: none !important;
text-shadow: none !important;
}
}
}
#feedback_form {
input, textarea {
font: normal 1em/1.4em $sans-serif;
}
textarea[name="details"] {
height: 150px;
}
}
#feedback_success_wrapper {
p {
padding: 0 $baseline $baseline $baseline;
}
}
// ==================== // ====================
// UI - disabled state // UI - disabled state
......
...@@ -13,6 +13,13 @@ ...@@ -13,6 +13,13 @@
font-size: ($sizeValue/10) + rem; font-size: ($sizeValue/10) + rem;
} }
// Adds a simple extension that indicates that this element should not print
%ui-print-excluded {
@media print {
display: none;
}
}
// Support .sr as a synonym for .sr-only // Support .sr as a synonym for .sr-only
.sr { .sr {
@extend .sr-only; @extend .sr-only;
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
@import 'layouts'; @import 'layouts';
@import 'components'; @import 'components';
@import 'course/layout/courseware_preview'; @import 'course/layout/courseware_preview';
@import 'shared/modal';
@import 'shared/help-tab';
// Features // Features
@import 'features/bookmarks'; @import 'features/bookmarks';
......
#help-modal {
overflow: visible;
background: transparent;
box-shadow: none;
@media (max-width: $grid-breakpoints-md) {
width: 90% !important;
margin-left: -47% !important;
}
@media (min-width: $grid-breakpoints-md) {
width: 700px !important;
margin-left: -350px !important;
}
}
.help-tab { .help-tab {
@include transform(rotate(-90deg)); @include transform(rotate(-90deg));
@include transform-origin(0 0); @include transform-origin(0 0);
...@@ -29,7 +46,9 @@ ...@@ -29,7 +46,9 @@
} }
.help-buttons { .help-buttons {
padding: ($baseline/2) ($baseline*2.5); .btn {
flex-grow: 1;
}
a:link, a:link,
a:visited { a:visited {
......
// Open edX: Help tab
// ==================
#help-modal {
overflow: visible;
background: transparent;
box-shadow: none;
@include media-breakpoint-down(md) {
width: 90% !important;
margin-left: -47% !important;
}
@include media-breakpoint-up(md) {
width: 700px !important;
margin-left: -350px !important;
}
}
.help-tab {
@extend %ui-depth2;
@extend %ui-print-excluded;
transform: rotate(-90deg);
transform-origin: top left;
position: fixed;
top: 250px;
left: 0;
a:link,
a:visited {
border: 1px solid $gray-300;
border-top-style: none;
border-radius: 0 0 ($baseline/2) ($baseline/2);
background: transparentize($white, 0.25);
color: transparentize($body-color, 0.25);
font-weight: bold;
text-decoration: none;
padding: 6px 22px 11px;
display: inline-block;
&:hover,
&:focus {
color: $white;
background: $link-color;
}
}
}
.help-buttons {
display: flex;
text-align: center;
justify-content: normal;
flex-grow: 1;
.btn:not(:first-child) {
@include margin-left($baseline/2);
}
@include media-breakpoint-down(md) {
flex-direction: column;
.btn {
width: 100%;
margin: $baseline/4 0 0 0 !important;
}
}
}
#feedback_form {
input, textarea {
font: normal 1em/1.4em $font-family-sans-serif;
}
textarea[name="details"] {
height: 150px;
}
}
#feedback_success_wrapper {
p {
padding: 0 $baseline $baseline $baseline;
}
}
.feedback-form-select { .feedback-form-select {
background: $white; background: $white;
margin-bottom: $baseline; margin-bottom: $baseline;
......
#lean_overlay { #lean_overlay {
background: transparent; background-image: radial-gradient(circle at 50% 30%, $shadow-d1, $shadow-d2);
@include background-image(radial-gradient(circle at 50% 30%, $shadow-d1, $shadow-d2));
display: none; display: none;
height:100%; height: 100%;
left: 0; left: 0;
position: fixed; position: fixed;
top: 0; top: 0;
width:100%; width: 100%;
z-index: 100; z-index: 100;
} }
...@@ -22,8 +19,8 @@ ...@@ -22,8 +19,8 @@
width: grid-width(5); width: grid-width(5);
border-radius: 3px; border-radius: 3px;
box-shadow: 0 0 5px 0 $shadow-d1; box-shadow: 0 0 5px 0 $shadow-d1;
background: $gray-d2; background: theme-color("dark");
color: $base-font-color; color: $body-color;
&.video-modal { &.video-modal {
left: 50%; left: 50%;
...@@ -56,7 +53,7 @@ ...@@ -56,7 +53,7 @@
.inner-wrapper { .inner-wrapper {
@extend %ui-depth1; @extend %ui-depth1;
background: $modal-bg-color; background: $modal-content-bg;
border-radius: 0; border-radius: 0;
border: 1px solid rgba(0, 0, 0, 0.9); border: 1px solid rgba(0, 0, 0, 0.9);
box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.7); box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.7);
...@@ -67,7 +64,7 @@ ...@@ -67,7 +64,7 @@
position: relative; position: relative;
p { p {
font-size: .9em; font-size: 0.9em;
line-height: 1.4; line-height: 1.4;
} }
...@@ -80,8 +77,6 @@ ...@@ -80,8 +77,6 @@
position: relative; position: relative;
&::before { &::before {
@include background-image(radial-gradient(50% 50%, circle closest-side, rgba(255,255,255, 0.8) 0%, rgba(255,255,255, 0) 100%));
content: ""; content: "";
display: block; display: block;
height: 400px; height: 400px;
...@@ -115,13 +110,13 @@ ...@@ -115,13 +110,13 @@
h2 { h2 {
position: relative; position: relative;
text-align: center; text-align: center;
text-shadow: 0 1px rgba(255,255,255, 0.4); text-shadow: 0 1px rgba(255, 255, 255, 0.4);
z-index: 2; z-index: 2;
} }
} }
.modal-form-error { .modal-form-error {
background: tint($red,90%); background: theme-color("danger");
border: 1px solid rgb(143, 14, 14); border: 1px solid rgb(143, 14, 14);
color: rgb(143, 14, 14); color: rgb(143, 14, 14);
display: none; display: none;
...@@ -138,7 +133,8 @@ ...@@ -138,7 +133,8 @@
padding: 12px; padding: 12px;
} }
.activation-message, .message { .activation-message,
.message {
padding: 0 ($baseline*2) ($baseline/2); padding: 0 ($baseline*2) ($baseline/2);
p { p {
...@@ -162,7 +158,7 @@ ...@@ -162,7 +158,7 @@
} }
label { label {
color: $text-color; color: $body-color;
&.field-error { &.field-error {
display: block; display: block;
...@@ -190,7 +186,7 @@ ...@@ -190,7 +186,7 @@
input[type="email"], input[type="email"],
input[type="text"], input[type="text"],
input[type="password"] { input[type="password"] {
background: rgb(255,255,255); background: theme-color("inverse");
display: block; display: block;
height: 45px; height: 45px;
margin-bottom: $baseline; margin-bottom: $baseline;
...@@ -200,16 +196,17 @@ ...@@ -200,16 +196,17 @@
label.remember-me, label.remember-me,
label.terms-of-service, label.terms-of-service,
label.honor-code { label.honor-code {
background: rgb(233,233,233); background: rgb(233, 233, 233);
border: 1px solid rgb(200,200,200); border: 1px solid rgb(200, 200, 200);
border-radius: 3px; border-radius: 3px;
box-shadow: 0 1px 0 0 rgba(255,255,255, 0.6); box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.6);
display: block; display: block;
margin-bottom: $baseline; margin-bottom: $baseline;
padding: 8px ($baseline/2); padding: 8px ($baseline/2);
&:hover, &:focus { &:hover,
background: rgb(230,230,230); &:focus {
background: rgb(230, 230, 230);
} }
&.field-error { &.field-error {
...@@ -217,12 +214,13 @@ ...@@ -217,12 +214,13 @@
} }
a { a {
font-family: $serif;
font-style: italic; font-style: italic;
} }
} }
.citizenship, .gender, .date-of-birth { .citizenship,
.gender,
.date-of-birth {
margin-bottom: $baseline; margin-bottom: $baseline;
float: left; float: left;
width: flex-grid(4); width: flex-grid(4);
...@@ -232,15 +230,14 @@ ...@@ -232,15 +230,14 @@
} }
select { select {
box-sizing: border-box;
width: 100%; width: 100%;
@include box-sizing(border-box);
display: block; display: block;
} }
} }
.citizenship, .gender { .citizenship,
.gender {
margin-right: flex-gutter(); margin-right: flex-gutter();
} }
...@@ -262,24 +259,23 @@ ...@@ -262,24 +259,23 @@
z-index: 2; z-index: 2;
p { p {
color: $lighter-base-font-color; color: theme-color("secondary");
font-style: italic; font-style: italic;
text-align: center; text-align: center;
span { span {
color: $lighter-base-font-color; color: theme-color("secondary");
font-family: $serif;
font-style: italic; font-style: italic;
} }
a { a {
color: $lighter-base-font-color; color: theme-color("secondary");
font-family: $serif;
font-style: italic; font-style: italic;
text-decoration: underline; text-decoration: underline;
&:hover, &:focus { &:hover,
color: $base-font-color; &:focus {
color: $body-color;
} }
} }
...@@ -298,21 +294,24 @@ ...@@ -298,21 +294,24 @@
right: 2px; right: 2px;
top: 0; top: 0;
z-index: 100; z-index: 100;
color: $lighter-base-font-color; color: theme-color("secondary");
font: normal 1.2rem/1.2rem $sans-serif; font: normal 1.2rem/1.2rem $font-family-sans-serif;
text-align: center; text-align: center;
text-shadow: 0 1px rgba(255,255,255, 0.8); text-shadow: 0 1px rgba(255,255,255, 0.8);
@include transition(all 0.15s ease-out 0s); @include transition(all 0.15s ease-out 0s);
&:hover, &:focus { &:hover,
color: $base-font-color; &:focus {
color: $body-color;
text-decoration: none; text-decoration: none;
} }
} }
} }
#help_wrapper, #feedback_form_wrapper, .discussion-alert-wrapper { #help_wrapper,
#feedback_form_wrapper,
.discussion-alert-wrapper {
padding: 0 ($baseline*1.5) ($baseline*1.5) ($baseline*1.5); padding: 0 ($baseline*1.5) ($baseline*1.5) ($baseline*1.5);
header { header {
...@@ -322,11 +321,9 @@ ...@@ -322,11 +321,9 @@
} }
.note { .note {
@include font-size(12); font-size: $font-size-sm;
@include line-height(12);
margin-top: ($baseline/2); margin-top: ($baseline/2);
color: $lighter-base-font-color; color: theme-color("secondary");
} }
} }
...@@ -338,10 +335,8 @@ ...@@ -338,10 +335,8 @@
.tip { .tip {
font-size: 12px; font-size: 12px;
display: block; display: block;
color: $dark-gray; color: theme-color("dark");
} }
} }
.leanModal_box { .leanModal_box {
...@@ -372,7 +367,7 @@ ...@@ -372,7 +367,7 @@
.list-actions-item { .list-actions-item {
@extend %t-copy-sub1; @extend %t-copy-sub1;
color: $base-font-color; color: $body-color;
text-align: center; text-align: center;
} }
......
...@@ -21,7 +21,7 @@ from xmodule.tabs import CourseTabList ...@@ -21,7 +21,7 @@ from xmodule.tabs import CourseTabList
<div id="help-modal" class="modal" aria-hidden="true" role="dialog" aria-modal="true" tabindex="-1" aria-labelledby="support-platform-name"> <div id="help-modal" class="modal" aria-hidden="true" role="dialog" aria-modal="true" tabindex="-1" aria-labelledby="support-platform-name">
<div class="inner-wrapper"> <div class="inner-wrapper">
## TODO: find a way to refactor this ## TODO: find a way to refactor this
<button class="close-modal" tabindex="0"> <button class="btn-link close-modal" tabindex="0">
<span class="icon fa fa-remove" aria-hidden="true"></span> <span class="icon fa fa-remove" aria-hidden="true"></span>
<span class="sr"> <span class="sr">
## Translators: this is a control to allow users to exit out of this modal interface (a menu or piece of UI that takes the full focus of the screen) ## Translators: this is a control to allow users to exit out of this modal interface (a menu or piece of UI that takes the full focus of the screen)
...@@ -74,9 +74,9 @@ from xmodule.tabs import CourseTabList ...@@ -74,9 +74,9 @@ from xmodule.tabs import CourseTabList
<hr> <hr>
<div class="help-buttons"> <div class="help-buttons">
<button type="button" class="" id="feedback_link_problem">${_('Report a problem')}</button><br /> <button type="button" class="btn btn-outline-primary" id="feedback_link_problem">${_('Report a problem')}</button>
<button type="button" class="" id="feedback_link_suggestion">${_('Make a suggestion')}</button><br /> <button type="button" class="btn btn-outline-primary" id="feedback_link_suggestion">${_('Make a suggestion')}</button>
<button type="button" class="" id="feedback_link_question">${_('Ask a question')}</button> <button type="button" class="btn btn-outline-primary" id="feedback_link_question">${_('Ask a question')}</button>
</div> </div>
<p class="note">${_('Please note: The {platform_name} support team is English speaking. While we will do our best to address your inquiry in any language, our responses will be in English.').format( <p class="note">${_('Please note: The {platform_name} support team is English speaking. While we will do our best to address your inquiry in any language, our responses will be in English.').format(
......
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