Skip to content

Instantly share code, notes, and snippets.

View mreidsma's full-sized avatar

Matthew Reidsma mreidsma

View GitHub Profile
@mreidsma
mreidsma / webfooter.html
Created October 11, 2024 16:50
HTML for Web Footer to match CMS branding for GVSU University Libraries
<div role="contentinfo">
<div class="footer hide-print">
<div class="content">
<h1 class="sr-only">Footer</h1>
<div class="row-gutter">
<div class="col-3 col-md-4 col-sm-6">
<h2 class="padding-none color-white">
Contact
@mreidsma
mreidsma / webheader.html
Created October 11, 2024 16:48
Web Header HTML for GVSU CMS-style template
<div role="banner">
<a href="#main" class="focus-inverted">Skip to main content</a>
<div class="header">
<div class="row content">
<div class="col-5 col-sm-12 logo">
<div class="col-12 col-sm-9">
<h1>
<a href="https://www.gvsu.edu">
@mreidsma
mreidsma / navigation.html
Created October 9, 2024 20:22
Main Website Navigation for the UL Website
<!--
Docs: https://libguides.gvsu.edu/reusabledesigns/navigation
-->
<!-- Include in <head> -->
<link href="https://prod.library.gvsu.edu/lib/ul_styles.css" rel="stylesheet"/>
<!-- Include right after the website header -->
<div id="cms-navigation" class="navigation hide-sm hide-print">
@mreidsma
mreidsma / libhours.html
Last active October 9, 2024 20:12
Design for adding library hours to the GVSU UL Website
<!--
Docs: https://libguides.gvsu.edu/reusabledesigns/hours
-->
<!-- Show all library hours for today -->
<!-- Include where you want the hours to appear. Must be nested inside the class of .site -->
<div class="site>
...
<div class="col-4 col-sm-12 library-hours"></div>
@mreidsma
mreidsma / banners.html
Created October 9, 2024 19:59
Designs for banners and alerts on the GVSU UL Website
<!--
Docs: https://libguides.gvsu.edu/reusabledesigns/banners
-->
<!-- Informational Alert -->
<section class="alert alert-info">
<span class="visually-hidden sr-only">Informational alert</span>
<p>Add your message here.</p>
@mreidsma
mreidsma / breadcrumbs.html
Created October 9, 2024 19:50
Add breadcrumbs to a UL Page
<!--
Docs: https://libguides.gvsu.edu/reusabledesigns/breadcrumbs
-->
<!-- Breadcrumb structure for static sites -->
<nav class="breadcrumbs" aria-label="breadcrumbs">
<ol>
<li><a href="https://www.gvsu.edu/library">University Libraries</a></li>
<li><a href="https://www.gvsu.edu/library/teaching-scholarship-120.htm">Teaching &amp; Scholarship</a></li>
@mreidsma
mreidsma / skiplink.html
Created October 9, 2024 19:43
Skip Link Design for the University Libraries Website
@mreidsma
mreidsma / occupancy.html
Last active October 9, 2024 19:40
Embed real-time occupancy on the website
<!--
Docs: https://libguides.gvsu.edu/reusabledesigns/skiplink
-->
<!-- Real Time Occupancy -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<div id="library-rto"></div>
<script>
jQuery(document).ready(function() {
@mreidsma
mreidsma / breadcrumbs.js
Last active September 10, 2024 18:06
Add breadcrumbs to GVSU CMS pages - update the links to match needs
(function() {
var parent = document.createElement("nav");
parent.className = "breadcrumbs";
parent.setAttribute("aria-label", "breadcrumbs");
parent.innerHTML = '<ol><li><a href="https://www.gvsu.edu/library">University Libraries</a></li><li><a href="#">Second Level</a></li><li><span aria-current="page">Third Level</span></li></ol><style>nav.breadcrumbs ol { list-style-type: none; margin: 0; padding: 0; } nav.breadcrumbs ol li { display: inline-block;} nav.breadcrumbs ol li a, nav.breadcrumbs ol li span { display: inline-block; margin: 0 .1em; padding-right: .1em; } nav.breadcrumbs ol li:after { content: "\u003E"; } nav.breadcrumbs ol li:first-child { margin-left: 0; } nav.breadcrumbs ol li:last-child:after { content: ""; }</style>';
var cmsContent = document.querySelector('#cms-content > .content');
cmsContent.insertBefore(parent, cmsContent.children[0]);
})();
@mreidsma
mreidsma / all_full_text.js
Last active March 6, 2020 15:55
Simple script to add link to link resolver in Summon results
setTimeout(function() {
libMyScope = angular.element('html').scope();
libScope( );
}, 1000);
function libScope(){
console.log('initialising...');
// WATCH FOR RESULTS FEED CHANGES...
libMyScope.$watchCollection('feed', function(){