Skip to content

Commit

Permalink
Merge pull request #25 from drgrice1/footer-adjustable-width
Browse files Browse the repository at this point in the history
Make the footer width adjustable per page.
  • Loading branch information
Alex-Jordan authored Dec 3, 2023
2 parents bee7a7b + 0b5ceb1 commit 27f3f6f
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion htdocs/themes/math4/system.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
% }
%
% # Footer
<div id="footer" role="contentinfo" class="row"><%= include 'ContentGenerator/Base/footer' %></div>
<%= include 'ContentGenerator/Base/footer' =%>
</div>
</div>
%
Expand Down
2 changes: 2 additions & 0 deletions lib/WeBWorK/ContentGenerator.pm
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ async sub go ($c) {

my $tx = $c->render_later->tx;

$c->stash->{footerWidthClass} = 'col-12';

if ($c->can('pre_header_initialize')) {
my $pre_header_initialize = $c->pre_header_initialize;
await $pre_header_initialize
Expand Down
24 changes: 13 additions & 11 deletions templates/ContentGenerator/Base/footer.html.ep
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<div class="col-lg-10">
<div id="last-modified"><%= maketext('Page generated at [_1]', $c->timestamp) %></div>
<div id="copyright">
<%== maketext(
'WeBWorK &copy; [_1] | theme: [_2] | ww_version: [_3] | pg_version [_4]',
$ce->{WW_COPYRIGHT_YEARS} || '1996-2023',
$ce->{defaultTheme} || 'unknown -- set defaultTheme in localOverides.conf',
$ce->{WW_VERSION} || 'unknown -- set WW_VERSION in VERSION',
$ce->{PG_VERSION} || 'unknown -- set PG_VERSION in ../pg/VERSION'
) %>
<div id="footer" role="contentinfo" class="row">
<div class="<%= $footerWidthClass %>">
<div id="last-modified"><%= maketext('Page generated at [_1]', $c->timestamp) %></div>
<div id="copyright">
<%== maketext(
'WeBWorK &copy; [_1] | theme: [_2] | ww_version: [_3] | pg_version [_4]',
$ce->{WW_COPYRIGHT_YEARS} || '1996-2023',
$ce->{defaultTheme} || 'unknown -- set defaultTheme in localOverides.conf',
$ce->{WW_VERSION} || 'unknown -- set WW_VERSION in VERSION',
$ce->{PG_VERSION} || 'unknown -- set PG_VERSION in ../pg/VERSION'
) %>
</div>
<a href="https://openwebwork.org/"><%= maketext('The WeBWorK Project') %></a>
</div>
<a href="https://openwebwork.org/"><%= maketext('The WeBWorK Project') %></a>
</div>
2 changes: 2 additions & 0 deletions templates/ContentGenerator/Instructor/Index.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<%= maketext('Select user(s) and/or set(s) below and click the action button of your choice.') =%>
</p>
%
% stash->{footerWidthClass} = 'col-xl-10';
%
<%= form_for current_route, method => 'POST', id => 'instructor-tools-form', begin =%>
<%= $c->hidden_authen_fields =%>
%
Expand Down
2 changes: 2 additions & 0 deletions templates/ContentGenerator/Instructor/Stats/index.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
%
% my $type = current_route =~ s/instructor_//r;
%
% stash->{footerWidthClass} = 'col-lg-10';
%
<div class="row">
<div class="col-lg-5 col-sm-6 mb-2">
<div class="card h-100">
Expand Down
2 changes: 2 additions & 0 deletions templates/ContentGenerator/Problem.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
% last;
% }
%
% stash->{footerWidthClass} = 'col-lg-10';
%
<%== $c->post_header_text =%>
<div id="custom_edit_message" class="row"><div class="col-lg-10"><%= $c->output_custom_edit_message %></div></div>
<div class="row"><div id="output_summary" class="col-lg-10"><%= $c->output_summary %></div></div>
Expand Down

0 comments on commit 27f3f6f

Please sign in to comment.