wax_theme 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 516a59cfab9cee3da58ed4cfc82630e5ee7bdb5a66cede77cee0badf808ac585
4
- data.tar.gz: 35f97e51d47292e9f99060373c7894c5073b05e10edea7e9dc8d5b815ee91c37
3
+ metadata.gz: a6779ec1f783cc81ba21e34042f3a7cd5d550f2ef756f4ce1e8fd171deaf881f
4
+ data.tar.gz: 3b64cc64525e2426f26c1a8651962fca580eae788ef533135029e1f442a4d391
5
5
  SHA512:
6
- metadata.gz: 78557a185755d0fba96104485708437ef3525fb4fdc2a65a34227fe5e8d2e136105914bd5440b65346764327a412671dff81bc97057d142067f0ba859d7a30ae
7
- data.tar.gz: d590934c69b0a4c5ecfe66fbbea2abf7f3ae9835c859bb79ab8bfaf093f478d84126438c3f6ac595e0bc89b95e7630689f3316ded1046a893147fa888773c020
6
+ metadata.gz: 90a960b9eb0a8a138378da5c926a25d6b44fc6d3a005eca6b87cc22e7e975006531085e96bac9617436f8e1f42bc2cf5d64b0226abee8c2b0235a4f0a452dba2
7
+ data.tar.gz: 02c8c9f66da3bc63eefbc89209273e49fed2c9c38b458df57c3178d9a449ccc1a710ec37b95af81e8aeb179bf1e78299a009608fe0dcd83c0ce01b3811ad906c
data/README.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # minicomp/wax 🐝
2
- [![Gem Version](https://badge.fury.io/rb/wax_theme.svg)](https://badge.fury.io/rb/wax_tasks) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![Build Status](https://travis-ci.org/mnyrop/wax.svg?branch=master)](https://travis-ci.org/minicomp/wax) [![Gem Downloads](https://img.shields.io/gem/dt/wax_theme.svg?color=046d0b)](https://badge.fury.io/rb/wax_theme) [![Join the chat at https://gitter.im/minicomp/wax](https://badges.gitter.im/minicomp/wax.svg)](https://gitter.im/minicomp/wax?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ![License](https://img.shields.io/github/license/minicomp/wax_tasks.svg?color=c6a1e0)
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/wax_theme.svg)](https://badge.fury.io/rb/wax_tasks)
4
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
5
+ [![CI:Test](https://github.com/minicomp/wax/workflows/ci:test/badge.svg)](https://github.com/minicomp/wax/actions?query=workflow%3Aci%3Atest)
6
+ [![Depfu](https://badges.depfu.com/badges/9d4da973f2cd2680c11ca34738c2dfb2/overview.svg)](https://depfu.com/github/minicomp/wax?project_id=10550)
7
+ [![Gem Downloads](https://img.shields.io/gem/dt/wax_theme.svg?color=046d0b)](https://badge.fury.io/rb/wax_theme)
8
+ [![Join the chat the minicomp-wax channel of the Code4Lib Slack](https://img.shields.io/badge/Slack-%23minicomp--wax-brightgreen.svg)](https://docs.google.com/forms/d/e/1FAIpQLSeD77mBp0Y13mFePF8UmDwFrlbxNx3VttEjz_3dgglJeK-Zbg/viewform?c=0&w=1)
9
+ ![License](https://img.shields.io/github/license/minicomp/wax_tasks.svg?color=c6a1e0)
3
10
 
4
11
 
5
12
 
@@ -11,11 +18,13 @@ It's comprised of: __a few Ruby gems__ for processing image data and associated
11
18
 
12
19
  - [Prerequisites](#Prerequisites)
13
20
  - [Getting Started](#Getting-Started)
21
+ - [Using Docker](#Using-Docker)
22
+ - [Contributing](#Contributing)
14
23
 
15
24
  <br>
16
25
 
17
26
  <a href="https://minicomp.github.io/wax/">
18
- <img src="https://raw.githubusercontent.com/minicomp/wiki/master/assets/wax_screen.gif"/>
27
+ <img src="https://raw.githubusercontent.com/minicomp/wiki/main/src/assets/wax_screen.gif?raw=true"/>
19
28
  </a>
20
29
 
21
30
  <br>
@@ -23,77 +32,100 @@ It's comprised of: __a few Ruby gems__ for processing image data and associated
23
32
  # Prerequisites
24
33
 
25
34
 
26
- You'll need `Ruby >= 2.4` with `bundler` installed. Check your versions with:
35
+ You'll need `git` and `ruby >= 3.2` with `bundler` installed.
36
+ 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/).
37
+
38
+ Check your versions with:
27
39
 
28
- ```bash
29
- $ ruby -v
30
- ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-darwin18]
40
+ ```sh
41
+ ruby -v
42
+ ```
31
43
 
32
- $ bundler -v
33
- Bundler version 2.0.1
44
+ ``` sh
45
+ bundler -v
34
46
  ```
35
47
 
36
48
  To process images, you will also need to have ImageMagick and Ghostscript installed and functional. You can check to see if you have ImageMagick by running:
37
49
 
38
- ```bash
39
- $ convert -version
40
- Version: ImageMagick 6.9.9-20 Q16 x86_64 2017-10-15 http://www.imagemagick.org
41
- Copyright: (c) 1999-2017 ImageMagick Studio LLC
50
+ ```sh
51
+ convert -version
42
52
  ```
43
53
 
44
54
  ... and check Ghostscript with:
45
- ```bash
46
- $ gs -version
47
- GPL Ghostscript 9.21 (2017-03-16)
48
- Copyright (C) 2017 Artifex Software, Inc. All rights reserved.
55
+ ``` sh
56
+ gs -version
49
57
  ```
50
58
 
59
+ Vips will soon replace ImageMagick for Wax's image processing. If you're ahead of the curve, you can check your version with
60
+
61
+ ``` sh
62
+ vips -v
63
+ ```
51
64
 
52
65
  # Getting Started
53
66
 
54
- __There are a few ways to get started with Wax, depending on your needs.__ Cloning the demo is suggested for new users so you can see how a full Wax site would work. __Advanced Jekyllers__ can start from a clean Jekyll install.
55
-
56
- ### Option 1: Clone the demo
57
-
58
- 1. Change directory into where you'd like your site, e.g., your Desktop:
59
- ```sh
60
- cd ~/Desktop
61
- ```
62
- 2. Clone this repository
63
- ```sh
64
- git clone https://github.com/minicomp/wax.git
65
- ```
66
- 3. Change directory into the site repository and install the dependencies:
67
- ```sh
68
- cd wax
69
- bundle install
70
- ```
71
- 4. Serve the site locally
72
- ```sh
73
- bundle exec jekyll serve
74
- ```
75
- #### Option 2: Start from scratch (Advanced)
76
-
77
- 1. Make a new Jekyll site and cd into it:
67
+ __There are a few ways to get started with Wax, depending on your needs.__ Copyin the demo template is suggested for new users so you can see how a full Wax site would work. __Advanced Jekyllers__ can start from a clean Jekyll install. To start with the demo:
68
+
69
+ 1. Log into your [GitHub account](https://github.com/). (Or sign up if you don't have one!)
70
+
71
+ 2. Head to the [Wax demo page](https://github.com/) and click **"Use this Template"** button. It will prompt you to create a copy of the repository in your own account. You should name it after the collection or exhibition you'll make, since this name will inform your free URL for the project with GitHub. For this example, our repository is called **"my-wax-site"**.
72
+
73
+ 3. On your own, new Wax repository page, click the Green **"Code"** button and copy the URL it provides to your clipboard, e.g,
78
74
  ```sh
79
- jekyll new ~/Desktop/wax_site
80
- cd ~/Desktop/wax_site
75
+ git@github.com:mnyrop/my-wax-site.git
81
76
  ```
82
- 2. Add this line to your Jekyll site's Gemfile:
77
+
78
+ 4. Open your Terminal/Shell application and change directory into where you'd like to work on your project, e.g., your Desktop:
79
+ ```sh
80
+ cd ~/Desktop
81
+ ```
82
+
83
+ 5. Run the `git clone` command plus the link you copied on your clipboard in one line, e.g.,
83
84
  ```sh
84
- gem "wax_theme"
85
+ git clone git@github.com:mnyrop/my-wax-site.git
85
86
  ```
86
- 3. And add this line to your Jekyll site's \_config.yml:
87
+
88
+ 6. When the clone is complete, change directory into your newly cloned project folder, in our case:
87
89
  ```sh
88
- theme: wax_theme
90
+ cd my-wax-site
89
91
  ```
90
- 4. Install the dependencies:
92
+
93
+ 7. Install the project-specific Ruby dependencies by running the command
91
94
  ```sh
92
95
  bundle install
93
96
  ```
94
- 5. Serve the site locally
97
+
98
+ 8. Run the demo site:
95
99
  ```sh
96
100
  bundle exec jekyll serve
97
101
  ```
98
102
 
99
- When the demo site is serving correctly you're ready to swap in your own content and configuration to make your own exhibition site.
103
+ After the last step, the terminal will provide you with a localhost URL for you to see your local copy of the site on your browser. This is the template site you will make changes to in order to make your own exhibition. For more, check out the [Minicomp/Wax Wiki](https://minicomp.github.io/wiki/wax/).
104
+
105
+
106
+ # Using Docker
107
+
108
+ To use Wax in a container, make sure you are familiar with Docker and have [Docker installed](https://docs.docker.com/get-docker/).
109
+
110
+ Run the "Getting Started" steps 1-6 above to copy and `cd` into the repo.
111
+
112
+ Next, build the `minicomp/wax` base image:
113
+ ```
114
+ docker build -t minicomp/wax .
115
+ ```
116
+
117
+ You will run all of the Wax tasks and commands within an interactive bash container, which you can create and access by running:
118
+ ```
119
+ docker run -it --rm -v "$PWD":/wax --name wax -p 4000:4000 minicomp/wax bash
120
+ ```
121
+
122
+ To serve the site, you can run the following command in the guest container and view it in your host browser:
123
+ ```
124
+ bundle exec jekyll serve --host 0.0.0.0
125
+ ```
126
+
127
+ You can exit the container at any time with `$ exit`, which will automatically stop and remove the container.
128
+
129
+ # Contributing
130
+
131
+ We welcome contributions to Wax, including bug reports and feature requests (submitted as [Issues](https://github.com/minicomp/wax/issues)), code contributions (submitted as [Pull Requests](https://github.com/minicomp/wax/pulls)), and documentation updates (submitted however!) Not sure where to start? Feel free to get in touch via [GitHub issue](https://github.com/minicomp/wax/issues) or grab an invite to join the conversation on the `#minicomp-wax` channel of the [Code4Lib Slack](https://docs.google.com/forms/d/e/1FAIpQLSeD77mBp0Y13mFePF8UmDwFrlbxNx3VttEjz_3dgglJeK-Zbg/viewform?c=0&w=1).
@@ -1,42 +1,54 @@
1
1
  {% assign collection = site[include.collection] %}
2
+ {% assign undefined = include.undefined | default: 'undefined' %}
3
+ {% assign id = include.id | default: include | jsonify | slugify %}
2
4
 
3
- {% if include.only and include.facet_by %}
4
- {% assign subset = collection | where: include.facet_by, include.only %}
5
+ {% if include.only.size > 0 %}
6
+ {% assign subset = collection | where: include.facet_by, include.only | sort: 'order' %}
7
+ {% else %}
8
+ {% assign subset = nil %}
5
9
  {% endif %}
6
10
 
7
- <div id='wax-gallery-{{ include.collection }}-container' class='wax-gallery-container full-width'>
11
+ <div id='{{ id }}-container' class='wax-gallery-container full-width'>
8
12
  <div class='wax-inline-container'>
9
- <div id="{{ include.collection }}-facet-buttons" class="facet-buttons"></div>
10
- <div id="wax-gallery-{{ include.collection }}" class="wax-gallery"></div>
13
+ {% if include.facet_by %}
14
+ <div id="{{ id }}-facet-buttons" class="facet-buttons"></div>
15
+ {% endif %}
16
+ <div id="wax-gallery-{{ id }}" class="wax-gallery"></div>
11
17
  </div>
12
18
  </div>
13
19
 
20
+ {% if subset.size > 0 %}
21
+ <script type="text/javascript">
22
+ $( document ).ready(function() {
23
+ let container = $('#{{ id }}-container');
24
+ let gallery = $('#wax-gallery-{{ id }}');
25
+ let buttonDiv = $('#{{ id }}-facet-buttons');
14
26
 
15
- <script type="text/javascript">
16
- $( document ).ready(function() {
17
- var container = $('#wax-gallery-{{ include.collection }}-container');
18
- var gallery = $('#wax-gallery-{{ include.collection }}');
19
- var buttonDiv = $('#{{ include.collection }}-facet-buttons');
20
-
21
- {% if subset %}
22
27
  {% for item in subset %}
23
28
  {%- capture item_html -%}
24
- "<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>"
29
+ "<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>"
25
30
  {%- endcapture -%}
26
31
  gallery.append({{ item_html | strip_newlines }});
27
32
  {% endfor %}
28
- {% else %}
33
+ });
34
+ </script>
35
+ {% else %}
36
+ <script type="text/javascript">
37
+ $( document ).ready(function() {
38
+ let container = $('#{{ id }}-container');
39
+ let gallery = $('#wax-gallery-{{ id }}');
40
+ let buttonDiv = $('#{{ id }}-facet-buttons');
41
+
42
+
29
43
  {% for item in collection %}
30
44
  {%- capture item_html -%}
31
- "<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 }}'/><div class='overlay'><p class='info'>{{ item.label }}</p></div></div></a></div>"
45
+ "<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>"
32
46
  {%- endcapture -%}
33
47
  gallery.append({{ item_html | strip_newlines }});
34
48
  {% endfor %}
35
- {% endif %}
36
49
 
37
- {% if include.facet_by %}
38
- {% unless subset %}
39
- var facets = Array.from(new Set([{%- for item in collection -%}'{{ item[include.facet_by] | slugify }}'{% unless forloop.last %}, {% endunless %}{%- endfor -%}]));
50
+ {% if include.facet_by %}
51
+ var facets = Array.from(new Set([{%- for item in collection -%}'{{ item[include.facet_by] | default: undefined | slugify }}'{% unless forloop.last %}, {% endunless %}{%- endfor -%}]));
40
52
  buttonDiv.append("<button class='btn facet active' data-filter='all'>show all</button>");
41
53
 
42
54
  for (i in facets) {
@@ -44,15 +56,15 @@
44
56
  }
45
57
 
46
58
  $(document).ready(function(){
47
- $(".facet").click(function(){
59
+ $("#{{ id }}-container .facet").click(function(){
48
60
  var filterValue = $(this).attr('data-filter');
49
- $('.facet').removeClass('active');
61
+ $('#{{ id }}-container .facet').removeClass('active');
50
62
  $(this).addClass('active');
51
- if(filterValue == 'all') { $('.all').show('slow'); }
52
- else { $('.all').hide('slow'); $(`.${filterValue}`).show('slow'); }
63
+ if(filterValue == 'all') { $('#{{ id }}-container .all').show('slow'); }
64
+ else { $('#{{ id }}-container .all').hide('slow'); $(`.${filterValue}`).show('slow'); }
53
65
  });
54
66
  });
55
- {% endunless %}
56
- {% endif %}
57
- });
58
- </script>
67
+ {% endif %}
68
+ });
69
+ </script>
70
+ {% endif %}
@@ -5,7 +5,9 @@
5
5
  <p class='footer-title'>{{ site.title }}</p>
6
6
  <p class='footer-description'>{{ site.description }}</p>
7
7
  <p class='footer-copyright'>
8
+ {% if site.copyright.size > 0 %}
8
9
  &copy; {{ site.copyright }}<br>
10
+ {% endif %}
9
11
  Built with <a href='https://github.com/minicomp/wax/'>Minicomp/Wax</a>
10
12
  </p>
11
13
  </div>
data/_includes/head.html CHANGED
@@ -1,4 +1,5 @@
1
1
  <head>
2
+ <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
2
3
  <meta name="viewport" content="width=device-width, initial-scale=1">
3
4
  <title>
4
5
  {{ site.title }}{% if page.label %} | {{ page.label }}{% elsif page.title %} | {{ page.title }}{% endif %}
@@ -9,5 +10,4 @@
9
10
  <link rel='stylesheet' href="{{ '/assets/styles.css' | absolute_url }}"/>
10
11
 
11
12
  <script type='text/javascript' src="{{ '/assets/jquery-3.2.1.min.js' | absolute_url }}"></script>
12
- <noscript>Please enable JavaScript in your browser.</noscript>
13
13
  </head>
@@ -13,10 +13,10 @@
13
13
  {% for item in site.menu %}
14
14
  {% if item.sub %}
15
15
  <li class='nav-item dropdown'>
16
- <a class='nav-link dropdown-toggle' href='#' id='wax-{{ item.label }}-dropdown' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>
16
+ <a class='nav-link dropdown-toggle' href='#' id='wax-{{ item.label | slugify }}-dropdown' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>
17
17
  {{ item.label }}
18
18
  </a>
19
- <div class='dropdown-menu' aria-labelledby='wax-{{ item.label }}-dropdown'>
19
+ <div class='dropdown-menu' aria-labelledby='wax-{{ item.label | slugify }}-dropdown'>
20
20
  {% for sub in item.sub %}
21
21
  <a class='dropdown-item' href='{{ sub.link | absolute_url }}'>{{ sub.label }}</a>
22
22
  {% endfor %}
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div class='inline-image-reference'>
4
4
  <a href='{{ item.url | absolute_url }}'>
5
- <img src='{{ item.full | absolute_url }}'/>
5
+ <img src='{{ item.full | absolute_url }}' alt="{{ item.label | escape }}"/>
6
6
  </a>
7
7
  {% if item.label %}
8
8
  <p class='image-caption'>
@@ -7,20 +7,25 @@
7
7
  {% assign value = item.value %}
8
8
  {% endif %}
9
9
 
10
- {% if item.type == 'link' %}
11
- {% if key == 'manifest' %}
12
- {%- capture value -%}
13
- <a href="{{ value | absolute_url }}" target="_blank" rel="noreferrer">{{ value | absolute_url }}</a>
14
- {%- endcapture -%}
15
- {% else %}
16
- {%- capture value -%}
17
- <a href="{{ value | absolute_url }}" target="_blank" rel="noreferrer">
18
- {{ value | absolute_url | remove: 'https://' | remove: 'http://' | split: "/" | first }}
19
- </a>
20
- {%- endcapture -%}
10
+ {% comment %}
11
+ Only display non-empty values
12
+ {% endcomment %}
13
+ {% if value | strip != '' %}
14
+ {% if item.type == 'link' %}
15
+ {% if key == 'manifest' %}
16
+ {%- capture value -%}
17
+ <a href="{{ value | absolute_url }}" target="_blank" rel="noreferrer">{{ value | absolute_url }}</a>
18
+ {%- endcapture -%}
19
+ {% else %}
20
+ {%- capture value -%}
21
+ <a href="{{ value | absolute_url }}" target="_blank" rel="noreferrer">
22
+ {{ value | absolute_url | remove: 'https://' | remove: 'http://' | split: "/" | first }}
23
+ </a>
24
+ {%- endcapture -%}
25
+ {% endif %}
21
26
  {% endif %}
27
+ <dt>{{ item.label }}</dt>
28
+ <dd>{{ value | strip }}</dd>
22
29
  {% endif %}
23
- <dt>{{ item.label }}</dt>
24
- <dd>{{ value | strip }}</dd>
25
30
  {% endfor %}
26
31
  </dl>
@@ -1,21 +1,24 @@
1
1
  <div id="osd" class="image-viewer"></div>
2
- <script async defer src="{{ '/assets/openseadragon/openseadragon.min.js' | absolute_url }}"></script>
2
+ <script defer src="{{ '/assets/openseadragon/openseadragon.min.js' | absolute_url }}"></script>
3
3
 
4
4
  <script>
5
5
  $(document).ready(function () {
6
6
  var manifestUrl = "{{ include.manifest | absolute_url }}";
7
7
  $.getJSON(manifestUrl, function(data) {
8
8
  var tileSources = [];
9
- $.each(data.sequences[0].canvases, function(k, val) {
10
- tileSources.push(val.images[0].resource.service['@id'] + '/info.json');
9
+ $.each(data.sequences[0].canvases, function(_k, val) {
10
+ tileSources.push({
11
+ tileSource: val.images[0].resource.service['@id'] + '/info.json',
12
+ referenceStripThumbnailUrl: val.thumbnail
13
+ });
11
14
  });
12
15
  OpenSeadragon({
13
16
  id: "osd",
17
+ preload: true,
14
18
  sequenceMode: true,
15
19
  prefixUrl: "{{ '/assets/openseadragon/images/' | absolute_url }}",
16
20
  tileSources: tileSources,
17
- homeFillsViewer: false,
18
- showReferenceStrip: true
21
+ showReferenceStrip: true,
19
22
  });
20
23
  });
21
24
  });
@@ -1,5 +1,5 @@
1
1
  {% if include.image %}
2
- {% assign image = image %}
2
+ {% assign image = include.image %}
3
3
  {% else %}
4
4
  {% assign item = site[include.collection] | where: 'pid', include.pid | first %}
5
5
  {% assign image = item.full %}
@@ -8,14 +8,22 @@
8
8
  {%- capture style -%}
9
9
  background-image: url('{{ image | absolute_url }}');
10
10
  background-position: 0% {{ include.y | default: '15%' }};
11
-
11
+ {% if include.clickable %}
12
+ cursor: pointer;
13
+ {% endif %}
12
14
  {% if include.height %}
13
15
  height: {{ include.height }} !important;
14
16
  {% endif %}
15
17
  {%- endcapture -%}
16
18
 
19
+ {%- capture onclick -%}
20
+ {% if include.clickable %}
21
+ onclick="window.location='{{ item.url | absolute_url }}'; return false;"
22
+ {% endif %}
23
+ {%- endcapture -%}
24
+
17
25
  <div class='wax-parallax full-width {% if page.banner %}top-banner{% else %}inline-parallax{% endif %}'>
18
- <div class='parallax-image' style="{{ style | strip }}"></div>
26
+ <div class='parallax-image' style="{{ style | strip }}" {{ onclick | strip }}></div>
19
27
 
20
28
  {% if item.label %}
21
29
  <div class='parallax-caption'>
@@ -1,5 +1,36 @@
1
- <div class='image-viewer'>
2
- <a href='{{ include.full_image | absolute_url }}'>
3
- <img class='item-full-image' src='{{ include.full_image | absolute_url }}' alt='{{ page.label | slugify }}'/>
4
- </a>
5
- </div>
1
+ <div id="osd" class="image-viewer"></div>
2
+ <script defer src="{{ '/assets/openseadragon/openseadragon.min.js' | absolute_url }}"></script>
3
+
4
+ <script>
5
+ $(document).ready(function () {
6
+ OpenSeadragon({
7
+ id: "osd",
8
+ preload: true,
9
+ showNavigationControl: false,
10
+ panHorizontal: false,
11
+ defaultZoomLevel: 0,
12
+ zoomPerScroll: 1,
13
+ prefixUrl: "{{ '/assets/openseadragon/images/' | absolute_url }}",
14
+ {% if page.img_list.size > 1 %}
15
+ sequenceMode: true,
16
+ showReferenceStrip: true,
17
+ tileSources: [
18
+ {% for img in page.img_list %}
19
+ {
20
+ type: 'image',
21
+ url: '{{ img.full | absolute_url }}',
22
+ referenceStripThumbnailUrl: '{{ img.thumbnail | absolute_url }}',
23
+ buildPyramid: false
24
+ }{% unless forloop.last %}, {% endunless %}
25
+ {% endfor %}
26
+ ]
27
+ {% else %}
28
+ tileSources: {
29
+ type: 'image',
30
+ url: '{{ page.full | absolute_url}}',
31
+ buildPyramid: false
32
+ },
33
+ {% endif %}
34
+ });
35
+ });
36
+ </script>
@@ -8,7 +8,7 @@
8
8
 
9
9
  {% if page.banner %}
10
10
  {% assign b = page.banner %}
11
- {% include parallax_image.html collection=b.collection pid=b.pid y=b.y height=b.height %}
11
+ {% include parallax_image.html collection=b.collection pid=b.pid y=b.y height=b.height image=b.image clickable=b.clickable %}
12
12
  {% endif %}
13
13
 
14
14
  <div id='wax-main'>
@@ -18,8 +18,7 @@
18
18
  </div>
19
19
 
20
20
  {% include footer.html %}
21
+ <script type='text/javascript' async defer src='{{ "/assets/bootstrap/bootstrap.min.js" | absolute_url }}'></script>
22
+ <script type='text/javascript' async defer src='{{ "/assets/popper.min.js" | absolute_url }}'></script>
21
23
  </body>
22
-
23
- <script type='text/javascript' async defer src='{{ "/assets/bootstrap/bootstrap.min.js" | absolute_url }}'></script>
24
- <script type='text/javascript' async defer src='{{ "/assets/popper.min.js" | absolute_url }}'></script>
25
24
  </html>
@@ -6,26 +6,19 @@ layout: default
6
6
  The block below controls the image viewer
7
7
  {% endcomment %}
8
8
 
9
- <h3 alt="{{ page.label }}" class='item-label'>{{ page.label }}</h3>
10
-
11
- {% if page.image_viewer %}
12
- {% assign viewer = page.image_viewer %}
13
- {% elsif layout.image_viewer %}
14
- {% assign viewer = layout.image_viewer %}
15
- {% endif %}
16
-
17
- {% if viewer %}
9
+ <h3 alt="{{ page.label | escape }}" class='item-label'>{{ page.label }}</h3>
18
10
  <div class='item-view'>
19
11
  <span class='pagination-link' id='prevlink'></span>
20
- {% if viewer == 'openseadragon' %}
21
- {% include osd_iiif_image_viewer.html manifest=page.manifest prevlink=prevlink nextlink=nextlink %}
22
- {% else %}
23
- {% include simple_image_viewer.html full_image=page.full prevlink=prevlink nextlink=nextlink %}
12
+
13
+ {% if page.manifest.size > 0 %}
14
+ {% include osd_iiif_image_viewer.html manifest=page.manifest %}
15
+ {% elsif page.full.size > 0 %}
16
+ {% include simple_image_viewer.html full_image=page.full %}
24
17
  {% endif %}
18
+
25
19
  <span class='pagination-link' id='nextlink'></span>
26
20
  </div>
27
21
  {% unless layout.pagination == false %}{% include item_pagination.html %}{% endunless %}
28
- {% endif %}
29
22
 
30
23
  {% comment %}
31
24
  The block below controls the item metadata table
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  layout: generic_collection_item
3
- image_viewer: 'openseadragon'
4
3
  pagination: true
5
4
  meta:
6
5
  - label: 'Label'
data/_sass/_wax.scss CHANGED
@@ -334,6 +334,7 @@ item pages (iiif + metadata)
334
334
 
335
335
  .item-full-image {
336
336
  max-width: $max-width;
337
+ max-height: 100%;
337
338
  height: $viewer-height;
338
339
  }
339
340
  }
@@ -439,7 +440,6 @@ search box
439
440
  }
440
441
  .wax-gallery {
441
442
  margin: $margin auto;
442
- min-height: 30vh;
443
443
  display: flex;
444
444
  flex-wrap: wrap;
445
445
  justify-content: flex-start;
@@ -500,7 +500,7 @@ search box
500
500
  display: table-cell;
501
501
  padding: .4rem;
502
502
  vertical-align: center;
503
- }
503
+ }
504
504
 
505
505
  // .info {
506
506
  // text-decoration: none;
Binary file
data/assets/search-ui.js CHANGED
@@ -1,5 +1,10 @@
1
+ ---
2
+ ---
3
+ DEFAULT = "{{ site.default_thumb }}";
4
+
1
5
  // Methods and jQuery UI for Wax search box
2
6
  function excerptedString(str) {
7
+ str = str || ''; // handle null > string
3
8
  if (str.length < 40) {
4
9
  return str;
5
10
  }
@@ -9,18 +14,18 @@ function excerptedString(str) {
9
14
  }
10
15
 
11
16
  function getThumbnail(item, url) {
12
- if ('thumbnail' in item) {
17
+ if (item.thumbnail) {
13
18
  return `<img class='sq-thumb-sm' src='${url}${item.thumbnail}'/>&nbsp;&nbsp;&nbsp;`
14
19
  }
15
20
  else {
16
- return '';
21
+ return `<img class='sq-thumb-sm' src='${url}${DEFAULT}'/>&nbsp;&nbsp;&nbsp;`
17
22
  }
18
23
  }
19
24
 
20
25
  function displayResult(item, fields, url) {
21
26
  var pid = item.pid;
22
27
  var label = item.label || 'Untitled';
23
- var link = item.permalink;
28
+ var link = item.permalink.toLowerCase();
24
29
  var thumb = getThumbnail(item, url);
25
30
  var meta = []
26
31
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wax_theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mnyrop
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-05 00:00:00.000000000 Z
11
+ date: 2023-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -16,79 +16,59 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.8'
19
+ version: 4.3.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.8'
26
+ version: 4.3.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: wax_tasks
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 1.0.1
34
- - - "<"
31
+ - - "~>"
35
32
  - !ruby/object:Gem::Version
36
33
  version: '1.1'
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: 1.0.1
44
- - - "<"
45
- - !ruby/object:Gem::Version
46
- version: '1.1'
47
- - !ruby/object:Gem::Dependency
48
- name: bundler
49
- requirement: !ruby/object:Gem::Requirement
50
37
  requirements:
51
38
  - - "~>"
52
39
  - !ruby/object:Gem::Version
53
- version: '2.0'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '2.0'
40
+ version: '1.1'
61
41
  - !ruby/object:Gem::Dependency
62
- name: rake
42
+ name: webrick
63
43
  requirement: !ruby/object:Gem::Requirement
64
44
  requirements:
65
45
  - - "~>"
66
46
  - !ruby/object:Gem::Version
67
- version: '12.0'
68
- type: :development
47
+ version: '1.8'
48
+ type: :runtime
69
49
  prerelease: false
70
50
  version_requirements: !ruby/object:Gem::Requirement
71
51
  requirements:
72
52
  - - "~>"
73
53
  - !ruby/object:Gem::Version
74
- version: '12.0'
54
+ version: '1.8'
75
55
  - !ruby/object:Gem::Dependency
76
56
  name: html-proofer
77
57
  requirement: !ruby/object:Gem::Requirement
78
58
  requirements:
79
59
  - - "~>"
80
60
  - !ruby/object:Gem::Version
81
- version: '3.10'
61
+ version: '3.15'
82
62
  type: :development
83
63
  prerelease: false
84
64
  version_requirements: !ruby/object:Gem::Requirement
85
65
  requirements:
86
66
  - - "~>"
87
67
  - !ruby/object:Gem::Version
88
- version: '3.10'
89
- description:
68
+ version: '3.15'
69
+ description:
90
70
  email:
91
- - m.nyrop@columbia.edu
71
+ - marii@nyu.edu
92
72
  executables: []
93
73
  extensions: []
94
74
  extra_rdoc_files: []
@@ -118,6 +98,7 @@ files:
118
98
  - assets/bootstrap/bootstrap.min.js.map
119
99
  - assets/datatables/datatables.css
120
100
  - assets/datatables/datatables.min.js
101
+ - assets/default.png
121
102
  - assets/elasticlunr.min.js
122
103
  - assets/jquery-3.2.1.min.js
123
104
  - assets/openseadragon/alt-buttons/fullpage_grouphover.png
@@ -201,7 +182,7 @@ homepage: https://github.com/minicomp/wax
201
182
  licenses:
202
183
  - MIT
203
184
  metadata: {}
204
- post_install_message:
185
+ post_install_message:
205
186
  rdoc_options: []
206
187
  require_paths:
207
188
  - lib
@@ -216,9 +197,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
197
  - !ruby/object:Gem::Version
217
198
  version: '0'
218
199
  requirements: []
219
- rubyforge_project:
220
- rubygems_version: 2.7.6
221
- signing_key:
200
+ rubygems_version: 3.4.17
201
+ signing_key:
222
202
  specification_version: 4
223
203
  summary: Jekyll gem theme for Minicomp/Wax
224
204
  test_files: []