Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ WeBWorK.sublime-workspace
conf/*.apache-config
math4-overrides.css
math4-overrides.js
htdocs/themes/math4/images/*
htdocs/themes/math4-green/images/*
htdocs/themes/math4-red/images/*
DATA/*
*.swp
.dump_past_answers_salt
Expand Down
9 changes: 7 additions & 2 deletions conf/defaults.config
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ $gitLibraryBranchName = "master";
$defaultTheme = "math4";
$defaultThemeTemplate = "system";

# The institution logo should be an image file in the theme's images folder
$institutionLogo = 'maa_logo.png';
$institutionURL = 'http://www.maa.org';
$institutionName = 'MAA (Mathematical Association of America)';

################################################################################
# Hardcopy Theme
################################################################################
Expand Down Expand Up @@ -1496,8 +1501,8 @@ $ConfigValues = [
{
var => 'defaultTheme',
doc => 'Theme (refresh page after saving changes to reveal new theme.)',
doc2 => 'There are currently two themes (or skins) to choose from: math3 and math4. The theme specifies a unified look and feel for the WeBWorK course web pages.',
values => [qw(math3 math4)],
doc2 => 'There is one main theme to choose from: math4. It has two variants, math4-green and math4-red. The theme specifies a unified look and feel for the WeBWorK course web pages.',
values => [qw(math4 math4-green math4-red)],
type => 'popuplist',
hashVar => '{defaultTheme}'
},
Expand Down
5 changes: 5 additions & 0 deletions conf/localOverrides.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ $mail{feedbackRecipients} = [
#$defaultTheme = "math4";
#$defaultThemeTemplate = "system";

# The institution logo should be an image file in the theme's images folder
#$institutionLogo = 'my_school_logo.png';
#$institutionURL = 'http://www.myschool.edu';
#$institutionName = 'My University';

################################################################################
# Language
################################################################################
Expand Down
Binary file removed htdocs/images/maa_logo_small.png
Binary file not shown.
Binary file removed htdocs/images/webwork_logo.gif
Binary file not shown.
Binary file removed htdocs/images/webwork_rectangle.png
Binary file not shown.
Binary file removed htdocs/images/webwork_square.gif
Binary file not shown.
Binary file removed htdocs/images/webwork_square.png
Binary file not shown.
Binary file removed htdocs/images/webwork_transparent_logo_small.png
Binary file not shown.
1 change: 1 addition & 0 deletions htdocs/themes/math4-green/images/maa_logo.png
1 change: 1 addition & 0 deletions htdocs/themes/math4-green/images/webwork_logo.svg
1 change: 1 addition & 0 deletions htdocs/themes/math4-red/images/maa_logo.png
1 change: 1 addition & 0 deletions htdocs/themes/math4-red/images/webwork_logo.svg
6 changes: 3 additions & 3 deletions htdocs/themes/math4/gateway.template
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@
<!-- Header -->
<div id = "masthead" class="row-fluid">
<div class="span2 webwork_logo">
<a href="<!--#url type="webwork" name="root"-->"><img src="<!--#url type="webwork" name="htdocs"-->/images/webwork_logo.svg" alt="to courses page" /></a>
<!--#webwork_logo-->
</div>
<div class="span6 maa_logo">
<a href="http://www.maa.org"><img src="<!--#url type="webwork" name="htdocs"-->/images/maa_logo_small.png" alt="image link to MAA (Mathematical Association of America) main web site" /></a>
<div class="span6 institution_logo">
<!--#institution_logo-->
</div>
<div id="loginstatus" class="span4">
<!--#loginstatus-->
Expand Down
File renamed without changes
4 changes: 1 addition & 3 deletions htdocs/themes/math4/math4-overrides.js.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@ $(function () {
/* This changes the WeBWorK Logo on the top left to a new image */
// $('.webwork_logo a img').attr('src','new-path-here');

/* This changes the MAA Logo on the top to a new image */
// $('.maa_logo a img').attr('src','new-path-here');
});
});
14 changes: 7 additions & 7 deletions htdocs/themes/math4/math4.css
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,17 @@ legend {
}

.webwork_logo a,
.maa_logo a {
display:block;
.institution_logo a {
display:block;
}

.maa_logo {
height: 58px;
padding: 5px 0;
.institution_logo {
padding: 8px 0;
height: 67px;
}

.maa_logo img {
padding: 5px;
.institution_logo img {
max-height: 51px;
}

#masthead a {
Expand Down
3 changes: 1 addition & 2 deletions htdocs/themes/math4/simple.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
<!--
################################################################################
# WeBWorK Online Homework Delivery System
# Copyright &copy; 2000-2018 The WeBWorK Project, http://openwebwork.sf.net/
# $CVSHeader: webwork2/conf/templates/math3/system.template,v 1.2 2008/06/26 19:46:02 gage Exp $
# Copyright &copy; 2000-2021 The WeBWorK Project, http://openwebwork.sf.net/
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of either: (a) the GNU General Public License as published by the
Expand Down
9 changes: 4 additions & 5 deletions htdocs/themes/math4/system.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
<!--
################################################################################
# WeBWorK Online Homework Delivery System
# Copyright &copy; 2000-2018 The WeBWorK Project, http://openwebwork.sf.net/
# $CVSHeader: webwork2/conf/templates/math3/system.template,v 1.2 2008/06/26 19:46:02 gage Exp $
# Copyright &copy; 2000-2021 The WeBWorK Project, http://openwebwork.sf.net/
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of either: (a) the GNU General Public License as published by the
Expand Down Expand Up @@ -80,10 +79,10 @@
<!-- Header -->
<div id = "masthead" class="row-fluid" role="banner">
<div class="span2 webwork_logo">
<a href="<!--#url type="webwork" name="root"-->"><img src="<!--#url type="webwork" name="htdocs"-->/images/webwork_logo.svg" alt="to courses page" /></a>
<!--#webwork_logo-->
</div>
<div class="span6 maa_logo">
<a href="http://www.maa.org"><img src="<!--#url type="webwork" name="htdocs"-->/images/maa_logo_small.png" alt="to MAA (Mathematical Association of America) main web site" /></a>
<div class="span6 institution_logo">
<!--#institution_logo-->
</div>
<div id="loginstatus" class="span4">
<!--#loginstatus-->
Expand Down
44 changes: 44 additions & 0 deletions lib/WeBWorK/ContentGenerator.pm
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,50 @@ sub output_course_lang_and_dir{
return "";
}

=item webwork_logo()

Create the link to the webwork installation landing page with a logo and alt text

=cut

sub webwork_logo {
my $self = shift;
my $r = $self->r;
my $ce = $r->ce;
my $theme = $r->param("theme") || $ce->{defaultTheme};
my $htdocs = $ce->{webwork_htdocs_url};
print CGI::a(
{href => $ce->{webwork_url}},
CGI::img({
src => "$htdocs/themes/$theme/images/webwork_logo.svg",
alt => $r->maketext("to courses page")
},'')
);
return "";
}

=item institution_logo()

Create the link to the host institution with a logo and alt text

=cut

sub institution_logo {
my $self = shift;
my $r = $self->r;
my $ce = $r->ce;
my $theme = $r->param("theme") || $ce->{defaultTheme};
my $htdocs = $ce->{webwork_htdocs_url};
print CGI::a(
{href => $ce->{institutionURL}},
CGI::img({
src => "$htdocs/themes/$theme/images/" . $ce->{institutionLogo},
alt => $r->maketext("to [_1] main web site", $ce->{institutionName})
},'')
);
return "";
}

=item content()

Defined in this package.
Expand Down
4 changes: 2 additions & 2 deletions lib/WeBWorK/Localize.pm
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ my $ConfigStrings = [
{
var => 'defaultTheme',
doc => x('Theme (refresh page after saving changes to reveal new theme.)'),
doc2 => x('There are currently two themes (or skins) to choose from: math3 and math4. The theme specifies a unified look and feel for the WeBWorK course web pages.'),
values => [qw(math3 math4)],
doc2 => x('There is one main theme to choose from: math4. It has two variants, math4-green and math4-red. The theme specifies a unified look and feel for the WeBWorK course web pages.'),
values => [qw(math4 math4-green math4-red)],
type => 'popuplist',
hashVar => '{defaultTheme}'
},
Expand Down