@cntrl-site/sdk 1.1.0 → 1.1.3
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/package.json +2 -2
- package/resources/template.scss.ejs +3 -3
- package/cntrl-site-sdk-1.1.0.tgz +0 -0
- package/cntrl.scss +0 -66
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cntrl-site/sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Generic SDK for use in public websites.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"lib": "lib"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@cntrl-site/core": "^1.22.
|
|
30
|
+
"@cntrl-site/core": "^1.22.4",
|
|
31
31
|
"@types/ejs": "^3.1.2",
|
|
32
32
|
"@types/isomorphic-fetch": "^0.0.36",
|
|
33
33
|
"commander": "^10.0.1",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// WE HIGHLY ADVICE YOU TO NOT CHANGE IT MANUALLY
|
|
4
4
|
@use "sass:map";
|
|
5
5
|
|
|
6
|
-
$__CNTRL_LAYOUT_WIDTH__:
|
|
6
|
+
$__CNTRL_LAYOUT_WIDTH__: <%= ranges[0].exemplary %>;
|
|
7
7
|
|
|
8
8
|
$layout: (
|
|
9
9
|
<% ranges.forEach(function(range) { %>
|
|
@@ -45,6 +45,6 @@ $layout: (
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
// reset global variable back to
|
|
49
|
-
$__CNTRL_LAYOUT_WIDTH__:
|
|
48
|
+
// reset global variable back to first layout's exemplary (mobile-first)
|
|
49
|
+
$__CNTRL_LAYOUT_WIDTH__: <%= ranges[0].exemplary %> !global;
|
|
50
50
|
}
|
package/cntrl-site-sdk-1.1.0.tgz
DELETED
|
Binary file
|
package/cntrl.scss
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
// CAUTION: THIS FILE IS AUTO-GENERATED BASED ON
|
|
2
|
-
// LAYOUT CONFIGURATION IN YOUR CNTRL PROJECT
|
|
3
|
-
// WE HIGHLY ADVICE YOU TO NOT CHANGE IT MANUALLY
|
|
4
|
-
@use "sass:map";
|
|
5
|
-
|
|
6
|
-
$__CNTRL_LAYOUT_WIDTH__: 100;
|
|
7
|
-
|
|
8
|
-
$layout: (
|
|
9
|
-
|
|
10
|
-
mobile: (
|
|
11
|
-
start: 0,
|
|
12
|
-
end: 749,
|
|
13
|
-
exemplary: 375,
|
|
14
|
-
isFirst: true,
|
|
15
|
-
isLast: false
|
|
16
|
-
),
|
|
17
|
-
|
|
18
|
-
tablet: (
|
|
19
|
-
start: 750,
|
|
20
|
-
end: 1023,
|
|
21
|
-
exemplary: 768,
|
|
22
|
-
isFirst: false,
|
|
23
|
-
isLast: false
|
|
24
|
-
),
|
|
25
|
-
|
|
26
|
-
desktop: (
|
|
27
|
-
start: 1024,
|
|
28
|
-
end: 9007199254740991,
|
|
29
|
-
exemplary: 1440,
|
|
30
|
-
isFirst: false,
|
|
31
|
-
isLast: true
|
|
32
|
-
),
|
|
33
|
-
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
@function size($value) {
|
|
37
|
-
@return #{$value/$__CNTRL_LAYOUT_WIDTH__*100}vw;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@mixin for($name) {
|
|
41
|
-
$start: map.get(map.get($layout, $name), "start");
|
|
42
|
-
$end: map.get(map.get($layout, $name), "end");
|
|
43
|
-
$isFirst: map.get(map.get($layout, $name), "isFirst");
|
|
44
|
-
$isLast: map.get(map.get($layout, $name), "isLast");
|
|
45
|
-
$exemplary: map.get(map.get($layout, $name), "exemplary");
|
|
46
|
-
$__CNTRL_LAYOUT_WIDTH__: $exemplary !global;
|
|
47
|
-
|
|
48
|
-
@if $isFirst == true and $isLast == true {
|
|
49
|
-
@content;
|
|
50
|
-
} @else if $isFirst == true {
|
|
51
|
-
@media (max-width: #{$end}px) {
|
|
52
|
-
@content;
|
|
53
|
-
}
|
|
54
|
-
} @else if $isLast == true {
|
|
55
|
-
@media (min-width: #{$start}px) {
|
|
56
|
-
@content;
|
|
57
|
-
}
|
|
58
|
-
} @else {
|
|
59
|
-
@media (min-width: #{$start}px) and (max-width: #{$end}px) {
|
|
60
|
-
@content;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// reset global variable back to it's initial state
|
|
65
|
-
$__CNTRL_LAYOUT_WIDTH__: 100 !global;
|
|
66
|
-
}
|