@iris.interactive/handcook 2.10.34 → 2.10.36

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.10.34-blue.svg?cacheSeconds=2592000)
2
+ ![Version](https://img.shields.io/badge/version-2.10.35-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.10.34",
3
+ "version": "2.10.36",
4
4
  "description": "The web cooking by IRIS Interactive",
5
5
  "main": "./public/scripts/index.js",
6
6
  "scripts": {
@@ -9,7 +9,9 @@ export class HcScrollspy {
9
9
  document.querySelectorAll(elements).forEach(element => {
10
10
  const navElement = document.querySelector(element.dataset.hcScrollspy);
11
11
  const shift = element.getAttribute('data-hc-scrollspy-shift') !== null ? parseInt(element.getAttribute('data-hc-scrollspy-shift')) : 0;
12
- this.activeItem(navElement, ElementEnum.scrollSmooth, shift);
12
+ if (navElement !== null) {
13
+ this.activeItem(navElement, ElementEnum.scrollSmooth, shift);
14
+ }
13
15
  });
14
16
  }
15
17
 
@@ -135,6 +135,7 @@ export class HcSlider {
135
135
  el: '.hc-slider-pagination',
136
136
  type: 'bullets',
137
137
  clickable: true,
138
+ dynamicBullets: false,
138
139
  bulletClass: 'hc-slider-pagination-bullet',
139
140
  clickableClass: 'hc-slider-pagination-clickable',
140
141
  currentClass: 'hc-slider-pagination-current',
@@ -193,6 +194,10 @@ export class HcSlider {
193
194
  // et si les elements n'existent pas déjà
194
195
  if (this.options.pagination !== false) {
195
196
 
197
+ if(items.length >= 8 ){
198
+ this.options.pagination.dynamicBullets = true;
199
+ }
200
+
196
201
  const el = this.slider.querySelectorAll(this.options.pagination.el);
197
202
  if (el.length === 0) {
198
203
  const paginationElement = document.createElement("div");
@@ -282,4 +287,4 @@ export class HcSlider {
282
287
  const hc_slider = function (trigger) {
283
288
  return new HcSlider(trigger);
284
289
  }
285
- export default hc_slider;
290
+ export default hc_slider;
@@ -120,6 +120,7 @@ $customer-bottom-bar-height: var(--iris--customer-bottom-bar--height, 60px);
120
120
 
121
121
  //Icon
122
122
  $icon-color: var(--iris--icon--color);
123
+ $icon-font-size: 20px;
123
124
 
124
125
 
125
126
  //Rank