expack_gem 0.3.0 → 0.4.0
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.
- checksums.yaml +4 -4
- data/.rspec +3 -3
- data/.rubocop.yml +8 -8
- data/CHANGELOG.md +5 -5
- data/CODE_OF_CONDUCT.md +132 -132
- data/LICENSE.txt +21 -21
- data/README.md +15 -37
- data/Rakefile +12 -12
- data/expack_gem-0.3.0.gem +0 -0
- data/lib/expack_gem/version.rb +5 -5
- data/lib/expack_gem.rb +24 -24
- data/sig/expack_gem.rbs +4 -4
- metadata +7 -13
- data/assets/javascript/expack/login.js +0 -43
- data/assets/javascript/expack/modals.js +0 -16
- data/assets/javascript/expack.bundle.js +0 -296
- data/assets/javascript/expack.js +0 -284
- data/assets/javascript/expack.min.js +0 -1
- data/assets/stylesheet/expack.css +0 -233
- data/assets/stylesheet/expack.min.css +0 -1
@@ -1,296 +0,0 @@
|
|
1
|
-
function modalFunction() {
|
2
|
-
var modal = document.getElementsByClassName("modal");
|
3
|
-
var modalBtn = document.getElementsByClassName("modal-btn");
|
4
|
-
var closeClick = document.getElementsByClassName("close");
|
5
|
-
modalBtn.onclick = function () {
|
6
|
-
modal.style.display = "block";
|
7
|
-
};
|
8
|
-
closeClick.onclick = function () {
|
9
|
-
modal.style.display = "none";
|
10
|
-
};
|
11
|
-
window.onclick = function (event) {
|
12
|
-
if (event.target == modal) {
|
13
|
-
modal.style.display = "none";
|
14
|
-
}
|
15
|
-
};
|
16
|
-
}
|
17
|
-
|
18
|
-
function loginOption() {
|
19
|
-
var emailClass = document.getElementsByClassName("login-email");
|
20
|
-
var passwordClass = document.getElementsByClassName("login-password");
|
21
|
-
var usernameClass = document.getElementsByClassName("login-username");
|
22
|
-
function hasRequiredClass(elements) {
|
23
|
-
for (var i = 0; i < elements.length; i++) {
|
24
|
-
if (elements[i].classList.contains('required')) {
|
25
|
-
return true;
|
26
|
-
}
|
27
|
-
}
|
28
|
-
return false;
|
29
|
-
}
|
30
|
-
var registerBtn = document.getElementsByClassName("register-btn");
|
31
|
-
if (registerBtn.length > 0) {
|
32
|
-
for (var i = 0; i < registerBtn.length; i++) {
|
33
|
-
registerBtn[i].onclick = function () {
|
34
|
-
var emailRequired = hasRequiredClass(emailClass);
|
35
|
-
var passwordRequired = hasRequiredClass(passwordClass);
|
36
|
-
var usernameRequired = hasRequiredClass(usernameClass);
|
37
|
-
if (emailRequired && emailClass.length > 0) {
|
38
|
-
var emailValue = emailClass[0].value;
|
39
|
-
localStorage.setItem("email saved", emailValue);
|
40
|
-
document.cookie = "userEmail=".concat(emailValue);
|
41
|
-
}
|
42
|
-
if (passwordRequired && passwordClass.length > 0) {
|
43
|
-
var passwordValue = passwordClass[0].value;
|
44
|
-
localStorage.setItem("password saved", passwordValue);
|
45
|
-
document.cookie = "userPassword=".concat(passwordValue);
|
46
|
-
}
|
47
|
-
if (usernameRequired && usernameClass.length > 0) {
|
48
|
-
var usernameValue = usernameClass[0].value;
|
49
|
-
localStorage.setItem("username saved", usernameValue);
|
50
|
-
document.cookie = "userUsername=".concat(usernameValue);
|
51
|
-
}
|
52
|
-
};
|
53
|
-
}
|
54
|
-
} else {
|
55
|
-
console.log("no register");
|
56
|
-
}
|
57
|
-
}
|
58
|
-
|
59
|
-
function unicodeFunction() {
|
60
|
-
document.addEventListener("DOMContentLoaded", function () {
|
61
|
-
var unicode = document.querySelectorAll("[class*='u-']");
|
62
|
-
unicode.forEach(function (element) {
|
63
|
-
var classes = element.className.split(" ");
|
64
|
-
classes.forEach(function (cls) {
|
65
|
-
if (cls.startsWith("c")) {
|
66
|
-
var unicodeChar = cls.substring(4);
|
67
|
-
element.textConent = unicodeMap[unicodeChar];
|
68
|
-
}
|
69
|
-
});
|
70
|
-
});
|
71
|
-
});
|
72
|
-
}
|
73
|
-
|
74
|
-
function copyClip() {
|
75
|
-
var copyText = document.querySelectorAll("[class^='copy-text'");
|
76
|
-
copyText.forEach(function (elements) {
|
77
|
-
elements.focus();
|
78
|
-
elements.select();
|
79
|
-
elements.setSelectionRange(0, 99999);
|
80
|
-
navigator.clipboard.writeText(elements.value);
|
81
|
-
alert("Copied Text: " + elements.value);
|
82
|
-
});
|
83
|
-
}
|
84
|
-
|
85
|
-
// import $ from "jquery";
|
86
|
-
function expackExport() {
|
87
|
-
document.addEventListener("DOMContentLoaded", function () {
|
88
|
-
var bgElements = document.querySelectorAll("[class*='bg-']");
|
89
|
-
bgElements.forEach(function (element) {
|
90
|
-
var classes = element.className.split(" ");
|
91
|
-
classes.forEach(function (cls) {
|
92
|
-
if (cls.startsWith("bg-")) {
|
93
|
-
var colorCode = cls.substring(3);
|
94
|
-
if (/^[0-9A-Fa-f]{6}$/.test(colorCode)) {
|
95
|
-
element.style.backgroundColor = "#".concat(colorCode);
|
96
|
-
}
|
97
|
-
}
|
98
|
-
});
|
99
|
-
});
|
100
|
-
var mnElements = document.querySelectorAll("[class*='fr-']");
|
101
|
-
mnElements.forEach(function (element) {
|
102
|
-
var classes = element.className.split(" ");
|
103
|
-
classes.forEach(function (cls) {
|
104
|
-
if (cls.startsWith("fr-")) {
|
105
|
-
var colorCode = cls.substring(3);
|
106
|
-
if (/^[0-9A-Fa-f]{6}$/.test(colorCode)) {
|
107
|
-
element.style.color = "#".concat(colorCode);
|
108
|
-
}
|
109
|
-
}
|
110
|
-
});
|
111
|
-
});
|
112
|
-
var fontWeightClass = document.querySelectorAll("[class^='fw-']");
|
113
|
-
fontWeightClass.forEach(function (element) {
|
114
|
-
var classes = element.className.split(" ");
|
115
|
-
classes.forEach(function (cls) {
|
116
|
-
if (cls.startsWith("fw-")) {
|
117
|
-
var _fwValue = cls.substring(3);
|
118
|
-
if (/^\d+px?$/.test(_fwValue)) {
|
119
|
-
element.style.fontWeight = _fwValue;
|
120
|
-
}
|
121
|
-
}
|
122
|
-
});
|
123
|
-
});
|
124
|
-
var fontSizeValue = document.querySelectorAll("[class*='sz-']");
|
125
|
-
fontSizeValue.forEach(function (element) {
|
126
|
-
var classes = element.className.split(" ");
|
127
|
-
classes.forEach(function (cls) {
|
128
|
-
if (cls.startsWith("sz-")) {
|
129
|
-
var sizeValue = cls.substring(3);
|
130
|
-
if (/^\d+px?$/.test(sizeValue)) {
|
131
|
-
element.style.fontSize = fwValue;
|
132
|
-
}
|
133
|
-
}
|
134
|
-
});
|
135
|
-
});
|
136
|
-
|
137
|
-
/*const closingClass = document.querySelectorAll("[class*='close']");
|
138
|
-
closingClass.forEach(element => {
|
139
|
-
element.innerHTML = "×";
|
140
|
-
element.addEventListener("click", function(){
|
141
|
-
element.style.visibility = "hidden";
|
142
|
-
});
|
143
|
-
});*/
|
144
|
-
/*const elementAlignment = document.querySelectorAll("[class*='align-']");
|
145
|
-
elementAlignment.forEach(element => {
|
146
|
-
const classes = element.className.split(" ");
|
147
|
-
classes.forEach(cls => {
|
148
|
-
if (cls.startsWith("align-")) {
|
149
|
-
const alignment = cls.substring(5);
|
150
|
-
if (alignment === "center" || alignment === "left" || alignment === "right") {
|
151
|
-
element.style.textAlign = alignment;
|
152
|
-
$(elementAlignment).css("text-align", alignment);
|
153
|
-
}
|
154
|
-
}
|
155
|
-
});
|
156
|
-
});*/
|
157
|
-
var elementPadding = document.querySelectorAll("[class^='pad-']");
|
158
|
-
elementPadding.forEach(function (element) {
|
159
|
-
var classes = element.className.split(" ");
|
160
|
-
classes.forEach(function (cls) {
|
161
|
-
if (cls.startsWith("pad-")) {
|
162
|
-
var paddingValue = cls.substring(5);
|
163
|
-
if (cls.startsWith("pad-t-")) {
|
164
|
-
if (/^\d+px?$/.test(paddingValue)) {
|
165
|
-
element.style.paddingTop = paddingValue;
|
166
|
-
}
|
167
|
-
} else if (cls.startsWith("pad-l-")) {
|
168
|
-
// left
|
169
|
-
if (/^\d+px?$/.test(paddingValue)) {
|
170
|
-
element.style.paddingLeft = paddingValue;
|
171
|
-
}
|
172
|
-
} else if (cls.startsWith("pad-r-")) {
|
173
|
-
// right
|
174
|
-
if (/^\d+px?$/.test(paddingValue)) {
|
175
|
-
element.style.paddingRight = paddingValue;
|
176
|
-
}
|
177
|
-
} else if (cls.startsWith("pad-b-")) {
|
178
|
-
// bottom
|
179
|
-
if (/^\d+px?$/.test(paddingValue)) {
|
180
|
-
element.style.paddingBottom = paddingValue;
|
181
|
-
}
|
182
|
-
} else {
|
183
|
-
if (/^\d+px?$/.test(paddingValue)) {
|
184
|
-
// padding all
|
185
|
-
element.style.padding = paddingValue;
|
186
|
-
}
|
187
|
-
}
|
188
|
-
}
|
189
|
-
});
|
190
|
-
});
|
191
|
-
|
192
|
-
// figure out how to have this work for all borders
|
193
|
-
var borderElements = document.querySelectorAll("[data-border]");
|
194
|
-
borderElements.forEach(function (element) {
|
195
|
-
var borderData = element.getAttribute('data-border');
|
196
|
-
if (borderData) {
|
197
|
-
var parts = borderData.split(" ");
|
198
|
-
parts.forEach(function (part) {
|
199
|
-
if (part.startsWith("color-")) {
|
200
|
-
var colorCode = part.substring(7);
|
201
|
-
if (/^[0-9A-Fa-f]{6}$/.test(colorCode)) {
|
202
|
-
element.style.borderColor = "#".concat(colorCode);
|
203
|
-
}
|
204
|
-
}
|
205
|
-
if (part.startsWith("radius-")) {
|
206
|
-
var borderRadius = part.substring(7);
|
207
|
-
if (borderRadius.includes("%")) {
|
208
|
-
borderRadius += "%";
|
209
|
-
} else {
|
210
|
-
borderRadius += "px";
|
211
|
-
}
|
212
|
-
element.style.borderRadius = borderRadius;
|
213
|
-
}
|
214
|
-
if (part.startsWith("size-")) {
|
215
|
-
var borderSize = part.substring(7);
|
216
|
-
element.style.borderWidth = borderSize;
|
217
|
-
}
|
218
|
-
});
|
219
|
-
}
|
220
|
-
});
|
221
|
-
var imageDimension = document.querySelectorAll("[data-image]");
|
222
|
-
imageDimension.forEach(function (element) {
|
223
|
-
var imageData = element.getAttribute('data-image');
|
224
|
-
if (imageData) {
|
225
|
-
var parts = imageData.split(" ");
|
226
|
-
parts.forEach(function (part) {
|
227
|
-
if (part.startsWith("height-")) {
|
228
|
-
var imageHeight = part.substring(7);
|
229
|
-
if (imageHeight.includes("%")) {
|
230
|
-
imageHeight += "%";
|
231
|
-
} else if (imageHeight.includes("em") || imageHeight.includes("-em")) {
|
232
|
-
imageHeight += "em";
|
233
|
-
} else {
|
234
|
-
imageHeight += "px";
|
235
|
-
}
|
236
|
-
element.style.height = imageHeight;
|
237
|
-
}
|
238
|
-
if (part.startsWith("width-")) {
|
239
|
-
var imageWidth = part.substring(6);
|
240
|
-
if (imageWidth.includes("%")) {
|
241
|
-
imageWidth += "%";
|
242
|
-
} else if (imageWidth.includes("em") || imageWidth.includes("-em")) {
|
243
|
-
imageWidth += "em";
|
244
|
-
} else {
|
245
|
-
imageWidth += "px";
|
246
|
-
}
|
247
|
-
element.style.width = imageWidth;
|
248
|
-
}
|
249
|
-
});
|
250
|
-
}
|
251
|
-
});
|
252
|
-
var marginCheck = document.querySelectorAll("[data-margin]");
|
253
|
-
marginCheck.forEach(function (element) {
|
254
|
-
var parts = element.className.split(" ");
|
255
|
-
parts.forEach(function (part) {
|
256
|
-
if (part.startsWith("a-")) {
|
257
|
-
var everyMargin = part.substring(5);
|
258
|
-
element.style.margin = everyMargin + "px";
|
259
|
-
} else if (part.startsWith("r-")) {
|
260
|
-
var rightMargin = part.substring(5);
|
261
|
-
element.style.marginRight = rightMargin + "px";
|
262
|
-
} else if (part.startsWith("l-")) {
|
263
|
-
var leftMargin = part.substring(5);
|
264
|
-
element.style.marginLeft = leftMargin + "px";
|
265
|
-
} else if (part.startsWith("t-")) {
|
266
|
-
var topMargin = part.substring(5);
|
267
|
-
element.style.marginTop = topMargin + "px";
|
268
|
-
} else if (part.startsWith("b-")) {
|
269
|
-
var bottomMargin = part.substring(5);
|
270
|
-
element.style.marginBottom = bottomMargin + "px";
|
271
|
-
}
|
272
|
-
});
|
273
|
-
});
|
274
|
-
var indexValue = document.querySelectorAll("[data-index]");
|
275
|
-
indexValue.forEach(function (element) {
|
276
|
-
var indexData = element.getAttribute('data-index');
|
277
|
-
if (indexData) {
|
278
|
-
var parts = indexData.split(" ");
|
279
|
-
parts.forEach(function (part) {
|
280
|
-
if (part.startsWith("z-")) {
|
281
|
-
var zIndex = part.substring(5);
|
282
|
-
element.style.zIndex = zIndex;
|
283
|
-
}
|
284
|
-
});
|
285
|
-
}
|
286
|
-
});
|
287
|
-
});
|
288
|
-
modalFunction();
|
289
|
-
loginOption();
|
290
|
-
unicodeFunction();
|
291
|
-
copyClip();
|
292
|
-
}
|
293
|
-
var global = expackExport();
|
294
|
-
|
295
|
-
export { global as default };
|
296
|
-
|
data/assets/javascript/expack.js
DELETED
@@ -1,284 +0,0 @@
|
|
1
|
-
function modalFunction() {
|
2
|
-
var modal = document.getElementsByClassName("modal");
|
3
|
-
var modalBtn = document.getElementsByClassName("modal-btn");
|
4
|
-
var closeClick = document.getElementsByClassName("close");
|
5
|
-
modalBtn.onclick = function () {
|
6
|
-
modal.style.display = "block";
|
7
|
-
};
|
8
|
-
closeClick.onclick = function () {
|
9
|
-
modal.style.display = "none";
|
10
|
-
};
|
11
|
-
window.onclick = function (event) {
|
12
|
-
if (event.target == modal) {
|
13
|
-
modal.style.display = "none";
|
14
|
-
}
|
15
|
-
};
|
16
|
-
}
|
17
|
-
|
18
|
-
function loginOption() {
|
19
|
-
var emailClass = document.getElementsByClassName("login-email");
|
20
|
-
var passwordClass = document.getElementsByClassName("login-password");
|
21
|
-
var usernameClass = document.getElementsByClassName("login-username");
|
22
|
-
function hasRequiredClass(elements) {
|
23
|
-
for (var i = 0; i < elements.length; i++) {
|
24
|
-
if (elements[i].classList.contains('required')) {
|
25
|
-
return true;
|
26
|
-
}
|
27
|
-
}
|
28
|
-
return false;
|
29
|
-
}
|
30
|
-
var registerBtn = document.getElementsByClassName("register-btn");
|
31
|
-
if (registerBtn.length > 0) {
|
32
|
-
for (var i = 0; i < registerBtn.length; i++) {
|
33
|
-
registerBtn[i].onclick = function () {
|
34
|
-
var emailRequired = hasRequiredClass(emailClass);
|
35
|
-
var passwordRequired = hasRequiredClass(passwordClass);
|
36
|
-
var usernameRequired = hasRequiredClass(usernameClass);
|
37
|
-
if (emailRequired && emailClass.length > 0) {
|
38
|
-
var emailValue = emailClass[0].value;
|
39
|
-
localStorage.setItem("email saved", emailValue);
|
40
|
-
document.cookie = "userEmail=".concat(emailValue);
|
41
|
-
}
|
42
|
-
if (passwordRequired && passwordClass.length > 0) {
|
43
|
-
var passwordValue = passwordClass[0].value;
|
44
|
-
localStorage.setItem("password saved", passwordValue);
|
45
|
-
document.cookie = "userPassword=".concat(passwordValue);
|
46
|
-
}
|
47
|
-
if (usernameRequired && usernameClass.length > 0) {
|
48
|
-
var usernameValue = usernameClass[0].value;
|
49
|
-
localStorage.setItem("username saved", usernameValue);
|
50
|
-
document.cookie = "userUsername=".concat(usernameValue);
|
51
|
-
}
|
52
|
-
};
|
53
|
-
}
|
54
|
-
} else {
|
55
|
-
console.log("no register");
|
56
|
-
}
|
57
|
-
}
|
58
|
-
|
59
|
-
function unicodeFunction() {
|
60
|
-
document.addEventListener("DOMContentLoaded", function () {
|
61
|
-
var unicode = document.querySelectorAll("[class*='u-']");
|
62
|
-
unicode.forEach(function (element) {
|
63
|
-
var classes = element.className.split(" ");
|
64
|
-
classes.forEach(function (cls) {
|
65
|
-
if (cls.startsWith("c")) {
|
66
|
-
var unicodeChar = cls.substring(4);
|
67
|
-
element.textConent = unicodeMap[unicodeChar];
|
68
|
-
}
|
69
|
-
});
|
70
|
-
});
|
71
|
-
});
|
72
|
-
}
|
73
|
-
|
74
|
-
function copyClip() {
|
75
|
-
var copyText = document.querySelectorAll("[class^='copy-text'");
|
76
|
-
copyText.forEach(function (elements) {
|
77
|
-
elements.focus();
|
78
|
-
elements.select();
|
79
|
-
elements.setSelectionRange(0, 99999);
|
80
|
-
navigator.clipboard.writeText(elements.value);
|
81
|
-
alert("Copied Text: " + elements.value);
|
82
|
-
});
|
83
|
-
}
|
84
|
-
|
85
|
-
// import $ from "jquery";
|
86
|
-
function expackExport() {
|
87
|
-
document.addEventListener("DOMContentLoaded", function () {
|
88
|
-
var bgElements = document.querySelectorAll("[class*='bg-']");
|
89
|
-
bgElements.forEach(function (element) {
|
90
|
-
var classes = element.className.split(" ");
|
91
|
-
classes.forEach(function (cls) {
|
92
|
-
if (cls.startsWith("bg-")) {
|
93
|
-
var colorCode = cls.substring(3);
|
94
|
-
if (/^[0-9A-Fa-f]{6}$/.test(colorCode)) {
|
95
|
-
element.style.backgroundColor = "#".concat(colorCode);
|
96
|
-
}
|
97
|
-
}
|
98
|
-
});
|
99
|
-
});
|
100
|
-
var mnElements = document.querySelectorAll("[class*='fr-']");
|
101
|
-
mnElements.forEach(function (element) {
|
102
|
-
var classes = element.className.split(" ");
|
103
|
-
classes.forEach(function (cls) {
|
104
|
-
if (cls.startsWith("fr-")) {
|
105
|
-
var colorCode = cls.substring(3);
|
106
|
-
if (/^[0-9A-Fa-f]{6}$/.test(colorCode)) {
|
107
|
-
element.style.color = "#".concat(colorCode);
|
108
|
-
}
|
109
|
-
}
|
110
|
-
});
|
111
|
-
});
|
112
|
-
var fontWeightClass = document.querySelectorAll("[class^='fw-']");
|
113
|
-
fontWeightClass.forEach(function (element) {
|
114
|
-
var classes = element.className.split(" ");
|
115
|
-
classes.forEach(function (cls) {
|
116
|
-
if (cls.startsWith("fw-")) {
|
117
|
-
var fwValue = cls.substring(3);
|
118
|
-
if (/^\d+px?$/.test(fwValue)) {
|
119
|
-
element.style.fontWeight = fwValue;
|
120
|
-
}
|
121
|
-
}
|
122
|
-
});
|
123
|
-
});
|
124
|
-
|
125
|
-
/*const closingClass = document.querySelectorAll("[class*='close']");
|
126
|
-
closingClass.forEach(element => {
|
127
|
-
element.innerHTML = "×";
|
128
|
-
element.addEventListener("click", function(){
|
129
|
-
element.style.visibility = "hidden";
|
130
|
-
});
|
131
|
-
});*/
|
132
|
-
/*const elementAlignment = document.querySelectorAll("[class*='align-']");
|
133
|
-
elementAlignment.forEach(element => {
|
134
|
-
const classes = element.className.split(" ");
|
135
|
-
classes.forEach(cls => {
|
136
|
-
if (cls.startsWith("align-")) {
|
137
|
-
const alignment = cls.substring(5);
|
138
|
-
if (alignment === "center" || alignment === "left" || alignment === "right") {
|
139
|
-
element.style.textAlign = alignment;
|
140
|
-
$(elementAlignment).css("text-align", alignment);
|
141
|
-
}
|
142
|
-
}
|
143
|
-
});
|
144
|
-
});*/
|
145
|
-
var elementPadding = document.querySelectorAll("[class^='pad-']");
|
146
|
-
elementPadding.forEach(function (element) {
|
147
|
-
var classes = element.className.split(" ");
|
148
|
-
classes.forEach(function (cls) {
|
149
|
-
if (cls.startsWith("pad-")) {
|
150
|
-
var paddingValue = cls.substring(5);
|
151
|
-
if (cls.startsWith("pad-t-")) {
|
152
|
-
if (/^\d+px?$/.test(paddingValue)) {
|
153
|
-
element.style.paddingTop = paddingValue;
|
154
|
-
}
|
155
|
-
} else if (cls.startsWith("pad-l-")) {
|
156
|
-
// left
|
157
|
-
if (/^\d+px?$/.test(paddingValue)) {
|
158
|
-
element.style.paddingLeft = paddingValue;
|
159
|
-
}
|
160
|
-
} else if (cls.startsWith("pad-r-")) {
|
161
|
-
// right
|
162
|
-
if (/^\d+px?$/.test(paddingValue)) {
|
163
|
-
element.style.paddingRight = paddingValue;
|
164
|
-
}
|
165
|
-
} else if (cls.startsWith("pad-b-")) {
|
166
|
-
// bottom
|
167
|
-
if (/^\d+px?$/.test(paddingValue)) {
|
168
|
-
element.style.paddingBottom = paddingValue;
|
169
|
-
}
|
170
|
-
} else {
|
171
|
-
if (/^\d+px?$/.test(paddingValue)) {
|
172
|
-
// padding all
|
173
|
-
element.style.padding = paddingValue;
|
174
|
-
}
|
175
|
-
}
|
176
|
-
}
|
177
|
-
});
|
178
|
-
});
|
179
|
-
|
180
|
-
// figure out how to have this work for all borders
|
181
|
-
var borderElements = document.querySelectorAll("[data-border]");
|
182
|
-
borderElements.forEach(function (element) {
|
183
|
-
var borderData = element.getAttribute('data-border');
|
184
|
-
if (borderData) {
|
185
|
-
var parts = borderData.split(" ");
|
186
|
-
parts.forEach(function (part) {
|
187
|
-
if (part.startsWith("color-")) {
|
188
|
-
var colorCode = part.substring(7);
|
189
|
-
if (/^[0-9A-Fa-f]{6}$/.test(colorCode)) {
|
190
|
-
element.style.borderColor = "#".concat(colorCode);
|
191
|
-
}
|
192
|
-
}
|
193
|
-
if (part.startsWith("radius-")) {
|
194
|
-
var borderRadius = part.substring(7);
|
195
|
-
if (borderRadius.includes("%")) {
|
196
|
-
borderRadius += "%";
|
197
|
-
} else {
|
198
|
-
borderRadius += "px";
|
199
|
-
}
|
200
|
-
element.style.borderRadius = borderRadius;
|
201
|
-
}
|
202
|
-
if (part.startsWith("size-")) {
|
203
|
-
var borderSize = part.substring(7);
|
204
|
-
element.style.borderWidth = borderSize;
|
205
|
-
}
|
206
|
-
});
|
207
|
-
}
|
208
|
-
});
|
209
|
-
var imageDimension = document.querySelectorAll("[data-image]");
|
210
|
-
imageDimension.forEach(function (element) {
|
211
|
-
var imageData = element.getAttribute('data-image');
|
212
|
-
if (imageData) {
|
213
|
-
var parts = imageData.split(" ");
|
214
|
-
parts.forEach(function (part) {
|
215
|
-
if (part.startsWith("height-")) {
|
216
|
-
var imageHeight = part.substring(7);
|
217
|
-
if (imageHeight.includes("%")) {
|
218
|
-
imageHeight += "%";
|
219
|
-
} else if (imageHeight.includes("em") || imageHeight.includes("-em")) {
|
220
|
-
imageHeight += "em";
|
221
|
-
} else {
|
222
|
-
imageHeight += "px";
|
223
|
-
}
|
224
|
-
element.style.height = imageHeight;
|
225
|
-
}
|
226
|
-
if (part.startsWith("width-")) {
|
227
|
-
var imageWidth = part.substring(6);
|
228
|
-
if (imageWidth.includes("%")) {
|
229
|
-
imageWidth += "%";
|
230
|
-
} else if (imageWidth.includes("em") || imageWidth.includes("-em")) {
|
231
|
-
imageWidth += "em";
|
232
|
-
} else {
|
233
|
-
imageWidth += "px";
|
234
|
-
}
|
235
|
-
element.style.width = imageWidth;
|
236
|
-
}
|
237
|
-
});
|
238
|
-
}
|
239
|
-
});
|
240
|
-
var marginCheck = document.querySelectorAll("[data-margin]");
|
241
|
-
marginCheck.forEach(function (element) {
|
242
|
-
var parts = element.className.split(" ");
|
243
|
-
parts.forEach(function (part) {
|
244
|
-
if (part.startsWith("a-")) {
|
245
|
-
var everyMargin = part.substring(5);
|
246
|
-
element.style.margin = everyMargin + "px";
|
247
|
-
} else if (part.startsWith("r-")) {
|
248
|
-
var rightMargin = part.substring(5);
|
249
|
-
element.style.marginRight = rightMargin + "px";
|
250
|
-
} else if (part.startsWith("l-")) {
|
251
|
-
var leftMargin = part.substring(5);
|
252
|
-
element.style.marginLeft = leftMargin + "px";
|
253
|
-
} else if (part.startsWith("t-")) {
|
254
|
-
var topMargin = part.substring(5);
|
255
|
-
element.style.marginTop = topMargin + "px";
|
256
|
-
} else if (part.startsWith("b-")) {
|
257
|
-
var bottomMargin = part.substring(5);
|
258
|
-
element.style.marginBottom = bottomMargin + "px";
|
259
|
-
}
|
260
|
-
});
|
261
|
-
});
|
262
|
-
var indexValue = document.querySelectorAll("[data-index]");
|
263
|
-
indexValue.forEach(function (element) {
|
264
|
-
var indexData = element.getAttribute('data-index');
|
265
|
-
if (indexData) {
|
266
|
-
var parts = indexData.split(" ");
|
267
|
-
parts.forEach(function (part) {
|
268
|
-
if (part.startsWith("z-")) {
|
269
|
-
var zIndex = part.substring(5);
|
270
|
-
element.style.zIndex = zIndex;
|
271
|
-
}
|
272
|
-
});
|
273
|
-
}
|
274
|
-
});
|
275
|
-
});
|
276
|
-
modalFunction();
|
277
|
-
loginOption();
|
278
|
-
unicodeFunction();
|
279
|
-
copyClip();
|
280
|
-
}
|
281
|
-
var global = expackExport();
|
282
|
-
|
283
|
-
export { global as default };
|
284
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
var ExPack=function(){"use strict";var t,e,s;return document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll("[class*='bg-']").forEach((function(t){t.className.split(" ").forEach((function(e){if(e.startsWith("bg-")){var s=e.substring(3);/^[0-9A-Fa-f]{6}$/.test(s)&&(t.style.backgroundColor="#".concat(s))}}))})),document.querySelectorAll("[class*='fr-']").forEach((function(t){t.className.split(" ").forEach((function(e){if(e.startsWith("fr-")){var s=e.substring(3);/^[0-9A-Fa-f]{6}$/.test(s)&&(t.style.color="#".concat(s))}}))})),document.querySelectorAll("[class^='fw-']").forEach((function(t){t.className.split(" ").forEach((function(e){if(e.startsWith("fw-")){var s=e.substring(3);/^\d+px?$/.test(s)&&(t.style.fontWeight=s)}}))})),document.querySelectorAll("[class*='sz-']").forEach((function(t){t.className.split(" ").forEach((function(e){if(e.startsWith("sz-")){var s=e.substring(3);/^\d+px?$/.test(s)&&(t.style.fontSize=fwValue)}}))})),document.querySelectorAll("[class^='pad-']").forEach((function(t){t.className.split(" ").forEach((function(e){if(e.startsWith("pad-")){var s=e.substring(5);e.startsWith("pad-t-")?/^\d+px?$/.test(s)&&(t.style.paddingTop=s):e.startsWith("pad-l-")?/^\d+px?$/.test(s)&&(t.style.paddingLeft=s):e.startsWith("pad-r-")?/^\d+px?$/.test(s)&&(t.style.paddingRight=s):e.startsWith("pad-b-")?/^\d+px?$/.test(s)&&(t.style.paddingBottom=s):/^\d+px?$/.test(s)&&(t.style.padding=s)}}))})),document.querySelectorAll("[data-border]").forEach((function(t){var e=t.getAttribute("data-border");e&&e.split(" ").forEach((function(e){if(e.startsWith("color-")){var s=e.substring(7);/^[0-9A-Fa-f]{6}$/.test(s)&&(t.style.borderColor="#".concat(s))}if(e.startsWith("radius-")){var a=e.substring(7);a.includes("%")?a+="%":a+="px",t.style.borderRadius=a}if(e.startsWith("size-")){var n=e.substring(7);t.style.borderWidth=n}}))})),document.querySelectorAll("[data-image]").forEach((function(t){var e=t.getAttribute("data-image");e&&e.split(" ").forEach((function(e){if(e.startsWith("height-")){var s=e.substring(7);s.includes("%")?s+="%":s.includes("em")||s.includes("-em")?s+="em":s+="px",t.style.height=s}if(e.startsWith("width-")){var a=e.substring(6);a.includes("%")?a+="%":a.includes("em")||a.includes("-em")?a+="em":a+="px",t.style.width=a}}))})),document.querySelectorAll("[data-margin]").forEach((function(t){t.className.split(" ").forEach((function(e){if(e.startsWith("a-")){var s=e.substring(5);t.style.margin=s+"px"}else if(e.startsWith("r-")){var a=e.substring(5);t.style.marginRight=a+"px"}else if(e.startsWith("l-")){var n=e.substring(5);t.style.marginLeft=n+"px"}else if(e.startsWith("t-")){var r=e.substring(5);t.style.marginTop=r+"px"}else if(e.startsWith("b-")){var i=e.substring(5);t.style.marginBottom=i+"px"}}))})),document.querySelectorAll("[data-index]").forEach((function(t){var e=t.getAttribute("data-index");e&&e.split(" ").forEach((function(e){if(e.startsWith("z-")){var s=e.substring(5);t.style.zIndex=s}}))}))})),t=document.getElementsByClassName("modal"),e=document.getElementsByClassName("modal-btn"),s=document.getElementsByClassName("close"),e.onclick=function(){t.style.display="block"},s.onclick=function(){t.style.display="none"},window.onclick=function(e){e.target==t&&(t.style.display="none")},function(){var t=document.getElementsByClassName("login-email"),e=document.getElementsByClassName("login-password"),s=document.getElementsByClassName("login-username");function a(t){for(var e=0;e<t.length;e++)if(t[e].classList.contains("required"))return!0;return!1}var n=document.getElementsByClassName("register-btn");if(n.length>0)for(var r=0;r<n.length;r++)n[r].onclick=function(){var n=a(t),r=a(e),i=a(s);if(n&&t.length>0){var o=t[0].value;localStorage.setItem("email saved",o),document.cookie="userEmail=".concat(o)}if(r&&e.length>0){var l=e[0].value;localStorage.setItem("password saved",l),document.cookie="userPassword=".concat(l)}if(i&&s.length>0){var c=s[0].value;localStorage.setItem("username saved",c),document.cookie="userUsername=".concat(c)}};else console.log("no register")}(),document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll("[class*='u-']").forEach((function(t){t.className.split(" ").forEach((function(e){if(e.startsWith("c")){var s=e.substring(4);t.textConent=unicodeMap[s]}}))}))})),void document.querySelectorAll("[class^='copy-text'").forEach((function(t){t.focus(),t.select(),t.setSelectionRange(0,99999),navigator.clipboard.writeText(t.value),alert("Copied Text: "+t.value)}))}();
|