appscms-tools-theme 2.1.7 → 2.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a8f11e33a5e4fa43b24c3c4e38962363e709bbae4f2cca8d3d754818efeea2c
4
- data.tar.gz: 67f6ecce54af396a3c938777732506fff204250a6d329c5640930df1f6e4b611
3
+ metadata.gz: 51b3c31ee812993687656e68b2412e478286a67cbb98d2e104b9292fdb0bce6f
4
+ data.tar.gz: cb31442354d68bb04bcfb6a790c1b140fbc2081eb83bf2bb51b35e70d6b6050b
5
5
  SHA512:
6
- metadata.gz: eefeeba7c687f986c8b4025107a8a5ae6ca6ce778aeeb9c509c12bae544ac3d069b5e9fa9f3871e7f51d9a5dcae261cc1a4aa633e5e1e14dad287088539088f2
7
- data.tar.gz: 730943d59eeae6263b46d87a59e4ff02e5d55f4487bb04465d0476e8c34bf32b8f00af91e01eb9c3a3b9e4422f204791677e035a74d0a393882d8a8f94abfcf5
6
+ metadata.gz: 93cb976dbffe80210bc811ee1ce7c7fbee6c4ae099744f191f3747ea2896753fa78b783dd761ebfd53fa9d82f84444779c7e252dc4ae33629cb0d8618a7658f9
7
+ data.tar.gz: 457d0caab467afae723489e2e5e13bf73856c76ab389a6e2b3e3b2941026f15a995386e7a7bda5a0ebe8162995cfbca89ea1c993e05d483599fc8f683b7c79a6
@@ -20,9 +20,18 @@
20
20
  ],
21
21
  "jsfilepaths": [
22
22
  "/assets/js/googledrive.js",
23
- "/js/canvas-image-effects.js"
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"
27
- ]
29
+ ],
30
+ "image": {
31
+ "src": "/assets/images/gallary.png",
32
+ "height": 277,
33
+ "width": 378,
34
+ "x": 110,
35
+ "y": 180
36
+ }
28
37
  }
data/_layouts/frame.html CHANGED
@@ -3,8 +3,10 @@ layout: feature
3
3
  ---
4
4
 
5
5
  <div class="container">
6
- {%- assign boxColor = site.data[page.folderName][page.lang][page.fileName].color -%}
7
- <div class="custom-box" data-filter="{{page.filter}}" style="background-color:{{boxColor}};">
6
+ {%- assign fileData = site.data[page.folderName][page.lang][page.fileName] -%}
7
+ <div class="custom-box" data-filter="{{page.filter}}" data-src="{{fileData.image.src}}"
8
+ data-height="{{fileData.image.height}}" data-width="{{fileData.image.width}}" data-x="{{fileData.image.x}}"
9
+ data-y="{{fileData.image.y}}" style="background-color:{{fileData.color}};">
8
10
  <div class="inner-box">
9
11
  <div style="display:none;" id="file-loader"><img src="/spinner.gif" alt="">
10
12
  <p>Please Wait ,Loading Your file </p>
@@ -54,6 +56,26 @@ layout: feature
54
56
  </div>
55
57
  </div>
56
58
  </div>
59
+ <div class="crop-image-modal-container">
60
+ <div class="row w-100">
61
+ <div class="crop-image-modal col-lg-6 col-md-8 mx-auto">
62
+ <div class="crop-image-modal-header" style="background-color:{{fileData.color}} ;">
63
+ <div>Select an area you would like to use</div>
64
+ <div>
65
+ <button onclick="closeModal()">
66
+ <i class="fas fa-times"></i>
67
+ </button>
68
+ </div>
69
+ </div>
70
+ <div class="crop-image-modal-body">
71
+
72
+ </div>
73
+ <div class="crop-btn-section">
74
+ <button id="crop" class="mx-auto my-3" style="background-color: {{fileData.color}};">crop</button>
75
+ </div>
76
+ </div>
77
+ </div>
78
+ </div>
57
79
  <div id="workspace" style="display: none;">
58
80
  <div class="row">
59
81
  <div class="col-md-8 mx-auto">
@@ -72,7 +94,7 @@ layout: feature
72
94
 
73
95
  </div>
74
96
  <div class="download-wrapper">
75
- <button id="download-button" style="background-color: {{boxColor}};"><svg
97
+ <button id="download-button" style="background-color: {{fileData.color}};"><svg
76
98
  xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
77
99
  <path
78
100
  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" />
data/assets/css/frame.css CHANGED
@@ -146,3 +146,286 @@ 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
+ }
Binary file
@@ -0,0 +1,171 @@
1
+ const getScript = document.currentScript
2
+ const pageTool = getScript.dataset.tool
3
+ const lang = getScript.dataset.lang
4
+ const gdrive = document.querySelector('#filepicker')
5
+ const inputBox = document.querySelector('#Inputbox')
6
+ const fileDropBox = document.querySelector('.custom-box')
7
+ const cropModal = document.querySelector('.crop-image-modal-container')
8
+ const workspace = document.getElementById('workspace')
9
+ const canvasPanel = document.getElementById('canvas-panel')
10
+ const download = document.querySelector('#download-button')
11
+ let cropInputWidth = null
12
+ let cropInputHeight = null
13
+ let image = null
14
+ const showLoader = () => {
15
+ showLoading()
16
+ }
17
+ const closeLoader = () => {}
18
+ const mimeTypes = 'image/png,image/jpg,image/jpeg,image/webp'
19
+ const filemimes = ['.png', '.webp', '.jpg', '.jpeg']
20
+ gdrive.addEventListener(
21
+ 'click',
22
+ (getFile, mimeTypes, showLoader, closeLoader) => {
23
+ const data = loadPicker()
24
+ }
25
+ )
26
+ const getDropBoxFile = (file) => {
27
+ handleFile(file)
28
+ }
29
+ const getFile = (file) => {
30
+ handleFile(file)
31
+ }
32
+ const fileOnChange = () => {
33
+ handleFile(file.files[0])
34
+ }
35
+ const dropbox = document.getElementById('dropbox')
36
+ dropbox.addEventListener(
37
+ 'click',
38
+ async (getDropBoxFile, showLoader, closeLoader) => {
39
+ const getFile = chooseFromDropbox()
40
+ }
41
+ )
42
+ inputBox.onclick = function () {
43
+ document.querySelector('#file').click()
44
+ }
45
+ fileDropBox.addEventListener('dragover', (e) => {
46
+ e.preventDefault()
47
+ })
48
+ fileDropBox.addEventListener('drop', (e) => {
49
+ e.preventDefault()
50
+ handleFile(e.dataTransfer.files[0])
51
+ })
52
+ const closeModal = () => {
53
+ cropModal.style.display = 'none'
54
+ }
55
+ const drawImage = () => {
56
+ let img = new Image()
57
+ img.src = fileDropBox.dataset.src
58
+ var canvas = document.createElement('canvas')
59
+ var ctx = canvas.getContext('2d')
60
+ img.onload = () => {
61
+ image.width = Number(fileDropBox.dataset.width)
62
+ image.height = Number(fileDropBox.dataset.height)
63
+ canvas.width = img.width
64
+ canvas.height = img.height
65
+ ctx.drawImage(
66
+ image,
67
+ Number(fileDropBox.dataset.x),
68
+ Number(fileDropBox.dataset.y),
69
+ image.width,
70
+ image.height
71
+ )
72
+ ctx.drawImage(img, 0, 0, canvas.width, canvas.height)
73
+ canvasPanel.innerHTML = ''
74
+ canvasPanel.appendChild(canvas)
75
+ stopLoading()
76
+ cropModal.style.display = 'none'
77
+ workspace.style.display = 'block'
78
+ }
79
+ }
80
+ const cropImage = (result) => {
81
+ let img = new Image()
82
+ let cropper = null
83
+ img.src = fileDropBox.dataset.src
84
+ img.onload = () => {
85
+ let img = document.createElement('img')
86
+ img.id = 'image'
87
+ img.src = result
88
+ let cropWidth = null
89
+ let cropHeight = null
90
+ document.querySelector('.crop-image-modal-body').appendChild(img)
91
+ cropper = new Cropper(img, {
92
+ ready() {
93
+ cropper.setAspectRatio(
94
+ Number(fileDropBox.dataset.width) / Number(fileDropBox.dataset.height)
95
+ )
96
+ cropModal.style.display = 'flex'
97
+ this.cropper.crop()
98
+ document.querySelector('#crop').addEventListener('click', () => {
99
+ let cropperImg = cropper
100
+ .getCroppedCanvas({
101
+ width: cropWidth,
102
+ height: cropHeight,
103
+ })
104
+ .toDataURL()
105
+ image = new Image()
106
+ image.onload = () => {
107
+ drawImage()
108
+ }
109
+ image.src = cropperImg
110
+ })
111
+ },
112
+ crop(event) {
113
+ cropWidth = Math.round(event.detail.width)
114
+ cropHeight = Math.round(event.detail.height)
115
+ },
116
+ })
117
+ stopLoading()
118
+ }
119
+ }
120
+ let inputFile = ''
121
+ const handleFile = (file) => {
122
+ cropModal.style.display = 'flex'
123
+ document.querySelector('#file-loader').style.display = 'flex'
124
+ document.querySelector('.file-input').style.display = 'none'
125
+ inputFile = file
126
+ if (file) {
127
+ const reader = new FileReader()
128
+ reader.onload = (e) => {
129
+ if (e.target.result) {
130
+ cropImage(e.target.result)
131
+ }
132
+ }
133
+ reader.readAsDataURL(file)
134
+ }
135
+ }
136
+ const showLoading = () => {
137
+ document.querySelector('#file-loader').style.display = 'flex'
138
+ document.querySelector('.file-input').style.display = 'none'
139
+ }
140
+ const stopLoading = () => {
141
+ fileDropBox.style.display = 'none'
142
+ }
143
+ download.addEventListener('click', () => {
144
+ let canvas = document.querySelector('canvas')
145
+ let url = canvas.toDataURL(`image/png`)
146
+ let a = document.createElement('a')
147
+ a.href = url
148
+ a.download = `safeimagekit-border-image.${inputFile.type.split('/')[1]}`
149
+ document.body.appendChild(a)
150
+ a.click()
151
+ if (lang === 'en') {
152
+ window.location.href = `/download?tool=${pageTool}`
153
+ } else {
154
+ window.location.href = `/${lang}/download?tool=${pageTool}`
155
+ }
156
+ })
157
+ const showDropDown = document.querySelector('.file-pick-dropdown')
158
+ const icon = document.querySelector('.arrow-sign')
159
+ const dropDown = document.querySelector('.file-picker-dropdown')
160
+ showDropDown.addEventListener('click', () => {
161
+ addScripts()
162
+ if (dropDown.style.display !== 'none') {
163
+ dropDown.style.display = 'none'
164
+ icon.classList.remove('fa-angle-up')
165
+ icon.classList.add('fa-angle-down')
166
+ } else {
167
+ dropDown.style.display = 'block'
168
+ icon.classList.remove('fa-angle-down')
169
+ icon.classList.add('fa-angle-up')
170
+ }
171
+ })
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.1.7
4
+ version: 2.1.8
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-07-27 00:00:00.000000000 Z
11
+ date: 2022-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -2575,6 +2575,7 @@ files:
2575
2575
  - assets/images/avatar.png
2576
2576
  - assets/images/balark.jpeg
2577
2577
  - assets/images/fileformat.webp
2578
+ - assets/images/gallary.png
2578
2579
  - assets/images/keshav.webp
2579
2580
  - assets/images/krutika.jpeg
2580
2581
  - assets/images/logo.png
@@ -2593,6 +2594,7 @@ files:
2593
2594
  - assets/js/ads.js
2594
2595
  - assets/js/append-div.js
2595
2596
  - assets/js/featureResult.js
2597
+ - assets/js/frame.js
2596
2598
  - assets/js/googledrive.js
2597
2599
  - assets/js/homeResult.js
2598
2600
  - assets/js/manifest.json