diff --git a/htdocs/themes/math4-green/_theme-colors.scss b/htdocs/themes/math4-green/_theme-colors.scss index 4a0d5d4e6e..1211cef9be 100644 --- a/htdocs/themes/math4-green/_theme-colors.scss +++ b/htdocs/themes/math4-green/_theme-colors.scss @@ -3,13 +3,14 @@ // Theme colors $primary: #324f36; -$info: #618265; +$ww-info: #618265; +$ww-info-text: black; // Link colors $link-color: #283f2b; // Webwork logo background color in the banner -$ww-logo-background-color: darken($info, 8%); +$ww-logo-background-color: darken($ww-info, 8%); // Achievment level bar $ww-achievement-level-color: #708e74; diff --git a/htdocs/themes/math4-red/_theme-colors.scss b/htdocs/themes/math4-red/_theme-colors.scss index 26de64dda7..549236d467 100644 --- a/htdocs/themes/math4-red/_theme-colors.scss +++ b/htdocs/themes/math4-red/_theme-colors.scss @@ -3,7 +3,8 @@ // Theme colors $primary: #800; -$info: #c30; +$ww-info: #c30; +$ww-info-text: white; // Link colors $link-color: $primary; @@ -11,7 +12,7 @@ $link-hover-color: #c00; $link-color-dark: tint-color($primary, 50%); // Webwork logo background color in the banner -$ww-logo-background-color: darken($info, 8%); +$ww-logo-background-color: darken($ww-info, 8%); // Achievment level bar $ww-achievement-level-color: #08c; diff --git a/htdocs/themes/math4-yellow/_theme-colors.scss b/htdocs/themes/math4-yellow/_theme-colors.scss index 527681abff..ca814baa84 100644 --- a/htdocs/themes/math4-yellow/_theme-colors.scss +++ b/htdocs/themes/math4-yellow/_theme-colors.scss @@ -3,10 +3,10 @@ // Theme colors $primary: #ffc700; -$info: black; +$ww-info: black; +$ww-info-text: $primary; $primary-bg-subtle-dark: shade-color($primary, 90%); -$info-text-emphasis-dark: tint-color($info, 50%); // Override the default white for the foreground color of active components. // White has poor color contrast with the yellow primary color. @@ -16,7 +16,7 @@ $component-active-color: black; $link-color: shade-color($primary, 60%); // Webwork logo background color in the banner -$ww-logo-background-color: $info; +$ww-logo-background-color: $ww-info; // Achievment level bar $ww-achievement-level-color: darken($primary, 15%); diff --git a/htdocs/themes/math4-yellow/_theme-overrides.scss b/htdocs/themes/math4-yellow/_theme-overrides.scss index 1046436e60..487f3697b1 100644 --- a/htdocs/themes/math4-yellow/_theme-overrides.scss +++ b/htdocs/themes/math4-yellow/_theme-overrides.scss @@ -1,34 +1,3 @@ -// Redo the btn-info to get a nice yellow on black coloring instead of white on black. -// Only the foreground colors are changed. -.btn-info { - @include button-variant( - // background color - $info, - // border color - $info, - // foreground color - $primary, - // hover background color - tint-color($info, $btn-hover-bg-tint-amount), - // hover border color - tint-color($info, $btn-hover-border-tint-amount), - // hover foreground color - $primary, - // active background color - tint-color($info, $btn-active-bg-tint-amount), - // active border color - tint-color($info, $btn-active-border-tint-amount), - // active foreground color - $primary, - // disabled background color - $info, - // disabled border color - $info, - // disabled foreground color - color-contrast($info) - ); -} - .btn-outline-primary { --#{$prefix}btn-color: #{shade_color($primary, 60%)}; --#{$prefix}btn-border-color: #{shade_color($primary, 20%)}; diff --git a/htdocs/themes/math4/_theme-colors.scss b/htdocs/themes/math4/_theme-colors.scss index b40d760909..041cbf372c 100644 --- a/htdocs/themes/math4/_theme-colors.scss +++ b/htdocs/themes/math4/_theme-colors.scss @@ -3,14 +3,15 @@ // Theme colors $primary: #038; -$info: #1a67ea; +$ww-info: #1a67ea; +$ww-info-text: white; // Link colors $link-color: $primary; $link-color-dark: tint-color($primary, 50%); // Webwork logo background color in the banner -$ww-logo-background-color: darken($info, 14%); +$ww-logo-background-color: darken($ww-info, 14%); // Achievment level bar $ww-achievement-level-color: #88d; diff --git a/htdocs/themes/math4/bootstrap.scss b/htdocs/themes/math4/bootstrap.scss index 3114fe8445..dd65a125b0 100644 --- a/htdocs/themes/math4/bootstrap.scss +++ b/htdocs/themes/math4/bootstrap.scss @@ -77,6 +77,36 @@ $link-hover-decoration: underline; --ww-course-config-tab-link-focus-outline-color: #{rgba($primary, $focus-ring-opacity)}; } +// Custom WeBWorK btn-info +.btn-ww-info { + @include button-variant( + // background color + $ww-info, + // border color + $ww-info, + // foreground color + $ww-info-text, + // hover background color + tint-color($ww-info, $btn-hover-bg-tint-amount), + // hover border color + tint-color($ww-info, $btn-hover-border-tint-amount), + // hover foreground color + $ww-info-text, + // active background color + tint-color($ww-info, $btn-active-bg-tint-amount), + // active border color + tint-color($ww-info, $btn-active-border-tint-amount), + // active foreground color + $ww-info-text, + // disabled background color + $ww-info, + // disabled border color + $ww-info, + // disabled foreground color + color-contrast($ww-info) + ); +} + // Overrides a:not(.btn):focus { diff --git a/templates/ContentGenerator/GatewayQuiz.html.ep b/templates/ContentGenerator/GatewayQuiz.html.ep index 78c9becc2b..e8623ff4cf 100644 --- a/templates/ContentGenerator/GatewayQuiz.html.ep +++ b/templates/ContentGenerator/GatewayQuiz.html.ep @@ -356,7 +356,7 @@
<%= link_to maketext('Print Test') => $c->systemLink(url_for('hardcopy_preselect_set', setID => "$setID,v$setVersionID")), - class => 'btn btn-info' =%> + class => 'btn btn-ww-info' =%>
% } diff --git a/templates/ContentGenerator/Instructor/PGProblemEditor.html.ep b/templates/ContentGenerator/Instructor/PGProblemEditor.html.ep index 6f38518d4a..9b48d35dd8 100644 --- a/templates/ContentGenerator/Instructor/PGProblemEditor.html.ep +++ b/templates/ContentGenerator/Instructor/PGProblemEditor.html.ep @@ -104,18 +104,18 @@ <%= link_to maketext('Sample Problems') => url_for('sample_problem_index'), target => 'techniques_window', title => maketext('Sample problem code with documentation.'), - class => 'reference-link btn btn-sm btn-info', + class => 'reference-link btn btn-sm btn-ww-info', data => { bs_toggle => 'tooltip', bs_placement => 'top' } =%> <%= link_to maketext('Math Objects') => $ce->{webworkURLs}{MathObjectsHelpURL}, target => 'math_objects', title => maketext('Wiki summary page for MathObjects'), - class => 'reference-link btn btn-sm btn-info', + class => 'reference-link btn btn-sm btn-ww-info', data => { bs_toggle => 'tooltip', bs_placement => 'top' } =%> % # PG POD served locally <%= link_to maketext('POD') => url_for('pod_index'), target => 'pod_docs', title => maketext('Documentation from source code for PG modules and macro files.'), - class => 'reference-link btn btn-sm btn-info', + class => 'reference-link btn btn-sm btn-ww-info', data => { bs_toggle => 'tooltip', bs_placement => 'top' } =%> % # PGML lab problem rendered as an unattached problem in a new window. % my $pgml_lab_source = readFile("$ce->{webworkDirs}{assets}/pg/PGMLLab/PGML-lab.pg"); @@ -124,13 +124,13 @@ 'PG markdown syntax used to format WeBWorK questions. ' . 'This interactive lab can help you to learn the techniques.' ), - class => 'reference-link pgml-lab btn btn-sm btn-info', + class => 'reference-link pgml-lab btn btn-sm btn-ww-info', data => { source => url_escape($pgml_lab_source), bs_toggle => 'tooltip', bs_placement => 'top' }, 'PGML' =%> <%= link_to maketext('Author Info') => $ce->{webworkURLs}{AuthorHelpURL}, target => 'author_info', title => maketext('Top level of author information on the wiki.'), - class => 'reference-link btn btn-sm btn-info', + class => 'reference-link btn btn-sm btn-ww-info', data => { bs_toggle => 'tooltip', bs_placement => 'top' } =%> % # Only show the report bugs in problem button if editing an OPL or Contrib problem. % if ($ce->{webworkURLs}{OPLBugReporter} @@ -149,7 +149,7 @@ . 'The very first time you do this you will need to register with an email address so that ' . 'information on the bug fix can be reported back to you.' ), - class => 'reference-link btn btn-sm btn-info', + class => 'reference-link btn btn-sm btn-ww-info', data => { bs_toggle => 'tooltip', bs_placement => 'top' } =%> % } diff --git a/templates/ContentGenerator/Instructor/PGProblemEditor/hardcopy_form.html.ep b/templates/ContentGenerator/Instructor/PGProblemEditor/hardcopy_form.html.ep index 79b1d08e7b..df1b18dc05 100644 --- a/templates/ContentGenerator/Instructor/PGProblemEditor/hardcopy_form.html.ep +++ b/templates/ContentGenerator/Instructor/PGProblemEditor/hardcopy_form.html.ep @@ -9,7 +9,7 @@ id => 'action_hardcopy_seed_id', class => 'form-control form-control-sm' =%>
-
diff --git a/templates/ContentGenerator/Instructor/PGProblemEditor/view_form.html.ep b/templates/ContentGenerator/Instructor/PGProblemEditor/view_form.html.ep index 3af03f728c..58a0ec4f73 100644 --- a/templates/ContentGenerator/Instructor/PGProblemEditor/view_form.html.ep +++ b/templates/ContentGenerator/Instructor/PGProblemEditor/view_form.html.ep @@ -10,7 +10,7 @@ id => 'action_view_seed_id', class => 'form-control form-control-sm' =%>
-
diff --git a/templates/ContentGenerator/ProblemSet/info.html.ep b/templates/ContentGenerator/ProblemSet/info.html.ep index 1a19470fe6..a8362e78d2 100644 --- a/templates/ContentGenerator/ProblemSet/info.html.ep +++ b/templates/ContentGenerator/ProblemSet/info.html.ep @@ -5,7 +5,7 @@ url_for('instructor_problem_editor_withset_withproblem', setID => $c->{set}->set_id, problemID => 0), params => { file_type => 'set_header' } ), - target => 'WW_Editor', class => 'btn btn-sm btn-info m-1' =%> + target => 'WW_Editor', class => 'btn btn-sm btn-ww-info m-1' =%> % } else {

<%= maketext('Set Info') %>

diff --git a/templates/ContentGenerator/ProblemSets/info.html.ep b/templates/ContentGenerator/ProblemSets/info.html.ep index 9bc76fcdcd..8d3f4930c2 100644 --- a/templates/ContentGenerator/ProblemSets/info.html.ep +++ b/templates/ContentGenerator/ProblemSets/info.html.ep @@ -5,7 +5,7 @@ <%= maketext('Course Info') =%> <%= link_to(maketext('Edit') => $c->systemLink(url_for('instructor_problem_editor'), params => { file_type => 'course_info' }), - target => 'WW_Editor', class => 'btn btn-sm btn-info m-1') =%> + target => 'WW_Editor', class => 'btn btn-sm btn-ww-info m-1') =%> % if (stash('course_info_error')) {
<%= stash('course_info_error') %>