@iris.interactive/handcook 2.9.14 → 2.9.17

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.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Welcome to HandCook 👨‍🍳
2
- ![Version](https://img.shields.io/badge/version-2.9.14-blue.svg?cacheSeconds=2592000)
2
+ ![Version](https://img.shields.io/badge/version-2.9.17-blue.svg?cacheSeconds=2592000)
3
3
  ![Prerequisite](https://img.shields.io/badge/node-%3E%3D%2012.14.0-blue.svg)
4
4
  [![License: UNLICENSED](https://img.shields.io/badge/License-UNLICENSED-yellow.svg)](#)
5
5
  [![Twitter: captain\_iris](https://img.shields.io/twitter/follow/captain\_iris.svg?style=social)](https://twitter.com/captain\_iris)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iris.interactive/handcook",
3
- "version": "2.9.14",
3
+ "version": "2.9.17",
4
4
  "description": "The web cooking by IRIS Interactive",
5
5
  "main": "./public/scripts/index.js",
6
6
  "scripts": {
@@ -19,8 +19,6 @@ import ElementEnum from "../../enumerators/element.enum";
19
19
 
20
20
  export class HcLightbox {
21
21
 
22
- instance;
23
-
24
22
  constructor(elements = ElementEnum.lightbox, options = {}) {
25
23
  if ( elements === ElementEnum.lightbox ) {
26
24
  Object.assign(options, {
@@ -28,7 +26,17 @@ export class HcLightbox {
28
26
  });
29
27
  }
30
28
  Fancybox.bind(elements,options);
31
- this.instance = Fancybox.getInstance();
29
+
30
+ this.attachEventToShowButton();
31
+ }
32
+
33
+ attachEventToShowButton() {
34
+ document.querySelectorAll("[data-hc-lightbox-show]").forEach(trigger => {
35
+ trigger.addEventListener('click', (e) => {
36
+ e.preventDefault();
37
+ document.querySelector(trigger.getAttribute('href') + ' img').click();
38
+ });
39
+ })
32
40
  }
33
41
  }
34
42
 
@@ -42,7 +42,6 @@ export class HcPopin {
42
42
  //Close overlay
43
43
  let closeTriggerOverlay = document.querySelectorAll('[data-hc-popin-overlay-background]');
44
44
  closeTriggerOverlay[0].addEventListener('click', (e) => {
45
- e.preventDefault();
46
45
  const clickDetect = e.composedPath().includes(element)
47
46
  if (!clickDetect) {
48
47
  this.close(element);
@@ -127,9 +126,6 @@ export class HcPopin {
127
126
  parent.classList.remove('hc-popin-overlay-show');
128
127
  }
129
128
 
130
- console.log("dispatch event hide");
131
- console.log(this.hideEvent);
132
-
133
129
  document.dispatchEvent(this.hideEvent);
134
130
  }
135
131
 
@@ -495,6 +495,10 @@ $roadtrip-topbar-link-color-hover: var(--iris--roadtrip-topbar--color-link-hover
495
495
  /* Global SIT
496
496
  / ================================================== */
497
497
  $topbar-sit-height: 60px;
498
+ $detail-sit-title-font-size: var(--iris--detail-sit-title--font-size, $h2-font-size);
499
+ $detail-sit-title-font-size--rem: var(--iris--detail-sit-title--font-size--rem, $h2-font-size--rem);
500
+ $detail-sit-title-font-size-small: var(--iris--detail-sit-title--font-size--small, $h2-font-size-small);
501
+ $detail-sit-title-font-size-small--rem: var(--iris--detail-sit-title--font-size--small--rem, $h2-font-size-small--rem);
498
502
 
499
503
  /* Notifications
500
504
  / ================================================== */