Skip to content

Instantly share code, notes, and snippets.

View michaelschofield's full-sized avatar

Michael Schofield michaelschofield

View GitHub Profile
<!--begin text ad markup-->
<table class='letterhead-promotion' style='margin: 0 auto; max-width: 600px;'>
<tr class='letterhead-promotion__row'>
<td class='letterhead-promotion__row__cell' style='text-align: center; padding-bottom: 8px;'>
<p class='letterhead-promotion__row__cell__promoter-display-name' style='font-size: 85%;'>Advertisement from {{ promoterDisplayName }}</p>
</td>
</tr>
<tr class='letterhead-promotion__row'>
<td class='letterhead-promotion__row__cell'>
<h3 class='letterhead-promotion__row__cell__heading' style='margin: 0 0 10px 0;'>{{ heading }}</h3>
@michaelschofield
michaelschofield / index.html
Last active December 9, 2018 06:17
stoicism.design
<h1 class="heading">
stoicism.design
</h1>
<form action="https://schoeyfield.us6.list-manage.com/subscribe/post?u=552ab950f555406e7dd967eda&amp;id=a25468faca" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="form validate" novalidate> <div class="form__group">
<input class="form__input" id="mce-EMAIL" name="EMAIL" type="text" required>
<label class="form__label" for="mce-EMAIL">Your email</label>
</div>
<input type="hidden" name="b_552ab950f555406e7dd967eda_a25468faca" tabindex="-1" value="">
/**
* Hi. Michael here. This code is just abstracted from a bigger prototypal thing
* but you might find it informative for interacting with the Bitbucket API.
* We're still using Angular 1.5.x, and this def needs some refactoring.
* Thanks for being polite :). - @schoeyfield
*/
/**
* Create a function for connecting with the Bitbucket API.
* @returns an object
<!-- Hi. This assumes the modal is mostly using CSS
for the whole pop-over effect. You really need javascript
to do two things: toggle aria-hidden="true" to "false" on open,
then focus the user on the modal and set the tabindex to the rest
of the <body> to -1. This captures the keyboard navigation and prevents
the user from accidentally tabbing out of the modal until he or she
closes the modal.
-->
<button class="button button--link" role="button">Modal Button</button>
<section ng-controller="WordPress as wp">
<article class="post" ng-repeat="post in wp.posts">
<h1>{{ post.title }}</h1>
{{ post.content }}
</article>
function addStatus() {
if( $('.itemSelect').length == 0 && $('pre').length == 0) {
$('.bibItemsEntry td:last-child').append('<a href="#" onclick="return false;" onmouseover="statustip(this); return false;"><i class="fa fa-question-circle"></i></a>');
}
}
function statustip(statuslink) {
if(statuslink.id != "set") {
statuslink.id = "current";
var hold_flag = 0;
@michaelschofield
michaelschofield / asu-library-webpac-mac.js
Created March 17, 2016 16:34
ASU Library's WebPAC map() function
function map(loclink, loc) {
var url = "/screens/map.html?loc=" + encodeURIComponent(loc); // add location code as url parameter
var $nextTD = $(loclink).closest('td').next(); // get the TD that contains the call number which is the next TD after the one that contains the clicked link
var call_num = $nextTD.text(); // get just the text of the call number TD (remove comments and html tags)
call_num = call_num.trim(); // trim to remove any preceding or trailing spaces from the call number
url += "&callnum=" + encodeURIComponent(call_num); // add call number as url parameter
window.open(url); // load url in new window
}

Bugs

  • On the results list, some book covers appear squished.
  • On advanced search, the label "expand search options" is the same when expanded.
  • First searched keyword: truth about cats and dogs - and received results including results with & in it. When I search : truth about cats & dogs - no results
  • Currently doing a side by side comparison of NovaCat vs the Beta and the color gray used in the beta version appears very light and hard to see.
  • Could a line of text saying "distance students" be added right underneath "Order for Delivery"? Also, Could "Hold for Pick-up (Local Users) be made the first option. I think public patrons will think we are offering to mail materials to their home.
  • Can an option be added to limit by Material Type?
  • After performing a search; pressing the advanced search button brings up a 404 error.
  • Cutting down all that extra text in the title field
  • Buttons beneath the item cover image: (please note suggested text and order)
<link rel='stylesheet' href='//www.example-library.org/critical-1.0.min.css' type='text/css' media='all' />
<script>
// loadCSS
!function(e){"use strict";e.loadCSS=function(t,n,r){var i,l=e.document,o=l.createElement("link");if(n)i=n;else{var a=(l.body||l.getElementsByTagName("head")[0]).childNodes;i=a[a.length-1]}var s=l.styleSheets;o.rel="stylesheet",o.href=t,o.media="only x",i.parentNode.insertBefore(o,n?i:i.nextSibling);var f=function(e){for(var t=o.href,n=s.length;n--;)if(s[n].href===t)return e();setTimeout(function(){f(e)})};return o.onloadcssdefined=f,f(function(){o.media=r||"all"}),o}}(this);
loadCSS( '//www.example-library.org/uncritical-1.0.min.css' );
</script>
<noscript>
<link rel="stylesheet" href="//www.example-library.org/uncritical-1.0.min.css">
</noscript>
/*------------------------------------*\
#MENU
\*------------------------------------*/
/**
* Mobile fixes
*/
.nav-menu.toggled-on {
background-color: #59b0cc;
padding: 5em 0 1em;