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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a8f11e33a5e4fa43b24c3c4e38962363e709bbae4f2cca8d3d754818efeea2c
4
- data.tar.gz: 67f6ecce54af396a3c938777732506fff204250a6d329c5640930df1f6e4b611
3
+ metadata.gz: 1f4226c5b2b1f495436ea6b165051daddc9f3d5c13b656dc98581f2fdd3e9305
4
+ data.tar.gz: ccb7fbd097362a8b89f0dd419955e28ac5dded4513bb3b8f1b4b62d6f64e139c
5
5
  SHA512:
6
- metadata.gz: eefeeba7c687f986c8b4025107a8a5ae6ca6ce778aeeb9c509c12bae544ac3d069b5e9fa9f3871e7f51d9a5dcae261cc1a4aa633e5e1e14dad287088539088f2
7
- data.tar.gz: 730943d59eeae6263b46d87a59e4ff02e5d55f4487bb04465d0476e8c34bf32b8f00af91e01eb9c3a3b9e4422f204791677e035a74d0a393882d8a8f94abfcf5
6
+ metadata.gz: 36df83176916c33601c7ffe917a4420a7fadb0f766879b7ac558a9f3ac488f03b0768c28344964bcd0d0a2269e34f0f4fbb349dd801d4336cb20dc226e663ec8
7
+ data.tar.gz: 0a54a63f6bd4986aa4f4f6017d058dd26c7c823f56454a885007edda323be8a7188ef83dc84049b21750275b309e932e5aa6be355b83d336d183ca2d7418f0a9
@@ -205,7 +205,8 @@
205
205
  "inputId": "Given in: _input_Id",
206
206
  "dropDown": "Proportion",
207
207
  "dropDownId": "Given in: _dd_Id",
208
- "dateTimePicker": false
208
+ "dateTimePicker": false,
209
+ "unit": "1/2"
209
210
  },
210
211
  {
211
212
  "labelName": "Occurrence of the disease: 1 in..",
@@ -20,9 +20,39 @@
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"
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
  }
@@ -0,0 +1,11 @@
1
+ [
2
+ {
3
+ "category": "Christmas",
4
+ "features": [
5
+ {
6
+ "name": "Calendar",
7
+ "link": "/calendar"
8
+ }
9
+ ]
10
+ }
11
+ ]
@@ -31,6 +31,10 @@ layout: feature
31
31
  <input class="form-control" type="date" name="{{item.dateTimePicker}}"
32
32
  id="{{item.dateTimePickerId}}">
33
33
  {%- endif -%}
34
+ {%- if item.unit -%}
35
+ <div class="unit">{{item.unit}}</div>
36
+ {%- endif -%}
37
+
34
38
  </div>
35
39
 
36
40
  </div>
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
- {%- assign boxColor = site.data[page.folderName][page.lang][page.fileName].color -%}
7
- <div class="custom-box" data-filter="{{page.filter}}" style="background-color:{{boxColor}};">
8
- <div class="inner-box">
9
- <div style="display:none;" id="file-loader"><img src="/spinner.gif" alt="">
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="saving-file-download-wrap" style="display: none;">
13
- <img loading="lazy" class="trust-img" src="/trust.svg" alt="trust">
14
- <p class="text-white my-2">Thanks for your patience</p>
15
- <button class="btn" id="download-zip">Download</button>
16
- </div>
17
- <div class="file-input">
18
- <div class="mb-4 d-flex justify-content-center">
19
- <svg xmlns="http://www.w3.org/2000/svg" id="img-svg" viewBox="0 0 96 60">
20
- <path fill="white"
21
- d="M61.9655252,3.24869071 L61.9765763,3.41278068 L62.045,5.866 L73.2405238,6.25793424 C74.5651997,6.30419294 75.6130942,7.37295092 75.6521743,8.67919891 L75.6517521,8.84366004 L73.9765763,56.8144197 C73.9303176,58.1390957 72.8615596,59.1869902 71.5553116,59.2260703 L71.3908505,59.2256481 L68.3103384,59.1184351 C68.0464245,59.8400339 67.3786666,60.3670921 66.5807111,60.425963 L66.4314488,60.4314488 L66.4314488,60.4314488 L30.4314488,60.4314488 C29.3268793,60.4314488 28.4314488,59.5360183 28.4314488,58.4314488 L28.431,55.114 L25.262454,55.2256481 C23.9377781,55.2719068 22.8178834,54.2788497 22.6877793,52.9785097 L22.6767282,52.8144197 L21.0015524,4.84366004 C20.9552937,3.51898409 21.9483508,2.39908942 23.2486907,2.2689853 L23.4127807,2.25793424 L59.3908505,1.00155235 C60.7155264,0.955293651 61.8354211,1.94835077 61.9655252,3.24869071 Z M54.2794488,39.4234488 L45.0024366,47.6809882 L40.7104488,42.4274488 L29.431,51.895 L29.4314488,58.4314488 C29.4314488,58.9442846 29.817489,59.3669559 30.3148276,59.424721 L30.4314488,59.4314488 L66.4314488,59.4314488 C66.9442846,59.4314488 67.3669559,59.0454086 67.424721,58.5480699 L67.4314488,58.4314488 L67.4304488,52.8324488 L54.2794488,39.4234488 Z M37.2275545,6.00094318 C36.4483334,5.97373218 35.7872098,6.54589593 35.688023,7.30354781 L35.676119,7.44768018 L35.676,8.431 L60.4314488,8.43144877 L68.4314488,16.4314488 L68.431,58.121 L71.4257499,58.2262572 C72.2049711,58.2534682 72.8660946,57.6813045 72.9652815,56.9236526 L72.9771854,56.7795202 L74.6523613,8.80876055 C74.6795723,8.0295394 74.1074085,7.36841587 73.3497567,7.26922904 L73.2056243,7.25732506 L37.2275545,6.00094318 Z M59.4257499,2.00094318 L23.4476802,3.25732506 C22.668459,3.28453606 22.0488581,3.9014237 22.002764,4.6641489 L22.0009432,4.80876055 L23.676119,52.7795202 C23.70333,53.5587414 24.3202177,54.1783423 25.0829429,54.2244364 L25.2275545,54.2262572 L28.431,54.114 L28.4314488,10.4314488 C28.4314488,9.32687927 29.3268793,8.43144877 30.4314488,8.43144877 L34.611,8.431 L34.6767282,7.41278068 C34.7229869,6.08810473 35.7917449,5.04021022 37.0979929,5.00113017 L37.262454,5.00155235 L61.045,5.831 L60.9771854,3.44768018 C60.9499744,2.66845903 60.3330868,2.04885809 59.5703616,2.00276399 L59.4257499,2.00094318 Z M59.431,9.431 L30.4314488,9.43144877 C29.9186129,9.43144877 29.4959416,9.81748896 29.4381765,10.3148276 L29.4314488,10.4314488 L29.431,50.591 L40.8439098,41.010846 L45.1168036,46.2404726 L54.3266522,38.0432874 L67.431,51.405 L67.431,17.431 L59.4314488,17.4314488 L59.431,9.431 Z M58.4314488,26.4314488 C60.088303,26.4314488 61.4314488,27.7745945 61.4314488,29.4314488 C61.4314488,31.088303 60.088303,32.4314488 58.4314488,32.4314488 C56.7745945,32.4314488 55.4314488,31.088303 55.4314488,29.4314488 C55.4314488,27.7745945 56.7745945,26.4314488 58.4314488,26.4314488 Z M60.431,9.846 L60.431,16.431 L67.016,16.431 L60.431,9.846 Z">
22
- </path>
23
- </svg>
24
- </div>
25
- <div class="d-flex justify-content-center align-items-center ">
26
- <div id="Inputbox" class="boxes"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"
27
- fill="currentColor">
28
- <path
29
- d="M14.0036 1.99646L17.0036 4.99646L16.999 4.99946L17 5.00001V13H16V5.99946L13 6.00001V2.99946H4V17.9995L12.0275 18.0003C12.0093 17.8361 12 17.6691 12 17.5C12 15.0147 14.0147 13 16.5 13C18.9853 13 21 15.0147 21 17.5C21 19.9853 18.9853 22 16.5 22C14.5409 22 12.8742 20.7481 12.2563 19.0007L3 19V2.00001H14L14.0036 1.99646ZM16.5 14C14.567 14 13 15.567 13 17.5C13 19.433 14.567 21 16.5 21C18.433 21 20 19.433 20 17.5C20 15.567 18.433 14 16.5 14ZM17 15V16.9995L19 17V18L17 17.9995V20H16V17.9995L14 18V17L16 16.9995V15H17ZM11 14V15H6V14H11ZM14 11V12H6V11H14ZM14 8.00001V9.00001H6V8.00001H14ZM14 3.40746V4.99946H15.592L14 3.40746Z">
30
- </path>
31
- </svg> <span class='ml-1'>CHOOSE FILE</span> </div>
32
- <div class="file-pick-dropdown">
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
- </div>
57
- <div id="workspace" style="display: none;">
58
- <div class="row">
59
- <div class="col-md-8 mx-auto">
60
- <div class="select-img-panel">
61
- <div id="saving-data" style="display: none;">
62
- <img loading="lazy" src="/img/save.gif" alt="saving"> <span class="ml-2">Saving your
63
- images...</span>
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
- <div id="canvas-panel">
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
- </div>
74
- <div class="download-wrapper">
75
- <button id="download-button" style="background-color: {{boxColor}};"><svg
76
- xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
77
- <path
78
- 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" />
79
- </svg>Download</button>
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
- </div>
87
- <input class="d-none" onchange="fileOnChange()" type="file" id="file" accept=".webp,.png,.jpg,.jpeg" />
128
+
129
+ </div>
@@ -29,3 +29,12 @@
29
29
  display: flex;
30
30
  gap: 10px;
31
31
  }
32
+ .unit {
33
+ background: #ffff;
34
+ padding: 0px 10px;
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ border-radius: 4px;
39
+ font-weight: 600;
40
+ }
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
@@ -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.1.7
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-07-27 00:00:00.000000000 Z
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