Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions htdocs/themes/math4-green/_theme-colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
5 changes: 3 additions & 2 deletions htdocs/themes/math4-red/_theme-colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@

// Theme colors
$primary: #800;
$info: #c30;
$ww-info: #c30;
$ww-info-text: white;

// Link colors
$link-color: $primary;
$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;
6 changes: 3 additions & 3 deletions htdocs/themes/math4-yellow/_theme-colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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%);
Expand Down
31 changes: 0 additions & 31 deletions htdocs/themes/math4-yellow/_theme-overrides.scss
Original file line number Diff line number Diff line change
@@ -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%)};
Expand Down
5 changes: 3 additions & 2 deletions htdocs/themes/math4/_theme-colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
30 changes: 30 additions & 0 deletions htdocs/themes/math4/bootstrap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion templates/ContentGenerator/GatewayQuiz.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
<div class="col-md-2 text-end mb-1">
<%= 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' =%>
</div>
</div>
% }
Expand Down
12 changes: 6 additions & 6 deletions templates/ContentGenerator/Instructor/PGProblemEditor.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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}
Expand All @@ -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' } =%>
% }
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
id => 'action_hardcopy_seed_id', class => 'form-control form-control-sm' =%>
</div>
<div class="col-auto mb-2">
<button id="randomize_hardcopy_seed_id" class="btn btn-info btn-sm" type="button">
<button id="randomize_hardcopy_seed_id" class="btn btn-ww-info btn-sm" type="button">
<%= maketext('Randomize Seed') =%>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
id => 'action_view_seed_id', class => 'form-control form-control-sm' =%>
</div>
<div class="col-auto mb-2">
<button id="randomize_view_seed_id" class="btn btn-info btn-sm" type="button">
<button id="randomize_view_seed_id" class="btn btn-ww-info btn-sm" type="button">
<%= maketext('Randomize Seed') =%>
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/ContentGenerator/ProblemSet/info.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -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' =%>
</h2>
% } else {
<h2><%= maketext('Set Info') %></h2>
Expand Down
2 changes: 1 addition & 1 deletion templates/ContentGenerator/ProblemSets/info.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -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') =%>
</h2>
% if (stash('course_info_error')) {
<div class="alert alert-danger p-1 mb-0"><%= stash('course_info_error') %></div>
Expand Down
Loading