@thegetty/quire-cli 0.20.1 → 0.20.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/bin/.DS_Store +0 -0
  3. package/bin/go-iiif/.DS_Store +0 -0
  4. package/bin/index.js +1 -1
  5. package/bin/starters/.DS_Store +0 -0
  6. package/bin/starters/default/.gitignore +14 -0
  7. package/bin/starters/default/config/_default/config.yml +53 -0
  8. package/bin/starters/default/config/development/config.yml +14 -0
  9. package/bin/themes/default/.gitignore +13 -0
  10. package/bin/themes/default/layouts/contents/single.html +2 -2
  11. package/bin/themes/default/layouts/data/search-index.html +1 -1
  12. package/bin/themes/default/layouts/partials/cite-this.html +2 -2
  13. package/bin/themes/default/layouts/partials/contents-list/closing-tags.html +10 -3
  14. package/bin/themes/default/layouts/partials/contents-list/contents-list.html +24 -9
  15. package/bin/themes/default/layouts/partials/contents-list/file-dir.html +7 -0
  16. package/bin/themes/default/layouts/partials/contents-list/file-path.html +10 -0
  17. package/bin/themes/default/layouts/partials/contents-list.html +207 -0
  18. package/bin/themes/default/layouts/partials/figure-caption.html +1 -0
  19. package/bin/themes/default/layouts/partials/figure-fallback.html +31 -0
  20. package/bin/themes/default/layouts/partials/figure-image.html +44 -0
  21. package/bin/themes/default/layouts/partials/figure-label.html +15 -0
  22. package/bin/themes/default/layouts/partials/figure-soundcloud.html +25 -0
  23. package/bin/themes/default/layouts/partials/figure-table.html +44 -0
  24. package/bin/themes/default/layouts/partials/figure-vimeo.html +24 -0
  25. package/bin/themes/default/layouts/partials/figure-website.html +21 -0
  26. package/bin/themes/default/layouts/partials/figure-youtube.html +23 -0
  27. package/bin/themes/default/layouts/partials/figures/media-types/vimeo.html +3 -1
  28. package/bin/themes/default/layouts/partials/menu.html +1 -1
  29. package/bin/themes/default/layouts/partials/page-bibliography.html +1 -1
  30. package/bin/themes/default/layouts/shortcodes/q-bibliography.html +8 -8
  31. package/bin/themes/default/layouts/shortcodes/q-figure-new.html +70 -0
  32. package/bin/themes/default/package-lock.json +13198 -0
  33. package/bin/themes/default/source/css/components/quire-contents-list.scss +22 -18
  34. package/bin/themes/default/source/css/print.scss +1 -1
  35. package/bin/themes/default/source/js/popup.js +14 -10
  36. package/bin/themes/default/static/img/icons/baseline-headset-24px.png +0 -0
  37. package/bin/themes/default/static/img/icons/baseline-videocam-24px.png +0 -0
  38. package/bin/themes/default/static/img/icons/baseline-website-24px.png +0 -0
  39. package/bin/themes/default/tests/.gitkeep +0 -0
  40. package/bin/themes/default/tests/e2e/.eslintrc.js +9 -0
  41. package/bin/themes/default/tests/e2e/fixtures/blns.json +483 -0
  42. package/bin/themes/default/tests/e2e/plugins/index.js +22 -0
  43. package/bin/themes/default/tests/e2e/specs/quire-contents.spec.js +52 -0
  44. package/bin/themes/default/tests/e2e/specs/quire-contributors.spec.js +66 -0
  45. package/bin/themes/default/tests/e2e/specs/quire-entry.spec.js +104 -0
  46. package/bin/themes/default/tests/e2e/specs/quire-essay.spec.js +105 -0
  47. package/bin/themes/default/tests/e2e/specs/quire-menu.spec.js +38 -0
  48. package/bin/themes/default/tests/e2e/specs/quire-modal.spec.js +69 -0
  49. package/bin/themes/default/tests/e2e/specs/quire-next-back-buttons.spec.js +27 -0
  50. package/bin/themes/default/tests/e2e/specs/quire-page.spec.js +28 -0
  51. package/bin/themes/default/tests/e2e/specs/quire-search.spec.js +48 -0
  52. package/bin/themes/default/tests/e2e/specs/quire-splash.spec.js +38 -0
  53. package/bin/themes/default/tests/e2e/support/commands.js +25 -0
  54. package/bin/themes/default/tests/e2e/support/index.js +20 -0
  55. package/package.json +1 -1
  56. package/bin/themes/default/static/css/application.css +0 -12072
  57. package/bin/themes/default/static/js/application.js +0 -92
@@ -0,0 +1,44 @@
1
+ {{- $imageDir := "" -}}
2
+ {{- if .Site.Params.imageDir -}}
3
+ {{- $imageDir = .Site.Params.imageDir -}}
4
+ {{- else }}
5
+ {{- $imageDir = "img" -}}
6
+ {{- end }}
7
+
8
+ {{- $tableSrc := printf "%s/%s/%s" "static" $imageDir .src -}}
9
+
10
+ {{- if eq .Site.Params.figureModal true -}}
11
+ {{- $now := now.UnixNano -}}
12
+ <figure
13
+ id="deepzoom-{{ $now }}"
14
+ title="{{ .caption | markdownify | safeHTML }}"
15
+ class="quire-figure leaflet-outer-wrapper mfp-hide notGet">
16
+ <div
17
+ id="js-deepzoomtable-{{ $now }}"
18
+ class="quire-deepzoom inset leaflet-inner-wrapper"
19
+ aria-live="polite"
20
+ role="application"
21
+ aria-label="Zoomable table">
22
+ <figure class="leaflet-table">{{ readFile $tableSrc | safeHTML }}</figure>
23
+ </div>
24
+ <span class="figure-caption visually-hidden">{{ with .caption }}{{ markdownify . }}{{ end }}{{ with .credit }} {{ markdownify . }}{{ end }}</span>
25
+ </figure>
26
+ <a
27
+ href="#deepzoom-{{ $now }}"
28
+ class="inline popup"
29
+ data-type="inline"
30
+ title="{{ .caption | markdownify | safeHTML }}" >
31
+ {{- end -}}
32
+
33
+ <figure class="quire-figure__table">
34
+ {{ readFile $tableSrc | safeHTML }}
35
+ </figure>
36
+
37
+ {{- if or .label (eq .Site.Params.figureModal true ) }}
38
+ {{- $labelDict := dict "Site" .Site "label" .label -}}
39
+ {{- partial "figure-label.html" $labelDict -}}
40
+ {{- end -}}
41
+
42
+ {{- if eq .Site.Params.figureModal true -}}
43
+ </a>
44
+ {{- end -}}
@@ -0,0 +1,24 @@
1
+ {{- if or (eq .Site.Params.epub true) (eq .Site.Params.pdf true) -}}
2
+
3
+ {{- $fallbackDict := dict "Site" .Site "alt" .alt "id" .id "mediaType" .mediaType "src" .src -}}
4
+ {{- partial "figure-fallback.html" $fallbackDict -}}
5
+
6
+ <figcaption class="quire-figure__caption caption"><a href="https://youtu.be/{{ .mediaId }}" target="_blank" >https://vimeo.com/{{ .mediaId }}</a></figcaption>
7
+
8
+ {{- else -}}
9
+
10
+ <div class="quire-figure__media-wrapper{{ if .aspectRatio }}--{{ .aspectRatio }}{{ else }}--widescreen{{ end }}">
11
+ <iframe
12
+ class="quire-figure__media"
13
+ src="https://player.vimeo.com/video/{{ .mediaId }}"
14
+ frameborder="0"
15
+ allow="autoplay; fullscreen"
16
+ allowfullscreen></iframe>
17
+ </div>
18
+
19
+ {{- end -}}
20
+
21
+ {{- if .label }}
22
+ {{- $labelDict := dict "Site" .Site "label" .label "icon" false -}}
23
+ {{- partial "figure-label.html" $labelDict -}}
24
+ {{- end -}}
@@ -0,0 +1,21 @@
1
+ {{- if or (eq .Site.Params.epub true) (eq .Site.Params.pdf true) -}}
2
+
3
+ {{- $fallbackDict := dict "Site" .Site "alt" .alt "id" .id "mediaType" .mediaType "src" .src -}}
4
+ {{- partial "figure-fallback.html" $fallbackDict -}}
5
+
6
+ <figcaption class="quire-figure__caption caption"><a href="{{ safeURL .mediaId }}" target="_blank" >{{ .mediaId }}</a></figcaption>
7
+
8
+ {{- else -}}
9
+
10
+ <div class="quire-figure__media-wrapper{{ if .aspectRatio }}--{{ .aspectRatio }}{{ else }}--widescreen{{ end }}">
11
+ <iframe class="quire-figure__media"
12
+ src="{{ safeURL .mediaId }}"></iframe>
13
+ </div>
14
+
15
+ {{- end -}}
16
+
17
+ {{- if .label }}
18
+ {{- $labelDict := dict "Site" .Site "label" .label "icon" false -}}
19
+ {{- partial "figure-label.html" $labelDict -}}
20
+ {{- end -}}
21
+
@@ -0,0 +1,23 @@
1
+ {{- if or (eq .Site.Params.epub true) (eq .Site.Params.pdf true) -}}
2
+
3
+ {{- $fallbackDict := dict "Site" .Site "alt" .alt "id" .id "mediaType" .mediaType "src" .src -}}
4
+ {{- partial "figure-fallback.html" $fallbackDict -}}
5
+
6
+ <figcaption class="quire-figure__caption caption"><a href="https://youtu.be/{{ .mediaId }}" target="_blank" >https://youtu.be/{{ .mediaId }}</a></figcaption>
7
+
8
+ {{- else -}}
9
+
10
+ <div class="quire-figure__media-wrapper{{ if .aspectRatio }}--{{ .aspectRatio }}{{ else }}--widescreen{{ end }}">
11
+ <iframe
12
+ class="quire-figure__media"
13
+ src="https://www.youtube-nocookie.com/embed/{{ .mediaId }}?rel=0&amp;showinfo=0"
14
+ frameborder="0"
15
+ allowfullscreen></iframe>
16
+ </div>
17
+
18
+ {{- end -}}
19
+
20
+ {{- if .label }}
21
+ {{- $labelDict := dict "Site" .Site "label" .label "icon" false -}}
22
+ {{- partial "figure-label.html" $labelDict -}}
23
+ {{- end -}}
@@ -8,12 +8,14 @@
8
8
 
9
9
  {{- else -}}
10
10
 
11
+ {{ $mediaIdEmbed := replace .mediaId "/" "?h=" }}
12
+
11
13
  <div
12
14
  class="quire-figure__media-wrapper{{ if .aspectRatio }}--{{ .aspectRatio }}{{ else }}--widescreen{{ end }}"
13
15
  >
14
16
  <iframe
15
17
  class="quire-figure__media"
16
- src="https://player.vimeo.com/video/{{ .mediaId }}"
18
+ src="https://player.vimeo.com/video/{{ $mediaIdEmbed }}"
17
19
  frameborder="0"
18
20
  allow="autoplay; fullscreen"
19
21
  allowfullscreen
@@ -4,7 +4,7 @@ available on all pages. For users with Javascript enabled, this menu is hidden
4
4
  by default. Users with JS disabled will alwasy see the menu in its expanded state.
5
5
  */}}
6
6
 
7
- {{- $contents := dict "site" .Site "contentsScope" .Site.Pages "contentsLocation" ".Params.menu" "contentsPage" . }}
7
+ {{- $contents := dict "site" .Site "contentsScope" "" "contentsLocation" ".Params.menu" "contentsPage" . }}
8
8
 
9
9
  <div class="quire-menu menu"
10
10
  role="banner"
@@ -28,7 +28,7 @@
28
28
  {{- end -}}
29
29
  {{- end -}}
30
30
 
31
- {{- $alphaOrder := $alphaOrder | truncate 100 | urlize -}}
31
+ {{- $alphaOrder := $alphaOrder | truncate 400 | urlize -}}
32
32
  {{- $.Page.Scratch.SetInMap "entry" "0" $short -}}
33
33
  {{- $.Page.Scratch.SetInMap "entry" "1" $full -}}
34
34
  {{- $entry := ($.Page.Scratch.GetSortedMapValues "entry") -}}
@@ -16,30 +16,30 @@
16
16
  {{- range $.Site.Data.references.entries -}}
17
17
 
18
18
  {{- $bibFull := .full -}}
19
-
19
+
20
20
  {{- $bibShort := "" -}}
21
21
  {{ if .short }}
22
22
  {{- $bibShort = .short -}}
23
23
  {{ else }}
24
24
  {{- $bibShort = .id -}}
25
25
  {{ end }}
26
-
26
+
27
27
  {{- $bibSort := "" -}}
28
28
  {{ if .sort }}
29
29
  {{- $bibSort = .sort -}}
30
30
  {{ else }}
31
31
  {{- $bibSort = .full -}}
32
- {{ end }}
33
- {{- $bibSort = $bibSort | truncate 100 | urlize -}}
34
-
32
+ {{ end }}
33
+ {{- $bibSort = $bibSort | truncate 400 | urlize -}}
34
+
35
35
  {{- $.Page.Scratch.SetInMap "ref" "0" $bibShort -}}
36
36
  {{- $.Page.Scratch.SetInMap "ref" "1" $bibFull -}}
37
37
  {{- $ref := ($.Page.Scratch.GetSortedMapValues "ref") -}}
38
- {{- $.Page.Scratch.SetInMap "biblio" $bibSort $ref -}}
38
+ {{- $.Page.Scratch.SetInMap "biblio" $bibSort $ref -}}
39
39
  {{- $.Page.Scratch.Delete "ref" -}}
40
-
40
+
41
41
  {{- end -}}
42
-
42
+
43
43
  {{- if ($.Page.Scratch.GetSortedMapValues "biblio") }}
44
44
  <div class="quire-page__content__references">
45
45
  {{- if eq .Site.Params.displayBiblioShort true }}
@@ -0,0 +1,70 @@
1
+ {{- $alt := "" -}}
2
+ {{- $aspectRatio := "" -}}
3
+ {{- $caption := "" -}}
4
+ {{- $credit := "" -}}
5
+ {{- $download := "" -}}
6
+ {{- $id := "" -}}
7
+ {{- $label := "" -}}
8
+ {{- $mediaId := "" -}}
9
+ {{- $mediaType := "" -}}
10
+ {{- $src := "" -}}
11
+
12
+ {{- if .Get "src" -}}
13
+
14
+ {{- with (.Get "alt") }}{{ $alt = . }}{{ end -}}
15
+ {{- with (.Get "aspect_ratio") }}{{ $aspectRatio = . }}{{ end -}}
16
+ {{- with (.Get "caption") }}{{ $caption = . }}{{ end -}}
17
+ {{- with (.Get "credit") }}{{ $credit = . }}{{ end -}}
18
+ {{- with (.Get "download") }}{{ $download = . }}{{ end -}}
19
+ {{- with (.Get "id") }}{{ $id = . }}{{ end -}}
20
+ {{- with (.Get "label") }}{{ $label = . }}{{ end -}}
21
+ {{- with (.Get "media_id") }}{{ $mediaId = . }}{{ end -}}
22
+ {{- with (.Get "media_type") }}{{ $mediaType = . }}{{ end -}}
23
+ {{- with (.Get "src") }}{{ $src = . }}{{ end -}}
24
+
25
+ {{- else if .Get "id" -}}
26
+
27
+ {{- range where .Site.Data.figures.figure_list "id" "eq" (.Get "id") -}}
28
+
29
+ {{- if ($.Get "alt") }}{{ $alt = ($.Get "alt") }}{{ else if .alt }}{{ $alt = .alt }}{{ end -}}
30
+ {{- with .aspect_ratio }}{{ $aspectRatio = . }}{{ end -}}
31
+ {{- if ($.Get "caption") }}{{ $caption = ($.Get "caption") }}{{ else if .caption }}{{ $caption = .caption }}{{ end -}}
32
+ {{- if ($.Get "credit") }}{{ $credit = ($.Get "credit") }}{{ else if .credit }}{{ $credit = .credit }}{{ end -}}
33
+ {{- with .download }}{{ $download = . }}{{ end -}}
34
+ {{- with .id }}{{ $id = . }}{{ end -}}
35
+ {{- if ($.Get "label") }}{{ $label = ($.Get "label") }}{{ else if .label }}{{ $label = .label }}{{ end -}}
36
+ {{- with .media_id }}{{ $mediaId = . }}{{ end -}}
37
+ {{- with .media_type }}{{ $mediaType = . }}{{ end -}}
38
+ {{- with .src }}{{ $src = . }}{{ end -}}
39
+
40
+ {{- end -}}
41
+
42
+ {{- else -}}
43
+
44
+ {{- end -}}
45
+
46
+ {{- $dict := dict "Site" .Site "alt" $alt "aspectRatio" $aspectRatio "caption" $caption "credit" $credit "download" $download "id" $id "label" $label "mediaId" $mediaId "mediaType" $mediaType "src" $src -}}
47
+
48
+ <figure data="q-figure"
49
+ class="quire-figure{{ with .Get "class" }} {{ . }}{{ end }}"
50
+ id="{{ $id }}">
51
+ <div class="q-figure__wrapper">
52
+
53
+ {{ if eq $mediaType "youtube" -}}
54
+ {{- partial "figure-youtube.html" $dict -}}
55
+ {{- else if eq $mediaType "vimeo" -}}
56
+ {{- partial "figure-vimeo.html" $dict -}}
57
+ {{- else if eq $mediaType "soundcloud" -}}
58
+ {{- partial "figure-soundcloud.html" $dict -}}
59
+ {{- else if eq $mediaType "website" -}}
60
+ {{- partial "figure-website.html" $dict -}}
61
+ {{- else if eq $mediaType "table" -}}
62
+ {{- partial "figure-table.html" $dict -}}
63
+ {{- else -}}
64
+ {{- partial "figure-image.html" $dict -}}
65
+ {{- end -}}
66
+
67
+ {{- partial "figure-caption.html" $dict -}}
68
+
69
+ </div>
70
+ </figure>