Skip to content

Instantly share code, notes, and snippets.

Avatar

Jason A. Clark jasonclark

View GitHub Profile
@jasonclark
jasonclark / google-books-search
Created Dec 18, 2010
This is a proof of concept app. I wanted to see if an alternative browse/search app for Google Books was possible. Built with PHP, HTML and the Google Ajax Search API (version 1).
View google-books-search
@jasonclark
jasonclark / index-html5-geo.php
Created Jan 5, 2011
html 5 geolocation, Google geocoder API - find position and set value in search form field. demo: http://www.lib.montana.edu/~jason/files/geolocate/index-html5-geo.php
View index-html5-geo.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>re: This Place - Location Matters : Montana State University Libraries</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="alternate" type="application/rss+xml" title="MSU Libraries: Tools" href="http://feeds.feedburner.com/msulibrarySpotlightTools" />
<style type="text/css" media="screen, projection, handheld">
<!--
@import url("/~jason/files/geolocate/meta/styles/master.css");
@jasonclark
jasonclark / booklist.js
Last active May 4, 2020
booklist javascript (jQuery) - calling google spreadsheet api, parsing response
View booklist.js
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
//source Google Sheets file is https://docs.google.com/spreadsheets/d/1rX4_fInsYS7vOGpnXm1UklZgvU27FXl3UYu9lx9RHHU/
$(function listBooks() {
$.getJSON( "https://spreadsheets.google.com/feeds/list/1rX4_fInsYS7vOGpnXm1UklZgvU27FXl3UYu9lx9RHHU/1/public/full?alt=json",
function (data) {
$('div#book-list').append('<ul class="items"></ul>');
$.each(data.feed.entry, function(i,entry) {
var item = '<span style="display:none">' + entry.id.$t + '</span>';
@jasonclark
jasonclark / booklist.css
Last active May 6, 2019
booklist CSS - display as table row
View booklist.css
<style type="text/css">
.items {display:table;list-style:none;margin:0;padding:0;border-spacing:5px;}
.items li {display:table-row;border-radius:10px;border:1px solid #ccc;padding:5px;margin:0 0 10px 0;}
.items li img {display:table-cell;vertical-align:top;}
.items li span.meta {display:table-cell;vertical-align:top;margin:0;padding:0 0 0 5px;}
.items li {margin:0 0 5px 0;}
</style>
@jasonclark
jasonclark / booklist.html
Last active May 5, 2019
booklist HTML - page structure and markup
View booklist.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Reading List</title>
<!-- Insert booklist.css here (https://gist.github.com/2585089) -->
<!-- Insert booklist.js here (https://gist.github.com/2585071) -->
@jasonclark
jasonclark / booklist HTML CSS and Javascript (complete file)
Last active May 8, 2019
booklist HTML CSS and Javascript (complete file) - Using the Google Spreadsheets Data API to build a Recommended Reading List
View booklist HTML CSS and Javascript (complete file)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Reading List</title>
<style type="text/css">
.items {display:table;list-style:none;margin:0;padding:0;border-spacing:5px;}
.items li {display:table-row;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;border:1px solid #ccc;padding:5px;margin:0 0 10px 0;}
.items li img {display:table-cell;vertical-align:top;}
.items li span.meta {display:table-cell;vertical-align:top;margin:0;padding:0 0 0 5px;}
@jasonclark
jasonclark / jquery-google-analytics-example
Created Sep 14, 2012
How to add Google Analytics to jQuery Mobile
View jquery-google-analytics-example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mobile @ Your Library</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
<link rel="stylesheet" href="./meta/styles/m.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
@jasonclark
jasonclark / cite-this-uncompressed.js
Created Oct 4, 2012
CiteThis Bookmarklet (Javascript unencoded and uncompressed)
View cite-this-uncompressed.js
javascript: (function () {
var h = document.createElement('div');
var t = document.getElementsByTagName('title')[0];
var info = '<p><strong>Title(' + t.innerHTML.length + '):</strong> ' + t.innerHTML + '</p>';
var m = document.getElementsByTagName('meta');
for (var i = 0; i < m.length; i++) {
if (null !== m[i].getAttribute('name')) {
var c = m[i].getAttribute('content');
info += '<p><strong>' + m[i].getAttribute('name') + '(' + c.length + '):</strong> ' + c + '</p>';
}
@jasonclark
jasonclark / booklist-lhuede.html
Created Nov 19, 2012
Book Review List using Google Spreasheet API and jQuery
View booklist-lhuede.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Reading List</title>
<style type="text/css">
.items {display:table;list-style:none;margin:0;padding:0;border-spacing:5px;}
.items li {display:table-row;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;border:1px solid #ccc;padding:5px;margin:0 0 10px 0;}
.items li img {display:table-cell;vertical-align:top;height:100px;width:100px;}
.items li span.meta {display:table-cell;vertical-align:top;margin:0;padding:0 0 0 5px;}
@jasonclark
jasonclark / gist:6d6613358f43653fec89
Created Jan 26, 2015
JSON-LD for Web page with additional types using schema.org
View gist:6d6613358f43653fec89
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebPage",
"name": "Title of web page",
"description": "Description of web page",
"additionalType": [
{
"@id": "http://dbpedia.org/page/Navajo"
},
You can’t perform that action at this time.