appscms-tools-theme 2.1.7 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_data/feature/en/allele-frequency.json +2 -1
- data/_data/feature/en/theframe.json +31 -1
- data/_data/photo-categories.json +11 -0
- data/_layouts/calculator.html +4 -0
- data/_layouts/frame.html +107 -65
- data/assets/css/calculators.css +9 -0
- data/assets/css/frame.css +287 -0
- data/assets/fonts/Calligraphy.ttf +0 -0
- data/assets/images/gallary.png +0 -0
- data/assets/images/together_forever.png +0 -0
- data/assets/js/frame.js +228 -0
- data/assets/js/photo-effects.json +56 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f4226c5b2b1f495436ea6b165051daddc9f3d5c13b656dc98581f2fdd3e9305
|
4
|
+
data.tar.gz: ccb7fbd097362a8b89f0dd419955e28ac5dded4513bb3b8f1b4b62d6f64e139c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36df83176916c33601c7ffe917a4420a7fadb0f766879b7ac558a9f3ac488f03b0768c28344964bcd0d0a2269e34f0f4fbb349dd801d4336cb20dc226e663ec8
|
7
|
+
data.tar.gz: 0a54a63f6bd4986aa4f4f6017d058dd26c7c823f56454a885007edda323be8a7188ef83dc84049b21750275b309e932e5aa6be355b83d336d183ca2d7418f0a9
|
@@ -20,9 +20,39 @@
|
|
20
20
|
],
|
21
21
|
"jsfilepaths": [
|
22
22
|
"/assets/js/googledrive.js",
|
23
|
-
"/
|
23
|
+
"https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.12/cropper.min.js",
|
24
|
+
"/assets/js/frame.js"
|
24
25
|
],
|
25
26
|
"cssfilepaths": [
|
27
|
+
"https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.12/cropper.css",
|
26
28
|
"/assets/css/frame.css"
|
29
|
+
],
|
30
|
+
"mainPreviewImage": "https://cdn.photofunia.com/effects/calendar/icons/medium.jpg",
|
31
|
+
"imageSamples": [
|
32
|
+
"https://cdn.photofunia.com/effects/calendar/examples/1hjpco5_r.jpg",
|
33
|
+
"https://cdn.photofunia.com/effects/calendar/examples/1gzzwn7_r.jpg",
|
34
|
+
"https://cdn.photofunia.com/effects/calendar/examples/eny6h4_r.jpg",
|
35
|
+
"https://cdn.photofunia.com/effects/calendar/examples/1v705mc_r.jpg"
|
36
|
+
],
|
37
|
+
"effectImagePath": "/assets/images/gallary.png",
|
38
|
+
"elements": [
|
39
|
+
{
|
40
|
+
"type": "image",
|
41
|
+
"label": "1."
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"label": "label",
|
45
|
+
"type": "text",
|
46
|
+
"id": "text-1"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"type": "image",
|
50
|
+
"label": "1."
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"label": "label",
|
54
|
+
"type": "text",
|
55
|
+
"id": "text-2"
|
56
|
+
}
|
27
57
|
]
|
28
58
|
}
|
data/_layouts/calculator.html
CHANGED
data/_layouts/frame.html
CHANGED
@@ -2,86 +2,128 @@
|
|
2
2
|
layout: feature
|
3
3
|
---
|
4
4
|
|
5
|
+
{%- assign fileData = site.data[page.folderName][page.lang][page.fileName] -%}
|
5
6
|
<div class="container">
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<p>Please Wait ,Loading Your file </p>
|
7
|
+
<div class="row">
|
8
|
+
<div class="col-md-3">
|
9
|
+
<div class="categories-section">
|
10
|
+
<h3>Categories</h3>
|
11
11
|
</div>
|
12
|
-
<div class="
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
<
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
<i class="fas fa-angle-down arrow-sign "></i>
|
34
|
-
<div class="file-picker-dropdown" style="display: none;">
|
35
|
-
<button id="dropbox"> <svg viewBox="0 0 24 24" fill="#0061FF"
|
36
|
-
xmlns="http://www.w3.org/2000/svg">
|
37
|
-
<path id="icon"
|
38
|
-
d="M12.0146 6.57367L6.50732 10.1473L12.0146 13.721L6.50732 17.2947L1 13.6912L6.50732 10.1176L1 6.57367L6.50732 3L12.0146 6.57367ZM6.47803 18.4263L11.9854 14.8527L17.4927 18.4263L11.9854 22L6.47803 18.4263ZM12.0146 13.6912L17.522 10.1176L12.0146 6.57367L17.4927 3L23 6.57367L17.4927 10.1473L23 13.721L17.4927 17.2947L12.0146 13.6912Z">
|
39
|
-
</path>
|
40
|
-
</svg> From Dropbox</button>
|
41
|
-
<button id='filepicker'> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
42
|
-
<path id="Path" d="M8.33331 3H15.6666L23 15H15.6666L8.33331 3Z" fill="#FFC107">
|
43
|
-
</path>
|
44
|
-
<path id="Path_2" d="M4.6012 21L8.30086 15H23L19.3333 21H4.6012Z" fill="#1976D2">
|
45
|
-
</path>
|
46
|
-
<path id="Path_3" d="M1 15.0625L4.60119 21L12 9L8.33333 3L1 15.0625Z"
|
47
|
-
fill="#4CAF50">
|
48
|
-
</path>
|
49
|
-
</svg> From Google Drive</button>
|
12
|
+
<div class="categories-list">
|
13
|
+
<div class="accordion" id="accordionExample">
|
14
|
+
{%- for item in site.data.photo-categories -%}
|
15
|
+
<div class="card">
|
16
|
+
<div class="card-header" id="heading-{{forloop.index}}">
|
17
|
+
<h3 class="mb-0">
|
18
|
+
<button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse"
|
19
|
+
data-target="#collapse-{{forloop.index}}" aria-expanded="true"
|
20
|
+
aria-controls="collapse-{{forloop.index}}">
|
21
|
+
{{item.category}}
|
22
|
+
</button>
|
23
|
+
</h3>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div id="collapse-{{forloop.index}}" class="collapse show"
|
27
|
+
aria-labelledby="heading-{{forloop.index}}" data-parent="#accordionExample">
|
28
|
+
<div class="card-body">
|
29
|
+
{%- for i in item.features -%}
|
30
|
+
<a href="{{i.link}}">{{i.name}}</a>
|
31
|
+
{%- endfor -%}
|
32
|
+
</div>
|
50
33
|
</div>
|
51
34
|
</div>
|
35
|
+
{%- endfor -%}
|
52
36
|
</div>
|
53
|
-
<p id="dropfile">or drop your file here</p>
|
54
37
|
</div>
|
38
|
+
|
55
39
|
</div>
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
<
|
63
|
-
|
40
|
+
<div class="col-md-9">
|
41
|
+
<div class="row">
|
42
|
+
<div class="col-md-8">
|
43
|
+
<form id="effect-form" data-feature-name="{{page.featureName}}">
|
44
|
+
{%- for item in fileData.elements -%}
|
45
|
+
{%- if item.type == "image" -%}
|
46
|
+
<label for="{{item.id}}">{{item.label}}</label>
|
47
|
+
<button type="button" id="{{item.id}}" data-index="{{forloop.index}}"
|
48
|
+
onclick="clickInput(this)">Choose
|
49
|
+
image</button>
|
50
|
+
<input class="d-none" id="file-{{forloop.index}}" type="file" onchange="fileOnChange(this)"
|
51
|
+
data-index="{{forloop.index}}" accept=".webp,.png,.jpg,.jpeg" required />
|
52
|
+
{%- endif -%}
|
53
|
+
{%- if item.type == "text" -%}
|
54
|
+
<label for="{{item.id}}">{{item.label}}</label>
|
55
|
+
<input type="text" id="{{item.id}}" required>
|
56
|
+
{%- endif -%}
|
57
|
+
{%- endfor -%}
|
58
|
+
<div>
|
59
|
+
<button type="submit">Go</button>
|
60
|
+
</div>
|
61
|
+
</form>
|
62
|
+
</div>
|
63
|
+
<div class="col-md-4">
|
64
|
+
<div class="preview-section">
|
65
|
+
<img src="{{fileData.mainPreviewImage}}" alt="">
|
64
66
|
</div>
|
65
|
-
<
|
67
|
+
<h3>Examples</h3>
|
68
|
+
<div class="image-samples">
|
69
|
+
{%- for item in fileData.imageSamples -%}
|
70
|
+
<img src="{{item}}" alt="sample">
|
71
|
+
{%- endfor -%}
|
66
72
|
</div>
|
67
73
|
</div>
|
68
74
|
</div>
|
69
|
-
<div class="col-md-4">
|
70
|
-
<div class="options-panel">
|
71
|
-
<div class="title">
|
72
75
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
76
|
+
<div class="crop-image-modal-container">
|
77
|
+
<div class="row w-100">
|
78
|
+
<div class="crop-image-modal col-lg-6 col-md-8 mx-auto">
|
79
|
+
<div class="crop-image-modal-header" style="background-color:{{fileData.color}} ;">
|
80
|
+
<div>Select an area you would like to use</div>
|
81
|
+
<div>
|
82
|
+
<button onclick="closeModal()">
|
83
|
+
<i class="fas fa-times"></i>
|
84
|
+
</button>
|
85
|
+
</div>
|
86
|
+
</div>
|
87
|
+
<div class="crop-image-modal-body">
|
88
|
+
|
89
|
+
</div>
|
90
|
+
<div class="crop-btn-section">
|
91
|
+
<button id="crop" class="mx-auto my-3"
|
92
|
+
style="background-color: {{fileData.color}};">crop</button>
|
93
|
+
</div>
|
80
94
|
</div>
|
81
95
|
</div>
|
96
|
+
</div>
|
97
|
+
<div id="workspace" data-name="together_forever" style="display: none;">
|
98
|
+
<div class="row">
|
99
|
+
<div class="col-md-8 mx-auto">
|
100
|
+
<div class="select-img-panel">
|
101
|
+
<div id="saving-data" style="display: none;">
|
102
|
+
<img loading="lazy" src="/img/save.gif" alt="saving"> <span class="ml-2">Saving your
|
103
|
+
images...</span>
|
104
|
+
</div>
|
105
|
+
<div id="canvas-panel">
|
106
|
+
</div>
|
107
|
+
</div>
|
108
|
+
</div>
|
109
|
+
<div class="col-md-4">
|
110
|
+
<div class="options-panel">
|
111
|
+
<div class="title">
|
82
112
|
|
113
|
+
</div>
|
114
|
+
<div class="download-wrapper">
|
115
|
+
<button id="download-button" style="background-color: {{fileData.color}};"><svg
|
116
|
+
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
117
|
+
<path
|
118
|
+
d="M256 0C114.6 0 0 114.6 0 256c0 141.4 114.6 256 256 256s256-114.6 256-256C512 114.6 397.4 0 256 0zM382.6 302.6l-103.1 103.1C270.7 414.6 260.9 416 256 416c-4.881 0-14.65-1.391-22.65-9.398L129.4 302.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L224 306.8V128c0-17.69 14.33-32 32-32s32 14.31 32 32v178.8l49.38-49.38c12.5-12.5 32.75-12.5 45.25 0S395.1 290.1 382.6 302.6z" />
|
119
|
+
</svg>Download</button>
|
120
|
+
</div>
|
121
|
+
</div>
|
122
|
+
|
123
|
+
</div>
|
124
|
+
</div>
|
83
125
|
</div>
|
84
126
|
</div>
|
85
127
|
</div>
|
86
|
-
|
87
|
-
|
128
|
+
|
129
|
+
</div>
|
data/assets/css/calculators.css
CHANGED
data/assets/css/frame.css
CHANGED
@@ -146,3 +146,290 @@ input {
|
|
146
146
|
.options-panel div {
|
147
147
|
width: 100%;
|
148
148
|
}
|
149
|
+
#action-button {
|
150
|
+
background-color: #ff6537;
|
151
|
+
margin: 0;
|
152
|
+
width: 180px;
|
153
|
+
padding: 10px 0;
|
154
|
+
font-size: 13pt;
|
155
|
+
position: relative;
|
156
|
+
border-radius: 2px;
|
157
|
+
border: 1px solid #ff6131;
|
158
|
+
color: #fff;
|
159
|
+
font-weight: 600;
|
160
|
+
display: block;
|
161
|
+
margin: auto;
|
162
|
+
margin-top: 20px;
|
163
|
+
}
|
164
|
+
#workspace-area input[type='text'] {
|
165
|
+
height: 40px;
|
166
|
+
border: 1px solid gray;
|
167
|
+
border-radius: 2px;
|
168
|
+
}
|
169
|
+
#canvas-area {
|
170
|
+
width: 100%;
|
171
|
+
margin-top: 30px;
|
172
|
+
max-width: 100%;
|
173
|
+
}
|
174
|
+
#img-svg {
|
175
|
+
margin: auto;
|
176
|
+
margin-top: 16px;
|
177
|
+
height: 67px;
|
178
|
+
width: 98px;
|
179
|
+
}
|
180
|
+
|
181
|
+
#file-loader {
|
182
|
+
display: flex;
|
183
|
+
align-items: center;
|
184
|
+
flex-direction: column;
|
185
|
+
}
|
186
|
+
|
187
|
+
#file-loader img {
|
188
|
+
height: 60px;
|
189
|
+
}
|
190
|
+
|
191
|
+
#file-loader p {
|
192
|
+
text-align: center;
|
193
|
+
color: #fff;
|
194
|
+
font-size: 17px;
|
195
|
+
}
|
196
|
+
|
197
|
+
#loading-img {
|
198
|
+
height: 27px;
|
199
|
+
width: 27px;
|
200
|
+
margin-right: 21px;
|
201
|
+
}
|
202
|
+
|
203
|
+
#dropbox svg,
|
204
|
+
#filepicker svg,
|
205
|
+
.boxes svg {
|
206
|
+
height: 24px !important;
|
207
|
+
width: 24px !important;
|
208
|
+
}
|
209
|
+
|
210
|
+
.file-picker-dropdown a,
|
211
|
+
.file-picker-dropdown button {
|
212
|
+
border: none;
|
213
|
+
width: 100%;
|
214
|
+
border-radius: 4px;
|
215
|
+
text-align: left;
|
216
|
+
background: #fff;
|
217
|
+
font-weight: 400;
|
218
|
+
font-size: 16px;
|
219
|
+
line-height: 24px;
|
220
|
+
padding: 15px 24px;
|
221
|
+
list-style: none;
|
222
|
+
height: 54px;
|
223
|
+
}
|
224
|
+
|
225
|
+
.file-picker-dropdown {
|
226
|
+
width: 213px;
|
227
|
+
position: absolute;
|
228
|
+
background: #fff;
|
229
|
+
top: 111%;
|
230
|
+
right: 0;
|
231
|
+
display: none;
|
232
|
+
box-shadow: rgb(26 26 26 / 20%) 0 0 12px;
|
233
|
+
border-radius: 4px;
|
234
|
+
}
|
235
|
+
|
236
|
+
.file-pick-dropdown i {
|
237
|
+
margin: 0;
|
238
|
+
}
|
239
|
+
|
240
|
+
.boxes {
|
241
|
+
background: #fff;
|
242
|
+
border-radius: 0;
|
243
|
+
cursor: pointer;
|
244
|
+
display: flex;
|
245
|
+
align-items: center;
|
246
|
+
padding: 15px 24px;
|
247
|
+
height: 54px;
|
248
|
+
border-top-left-radius: 4px;
|
249
|
+
border-bottom-left-radius: 4px;
|
250
|
+
justify-content: center;
|
251
|
+
font-size: 15px;
|
252
|
+
font-weight: 800;
|
253
|
+
color: #000;
|
254
|
+
}
|
255
|
+
|
256
|
+
.file-pick-dropdown {
|
257
|
+
color: #000;
|
258
|
+
cursor: pointer;
|
259
|
+
display: inline-flex;
|
260
|
+
background: #fff;
|
261
|
+
height: 54px;
|
262
|
+
border-left: 1px solid rgba(95, 88, 88, 0.75);
|
263
|
+
padding: 13px 20px;
|
264
|
+
border-top-right-radius: 4px;
|
265
|
+
border-bottom-right-radius: 4px;
|
266
|
+
align-items: center;
|
267
|
+
position: relative;
|
268
|
+
}
|
269
|
+
|
270
|
+
.crop-img-box {
|
271
|
+
background-color: #fff;
|
272
|
+
width: 100%;
|
273
|
+
border-radius: 0.75em;
|
274
|
+
border: 1px solid #f2f2f2;
|
275
|
+
box-shadow: 0px 5px 16px -2px rgb(42 115 217 / 20%);
|
276
|
+
font-size: 16px;
|
277
|
+
height: auto;
|
278
|
+
display: none;
|
279
|
+
}
|
280
|
+
|
281
|
+
.custom-box {
|
282
|
+
padding: 15px;
|
283
|
+
}
|
284
|
+
|
285
|
+
.inner-box {
|
286
|
+
border: 1px dashed rgba(0, 0, 0, 0.15);
|
287
|
+
background: rgba(0, 0, 0, 0.1);
|
288
|
+
padding: 40px;
|
289
|
+
min-height: 300px;
|
290
|
+
width: 100%;
|
291
|
+
}
|
292
|
+
#dropfile {
|
293
|
+
font-size: 16px;
|
294
|
+
margin-top: 15px;
|
295
|
+
text-align: center;
|
296
|
+
color: #fff;
|
297
|
+
}
|
298
|
+
.options-panel {
|
299
|
+
box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
|
300
|
+
border-radius: 4px;
|
301
|
+
padding: 30px;
|
302
|
+
width: 100%;
|
303
|
+
}
|
304
|
+
.options-panel .title {
|
305
|
+
width: 100%;
|
306
|
+
font-size: 28px;
|
307
|
+
line-height: 36px;
|
308
|
+
color: #000;
|
309
|
+
font-weight: 700;
|
310
|
+
text-align: left;
|
311
|
+
text-transform: capitalize;
|
312
|
+
}
|
313
|
+
.options-panel .description {
|
314
|
+
width: 100%;
|
315
|
+
font-size: 17px;
|
316
|
+
color: #666;
|
317
|
+
font-weight: 400;
|
318
|
+
text-align: left;
|
319
|
+
}
|
320
|
+
.options-title {
|
321
|
+
width: 100%;
|
322
|
+
font-size: 17px;
|
323
|
+
color: #666;
|
324
|
+
font-weight: 400;
|
325
|
+
text-align: left;
|
326
|
+
}
|
327
|
+
#download-button {
|
328
|
+
cursor: pointer;
|
329
|
+
display: inline-block;
|
330
|
+
width: 100%;
|
331
|
+
padding: 14px 0;
|
332
|
+
margin-bottom: 20px;
|
333
|
+
text-align: center;
|
334
|
+
border-radius: 50px;
|
335
|
+
background: #0050e5;
|
336
|
+
font-size: 18px;
|
337
|
+
color: #fff;
|
338
|
+
font-weight: 700;
|
339
|
+
text-decoration: none;
|
340
|
+
transition: all 0.3s;
|
341
|
+
border: none;
|
342
|
+
}
|
343
|
+
#download-button svg {
|
344
|
+
fill: #fff;
|
345
|
+
margin-right: 4px;
|
346
|
+
margin-bottom: 4px;
|
347
|
+
height: 20px;
|
348
|
+
}
|
349
|
+
.download-wrapper {
|
350
|
+
display: flex;
|
351
|
+
align-items: center;
|
352
|
+
border-bottom: 1px solid #ddd;
|
353
|
+
margin: 12px 0px;
|
354
|
+
padding: 12px 0px;
|
355
|
+
}
|
356
|
+
#canvas-panel canvas {
|
357
|
+
max-width: 100%;
|
358
|
+
}
|
359
|
+
.options-panel select,
|
360
|
+
textarea,
|
361
|
+
input {
|
362
|
+
width: 100%;
|
363
|
+
text-align: left;
|
364
|
+
background: #fff;
|
365
|
+
height: 34px;
|
366
|
+
display: flex;
|
367
|
+
border-radius: 4px;
|
368
|
+
justify-content: space-between;
|
369
|
+
box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%);
|
370
|
+
color: #0f0c0c;
|
371
|
+
border: 1px solid #ccc;
|
372
|
+
}
|
373
|
+
.crop-image-modal-container {
|
374
|
+
position: fixed;
|
375
|
+
display: none;
|
376
|
+
justify-content: center;
|
377
|
+
background-color: rgba(0, 0, 0, 0.297);
|
378
|
+
height: 100vh;
|
379
|
+
width: 100%;
|
380
|
+
top: 0;
|
381
|
+
left: 0;
|
382
|
+
z-index: 999999;
|
383
|
+
padding: 0px 20px;
|
384
|
+
}
|
385
|
+
.crop-image-modal {
|
386
|
+
height: fit-content;
|
387
|
+
background-color: #fff;
|
388
|
+
width: 100%;
|
389
|
+
margin-top: 10px;
|
390
|
+
border-radius: 5px;
|
391
|
+
padding: 0;
|
392
|
+
overflow-y: auto;
|
393
|
+
}
|
394
|
+
.crop-image-modal-header {
|
395
|
+
border-top-right-radius: 5px;
|
396
|
+
border-top-left-radius: 5px;
|
397
|
+
display: flex;
|
398
|
+
justify-content: space-between;
|
399
|
+
background-color: #ff5554;
|
400
|
+
display: flex;
|
401
|
+
align-items: center;
|
402
|
+
padding: 10px 20px;
|
403
|
+
}
|
404
|
+
.crop-image-modal-header div {
|
405
|
+
height: 100%;
|
406
|
+
display: flex;
|
407
|
+
align-items: center;
|
408
|
+
font-size: 20px;
|
409
|
+
color: #fff;
|
410
|
+
}
|
411
|
+
.crop-image-modal-body {
|
412
|
+
width: 450px;
|
413
|
+
margin: 10px auto;
|
414
|
+
}
|
415
|
+
.crop-image-modal-header button {
|
416
|
+
border: none;
|
417
|
+
background-color: transparent;
|
418
|
+
}
|
419
|
+
.crop-image-modal-header button i {
|
420
|
+
color: #fff;
|
421
|
+
font-size: 20px;
|
422
|
+
}
|
423
|
+
.crop-image-modal-body {
|
424
|
+
border-top-right-radius: 5px;
|
425
|
+
border-top-left-radius: 5px;
|
426
|
+
}
|
427
|
+
#crop {
|
428
|
+
border: none;
|
429
|
+
padding: 7px 14px;
|
430
|
+
color: #fff;
|
431
|
+
}
|
432
|
+
.crop-image-modal-body img{
|
433
|
+
width: 100%;
|
434
|
+
height: 100%;
|
435
|
+
}
|
Binary file
|
Binary file
|
Binary file
|
data/assets/js/frame.js
ADDED
@@ -0,0 +1,228 @@
|
|
1
|
+
const getScript = document.currentScript
|
2
|
+
const pageTool = getScript.dataset.tool
|
3
|
+
const lang = getScript.dataset.lang
|
4
|
+
const inputBox = document.querySelector('#Inputbox')
|
5
|
+
const fileDropBox = document.querySelector('.custom-box')
|
6
|
+
const cropModal = document.querySelector('.crop-image-modal-container')
|
7
|
+
const workspace = document.getElementById('workspace')
|
8
|
+
const canvasPanel = document.getElementById('canvas-panel')
|
9
|
+
const download = document.querySelector('#download-button')
|
10
|
+
const form = document.querySelector('#effect-form')
|
11
|
+
let files = []
|
12
|
+
let cropWidth = null
|
13
|
+
let cropHeight = null
|
14
|
+
let cropper = null
|
15
|
+
let cropInputWidth = null
|
16
|
+
let index = 0
|
17
|
+
let cropInputHeight = null
|
18
|
+
let image = null
|
19
|
+
const showLoader = () => {
|
20
|
+
showLoading()
|
21
|
+
}
|
22
|
+
const closeLoader = () => {}
|
23
|
+
const clickInput = (e) => {
|
24
|
+
console.log(`#file-${e.dataset.index}`)
|
25
|
+
document.querySelector(`#file-${e.dataset.index}`).click()
|
26
|
+
}
|
27
|
+
let featureData = null
|
28
|
+
|
29
|
+
fetch('/assets/js/photo-effects.json')
|
30
|
+
.then((response) => response.json())
|
31
|
+
.then((data) => {
|
32
|
+
featureData = data.find((i) => i.name === form.dataset.featureName)
|
33
|
+
console.log(featureData)
|
34
|
+
})
|
35
|
+
const fileOnChange = (e) => {
|
36
|
+
index = Number(e.dataset.index)
|
37
|
+
let reader = new FileReader()
|
38
|
+
reader.readAsDataURL(e.files[0])
|
39
|
+
reader.onload = (event) => {
|
40
|
+
if (cropper === null) {
|
41
|
+
cropImage(event.target.result, e.id)
|
42
|
+
} else {
|
43
|
+
updateCropper(event.target.result, e.id)
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
const closeModal = () => {
|
48
|
+
cropModal.style.display = 'none'
|
49
|
+
}
|
50
|
+
form.addEventListener('submit', (e) => {
|
51
|
+
e.preventDefault()
|
52
|
+
drawImage()
|
53
|
+
})
|
54
|
+
const drawInputImage = (ctx, item, indexValue, canvas, image) => {
|
55
|
+
console.log(ctx)
|
56
|
+
return new Promise((resolve, reject) => {
|
57
|
+
let image = document.createElement('img')
|
58
|
+
image.src = files[indexValue]
|
59
|
+
image.onload = () => {
|
60
|
+
image.width = Number(item.width)
|
61
|
+
image.height = Number(item.height)
|
62
|
+
ctx.drawImage(
|
63
|
+
image,
|
64
|
+
Number(item.x),
|
65
|
+
Number(item.y),
|
66
|
+
image.width,
|
67
|
+
image.height
|
68
|
+
)
|
69
|
+
if (item.rotate) {
|
70
|
+
drawRotated(item.rotate, ctx, canvas, image)
|
71
|
+
}
|
72
|
+
resolve()
|
73
|
+
}
|
74
|
+
})
|
75
|
+
}
|
76
|
+
const drawRotated = (degrees, ctx, canvas, image) => {
|
77
|
+
console.log(image)
|
78
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height)
|
79
|
+
|
80
|
+
// save the unrotatedctx of the canvas so we can restore it later
|
81
|
+
// the alternative is to untranslate & unrotate after drawing
|
82
|
+
ctx.save()
|
83
|
+
|
84
|
+
// move to the center of the canvas
|
85
|
+
ctx.translate(canvas.width / 2, canvas.height / 2)
|
86
|
+
|
87
|
+
// rotate the canvas to the specified degrees
|
88
|
+
ctx.rotate((degrees * Math.PI) / 180)
|
89
|
+
|
90
|
+
// draw the image
|
91
|
+
// since thectx is rotated, the image will be rotated also
|
92
|
+
ctx.drawImage(image, -image.width / 2, -image.width / 2)
|
93
|
+
|
94
|
+
// we’re done with the rotating so restore the unrotatedctx
|
95
|
+
ctx.restore()
|
96
|
+
}
|
97
|
+
const drawImage = () => {
|
98
|
+
let img = new Image()
|
99
|
+
img.src = featureData.effectImagePath
|
100
|
+
var canvas = document.createElement('canvas')
|
101
|
+
var ctx = canvas.getContext('2d')
|
102
|
+
img.onload = () => {
|
103
|
+
canvas.width = img.width
|
104
|
+
canvas.height = img.height
|
105
|
+
Promise.all(
|
106
|
+
featureData.elements.map((item, indexValue) => {
|
107
|
+
if (item.type === 'image') {
|
108
|
+
return new Promise((resolve, reject) => {
|
109
|
+
drawInputImage(ctx, item, indexValue, canvas).then(() => {
|
110
|
+
resolve()
|
111
|
+
})
|
112
|
+
})
|
113
|
+
}
|
114
|
+
})
|
115
|
+
).then(() => {
|
116
|
+
ctx.drawImage(img, 0, 0, canvas.width, canvas.height)
|
117
|
+
featureData.elements.map((item, indexValue) => {
|
118
|
+
if (item.type === 'text') {
|
119
|
+
let myFont = new FontFace(item.font, `url(${item.fontPath})`)
|
120
|
+
myFont.load().then(function (font) {
|
121
|
+
document.fonts.add(font)
|
122
|
+
ctx.font = `${item.fontSize}px ${item.fontWeight} ${item.font}`
|
123
|
+
if (item.shadowColor) {
|
124
|
+
ctx.shadowColor = `${item.shadowColor}`
|
125
|
+
}
|
126
|
+
if (item.shadowOffsetX) {
|
127
|
+
ctx.shadowOffsetX = 3
|
128
|
+
}
|
129
|
+
if (item.shadowOffsetY) {
|
130
|
+
ctx.shadowOffsetY = 3
|
131
|
+
}
|
132
|
+
if (item.shadowBlur) {
|
133
|
+
ctx.shadowBlur = 2
|
134
|
+
}
|
135
|
+
ctx.fillStyle = `${item.color}`
|
136
|
+
ctx.fillText(
|
137
|
+
document.querySelector(`#${item.id}`).value,
|
138
|
+
item.x,
|
139
|
+
item.y
|
140
|
+
)
|
141
|
+
})
|
142
|
+
}
|
143
|
+
if (item.type === 'rectangle') {
|
144
|
+
}
|
145
|
+
})
|
146
|
+
canvasPanel.innerHTML = ''
|
147
|
+
canvasPanel.appendChild(canvas)
|
148
|
+
workspace.style.display = 'block'
|
149
|
+
})
|
150
|
+
}
|
151
|
+
}
|
152
|
+
const cropImage = (result, id) => {
|
153
|
+
let image = new Image()
|
154
|
+
image.onload = () => {
|
155
|
+
let img = document.createElement('img')
|
156
|
+
img.src = result
|
157
|
+
img.id = 'image'
|
158
|
+
document.querySelector('.crop-image-modal-body').appendChild(img)
|
159
|
+
cropper = new Cropper(img, {
|
160
|
+
viewMode: 3,
|
161
|
+
ready() {
|
162
|
+
console.log(id)
|
163
|
+
let find = featureData.elements.find((i) => i.id === id)
|
164
|
+
console.log(find)
|
165
|
+
cropper.setAspectRatio(Number(find.width) / Number(find.height))
|
166
|
+
cropModal.style.display = 'flex'
|
167
|
+
this.cropper.crop()
|
168
|
+
},
|
169
|
+
crop(event) {
|
170
|
+
cropWidth = Math.round(event.detail.width)
|
171
|
+
cropHeight = Math.round(event.detail.height)
|
172
|
+
},
|
173
|
+
})
|
174
|
+
}
|
175
|
+
image.src = result
|
176
|
+
}
|
177
|
+
const updateCropper = (result, id) => {
|
178
|
+
cropper.destroy()
|
179
|
+
document.querySelector('.crop-image-modal-body').innerHTML = ''
|
180
|
+
cropImage(result, id)
|
181
|
+
}
|
182
|
+
document.querySelector('#crop').addEventListener('click', () => {
|
183
|
+
let cropperImg = cropper
|
184
|
+
.getCroppedCanvas({
|
185
|
+
width: cropWidth,
|
186
|
+
height: cropHeight,
|
187
|
+
})
|
188
|
+
.toDataURL()
|
189
|
+
files[index - 1] = cropperImg
|
190
|
+
cropModal.style.display = 'none'
|
191
|
+
})
|
192
|
+
let inputFile = ''
|
193
|
+
const handleFile = (file) => {
|
194
|
+
cropModal.style.display = 'flex'
|
195
|
+
document.querySelector('#file-loader').style.display = 'flex'
|
196
|
+
document.querySelector('.file-input').style.display = 'none'
|
197
|
+
inputFile = file
|
198
|
+
if (file) {
|
199
|
+
const reader = new FileReader()
|
200
|
+
reader.onload = (e) => {
|
201
|
+
if (e.target.result) {
|
202
|
+
cropImage(e.target.result)
|
203
|
+
}
|
204
|
+
}
|
205
|
+
reader.readAsDataURL(file)
|
206
|
+
}
|
207
|
+
}
|
208
|
+
const showLoading = () => {
|
209
|
+
document.querySelector('#file-loader').style.display = 'flex'
|
210
|
+
document.querySelector('.file-input').style.display = 'none'
|
211
|
+
}
|
212
|
+
const stopLoading = () => {
|
213
|
+
fileDropBox.style.display = 'none'
|
214
|
+
}
|
215
|
+
download.addEventListener('click', () => {
|
216
|
+
let canvas = document.querySelector('canvas')
|
217
|
+
let url = canvas.toDataURL(`image/png`)
|
218
|
+
let a = document.createElement('a')
|
219
|
+
a.href = url
|
220
|
+
a.download = `safeimagekit-border-image.${inputFile.type.split('/')[1]}`
|
221
|
+
document.body.appendChild(a)
|
222
|
+
a.click()
|
223
|
+
if (lang === 'en') {
|
224
|
+
window.location.href = `/download?tool=${pageTool}`
|
225
|
+
} else {
|
226
|
+
window.location.href = `/${lang}/download?tool=${pageTool}`
|
227
|
+
}
|
228
|
+
})
|
@@ -0,0 +1,56 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"name": "together_forever",
|
4
|
+
"effectImagePath": "/assets/images/together_forever.png",
|
5
|
+
"elements": [
|
6
|
+
{
|
7
|
+
"type": "image",
|
8
|
+
"imagePath": "",
|
9
|
+
"filter": "",
|
10
|
+
"perspective": "",
|
11
|
+
"rotate": 45,
|
12
|
+
"height": 300,
|
13
|
+
"width": 300,
|
14
|
+
"x": 200,
|
15
|
+
"y": 200,
|
16
|
+
"id": "file-1"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"label": "",
|
20
|
+
"id": "text-1",
|
21
|
+
"type": "text",
|
22
|
+
"x": "100",
|
23
|
+
"y": "100",
|
24
|
+
"color": "red",
|
25
|
+
"fontFamily": "Calligraphy",
|
26
|
+
"fontPath": "/assets/fonts/Calligraphy.ttf",
|
27
|
+
"fontWeight": "bold",
|
28
|
+
"fontSize": 50
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"type": "image",
|
32
|
+
"imagePath": "",
|
33
|
+
"filter": "",
|
34
|
+
"perspective": "",
|
35
|
+
"rotate": "",
|
36
|
+
"height": 300,
|
37
|
+
"width": 300,
|
38
|
+
"x": 100,
|
39
|
+
"y": 200,
|
40
|
+
"id": "file-3"
|
41
|
+
},
|
42
|
+
{
|
43
|
+
"id": "text-2",
|
44
|
+
"label": "",
|
45
|
+
"type": "text",
|
46
|
+
"x": 100,
|
47
|
+
"y": 100,
|
48
|
+
"color": "red",
|
49
|
+
"fontFamily": "Calligraphy",
|
50
|
+
"fontPath": "/assets/fonts/Calligraphy.ttf",
|
51
|
+
"fontWeight": "bold",
|
52
|
+
"fontSize": 50
|
53
|
+
}
|
54
|
+
]
|
55
|
+
}
|
56
|
+
]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appscms-tools-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vivek-appscms
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -2376,6 +2376,7 @@ files:
|
|
2376
2376
|
- _data/home/hi/hi.json
|
2377
2377
|
- _data/languagesupport/compress-pdf-langs.json
|
2378
2378
|
- _data/languagesupport/index-langs.json
|
2379
|
+
- _data/photo-categories.json
|
2379
2380
|
- _data/privacy/en/privacyPolicy.json
|
2380
2381
|
- _data/rating/rating.json
|
2381
2382
|
- _data/termAndCondition/en/termAndCondition.json
|
@@ -2564,6 +2565,7 @@ files:
|
|
2564
2565
|
- assets/fileimg/wcqHWtb.jpeg
|
2565
2566
|
- assets/fileimg/xbfyrdU.jpeg
|
2566
2567
|
- assets/fileimg/xeDZX8x.jpeg
|
2568
|
+
- assets/fonts/Calligraphy.ttf
|
2567
2569
|
- assets/guaranty.svg
|
2568
2570
|
- assets/images/Ankita.webp
|
2569
2571
|
- assets/images/Anushka.webp
|
@@ -2575,6 +2577,7 @@ files:
|
|
2575
2577
|
- assets/images/avatar.png
|
2576
2578
|
- assets/images/balark.jpeg
|
2577
2579
|
- assets/images/fileformat.webp
|
2580
|
+
- assets/images/gallary.png
|
2578
2581
|
- assets/images/keshav.webp
|
2579
2582
|
- assets/images/krutika.jpeg
|
2580
2583
|
- assets/images/logo.png
|
@@ -2583,6 +2586,7 @@ files:
|
|
2583
2586
|
- assets/images/safevideoconverter.svg
|
2584
2587
|
- assets/images/siddhika.jpeg
|
2585
2588
|
- assets/images/sona.jpeg
|
2589
|
+
- assets/images/together_forever.png
|
2586
2590
|
- assets/images/udit.jpeg
|
2587
2591
|
- assets/images/udit.jpg
|
2588
2592
|
- assets/images/udit.png
|
@@ -2593,10 +2597,12 @@ files:
|
|
2593
2597
|
- assets/js/ads.js
|
2594
2598
|
- assets/js/append-div.js
|
2595
2599
|
- assets/js/featureResult.js
|
2600
|
+
- assets/js/frame.js
|
2596
2601
|
- assets/js/googledrive.js
|
2597
2602
|
- assets/js/homeResult.js
|
2598
2603
|
- assets/js/manifest.json
|
2599
2604
|
- assets/js/multiselect.js
|
2605
|
+
- assets/js/photo-effects.json
|
2600
2606
|
- assets/js/redirectResult.js
|
2601
2607
|
- assets/js/theme.js
|
2602
2608
|
- assets/linkdin.svg
|