forked from pbinkley/annotate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Marii
committed
Dec 21, 2017
1 parent
2b7a213
commit 6cdd205
Showing
8 changed files
with
127 additions
and
42 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.DS_Store | ||
_site | ||
.sass-cache/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ruby "2.4.2" | ||
source 'https://rubygems.org' | ||
gem 'jekyll', '3.6.2' | ||
gem 'minima', '2.1.1' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
addressable (2.5.2) | ||
public_suffix (>= 2.0.2, < 4.0) | ||
colorator (1.1.0) | ||
ffi (1.9.18) | ||
forwardable-extended (2.6.0) | ||
jekyll (3.6.2) | ||
addressable (~> 2.4) | ||
colorator (~> 1.0) | ||
jekyll-sass-converter (~> 1.0) | ||
jekyll-watch (~> 1.1) | ||
kramdown (~> 1.14) | ||
liquid (~> 4.0) | ||
mercenary (~> 0.3.3) | ||
pathutil (~> 0.9) | ||
rouge (>= 1.7, < 3) | ||
safe_yaml (~> 1.0) | ||
jekyll-sass-converter (1.5.1) | ||
sass (~> 3.4) | ||
jekyll-watch (1.5.1) | ||
listen (~> 3.0) | ||
kramdown (1.16.2) | ||
liquid (4.0.0) | ||
listen (3.1.5) | ||
rb-fsevent (~> 0.9, >= 0.9.4) | ||
rb-inotify (~> 0.9, >= 0.9.7) | ||
ruby_dep (~> 1.2) | ||
mercenary (0.3.6) | ||
minima (2.1.1) | ||
jekyll (~> 3.3) | ||
pathutil (0.16.1) | ||
forwardable-extended (~> 2.6) | ||
public_suffix (3.0.1) | ||
rb-fsevent (0.10.2) | ||
rb-inotify (0.9.10) | ||
ffi (>= 0.5.0, < 2) | ||
rouge (2.2.1) | ||
ruby_dep (1.5.0) | ||
safe_yaml (1.0.4) | ||
sass (3.5.4) | ||
sass-listen (~> 4.0.0) | ||
sass-listen (4.0.0) | ||
rb-fsevent (~> 0.9, >= 0.9.4) | ||
rb-inotify (~> 0.9, >= 0.9.7) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
jekyll (= 3.6.2) | ||
minima (= 2.1.1) | ||
|
||
RUBY VERSION | ||
ruby 2.4.2p198 | ||
|
||
BUNDLED WITH | ||
1.16.0 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<iframe title='Mirador' class="iiif_presentation" allowtransparency="true" src='iiif_mirador.html' allowfullscreen='true' webkitallowfullscreen='true' mozallowfullscreen='true' style='width: 100%; height: 600px;' srcdoc="<link rel='stylesheet' type='text/css' href='{{ site.baseurl }}/build/mirador/css/mirador-combined.css'> | ||
<style> | ||
#viewer { | ||
width: 100%; | ||
height: 500px | ||
} | ||
</style> | ||
<div id='viewer'></div> | ||
<script src='{{ site.baseurl }}/build/mirador/mirador.js'></script> | ||
<script type='text/javascript'> | ||
$(function() { | ||
myMiradorInstance = Mirador({ | ||
id: 'viewer', | ||
data: [ | ||
{ manifestUri: '{{ site.baseurl }}/manifest.json', 'location': 'Gallica'} | ||
], | ||
windowObjects: [{ | ||
loadedManifest: '{{ site.baseurl }}/manifest.json', | ||
canvasID: 'http://gallica.bnf.fr/iiif/ark:/12148/btv1b10500001g/canvas/f7', | ||
bottomPanelVisible: true | ||
}], | ||
annotationEndpoint: { 'name':'Local Storage', 'module': 'LocalStorageEndpoint' } | ||
}); | ||
}); | ||
</script>"> | ||
</iframe> |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
# Bibliothèque nationale de France Français 640 | ||
|
||
### Sample static annotations can be found on 1r, 3r, and 3v by toggling the <i class="fa fa-comments" aria-hidden="true"></i> button on the top left of the viewer. | ||
|
||
<br><br> | ||
{% include iiif_presentation.html %} | ||
<br><br> | ||
|
||
### To grab annotations added via Mirador in LocalStorage, add your annotation using the <i class="fa fa-comments" aria-hidden="true"></i> panel, open the browser console, and run the following: | ||
<br><br> | ||
```js | ||
var gallicaUrlRegex = /.+gallica\.bnf\.fr.+canvas\/(.+)/g; | ||
|
||
for(var i =0; i < localStorage.length; i++){ | ||
var key = localStorage.key(i); | ||
var matches = gallicaUrlRegex.exec(key); | ||
if(matches != null) { | ||
console.log(matches[1]); | ||
var fileName = matches[1] + '.json'; | ||
var fileContent = localStorage.getItem(key); | ||
console.log('Want to save ' + fileName + ' with content: ' + fileContent); | ||
} | ||
} | ||
``` | ||
<br><br> | ||
## To Do: | ||
### Download JSON from localStorage instead of displaying it.<br><br>See: [https://ourcodeworld.com/articles/read/189/how-to-create-a-file-and-generate-a-download-with-javascript-in-the-browser-without-a-server](https://ourcodeworld.com/articles/read/189/how-to-create-a-file-and-generate-a-download-with-javascript-in-the-browser-without-a-server) ?<br><br>Also: [http://www.darthcrimson.org/hacking-mirador-workshop/annotate.html](http://www.darthcrimson.org/hacking-mirador-workshop/annotate.html) should be fixed soonish...? |
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