-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'upstream-main' into map
- Loading branch information
Showing
2,514 changed files
with
267 additions
and
214 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,18 +1,18 @@ | ||
name: ci:test | ||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: [main, development, v1*] | ||
pull_request: | ||
branches: [main, development, v1*] | ||
|
||
jobs: | ||
test: | ||
if: github.repository_owner == 'minicomp' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/checkout@v3 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
- name: install | ||
run: gem install bundler && bundle | ||
- name: test | ||
run: bundle exec rake wax:test |
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 +1 @@ | ||
2.7.2 | ||
3.2.2 |
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 |
---|---|---|
|
@@ -4,23 +4,25 @@ MAINTAINER Andrew Woods <[email protected]> | |
|
||
# Install apt dependencies | ||
RUN apt-get update -y | ||
RUN apt-get install -y build-essential | ||
RUN apt-get install -y software-properties-common | ||
RUN apt-get install -y git | ||
RUN apt-get install -y ghostscript | ||
RUN apt-get install -y imagemagick | ||
RUN apt-get install -y libvips | ||
RUN apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
software-properties-common \ | ||
git \ | ||
ghostscript \ | ||
imagemagick \ | ||
libvips \ | ||
locales \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Add imagemagick PDF fix | ||
RUN sed -i '/disable ghostscript format types/,+6d' /etc/ImageMagick-6/policy.xml | ||
|
||
# Install locales | ||
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \ | ||
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 | ||
# Set up locales | ||
RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 | ||
ENV LANG en_US.utf8 | ||
|
||
RUN mkdir /wax | ||
COPY Gemfile* *.gemspec ./wax | ||
COPY Gemfile* *.gemspec /wax/ | ||
WORKDIR /wax | ||
RUN bundle | ||
|
||
|
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
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
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
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,58 +1,70 @@ | ||
{% assign collection = site[include.collection] %} | ||
{% assign undefined = include.undefined | default: 'undefined' %} | ||
{% assign id = include.id | default: include | jsonify | slugify %} | ||
|
||
{% if include.only and include.facet_by %} | ||
{% if include.only.size > 0 %} | ||
{% assign subset = collection | where: include.facet_by, include.only | sort: 'order' %} | ||
{% else %} | ||
{% assign subset = nil %} | ||
{% endif %} | ||
|
||
<div id='wax-gallery-{{ include.collection }}-container' class='wax-gallery-container full-width'> | ||
<div id='{{ id }}-container' class='wax-gallery-container full-width'> | ||
<div class='wax-inline-container'> | ||
<div id="{{ include.collection }}-facet-buttons" class="facet-buttons"></div> | ||
<div id="wax-gallery-{{ include.collection }}" class="wax-gallery"></div> | ||
{% if include.facet_by %} | ||
<div id="{{ id }}-facet-buttons" class="facet-buttons"></div> | ||
{% endif %} | ||
<div id="wax-gallery-{{ id }}" class="wax-gallery"></div> | ||
</div> | ||
</div> | ||
|
||
{% if subset.size > 0 %} | ||
<script type="text/javascript"> | ||
$( document ).ready(function() { | ||
let container = $('#{{ id }}-container'); | ||
let gallery = $('#wax-gallery-{{ id }}'); | ||
let buttonDiv = $('#{{ id }}-facet-buttons'); | ||
|
||
<script type="text/javascript"> | ||
$( document ).ready(function() { | ||
var container = $('#wax-gallery-{{ include.collection }}-container'); | ||
var gallery = $('#wax-gallery-{{ include.collection }}'); | ||
var buttonDiv = $('#{{ include.collection }}-facet-buttons'); | ||
|
||
{% if subset %} | ||
{% for item in subset %} | ||
{%- capture item_html -%} | ||
"<div class='gallery-item {{ item[include.facet_by] | slugify }} all'><a href='{{ item.url | absolute_url }}'><div class='hovereffect'><img class='img-responsive gallery-thumb' src='{{ item.thumbnail | absolute_url }}'/><div class='overlay'><p class='info'>{{ item.label }}</p></div></div></a></div>" | ||
"<div class='gallery-item {{ item[include.facet_by] | slugify }} all'><a href='{{ item.url | absolute_url }}'><div class='hovereffect'><img class='img-responsive gallery-thumb' src='{{ item.thumbnail | default: site.default_thumb | absolute_url }}' alt='{{ item.label | escape }}'/><div class='overlay'><p class='info'>{{ item.label | escape }}</p></div></div></a></div>" | ||
{%- endcapture -%} | ||
gallery.append({{ item_html | strip_newlines }}); | ||
{% endfor %} | ||
{% else %} | ||
}); | ||
</script> | ||
{% else %} | ||
<script type="text/javascript"> | ||
$( document ).ready(function() { | ||
let container = $('#{{ id }}-container'); | ||
let gallery = $('#wax-gallery-{{ id }}'); | ||
let buttonDiv = $('#{{ id }}-facet-buttons'); | ||
|
||
|
||
{% for item in collection %} | ||
{%- capture item_html -%} | ||
"<div class='gallery-item {{ item[include.facet_by] | slugify }} all'><a href='{{ item.url | absolute_url }}'><div class='hovereffect'><img class='img-responsive gallery-thumb' src='{{ item.thumbnail | absolute_url }}' alt='{{ item.label | escape }}'/><div class='overlay'><p class='info'>{{ item.label }}</p></div></div></a></div>" | ||
"<div class='gallery-item {{ item[include.facet_by] | default: undefined | slugify }} all'><a href='{{ item.url | absolute_url }}'><div class='hovereffect'><img class='img-responsive gallery-thumb' src='{{ item.thumbnail | default: site.default_thumb | absolute_url }}' alt='{{ item.label | escape }}'/><div class='overlay'><p class='info'>{{ item.label | escape }}</p></div></div></a></div>" | ||
{%- endcapture -%} | ||
gallery.append({{ item_html | strip_newlines }}); | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{% if include.facet_by %} | ||
{% unless subset %} | ||
var facets = Array.from(new Set([{%- for item in collection -%}'{{ item[include.facet_by] | slugify }}'{% unless forloop.last %}, {% endunless %}{%- endfor -%}])); | ||
{% if include.facet_by %} | ||
var facets = Array.from(new Set([{%- for item in collection -%}'{{ item[include.facet_by] | default: undefined | slugify }}'{% unless forloop.last %}, {% endunless %}{%- endfor -%}])); | ||
buttonDiv.append("<button class='btn facet active' data-filter='all'>show all</button>"); | ||
|
||
for (i in facets) { | ||
buttonDiv.append(`<button class='btn facet' data-filter='${facets[i]}'>${facets[i]}</button>`); | ||
} | ||
|
||
$(document).ready(function(){ | ||
$(".facet").click(function(){ | ||
$("#{{ id }}-container .facet").click(function(){ | ||
var filterValue = $(this).attr('data-filter'); | ||
$('.facet').removeClass('active'); | ||
$('#{{ id }}-container .facet').removeClass('active'); | ||
$(this).addClass('active'); | ||
if(filterValue == 'all') { $('.all').show('slow'); } | ||
else { $('.all').hide('slow'); $(`.${filterValue}`).show('slow'); } | ||
if(filterValue == 'all') { $('#{{ id }}-container .all').show('slow'); } | ||
else { $('#{{ id }}-container .all').hide('slow'); $(`.${filterValue}`).show('slow'); } | ||
}); | ||
}); | ||
{% endunless %} | ||
{% endif %} | ||
}); | ||
</script> | ||
{% endif %} | ||
}); | ||
</script> | ||
{% endif %} |
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
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,5 +1,36 @@ | ||
<div class='image-viewer'> | ||
<a href='{{ include.full_image | absolute_url }}'> | ||
<img class='item-full-image' src='{{ include.full_image | absolute_url }}' alt='{{ page.label | escape }}'/> | ||
</a> | ||
</div> | ||
<div id="osd" class="image-viewer"></div> | ||
<script defer src="{{ '/assets/openseadragon/openseadragon.min.js' | absolute_url }}"></script> | ||
|
||
<script> | ||
$(document).ready(function () { | ||
OpenSeadragon({ | ||
id: "osd", | ||
preload: true, | ||
showNavigationControl: false, | ||
panHorizontal: false, | ||
defaultZoomLevel: 0, | ||
zoomPerScroll: 1, | ||
prefixUrl: "{{ '/assets/openseadragon/images/' | absolute_url }}", | ||
{% if page.img_list.size > 1 %} | ||
sequenceMode: true, | ||
showReferenceStrip: true, | ||
tileSources: [ | ||
{% for img in page.img_list %} | ||
{ | ||
type: 'image', | ||
url: '{{ img.full | absolute_url }}', | ||
referenceStripThumbnailUrl: '{{ img.thumbnail | absolute_url }}', | ||
buildPyramid: false | ||
}{% unless forloop.last %}, {% endunless %} | ||
{% endfor %} | ||
] | ||
{% else %} | ||
tileSources: { | ||
type: 'image', | ||
url: '{{ page.full | absolute_url}}', | ||
buildPyramid: false | ||
}, | ||
{% endif %} | ||
}); | ||
}); | ||
</script> |
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
Oops, something went wrong.