@iris.interactive/handcook 2.10.6 → 2.10.8
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
|
-

|
|
3
3
|

|
|
4
4
|
[](#)
|
|
5
5
|
[](https://twitter.com/captain\_iris)
|
package/package.json
CHANGED
|
@@ -20,12 +20,13 @@ import ElementEnum from "../../enumerators/element.enum";
|
|
|
20
20
|
export class HcLightbox {
|
|
21
21
|
|
|
22
22
|
constructor(elements = ElementEnum.lightbox, options = {}) {
|
|
23
|
-
if (
|
|
23
|
+
if (elements === ElementEnum.lightbox) {
|
|
24
24
|
Object.assign(options, {
|
|
25
|
-
groupAttr: ElementEnum.lightboxAttr
|
|
25
|
+
groupAttr: ElementEnum.lightboxAttr,
|
|
26
|
+
l10n: this.getTranslation()
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
|
-
Fancybox.bind(elements,options);
|
|
29
|
+
Fancybox.bind(elements, options);
|
|
29
30
|
|
|
30
31
|
this.attachEventToShowButton();
|
|
31
32
|
}
|
|
@@ -38,6 +39,48 @@ export class HcLightbox {
|
|
|
38
39
|
});
|
|
39
40
|
})
|
|
40
41
|
}
|
|
42
|
+
|
|
43
|
+
getTranslation() {
|
|
44
|
+
const lang = document.querySelector('html').getAttribute('lang');
|
|
45
|
+
|
|
46
|
+
if (lang.indexOf('fr-FR') !== false) {
|
|
47
|
+
return {
|
|
48
|
+
CLOSE: "Fermer",
|
|
49
|
+
NEXT: "Suivant",
|
|
50
|
+
PREV: "Précédent",
|
|
51
|
+
MODAL: "Vous pouvez fermer la modal avec la touche echap",
|
|
52
|
+
ERROR: "Quelque chose c'est mal passé. Merci d'essayer plus tard\n",
|
|
53
|
+
IMAGE_ERROR: "Image introuvable",
|
|
54
|
+
ELEMENT_NOT_FOUND: "Élement HTML introuvable",
|
|
55
|
+
AJAX_NOT_FOUND: "Erreur de chargement AJAX : Introuvable",
|
|
56
|
+
AJAX_FORBIDDEN: "Erreur de chargement AJAX : Interdit",
|
|
57
|
+
IFRAME_ERROR: "Erreur du chargement de la page",
|
|
58
|
+
TOGGLE_ZOOM: "Zoome/dezoome",
|
|
59
|
+
TOGGLE_THUMBS: "Affiche/cache les miniatures",
|
|
60
|
+
TOGGLE_SLIDESHOW: "Active/désactive le défilement automatique",
|
|
61
|
+
TOGGLE_FULLSCREEN: "Bascule le mode plein écran",
|
|
62
|
+
DOWNLOAD: "Télécharger",
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
CLOSE: "Close",
|
|
68
|
+
NEXT: "Next",
|
|
69
|
+
PREV: "Previous",
|
|
70
|
+
MODAL: "You can close this modal content with the ESC key",
|
|
71
|
+
ERROR: "Something Went Wrong, Please Try Again Later",
|
|
72
|
+
IMAGE_ERROR: "Image Not Found",
|
|
73
|
+
ELEMENT_NOT_FOUND: "HTML Element Not Found",
|
|
74
|
+
AJAX_NOT_FOUND: "Error Loading AJAX : Not Found",
|
|
75
|
+
AJAX_FORBIDDEN: "Error Loading AJAX : Forbidden",
|
|
76
|
+
IFRAME_ERROR: "Error Loading Page",
|
|
77
|
+
TOGGLE_ZOOM: "Toggle zoom level",
|
|
78
|
+
TOGGLE_THUMBS: "Toggle thumbnails",
|
|
79
|
+
TOGGLE_SLIDESHOW: "Toggle slideshow",
|
|
80
|
+
TOGGLE_FULLSCREEN: "Toggle full-screen mode",
|
|
81
|
+
DOWNLOAD: "Download",
|
|
82
|
+
};
|
|
83
|
+
}
|
|
41
84
|
}
|
|
42
85
|
|
|
43
86
|
const hc_lightbox = function (trigger = ElementEnum.lightbox, options = {}) {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
/* ============================================= */
|
|
54
54
|
.text-icon {
|
|
55
55
|
display: inline-flex;
|
|
56
|
-
align-items:
|
|
56
|
+
align-items: center;
|
|
57
57
|
|
|
58
58
|
&:before {
|
|
59
59
|
margin-right: 5px;
|
|
@@ -63,6 +63,10 @@
|
|
|
63
63
|
&:after {
|
|
64
64
|
margin-left: 5px;
|
|
65
65
|
}
|
|
66
|
+
|
|
67
|
+
&--start {
|
|
68
|
+
align-items: flex-start;
|
|
69
|
+
}
|
|
66
70
|
}
|
|
67
71
|
|
|
68
72
|
/* Block with img animated on hover
|
package/public/styles/style.css
CHANGED
|
@@ -25,4 +25,4 @@
|
|
|
25
25
|
* @author Lucas ROCHE
|
|
26
26
|
* @date 28/01/2022 07:41
|
|
27
27
|
* @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
28
|
-
*/.stretched-link:before{background-color:transparent;bottom:0;content:"";left:0;pointer-events:auto;position:absolute;right:0;top:0;z-index:1}.list-flex{display:flex;flex-wrap:wrap;margin-bottom:0}.list-flex>*{list-style-type:none;margin:0 10px 10px 0}.list-flex>:last-child{margin-right:0}@-webkit-keyframes loader{to{transform:rotate(1turn)}}@keyframes loader{to{transform:rotate(1turn)}}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.text-icon{align-items:
|
|
28
|
+
*/.stretched-link:before{background-color:transparent;bottom:0;content:"";left:0;pointer-events:auto;position:absolute;right:0;top:0;z-index:1}.list-flex{display:flex;flex-wrap:wrap;margin-bottom:0}.list-flex>*{list-style-type:none;margin:0 10px 10px 0}.list-flex>:last-child{margin-right:0}@-webkit-keyframes loader{to{transform:rotate(1turn)}}@keyframes loader{to{transform:rotate(1turn)}}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.text-icon{align-items:center;display:inline-flex}.text-icon:before{margin-right:5px}.text-icon:after{margin-left:5px}.text-icon--start{align-items:flex-start}.hover-item img{transition:.2s ease;will-change:transform}.hover-item:hover img{transform:scale(1.02)}.is-opened{color:#009e55}.soon-closed{color:#ff890e}.is-closed{color:#f33}.fi--color:before,.fi-color:after{color:var(--iris--icon--color)}.font-size-xsmall{font-size:var(--iris--global--font-size-xsmall--rem)}.font-size-small{font-size:var(--iris--global--font-size-small--rem)}.font-size-regular{font-size:var(--iris--global--font-size-regular--rem)}@media screen and (max-width:650px){.font-size-regular{font-size:var(--iris--global--font-size-regular--small--rem)}}.font-size-large{font-size:var(--iris--global--font-size-large--rem)}@media screen and (max-width:650px){.font-size-large{font-size:var(--iris--global--font-size-large--small--rem)}}.font-size-xlarge{font-size:var(--iris--global--font-size-extra-large--rem)}@media screen and (max-width:650px){.font-size-xlarge{font-size:var(--iris--global--font-size-extra-large--small--rem)}}
|