Skip to content

Instantly share code, notes, and snippets.

<script id="static-bubble-template" type="text/template">
<!-- Close "X". -->
<a name="close" class="close">&times;</a>
<!-- Title. -->
<div class="title" rv-html="record:title | recordTitle"></div>
<p class="more-info">Click for more information.</p>
<!-- Body / Item. -->
.bubble.static.selected p.more-info {
display: none;
}
#neatline #waypoints {
max-height: 80%;
max-width: 200px;
right: 40px;
top: 40px;
}
#waypoints a.title {
cursor: pointer;
display: list-item;
font-weight: 10;
{
"simple_pages": {
"table" : "SimplePagesPage",
"result_type" : "Simple Page",
"flag" : "is_published",
"fields" : ["title", "text"]
}
}
{
"exhibits": {
"table" : "Exhibit",
"result_type" : "Exhibit",
"tagged" : true,
"flag" : "public",
"fields": [
"title",
<img src="http://fedora.path/image.jpg" />
@davidmcclure
davidmcclure / gist:9904089
Last active August 29, 2015 13:57
Creating themes for individual Neatline exhibits
Neatline.on('start', function() {
var narrative = $('div.narrative');
var exhibit = $('div.exhibit');
var bubble = $('div.bubble');
// Cache the width of the narrative.
var textWidth = narrative.outerWidth();
var position = function() {
Neatline.on('start', function() {
NProgress.configure({ showSpinner: false });
NProgress.start();
Neatline.vent.on('MAP:ingest', function() {
NProgress.done();
});
});
Neatline.on('start', function() {
var map = Neatline.request('MAP:getMap');
$('.btn.in').click(function() {
map.zoomIn();
});
$('.btn.out').click(function() {
map.zoomOut();
Neatline.on('start', function() {
Neatline.vent.on('MAP:ingest', function() {
var layers = Neatline.request('MAP:getWmsLayers');
var loader = $('#wms-loader');
_.each(layers, function(layer) {
// When loading starts.
layer.events.register('loadstart', layer, function() {