Skip to content

Commit

Permalink
February 2021 Snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
ama39 committed Feb 17, 2021
1 parent 84e19e4 commit d11837a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
10 changes: 8 additions & 2 deletions css/base.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/base.css.map

Large diffs are not rendered by default.

22 changes: 14 additions & 8 deletions js/cwd_utilities.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* CWD Utilities (ama39, last update: 11/13/20)
/* CWD Utilities (ama39, last update: 2/15/21)
- 1. Main Navigation (script support for dropdown menus and mobile)
- 2. Empty Sidebar Helper (clears whitespace from empty sidebar regions to allow use of the :empty pseudo class in CSS)
- 3. Mobile Table Helper (allows tables or other block elements to scroll horizontally on small devices, apply via .mobile-scroll class)
Expand All @@ -9,6 +9,7 @@
- 8. Photo Credit/Information (div.photo-credit is turned into a small camera icon, revealing details on hover (or via keyboard/screen reader focus)
Change Log
- 2/15/21 Small adjustment to code for detecting empty sidebar menus in Drupal
- 11/13/20 Added support for links on Expander headings
- 6/18/20 Bug fix for mobile section navigation + breadcrumb; the process will now be skipped when section navigation is not present
- 6/17/20 WA fix for mobile section navigation + breadcrumb keyboard focus
Expand Down Expand Up @@ -321,13 +322,16 @@ var msie = document.documentMode;


// 2. Empty Sidebar Helper ------------------------------------------------
$('.secondary').each(function() {
if (msie != 8 && msie != 7) {
if ( !$(this).html().trim() ) {
$(this).empty().addClass('empty');
function emptySidebars() {
$('.secondary').each(function() {
if (msie != 8 && msie != 7) {
if ( !$(this).html().trim() ) {
$(this).empty().addClass('empty');
}
}
}
});
});
}
emptySidebars();


// 3. Mobile Table Helper -------------------------------------------------
Expand Down Expand Up @@ -450,7 +454,9 @@ var msie = document.documentMode;
has_items = true;
}
if (!has_items) {
$(this).remove();
$(this).parent('.mobile').prev('.mobile-expander-heading').remove();
$(this).parent('.mobile').remove();
emptySidebars();
}
}
});
Expand Down
8 changes: 7 additions & 1 deletion sass/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,12 @@ abbr {
.double-margin {
margin-bottom: 2em !important;
}
.triple-margin {
margin-bottom: 3em !important;
}
.quadrupal-margin {
margin-bottom: 4em !important;
}
.nobr {
white-space: nowrap;
}
Expand Down Expand Up @@ -1052,8 +1058,8 @@ main .row > .secondary:empty, main .row > .secondary.empty {
}
#main-content {
background: #fff;
overflow-y: visible;
overflow-x: hidden;
overflow-y: visible;
}
.content-block {
float: left;
Expand Down

0 comments on commit d11837a

Please sign in to comment.