Skip to content

Instantly share code, notes, and snippets.

View aeschylus's full-sized avatar

Drew Winget aeschylus

View GitHub Profile
@aeschylus
aeschylus / Gruntfile.js
Created August 26, 2013 02:43
This is in the public folder of an express.js application. It does not have access to any "index.html", as a .hjs template is rendered by express from the top-level, back-end views/index.hjs location. Livereload works by appending a script take to this generated file, so I need to render and copy this back-end template any time I change it, in o…
// Generated on 2013-08-24 using generator-webapp 0.2.7
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're only matching one level down:
@aeschylus
aeschylus / annotationLayer.js
Last active December 25, 2015 03:49
Look at line
(function($) {
$.AnnotationsLayer = function(options) {
jQuery.extend(true, this, {
element: null,
width: $.DEFAULT_SETTINGS.imageView.annotationsList.width,
parent: null,
showList: true,
annotationUrls: null,
@aeschylus
aeschylus / index.html
Created October 24, 2013 20:02
A sample index displaying 6 institutions' IIIF endpoints in a single environment.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="css/mirador-combined.min.css">
<style>
body { padding: 0; margin: 0; overflow: hidden; font-size: 70%; }
#viewer { width:100%; height:100%; background: #333 url(images/debut_dark.png) left top repeat; position: fixed; }
@aeschylus
aeschylus / module
Created November 19, 2013 22:43
Binding a method with self context.
(function($) {
$.AnnotationsLayer = function(options) {
jQuery.extend(true, this, {
sidePanel: null,
bottomPanel: null,
regionController: null,
width: $.DEFAULT_SETTINGS.imageView.annotationsList.width,
parent: null,
(function($) {
$.AnnotationsLayer = function(options) {
jQuery.extend(true, this, {
sidePanel: null,
bottomPanel: null,
regionController: null,
width: $.DEFAULT_SETTINGS.imageView.annotationsList.width,
parent: null,
@aeschylus
aeschylus / Manifest.json
Created November 30, 2013 02:48
Fixture Manifest.json for IIIF Metadata API 1.0 Ranges feature.
This file has been truncated, but you can view the full file.
{
"@context":"http://www.shared-canvas.org/ns/context.json",
"@id":"http://demos.biblissima-condorcet.fr/iiif/metadata/ark:/12148/btv1b84473026/manifest.json",
"@type":"sc:Manifest",
"label":"Paris, BnF, MSS Français 1728",
"metadata":
{
"Repository":"Bibliothèque nationale de France / National Library of France",
"Provider" : "Biblissima",
@aeschylus
aeschylus / treeData.json
Created March 2, 2014 06:52
Sample Tree Data - The important aspect here is that the children objects be stored as elements in an array under a "children" key in the nested structure.
{
"name": "MyClass",
"children": [{
"name": "1",
"children": [{
"name": "1",
"children": [{
"name": "7"
}, {
"name": "8"
<a target=”_blank” href=”http://mirador.britishart.yale.edu/?manifest=http://manifests.britishart.yale.edu/manifest/1079">
<img src=”http://manifests.britishart.yale.edu/logo-iiif.png" alt=”IIIF Manifest”>
</a>
<!---
To link to an image instead of a manifest, use "image=[link_to_info.json]" instead of "manifest=".
To make Mirador open to a specific canvas or page of a manifest, add another query parameter:
"...&canvas=[the_id_of_my_IIIF_canvas]"
-->
@aeschylus
aeschylus / manfiest.json
Created August 15, 2016 19:23
Case 4 IIIF 2.0 manfiest - multiple
{
@context: "http://iiif.io/api/presentation/2/context.json",
@id: "http://wellcomelibrary.org/iiif/b18035723/manifest",
@type: "sc:Manifest",
label: "Wunder der Vererbung",
metadata: [
{
label: "Title",
value: "Wunder der Vererbung"
},
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "http://wellcomelibrary.org/iiif/b18035723/manifest",
"@type": "sc:Manifest",
"label": "Wunder der Vererbung",
"metadata": [
{
"label": "Title",
"value": "Wunder der Vererbung"