Skip to content

Commit

Permalink
Merge branch 'upstream-main' into map
Browse files Browse the repository at this point in the history
  • Loading branch information
awoods committed Aug 3, 2023
2 parents 6ea5e08 + 450aca0 commit 44c99d6
Show file tree
Hide file tree
Showing 2,514 changed files with 267 additions and 214 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
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
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.2
3.2.2
22 changes: 12 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 5 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
source 'https://rubygems.org'
gemspec

# Temporarily pin jekyll to avoid absolute_url bug in 4.2
gem 'jekyll', '4.1'

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'kramdown-parser-gfm'
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem 'wdm', '~> 0.1.1', :install_if => Gem.win_platform?
gem "tzinfo", ">= 1", "< 3"
gem "tzinfo-data"
end
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# minicomp/wax 🐝

[![Gem Version](https://badge.fury.io/rb/wax_theme.svg)](https://badge.fury.io/rb/wax_tasks)
[![Gem Version](https://badge.fury.io/rb/wax_theme.svg)](https://badge.fury.io/rb/wax_theme)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![CI:Test](https://github.com/minicomp/wax/workflows/ci:test/badge.svg)](https://github.com/minicomp/wax/actions?query=workflow%3Aci%3Atest)
[![Depfu](https://badges.depfu.com/badges/9d4da973f2cd2680c11ca34738c2dfb2/overview.svg)](https://depfu.com/github/minicomp/wax?project_id=10550)
Expand Down Expand Up @@ -32,7 +32,7 @@ It's comprised of: __a few Ruby gems__ for processing image data and associated
# Prerequisites


You'll need `git` and `ruby >= 2.4` with `bundler` installed.
You'll need `git` and `ruby >= 3.2` with `bundler` installed.
These dependencies can either be installed natively on your system or within a [Docker environment](#Using-Docker). For instructions, check the Wiki's [Setting up your system page](https://minicomp.github.io/wiki/wax/setting-up-your-system/).

Check your versions with:
Expand Down
7 changes: 1 addition & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@ require 'yaml'
namespace :wax do
desc 'run default html-proofer tests'
task :test do
sh "rm -rf _site .jekyll*"
sh "bundle exec jekyll clean"
sh "bundle exec jekyll build -b '#{@baseurl}' -d '_site#{@baseurl}'"
opts = {
check_external_hash: true,
allow_hash_href: true,
check_html: true,
disable_external: true,
empty_alt_ignore: true,
assume_extension: true,
only_4xx: true
}
HTMLProofer.check_directory('./_site', opts).run
end
Expand Down
16 changes: 5 additions & 11 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#
# Questions ?
# ~> https://minicomp.github.io/wiki/#/
# ~> https://gitter.im/minicomp/wax/
#
# ---------------------------------------------------------------
# MAIN SETTINGS
Expand All @@ -22,8 +21,9 @@ title: 'Wax'
description: 'Minimal Exhibitions with Jekyll'
url: 'https://minicomp.github.io'
baseurl: '/wax'
copyright: 'Example copyright org, 2019'
copyright: 'Example copyright org, 2023'
logo: '/assets/logo.png'
default_thumb: '/assets/default.png'

# ---------------------------------------------------------------
# BUILD SETTINGS
Expand All @@ -33,13 +33,7 @@ logo: '/assets/logo.png'
permalink: 'pretty'
sass:
style: compressed
exclude:
- Gemfile*
- Rakefile
- vendor
- spec
- README.md
incremental: true
exclude: ["Gemfile*", "*.gemspec", "Rakefile", "vendor", "spec", "README.md", "LICENSE.txt", "Docker*"]
webrick:
headers:
'Access-Control-Allow-Origin': '*'
Expand Down Expand Up @@ -137,8 +131,8 @@ footer:
link: 'https://github.com/minicomp/wax'
- label: 'Credits'
link: '/credits'
- label: 'Contact'
link: 'https://gitter.im/minicomp/wax/'
- label: 'Wiki'
link: 'https://minicomp.github.io/wiki/wax/'
logos:
- img: '/img/logo.png'

Expand Down
4 changes: 2 additions & 2 deletions _exhibits/a.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Ut eleifend lacus at erat efficitur bibendum. Ut laoreet elit nec dolor molestie
Nam velit leo, mattis ac dui non, vulputate porttitor sapien. Praesent in aliquet dui. Nulla facilisi. Maecenas nulla ex, facilisis non aliquet ac, ultrices eu sem. Sed vel aliquet urna. Mauris quis ex at lectus iaculis elementum id id massa. Integer luctus nulla vel tellus rutrum, ac pulvinar erat finibus. Aliquam erat volutpat. Pellentesque vel velit sit amet mauris dignissim feugiat.


{% include parallax_image.html collection='qatar' pid='obj12' y='50%' %}
{% include parallax_image.html collection='qatar' pid='obj12' y='50%' clickable='true' %}


Duis commodo ligula libero, a pharetra ligula posuere sit amet. Sed ipsum dolor, elementum eget nisl eget, sagittis vestibulum augue. Donec tincidunt mauris et nunc sagittis, nec consectetur lorem tristique. Nulla tincidunt magna ut ullamcorper consectetur. Nulla mi urna, feugiat sed massa non, ullamcorper efficitur dolor.[^2] Sed luctus, massa eget pharetra posuere, nibh sem eleifend lectus, lobortis molestie ante libero non metus. Aenean et est sit amet est pulvinar convallis vel non tortor. Nunc semper commodo fringilla. Proin eget metus eget felis faucibus aliquet. Cras ultrices turpis id nibh cursus fringilla. Aenean nec magna turpis. Suspendisse egestas tellus iaculis ante pharetra imperdiet ac at odio.
Expand All @@ -26,4 +26,4 @@ Duis finibus leo non velit viverra tincidunt. Fusce efficitur laoreet convallis.

[^1]: Integer eu augue elementum, venenatis nisi vitae, ultrices magna. Nunc accumsan sem quis tristique iaculis. Quisque sed lorem tortor.

[^2]: Nunc semper commodo fringilla. Proin eget metus eget felis faucibus aliquet. Cras ultrices turpis id nibh cursus fringilla. Aenean nec magna turpis. Suspendisse egestas tellus iaculis ante pharetra imperdiet ac at odio.
[^2]: Nunc semper commodo fringilla. Proin eget metus eget felis faucibus aliquet. Cras ultrices turpis id nibh cursus fringilla. Aenean nec magna turpis. Suspendisse egestas tellus iaculis ante pharetra imperdiet ac at odio.
2 changes: 1 addition & 1 deletion _exhibits/b.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Ut eleifend lacus at erat efficitur bibendum. Ut laoreet elit nec dolor molestie

Nam velit leo, mattis ac dui non, vulputate porttitor sapien. Praesent in aliquet dui. Nulla facilisi. Maecenas nulla ex, facilisis non aliquet ac, ultrices eu sem. Sed vel aliquet urna. Mauris quis ex at lectus iaculis elementum id id massa. Integer luctus nulla vel tellus rutrum, ac pulvinar erat finibus. Aliquam erat volutpat. Pellentesque vel velit sit amet mauris dignissim feugiat.

{% include inline_image.html collection='qatar' pid='obj7' %}
{% include inline_image.html collection='qatar' pid='obj7' clickable='true' %}

Duis commodo ligula libero, a pharetra ligula posuere sit amet. Sed ipsum dolor, elementum eget nisl eget, sagittis vestibulum augue. Donec tincidunt mauris et nunc sagittis, nec consectetur lorem tristique. Nulla tincidunt magna ut ullamcorper consectetur. Nulla mi urna, feugiat sed massa non, ullamcorper efficitur dolor. Sed luctus, massa eget pharetra posuere, nibh sem eleifend lectus, lobortis molestie ante libero non metus. Aenean et est sit amet est pulvinar convallis vel non tortor. Nunc semper commodo fringilla. Proin eget metus eget felis faucibus aliquet. Cras ultrices turpis id nibh cursus fringilla. Aenean nec magna turpis. Suspendisse egestas tellus iaculis ante pharetra imperdiet ac at odio.

Expand Down
64 changes: 38 additions & 26 deletions _includes/collection_gallery.html
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 %}
2 changes: 2 additions & 0 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<p class='footer-title'>{{ site.title }}</p>
<p class='footer-description'>{{ site.description }}</p>
<p class='footer-copyright'>
{% if site.copyright.size > 0 %}
&copy; {{ site.copyright }}<br>
{% endif %}
Built with <a href='https://github.com/minicomp/wax/'>Minicomp/Wax</a>
</p>
</div>
Expand Down
12 changes: 10 additions & 2 deletions _includes/parallax_image.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,22 @@
{%- capture style -%}
background-image: url('{{ image | absolute_url }}');
background-position: 0% {{ include.y | default: '15%' }};

{% if include.clickable %}
cursor: pointer;
{% endif %}
{% if include.height %}
height: {{ include.height }} !important;
{% endif %}
{%- endcapture -%}

{%- capture onclick -%}
{% if include.clickable %}
onclick="window.location='{{ item.url | absolute_url }}'; return false;"
{% endif %}
{%- endcapture -%}

<div class='wax-parallax full-width {% if page.banner %}top-banner{% else %}inline-parallax{% endif %}'>
<div class='parallax-image' style="{{ style | strip }}"></div>
<div class='parallax-image' style="{{ style | strip }}" {{ onclick | strip }}></div>

{% if item.label %}
<div class='parallax-caption'>
Expand Down
41 changes: 36 additions & 5 deletions _includes/simple_image_viewer.html
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>
3 changes: 1 addition & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

{% if page.banner %}
{% assign b = page.banner %}
{% include parallax_image.html collection=b.collection pid=b.pid y=b.y height=b.height image=b.image %}
{% include parallax_image.html collection=b.collection pid=b.pid y=b.y height=b.height image=b.image clickable=b.clickable %}
{% endif %}

<div id='wax-main'>
Expand All @@ -18,7 +18,6 @@
</div>

{% include footer.html %}

<script type='text/javascript' async defer src='{{ "/assets/bootstrap/bootstrap.min.js" | absolute_url }}'></script>
<script type='text/javascript' async defer src='{{ "/assets/popper.min.js" | absolute_url }}'></script>
</body>
Expand Down
Loading

0 comments on commit 44c99d6

Please sign in to comment.