Skip to content

Commit

Permalink
Fixed footer for archived sites
Browse files Browse the repository at this point in the history
And disable heatmap reporting on archived sites.
  • Loading branch information
maxg committed Feb 1, 2021
1 parent b512029 commit 124c8b1
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
3 changes: 3 additions & 0 deletions web/handout/course-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ HANDOUT_EXERCISES = [ 'reading-exercises' ];
// optional: location for videos
// HANDOUT_VIDEO = 'https://example.com/6.HANDX/video/';

// optional: add archived site footer
// HANDOUT_ARCHIVED = 'Archived IAP 2000';

// optional: configuration for slides
// HANDOUT_SLIDE_OPTIONS = { ratio: '16:9' };

Expand Down
4 changes: 4 additions & 0 deletions web/handout/handout-render.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ function renderPage() {
$('footer:contains("\u00a9")').addClass('col-sm-2 footer-margin').html($('<div>').html(HANDOUT_AUTHORS));
// department footer
$('body').append($('<footer>').text(HANDOUT_DEPARTMENT));
// archived footer
if (window.HANDOUT_ARCHIVED) {
$('body').append($('<footer>').addClass('footer-archived').html(HANDOUT_ARCHIVED));
}

// identify exercises
$(HANDOUT_EXERCISES.map(function(category) {
Expand Down
2 changes: 1 addition & 1 deletion web/handout/handout-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ $(document).ready(function() {
// on delivered handouts...
if (window.HANDOUT_DELIVER === undefined) {
// wire up heatmap
// [disabled] $('[data-handx-url]').first().each(createHeatmap);
$('[data-handx-url]').not('.footer-archived ~ *').first().each(createHeatmap);
}

// handle fragment identifiers
Expand Down
24 changes: 23 additions & 1 deletion web/handout/handout-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ header, footer {
color: #fff;
padding: 1em 2em;
}
header a, header a:focus, header a:hover {
header a, header a:focus, header a:hover,
footer.footer-archived a, footer.footer-archived a:focus, footer.footer-archived a:hover {
color: #fff;
}
footer.footer-archived a {
text-decoration: underline;
text-decoration-color: #fffa;
}
header > div {
float: right;
}
Expand Down Expand Up @@ -58,6 +63,23 @@ footer.footer-margin > div {
font-size: 85%;
line-height: 1.33;
}
footer.footer-archived {
text-align: left;
position: fixed;
bottom: 0;
min-width: 33%;
max-width: 67%;
}
footer.footer-archived::after {
content: '';
position: absolute;
top: 0;
right: -1.5em;
height: 100%;
width: 3em;
background-color: inherit;
transform: skew(22.5deg);
}

/* table of contents */
header.chip {
Expand Down

0 comments on commit 124c8b1

Please sign in to comment.