@iris.interactive/handcook 1.0.13 → 2.3.1
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 +1 -1
- package/package.json +1 -1
- package/public/index.html +39 -0
- package/public/mix-manifest.json +9 -0
- package/public/scripts/SmoothScroll.js +41 -0
- package/public/scripts/index.js +14 -0
- package/public/styles/scss/_utils.scss +0 -6
- package/public/styles/scss/_variables.scss +22 -0
- package/public/styles/scss/handcook.scss +20 -0
- package/public/styles/scss/mixins/_mixin-font.scss +36 -24
- package/public/styles/scss/mixins/_mixin-layout.scss +28 -32
- package/public/styles/scss/mixins/_mixin-style.scss +16 -1
- package/public/styles/style.css +17 -1230
- package/resources/assets/scripts/SmoothScroll.js +41 -0
- package/resources/assets/styles/_utils.scss +96 -0
- package/resources/assets/styles/_variables.scss +419 -0
- package/resources/assets/styles/handcook.scss +20 -0
- package/resources/assets/styles/mixins/_mixin-font.scss +43 -0
- package/resources/assets/styles/mixins/_mixin-layout.scss +84 -0
- package/resources/assets/styles/mixins/_mixin-style.scss +133 -0
- package/resources/index.html +39 -0
- package/resources/index.js +18 -0
- package/resources/style.scss +21 -0
- package/public/fonts/svgfont/etourisme/etourisme-font.eot +0 -0
- package/public/fonts/svgfont/etourisme/etourisme-font.svg +0 -1
- package/public/fonts/svgfont/etourisme/etourisme-font.ttf +0 -0
- package/public/fonts/svgfont/etourisme/etourisme-font.woff +0 -0
- package/public/fonts/svgfont/info-neige/info-neige-font.eot +0 -0
- package/public/fonts/svgfont/info-neige/info-neige-font.svg +0 -1
- package/public/fonts/svgfont/info-neige/info-neige-font.ttf +0 -0
- package/public/fonts/svgfont/info-neige/info-neige-font.woff +0 -0
- package/public/fonts/svgfont/iris-tides/iris-tides-font.eot +0 -0
- package/public/fonts/svgfont/iris-tides/iris-tides-font.svg +0 -1
- package/public/fonts/svgfont/iris-tides/iris-tides-font.ttf +0 -0
- package/public/fonts/svgfont/iris-tides/iris-tides-font.woff +0 -0
- package/public/fonts/svgfont/iris-weather/iris-weather-font.eot +0 -0
- package/public/fonts/svgfont/iris-weather/iris-weather-font.svg +0 -1
- package/public/fonts/svgfont/iris-weather/iris-weather-font.ttf +0 -0
- package/public/fonts/svgfont/iris-weather/iris-weather-font.woff +0 -0
- package/public/fonts/svgfont/theme/theme-font.eot +0 -0
- package/public/fonts/svgfont/theme/theme-font.svg +0 -1
- package/public/fonts/svgfont/theme/theme-font.ttf +0 -0
- package/public/fonts/svgfont/theme/theme-font.woff +0 -0
- package/public/styles/scss/_init.scss +0 -24
- package/public/styles/scss/_layout.scss +0 -213
- package/public/styles/scss/lib/_etourisme-font.scss +0 -55
- package/public/styles/scss/lib/_info-neige-font.scss +0 -36
- package/public/styles/scss/lib/_iris-tides-font.scss +0 -38
- package/public/styles/scss/lib/_iris-weather-font.scss +0 -47
- package/public/styles/scss/lib/_theme-font.scss +0 -135
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
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
~ IRIS Interactive
|
|
3
|
+
~
|
|
4
|
+
~ NOTICE OF LICENSE
|
|
5
|
+
~
|
|
6
|
+
~ This source file is no subject to a specific license
|
|
7
|
+
~ but it belongs to the company IRIS Interactive.
|
|
8
|
+
~ You can contact IRIS Interactive at the following
|
|
9
|
+
~ address: contact@iris-interactive.fr
|
|
10
|
+
~
|
|
11
|
+
~ @author Lucas ROCHE
|
|
12
|
+
~ @date 27/01/2022 14:31
|
|
13
|
+
~ @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
<html>
|
|
17
|
+
<head>
|
|
18
|
+
<title>IRIStyle</title>
|
|
19
|
+
<script type="text/javascript">var exports = {};</script>
|
|
20
|
+
<script type="text/javascript" src="scripts/index.js"></script>
|
|
21
|
+
<link rel="stylesheet" href="styles/style.css">
|
|
22
|
+
|
|
23
|
+
</head>
|
|
24
|
+
<body>
|
|
25
|
+
<div id="step-1" style="height: 1800px; background-color: red;">
|
|
26
|
+
<a href="#step-2" data-trigger="wpiris-scroll">To step 2</a>
|
|
27
|
+
</div>
|
|
28
|
+
<div id="step-2" style="height: 1800px; background-color: green;">
|
|
29
|
+
<a href="#step-3" data-trigger="wpiris-scroll">To step 3</a>
|
|
30
|
+
</div>
|
|
31
|
+
<div id="step-3" style="height: 1800px; background-color: yellow;">
|
|
32
|
+
<a href="#step-1" data-trigger="wpiris-scroll">To step 1</a>
|
|
33
|
+
</div>
|
|
34
|
+
</body>
|
|
35
|
+
<script type="text/javascript">
|
|
36
|
+
const SmoothScroll = exports.SmoothScroll;
|
|
37
|
+
SmoothScroll( '[data-trigger="wpiris-scroll"]', 1000 );
|
|
38
|
+
</script>
|
|
39
|
+
</html>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"/scripts/index.js": "/scripts/index.js",
|
|
3
|
+
"/styles/style.css": "/styles/style.css",
|
|
4
|
+
"/index.html": "/index.html",
|
|
5
|
+
"/styles/scss/_utils.scss": "/styles/scss/_utils.scss",
|
|
6
|
+
"/styles/scss/_variables.scss": "/styles/scss/_variables.scss",
|
|
7
|
+
"/styles/scss/handcook.scss": "/styles/scss/handcook.scss",
|
|
8
|
+
"/scripts/SmoothScroll.js": "/scripts/SmoothScroll.js"
|
|
9
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const easeInCubic = function (t) { return t*t*t }
|
|
2
|
+
|
|
3
|
+
const scrollToElem = (startTime, currentTime, duration, scrollEndElemTop, startScrollOffset) => {
|
|
4
|
+
const runtime = currentTime - startTime;
|
|
5
|
+
let progress = runtime / duration;
|
|
6
|
+
|
|
7
|
+
progress = Math.min(progress, 1);
|
|
8
|
+
|
|
9
|
+
const ease = easeInCubic(progress);
|
|
10
|
+
|
|
11
|
+
window.scroll(0, startScrollOffset + (scrollEndElemTop * ease));
|
|
12
|
+
if(runtime < duration){
|
|
13
|
+
requestAnimationFrame((timestamp) => {
|
|
14
|
+
const currentTime = timestamp || new Date().getTime();
|
|
15
|
+
scrollToElem(startTime, currentTime, duration, scrollEndElemTop, startScrollOffset);
|
|
16
|
+
})
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const SmoothScroll = (triggerAttribute, durationAnimation = 1000 ) => {
|
|
21
|
+
const triggerElement = document.querySelectorAll( triggerAttribute );
|
|
22
|
+
triggerElement.forEach( ( element, key ) => {
|
|
23
|
+
element.addEventListener( 'click', ( event ) => {
|
|
24
|
+
event.preventDefault();
|
|
25
|
+
const target = ( element.getAttribute( 'href' ) != '' ) ? document.querySelector( element.getAttribute( 'href' ) ) : document.querySelector( element.dataset.href );
|
|
26
|
+
const shift = ( element.dataset.shift !== undefined ) ? element.dataset.shift : 0;
|
|
27
|
+
|
|
28
|
+
const anim = requestAnimationFrame((timestamp) => {
|
|
29
|
+
const stamp = timestamp || new Date().getTime();
|
|
30
|
+
const start = stamp;
|
|
31
|
+
|
|
32
|
+
const startScrollOffset = window.pageYOffset;
|
|
33
|
+
const scrollEndElemTop = target.getBoundingClientRect().top - shift;
|
|
34
|
+
|
|
35
|
+
scrollToElem(start, stamp, durationAnimation, scrollEndElemTop, startScrollOffset);
|
|
36
|
+
})
|
|
37
|
+
} );
|
|
38
|
+
} );
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default SmoothScroll;
|
package/public/scripts/index.js
CHANGED
|
@@ -62,6 +62,20 @@ var SmoothScroll = function SmoothScroll(triggerAttribute) {
|
|
|
62
62
|
|
|
63
63
|
__webpack_require__.r(__webpack_exports__);
|
|
64
64
|
/* harmony import */ var _package_script_SmoothScroll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @package_script/SmoothScroll */ "./resources/assets/scripts/SmoothScroll.js");
|
|
65
|
+
/*
|
|
66
|
+
* IRIS Interactive
|
|
67
|
+
*
|
|
68
|
+
* NOTICE OF LICENSE
|
|
69
|
+
*
|
|
70
|
+
* This source file is no subject to a specific license
|
|
71
|
+
* but it belongs to the company IRIS Interactive.
|
|
72
|
+
* You can contact IRIS Interactive at the following
|
|
73
|
+
* address: contact@iris-interactive.fr
|
|
74
|
+
*
|
|
75
|
+
* @author Lucas ROCHE
|
|
76
|
+
* @date 27/01/2022 14:32
|
|
77
|
+
* @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
78
|
+
*/
|
|
65
79
|
|
|
66
80
|
exports.SmoothScroll = _package_script_SmoothScroll__WEBPACK_IMPORTED_MODULE_0__["default"];
|
|
67
81
|
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* IRIS Interactive
|
|
3
|
+
*
|
|
4
|
+
* NOTICE OF LICENSE
|
|
5
|
+
*
|
|
6
|
+
* This source file is no subject to a specific license
|
|
7
|
+
* but it belongs to the company IRIS Interactive.
|
|
8
|
+
* You can contact IRIS Interactive at the following
|
|
9
|
+
* address: contact@iris-interactive.fr
|
|
10
|
+
*
|
|
11
|
+
* @author Lucas ROCHE
|
|
12
|
+
* @date 28/01/2022 07:51
|
|
13
|
+
* @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
14
|
+
*/
|
|
15
|
+
|
|
1
16
|
/*
|
|
2
17
|
* Created by IRIS Interactive
|
|
3
18
|
* User : IRIS Interactive
|
|
@@ -51,6 +66,13 @@ $margin-medium: 40px;
|
|
|
51
66
|
$margin-small: 20px;
|
|
52
67
|
$margin-xsmall: 20px;
|
|
53
68
|
|
|
69
|
+
$viewport-borders: (
|
|
70
|
+
"large": $margin-large,
|
|
71
|
+
"medium": $margin-medium,
|
|
72
|
+
"small": $margin-small,
|
|
73
|
+
"xsmall": $margin-xsmall,
|
|
74
|
+
);
|
|
75
|
+
|
|
54
76
|
|
|
55
77
|
/* Breakpoint
|
|
56
78
|
/ ================================================== */
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* IRIS Interactive
|
|
3
|
+
*
|
|
4
|
+
* NOTICE OF LICENSE
|
|
5
|
+
*
|
|
6
|
+
* This source file is no subject to a specific license
|
|
7
|
+
* but it belongs to the company IRIS Interactive.
|
|
8
|
+
* You can contact IRIS Interactive at the following
|
|
9
|
+
* address: contact@iris-interactive.fr
|
|
10
|
+
*
|
|
11
|
+
* @author Fabien SERRA
|
|
12
|
+
* @date 27/01/2022 13:39
|
|
13
|
+
* @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
@import "variables";
|
|
17
|
+
@import "mixins/mixin-font";
|
|
18
|
+
@import "mixins/mixin-layout";
|
|
19
|
+
@import "mixins/mixin-style";
|
|
20
|
+
@import "utils";
|
|
@@ -1,31 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* IRIS Interactive
|
|
3
|
+
*
|
|
4
|
+
* NOTICE OF LICENSE
|
|
5
|
+
*
|
|
6
|
+
* This source file is no subject to a specific license
|
|
7
|
+
* but it belongs to the company IRIS Interactive.
|
|
8
|
+
* You can contact IRIS Interactive at the following
|
|
9
|
+
* address: contact@iris-interactive.fr
|
|
10
|
+
*
|
|
11
|
+
* @author Lucas ROCHE
|
|
12
|
+
* @date 28/01/2022 07:41
|
|
13
|
+
* @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
14
|
+
*/
|
|
15
|
+
@use "sass:math";
|
|
5
16
|
|
|
6
|
-
/*
|
|
17
|
+
/* Font icon
|
|
7
18
|
/* ============================================= */
|
|
8
|
-
|
|
9
|
-
|
|
19
|
+
@mixin fi($unicode) {
|
|
20
|
+
content: $unicode;
|
|
21
|
+
font-family: "collection-font";
|
|
22
|
+
font-style: normal;
|
|
23
|
+
font-weight: 400;
|
|
24
|
+
font-display: block;
|
|
25
|
+
}
|
|
10
26
|
|
|
11
|
-
/*
|
|
27
|
+
/* Font size
|
|
12
28
|
/* ============================================= */
|
|
13
|
-
@
|
|
14
|
-
$
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@if $label == $name {
|
|
18
|
-
$content: $icon;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
content: $content;
|
|
23
|
-
font-family: '#{$plugin}-font';
|
|
29
|
+
@function rem-size( $size ) {
|
|
30
|
+
$remSize: math.div($size, 16);
|
|
31
|
+
@return #{$remSize}rem;
|
|
32
|
+
}
|
|
24
33
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
margin-left: 10px;
|
|
29
|
-
}
|
|
34
|
+
@function vw-size( $size ) {
|
|
35
|
+
$ceil-size: math.div(math.div($container, 1px), 1 - math.div($margin-xlarge, 100%) * 2);
|
|
36
|
+
@return calc(#{$size} * 100 / #{$ceil-size} * 1vw);
|
|
30
37
|
}
|
|
31
38
|
|
|
39
|
+
// Breakpoint large recalcule font-size
|
|
40
|
+
@function clamp-size( $min, $value, $max) {
|
|
41
|
+
$val: vw-size($value);
|
|
42
|
+
@return clamp(#{$min}, #{$val}, #{$max});
|
|
43
|
+
}
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* IRIS Interactive
|
|
3
|
+
*
|
|
4
|
+
* NOTICE OF LICENSE
|
|
5
|
+
*
|
|
6
|
+
* This source file is no subject to a specific license
|
|
7
|
+
* but it belongs to the company IRIS Interactive.
|
|
8
|
+
* You can contact IRIS Interactive at the following
|
|
9
|
+
* address: contact@iris-interactive.fr
|
|
10
|
+
*
|
|
11
|
+
* @author Lucas ROCHE
|
|
12
|
+
* @date 28/01/2022 07:51
|
|
13
|
+
* @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
14
|
+
*/
|
|
15
|
+
|
|
1
16
|
/*
|
|
2
17
|
* Created by IRIS Interactive
|
|
3
18
|
* User : IRIS Interactive
|
|
@@ -6,12 +21,23 @@
|
|
|
6
21
|
|
|
7
22
|
/* Main gutter
|
|
8
23
|
/ ================================================== */
|
|
24
|
+
@function viewport-border($index) {
|
|
25
|
+
@return map_get($viewport-borders, $index);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
/* Breakpoints
|
|
30
|
+
/* ============================================= */
|
|
9
31
|
@mixin breakpoint($point) {
|
|
10
32
|
|
|
11
33
|
@if $point == "xlarge" {
|
|
12
34
|
@media screen and (min-width: #{$breakpoint-xlarge}) {
|
|
13
35
|
@content;
|
|
14
36
|
}
|
|
37
|
+
} @else if $point == "desktop" {
|
|
38
|
+
@media screen and (min-width: #{$breakpoint-desktop}) {
|
|
39
|
+
@content;
|
|
40
|
+
}
|
|
15
41
|
} @else if $point == "large" {
|
|
16
42
|
@media screen and (max-width: #{$breakpoint-large}) {
|
|
17
43
|
@content;
|
|
@@ -28,10 +54,6 @@
|
|
|
28
54
|
@media screen and (max-width: #{$breakpoint-xsmall}) {
|
|
29
55
|
@content;
|
|
30
56
|
}
|
|
31
|
-
} @else if $point == "desktop" {
|
|
32
|
-
@media screen and (min-width: #{$breakpoint-desktop}) {
|
|
33
|
-
@content;
|
|
34
|
-
}
|
|
35
57
|
} @else {
|
|
36
58
|
@media screen and (max-width: $point) {
|
|
37
59
|
@content;
|
|
@@ -48,37 +70,11 @@
|
|
|
48
70
|
flex-direction: $direction;
|
|
49
71
|
}
|
|
50
72
|
|
|
51
|
-
/* Font size
|
|
52
|
-
/* ============================================= */
|
|
53
|
-
@function rem-size( $size ) {
|
|
54
|
-
$remSize: math.div($size, 16);
|
|
55
|
-
@return #{$remSize}rem;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// TODO : n'est plus utilisé
|
|
59
|
-
@function rem-size-ratio( $size, $ratio ) {
|
|
60
|
-
@return calc((#{$size} / 16 * 1rem) * #{$ratio});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
@function vw-size( $size ) {
|
|
64
|
-
$ceil-size: math.div(math.div($container, 1px), 1 - math.div($margin-xlarge, 100%) * 2);
|
|
65
|
-
@return calc(#{$size} * 100 / #{$ceil-size} * 1vw);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Breakpoint large recalcule font-size
|
|
69
|
-
@function clamp-size( $min, $value, $max) {
|
|
70
|
-
$val: vw-size($value);
|
|
71
|
-
@return clamp(#{$min}, #{$val}, #{$max});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
73
|
/* Hover - TODO
|
|
75
74
|
/* ============================================= */
|
|
76
75
|
@mixin hover {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
&:hover {
|
|
80
|
-
@content;
|
|
81
|
-
}
|
|
76
|
+
&:hover {
|
|
77
|
+
@content;
|
|
82
78
|
}
|
|
83
79
|
}
|
|
84
80
|
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* IRIS Interactive
|
|
3
|
+
*
|
|
4
|
+
* NOTICE OF LICENSE
|
|
5
|
+
*
|
|
6
|
+
* This source file is no subject to a specific license
|
|
7
|
+
* but it belongs to the company IRIS Interactive.
|
|
8
|
+
* You can contact IRIS Interactive at the following
|
|
9
|
+
* address: contact@iris-interactive.fr
|
|
10
|
+
*
|
|
11
|
+
* @author Lucas ROCHE
|
|
12
|
+
* @date 28/01/2022 07:51
|
|
13
|
+
* @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
14
|
+
*/
|
|
15
|
+
|
|
1
16
|
/*
|
|
2
17
|
* Created by IRIS Interactive
|
|
3
18
|
* User : IRIS Interactive
|
|
@@ -115,7 +130,7 @@
|
|
|
115
130
|
z-index: 1;
|
|
116
131
|
pointer-events: auto;
|
|
117
132
|
content: "";
|
|
118
|
-
background-color:
|
|
133
|
+
background-color: transparent;
|
|
119
134
|
}
|
|
120
135
|
}
|
|
121
136
|
|