Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the footer width adjustable per page. #25

Merged
merged 1 commit into from
Dec 3, 2023
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
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