Skip to content

Commit

Permalink
feat(neume exemplars): add frontend elements for neume exemplar search
Browse files Browse the repository at this point in the history
  • Loading branch information
dchiller committed Oct 8, 2024
1 parent 912b260 commit 1d87f84
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
6 changes: 6 additions & 0 deletions nginx/public/node/frontend/public/css/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,12 @@ html.js {
background: #ccc;
}

.neume-gallery-container {
display: flex;
flex-wrap: nowrap;
overflow: auto;
}

.neume-gallery-entry {
transition: border-color 0.2s;
float: left;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default Marionette.CompositeView.extend({
exemplarUrl: function ()
{
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers
return pageSnippetUrl(this.siglum_slug, _.pick(this, ['p', 'x', 'y', 'w', 'h']), {height: 75});
return pageSnippetUrl(_.pick(this, ['p', 'x', 'y', 'w', 'h']), {height: 50});
// jscs enable
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default Marionette.Object.extend({
regions.searchInput.show(inputView);

// Neume gallery
if (field.type === 'neumes' && this.neumeExemplars.length > 0)
if (field.type === 'neume_names' && this.neumeExemplars.length > 0)
{
var gallery = new NeumeGalleryView({
collection: this.neumeExemplars
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default Marionette.ItemView.extend({
return null;
}

return pageSnippetUrl(this.siglumSlug, box, {height: this.neumeImageHeight});
return pageSnippetUrl(box, {height: this.neumeImageHeight});
},

templateHelpers: function ()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<h4>Available neumes</h4>
<div class="child-container clearfix"></div>
<div class="child-container neume-gallery-container"></div>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import _ from 'underscore';
/**
* Generate a IIIF URL for a snippet of a page
*
* @param {String} siglumSlug The siglum slug of the manuscript to search
* @param {Object} location The location of the manuscript to search, with attributes
*
* - p: folio number
Expand All @@ -13,7 +12,7 @@ import _ from 'underscore';
* @param {Object} dimensions The dimensions of the image to output, with attributes
* width and height (both optional).
*/
export default function pageSnippetUrl(siglumSlug, loc, dimens)
export default function pageSnippetUrl(loc, dimens)
{
var filename = loc.p;
var bounds = [loc.x, loc.y, loc.w, loc.h].join(',');
Expand Down

0 comments on commit 1d87f84

Please sign in to comment.