The Sherman Library took the unique opportunity to build a public library website where there wasn’t one before. A fresh start, no baggage, with plenty of time to talk, plan, design, develop, make mistakes, get delayed, and user-test. This is the narrative of the entire process – the whole shebang: answering why the design committee opted to build a mobile-first, responsive, and flat website, the data they used to convince stakeholders to ditch the carousel, the techniques and pains behind development, content strategy, and seeing the website launch. Attendees have a unique look into the workflow of another library, the user-experience research and best practices that drove our decision-making. In short: we made the font huge, stopped supporting old Internet Explorers, took all the tabs off the search box, and embraced the white space. This is why.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ================== | |
* Custom Welcome Panel | |
*/ // This is a custom welcome panel, sort of. The | |
// correct way of updating the welcome panel content | |
// is still only visible to users that can edit_theme_options. | |
// This takes the welcome-panel styles and adds it as an admin_notice. | |
function ms_welcome_panel() { | |
$screen = get_current_screen(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Assuming a parent category called "LibTechGender" with sub-categories | |
like "Code of Conduct", "Impostor Syndrome," etc. Probably get more | |
nesty to separate by "Articles (Mine)" and "Articles (Others)," but | |
the point is it can be done with just categories. | |
*/ | |
// Fetch articles about the "Code of Conduct" | |
$args = array( | |
'post_type' => 'post', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* jquery.getQueryParameters.js | |
* Copyright (c) 2014 Nicholas Ortenzio | |
* The MIT License (MIT) | |
* | |
*/ | |
jQuery.extend({ | |
getQueryParameters : function(str) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function nth(o){return o+([‘st’,’nd’,’rd’][(o+’’).match(/1?\d\b/)-1]||’th’)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Have to get creative with Schema though. I'm actively finagling. DTs cannot contain any block level elements, but DDs can. | |
<dl vocab="http://schema.org/" typeof="Person"> | |
<dt property="name">Sandra Fiegi</dt> | |
<dd> | |
<img property="image" src="example.jpg" alt="A photo of Sandra Fiegi"> | |
</dd> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From David Waslh: http://davidwalsh.name/jquery-ajax-callback | |
$.when( | |
$.getScript('/media/js/wiki-min.js?build=21eb633'), | |
$.getJSON('https://developer.mozilla.org/en-US/demos/feeds/json/featured/') | |
).then(function(a, b) { // or ".done" | |
// Yay, stuff loaded and now we can do something! | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// There are probably more legit ways of doing this, | |
// but for my sparse use I sometimes use this. | |
// IE8 ployfill for GetComputed Style (for Responsive Script below) | |
if (!window.getComputedStyle) { | |
window.getComputedStyle = function(el, pseudo) { | |
this.el = el; | |
this.getPropertyValue = function(prop) { | |
var re = /(\-([a-z]){1})/g; | |
if (prop == 'float') prop = 'styleFloat'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var CSSCriticalPath = function(w, d, opts) { | |
var opt = opts || {}; | |
var css = {}; | |
var pushCSS = function(r) { | |
if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
for(var i = 0; i < styles.length; i++) { | |
if(!!styles[i] === false) continue; | |
var pair = styles[i].split(": "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Deregister all the things | |
add_action( 'wp_print_scripts', 'libux_deregister_scripts', 100 ); | |
function libux_deregister_scripts() { | |
// Ditch jQuery - except on one page that requires it, | |
// but load that with a CDN. | |
wp_deregister_script( 'jquery' ); | |
if ( is_page( 'something' ) ) { |