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
/* | |
* 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' ) ) { |
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
add_filter('ef_user_following_posts_query_args','any_posts_ef_user_following_posts_query_args',10,1); | |
function any_posts_ef_user_following_posts_query_args( $post_args ){ | |
$post_args['post_type'] = 'any'; | |
return $post_args; | |
} |
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
<?php | |
// Fetch all posts, regardless of post-type, in "my_category". | |
$args = array( | |
'post_type' => 'any', | |
'category_name' => 'my_category' | |
); | |
// Call the $args ^ in a new WP_Query(). | |
$the_query = new WP_Query( $args ); |
OlderNewer