appscms-tools-theme 5.1.8 → 5.1.9

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.
@@ -22,7 +22,215 @@ assign boxColor = site.data[page.folderName][page.lang][page.fileName].color -%}
22
22
  <img src="/assets/images/content-tool-logo.png" alt="" />
23
23
  </a>
24
24
  </div>
25
- <button class="btn btn-primary btn-login">Login</button>
25
+ {%- if site.authentication -%}
26
+ <button class="login-modal-button open-modal-btn login-btn" style="width: 100px; padding: 5px 10px;" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasRight" aria-controls="offcanvasRight">Login</button>
27
+ <div class="user-profile-header">
28
+
29
+ <div class="profile-button" id="profileButton">
30
+
31
+
32
+ </div>
33
+ </div>
34
+
35
+ <div class="user-modal" id="userModal">
36
+ <div class="modal-item">
37
+ <div class="profile-user-avatar">GI</div>
38
+ <div class="user-info">
39
+ <div class="logged-in-username">Gill</div>
40
+ <p class="logged-in-user-email">itsrammoudgill@gmail.com</p>
41
+ </div>
42
+
43
+ </div>
44
+
45
+ <div class="modal-item">
46
+ <div class="item-icon"><svg height="20" width="20" viewBox="0 0 24 24" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" fill="#000000"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><defs><style>.cls-1{fill:none;stroke:#020202;stroke-miterlimit:10;stroke-width:1.91px;}</style></defs><circle class="cls-1" cx="12" cy="7.25" r="5.73"></circle><path class="cls-1" d="M1.5,23.48l.37-2.05A10.3,10.3,0,0,1,12,13h0a10.3,10.3,0,0,1,10.13,8.45l.37,2.05"></path></g></svg></div>
47
+ <div class="item-text">
48
+ <a href="/profile">Account</a> </div>
49
+ <div class="item-arrow"><svg viewBox="-4.5 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <title>arrow_right [#336]</title> <desc>Created with Sketch.</desc> <defs> </defs> <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Dribbble-Light-Preview" transform="translate(-305.000000, -6679.000000)" fill="#000000"> <g id="icons" transform="translate(56.000000, 160.000000)"> <path d="M249.365851,6538.70769 L249.365851,6538.70769 C249.770764,6539.09744 250.426289,6539.09744 250.830166,6538.70769 L259.393407,6530.44413 C260.202198,6529.66364 260.202198,6528.39747 259.393407,6527.61699 L250.768031,6519.29246 C250.367261,6518.90671 249.720021,6518.90172 249.314072,6519.28247 L249.314072,6519.28247 C248.899839,6519.67121 248.894661,6520.31179 249.302681,6520.70653 L257.196934,6528.32352 C257.601847,6528.71426 257.601847,6529.34685 257.196934,6529.73759 L249.365851,6537.29462 C248.960938,6537.68437 248.960938,6538.31795 249.365851,6538.70769" id="arrow_right-[#336]"> </path> </g> </g> </g> </g></svg></div>
50
+ </div>
51
+
52
+ <div class="modal-item">
53
+ <div class="item-icon"><svg height="20" width="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <g id="Warning / Help"> <path id="Vector" d="M8.19531 8.76498C8.42304 8.06326 8.84053 7.43829 9.40137 6.95899C9.96221 6.47968 10.6444 6.16501 11.373 6.0494C12.1017 5.9338 12.8486 6.02202 13.5303 6.3042C14.2119 6.58637 14.8016 7.05166 15.2354 7.64844C15.6691 8.24521 15.9295 8.95008 15.9875 9.68554C16.0455 10.421 15.8985 11.1581 15.5636 11.8154C15.2287 12.4728 14.7192 13.0251 14.0901 13.4106C13.4611 13.7961 12.7377 14.0002 12 14.0002V14.9998M12.0498 19V19.1L11.9502 19.1002V19H12.0498Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path> </g> </g></svg></div>
54
+ <div class="item-text">
55
+ <a href="/contact">Contact</a>
56
+ </div>
57
+ <div class="item-arrow"><svg viewBox="-4.5 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <title>arrow_right [#336]</title> <desc>Created with Sketch.</desc> <defs> </defs> <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Dribbble-Light-Preview" transform="translate(-305.000000, -6679.000000)" fill="#000000"> <g id="icons" transform="translate(56.000000, 160.000000)"> <path d="M249.365851,6538.70769 L249.365851,6538.70769 C249.770764,6539.09744 250.426289,6539.09744 250.830166,6538.70769 L259.393407,6530.44413 C260.202198,6529.66364 260.202198,6528.39747 259.393407,6527.61699 L250.768031,6519.29246 C250.367261,6518.90671 249.720021,6518.90172 249.314072,6519.28247 L249.314072,6519.28247 C248.899839,6519.67121 248.894661,6520.31179 249.302681,6520.70653 L257.196934,6528.32352 C257.601847,6528.71426 257.601847,6529.34685 257.196934,6529.73759 L249.365851,6537.29462 C248.960938,6537.68437 248.960938,6538.31795 249.365851,6538.70769" id="arrow_right-[#336]"> </path> </g> </g> </g> </g></svg></div>
58
+ </div>
59
+
60
+ <div class="modal-item" id="logoutBtn">
61
+ <div class="item-icon"><svg height="20" width="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round"></path> <path d="M10 12H20M20 12L17 9M20 12L17 15" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> </g></svg></div>
62
+ <div class="item-text">Log out</div>
63
+ <div class="item-arrow"><svg viewBox="-4.5 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <title>arrow_right [#336]</title> <desc>Created with Sketch.</desc> <defs> </defs> <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Dribbble-Light-Preview" transform="translate(-305.000000, -6679.000000)" fill="#000000"> <g id="icons" transform="translate(56.000000, 160.000000)"> <path d="M249.365851,6538.70769 L249.365851,6538.70769 C249.770764,6539.09744 250.426289,6539.09744 250.830166,6538.70769 L259.393407,6530.44413 C260.202198,6529.66364 260.202198,6528.39747 259.393407,6527.61699 L250.768031,6519.29246 C250.367261,6518.90671 249.720021,6518.90172 249.314072,6519.28247 L249.314072,6519.28247 C248.899839,6519.67121 248.894661,6520.31179 249.302681,6520.70653 L257.196934,6528.32352 C257.601847,6528.71426 257.601847,6529.34685 257.196934,6529.73759 L249.365851,6537.29462 C248.960938,6537.68437 248.960938,6538.31795 249.365851,6538.70769" id="arrow_right-[#336]"> </path> </g> </g> </g> </g></svg></div>
64
+ </div>
65
+ </div>
66
+ <div class="side-modal-overlay" id="modalOverlay"></div>
67
+
68
+ <div class="side-modal" id="sideModal">
69
+ <div class="modal-header">
70
+ <div>
71
+
72
+ {%- if siteData.navbarBrandLogoSvg -%}
73
+ <a href="/" aria-label="home-page"> {{siteData.navbarBrandLogoSvg}} </a>
74
+ {%- elsif siteData.navbarBrandText -%}
75
+ <span> {{siteData.navbarBrandText}}
76
+ {%- else -%}
77
+ {%- endif -%}
78
+ </div>
79
+ <button class="close-modal-btn">&times;</button>
80
+ </div>
81
+ <div class="side-modal-content">
82
+ <div class="modal-body d-flex justify-content-center">
83
+ <div class="user-avatar" id="userAvatar" style="display: none">GI</div>
84
+ <div class="auth-container" id="authContainer">
85
+ <div id="loginForm">
86
+ <h1>Log in</h1>
87
+ <h2>
88
+ Don't have an account? <a href="#" id="showSignup">Create account</a>
89
+ </h2>
90
+
91
+ <div class="auth-forms">
92
+ <button class="social-btn google-btn" id="googleLogin">
93
+ <svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M30.0014 16.3109C30.0014 15.1598 29.9061 14.3198 29.6998 13.4487H16.2871V18.6442H24.1601C24.0014 19.9354 23.1442 21.8798 21.2394 23.1864L21.2127 23.3604L25.4536 26.58L25.7474 26.6087C28.4458 24.1665 30.0014 20.5731 30.0014 16.3109Z" fill="#4285F4"></path> <path d="M16.2863 29.9998C20.1434 29.9998 23.3814 28.7553 25.7466 26.6086L21.2386 23.1863C20.0323 24.0108 18.4132 24.5863 16.2863 24.5863C12.5086 24.5863 9.30225 22.1441 8.15929 18.7686L7.99176 18.7825L3.58208 22.127L3.52441 22.2841C5.87359 26.8574 10.699 29.9998 16.2863 29.9998Z" fill="#34A853"></path> <path d="M8.15964 18.769C7.85806 17.8979 7.68352 16.9645 7.68352 16.0001C7.68352 15.0356 7.85806 14.1023 8.14377 13.2312L8.13578 13.0456L3.67083 9.64746L3.52475 9.71556C2.55654 11.6134 2.00098 13.7445 2.00098 16.0001C2.00098 18.2556 2.55654 20.3867 3.52475 22.2845L8.15964 18.769Z" fill="#FBBC05"></path> <path d="M16.2864 7.4133C18.9689 7.4133 20.7784 8.54885 21.8102 9.4978L25.8419 5.64C23.3658 3.38445 20.1435 2 16.2864 2C10.699 2 5.8736 5.1422 3.52441 9.71549L8.14345 13.2311C9.30229 9.85555 12.5086 7.4133 16.2864 7.4133Z" fill="#EB4335"></path> </g></svg>
94
+ Continue with Google
95
+ </button>
96
+ <button class="social-btn facebook-btn d-none" id="facebookLogin">
97
+ <span class="icon facebook-icon"></span>
98
+ Continue with Facebook
99
+ </button>
100
+ <!-- Add this inside your auth-forms div in both login and signup sections -->
101
+ <button class="social-btn twitter-btn d-none" id="twitterLogin">
102
+ <svg
103
+ viewBox="0 0 24 24"
104
+ width="24"
105
+ height="24"
106
+ style="margin-right: 10px"
107
+ >
108
+ <path
109
+ fill="white"
110
+ d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
111
+ />
112
+ </svg>
113
+ Continue with X
114
+ </button>
115
+
116
+ <div class="or-divider">Or</div>
117
+
118
+ <form id="emailLoginForm">
119
+ <div class="input-group">
120
+ <span class="icon email-icon"></span>
121
+ <input
122
+ type="email"
123
+ id="loginEmail"
124
+ placeholder="Email"
125
+ required
126
+ />
127
+ </div>
128
+ <div class="input-group">
129
+ <span class="icon password-icon"></span>
130
+ <input
131
+ type="password"
132
+ id="loginPassword"
133
+ placeholder="Password"
134
+ required
135
+ />
136
+ <span
137
+ class="password-toggle icon eye-icon"
138
+ id="toggleLoginPassword"
139
+ ></span>
140
+ </div>
141
+ <button type="submit" class="login-btn">Log in</button>
142
+ </form>
143
+
144
+ <div class="forgot-password">
145
+ <a href="#" id="forgotPassword">Forgot your password?</a>
146
+ </div>
147
+ </div>
148
+ </div>
149
+
150
+ <!-- Forgot Password Form -->
151
+ <div id="forgotPasswordForm">
152
+ <div class="back-btn" id="backToLogin">
153
+ <span class="back-icon">←</span>
154
+ Back to login
155
+ </div>
156
+
157
+ <h1>Reset password</h1>
158
+ <h2>
159
+ Enter your email address and we'll send you a link to reset your
160
+ password
161
+ </h2>
162
+
163
+ <form id="resetPasswordForm">
164
+ <div class="input-group">
165
+ <span class="icon email-icon"></span>
166
+ <input type="email" id="resetEmail" placeholder="Email" required />
167
+ </div>
168
+ <button type="submit" class="login-btn">Send reset link</button>
169
+ </form>
170
+
171
+ <div class="reset-success" id="resetSuccess">
172
+ <div class="success-icon">✓</div>
173
+ <h3>Reset link sent</h3>
174
+ <p>Check your email for instructions to reset your password</p>
175
+ </div>
176
+ </div>
177
+
178
+ <!-- Sign Up Form -->
179
+ <div id="signupForm" style="display: none">
180
+ <h1>Create your account</h1>
181
+ <h2>Already have an account? <a href="#" id="showLogin">Log in</a></h2>
182
+
183
+ <div class="auth-forms">
184
+ <button class="social-btn google-btn" id="googleSignup">
185
+ <svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M30.0014 16.3109C30.0014 15.1598 29.9061 14.3198 29.6998 13.4487H16.2871V18.6442H24.1601C24.0014 19.9354 23.1442 21.8798 21.2394 23.1864L21.2127 23.3604L25.4536 26.58L25.7474 26.6087C28.4458 24.1665 30.0014 20.5731 30.0014 16.3109Z" fill="#4285F4"></path> <path d="M16.2863 29.9998C20.1434 29.9998 23.3814 28.7553 25.7466 26.6086L21.2386 23.1863C20.0323 24.0108 18.4132 24.5863 16.2863 24.5863C12.5086 24.5863 9.30225 22.1441 8.15929 18.7686L7.99176 18.7825L3.58208 22.127L3.52441 22.2841C5.87359 26.8574 10.699 29.9998 16.2863 29.9998Z" fill="#34A853"></path> <path d="M8.15964 18.769C7.85806 17.8979 7.68352 16.9645 7.68352 16.0001C7.68352 15.0356 7.85806 14.1023 8.14377 13.2312L8.13578 13.0456L3.67083 9.64746L3.52475 9.71556C2.55654 11.6134 2.00098 13.7445 2.00098 16.0001C2.00098 18.2556 2.55654 20.3867 3.52475 22.2845L8.15964 18.769Z" fill="#FBBC05"></path> <path d="M16.2864 7.4133C18.9689 7.4133 20.7784 8.54885 21.8102 9.4978L25.8419 5.64C23.3658 3.38445 20.1435 2 16.2864 2C10.699 2 5.8736 5.1422 3.52441 9.71549L8.14345 13.2311C9.30229 9.85555 12.5086 7.4133 16.2864 7.4133Z" fill="#EB4335"></path> </g></svg>
186
+ Continue with Google
187
+ </button>
188
+
189
+ <div class="or-divider">Or</div>
190
+
191
+ <form id="emailSignupForm">
192
+ <div class="input-group">
193
+ <span class="icon email-icon"></span>
194
+ <input
195
+ type="email"
196
+ id="signupEmail"
197
+ placeholder="Email"
198
+ required
199
+ />
200
+ </div>
201
+ <div class="input-group">
202
+ <span class="icon password-icon"></span>
203
+ <input
204
+ type="password"
205
+ id="signupPassword"
206
+ placeholder="Password"
207
+ required
208
+ />
209
+ <span
210
+ class="password-toggle icon eye-icon"
211
+ id="toggleSignupPassword"
212
+ ></span>
213
+ </div>
214
+ <button type="submit" class="login-btn">Create account</button>
215
+ </form>
216
+
217
+ <p style="font-size: 14px; color: #777; text-align: center">
218
+ By creating an account, you agree to our
219
+ <a href="#">Privacy Policy</a> and our
220
+ <a href="#">Terms & Conditions.</a>
221
+ </p>
222
+ </div>
223
+ </div>
224
+
225
+
226
+
227
+ </div><div class="user-avatar" id="userAvatar" style="display: none"></div>
228
+
229
+
230
+ </div>
231
+ </div>
232
+ </div>
233
+ {%- endif -%}
26
234
  </div>
27
235
  </nav>
28
236
 
@@ -89,6 +297,20 @@ assign boxColor = site.data[page.folderName][page.lang][page.fileName].color -%}
89
297
  </div>
90
298
  </div>
91
299
  </div>
300
+ <style>
301
+ .custom-switch .custom-control-input:checked ~ .custom-control-label::before {
302
+ background-color: #2563eb; /* Bootstrap blue or use #1D4ED8 for deeper blue */
303
+ border-color: #2563eb;
304
+ }
305
+
306
+ .custom-switch .custom-control-label::before {
307
+ transition: all 0.3s ease-in-out;
308
+ }
309
+
310
+ .custom-switch .custom-control-input:focus ~ .custom-control-label::before {
311
+ box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
312
+ }
313
+ </style>
92
314
 
93
315
  <!-- Main Content -->
94
316
  <div class="main-content" id="mainContent">
@@ -110,27 +332,50 @@ assign boxColor = site.data[page.folderName][page.lang][page.fileName].color -%}
110
332
  <!-- FORM START -->
111
333
  <form id="contentToolForm">
112
334
  <!-- Standard Inputs -->
113
- {% for input in pageData.inputs %}
114
- <div class="mb-3">
115
- <label class="form-label">{{ input.label }}</label>
116
-
117
- {% if input.type == "text" %}
118
- <input type="text" name="{{ input.name }}" placeholder="{{ input.placeholder }}" class="form-control" />
119
-
120
- {% elsif input.type == "select" %}
121
- <select class="form-control" name="{{ input.name }}">
122
- {% for option in input.options %}
123
- <option value="{{ option }}">{{ option }}</option>
124
- {% endfor %}
125
- </select>
335
+ {% for input in pageData.inputs %}
336
+ <div class="mb-3">
337
+ {% if input.type == "text" %}
338
+ <label class="form-label">{{ input.label }}</label>
339
+ <input
340
+ type="text"
341
+ name="{{ input.name }}"
342
+ placeholder="{{ input.placeholder }}"
343
+ class="form-control"
344
+ />
345
+
346
+ {% elsif input.type == "select" %}
347
+ <label class="form-label">{{ input.label }}</label>
348
+ <select class="form-control" name="{{ input.name }}">
349
+ {% for option in input.options %}
350
+ <option value="{{ option }}">{{ option }}</option>
351
+ {% endfor %}
352
+ </select>
353
+
354
+ {% elsif input.type == "textarea" %}
355
+ <label class="form-label">{{ input.label }}</label>
356
+ <textarea
357
+ name="{{ input.name }}"
358
+ placeholder="{{ input.placeholder }}"
359
+ rows="3"
360
+ class="form-control"
361
+ ></textarea>
362
+
363
+ {% elsif input.type == "checkbox" %}
364
+ <div class="custom-control custom-switch">
365
+ <input
366
+ type="checkbox"
367
+ class="custom-control-input"
368
+ id="{{ input.name }}"
369
+ name="{{ input.name }}"
370
+ />
371
+ <label class="custom-control-label" for="{{ input.name }}">
372
+ {{ input.label }}
373
+ </label>
374
+ </div>
375
+ {% endif %}
376
+ </div>
377
+ {% endfor %}
126
378
 
127
- {% elsif input.type == "textarea" %}
128
- <textarea name="{{ input.name }}" placeholder="{{ input.placeholder }}" rows="3"
129
- class="form-control"></textarea>
130
-
131
- {% endif %}
132
- </div>
133
- {% endfor %}
134
379
 
135
380
 
136
381
  <div class="advanced-options mb-3" data-toggle="collapse" data-target="#advancedOptions">
@@ -168,8 +413,7 @@ assign boxColor = site.data[page.folderName][page.lang][page.fileName].color -%}
168
413
  </form>
169
414
  <!-- FORM END -->
170
415
  </div>
171
-
172
- <!-- Quill Editor -->
416
+ <!-- Quill Editor -->
173
417
  <div class="col-lg-4 col-xl-6">
174
418
  <div id="editor" style="height: 300px; background: #fff"></div>
175
419
  </div>
@@ -179,12 +423,145 @@ assign boxColor = site.data[page.folderName][page.lang][page.fileName].color -%}
179
423
  <link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet" />
180
424
  <script src="https://cdn.quilljs.com/1.3.6/quill.min.js"></script>
181
425
 
182
- <!-- Init Quill -->
426
+ <!-- Custom CSS for Copy Button -->
427
+ <style>
428
+ .ql-copy {
429
+ position: relative;
430
+ }
431
+
432
+ .ql-copy:before {
433
+ content: "📋";
434
+ font-size: 14px;
435
+ }
436
+
437
+ .ql-copy:hover {
438
+ color: #06c;
439
+ }
440
+
441
+ /* Tooltip styles */
442
+ .copy-tooltip {
443
+ position: absolute;
444
+ top: -30px;
445
+ left: 50%;
446
+ transform: translateX(-50%);
447
+ background: #333;
448
+ color: white;
449
+ padding: 4px 8px;
450
+ border-radius: 4px;
451
+ font-size: 12px;
452
+ white-space: nowrap;
453
+ opacity: 0;
454
+ pointer-events: none;
455
+ transition: opacity 0.3s;
456
+ z-index: 1000;
457
+ }
458
+
459
+ .copy-tooltip.show {
460
+ opacity: 1;
461
+ }
462
+
463
+ .copy-tooltip::after {
464
+ content: '';
465
+ position: absolute;
466
+ top: 100%;
467
+ left: 50%;
468
+ transform: translateX(-50%);
469
+ border: 4px solid transparent;
470
+ border-top-color: #333;
471
+ }
472
+ </style>
473
+
474
+ <!-- Init Quill with Custom Copy Button -->
183
475
  <script>
476
+ // Custom copy button handler
477
+ function copyEditorContent() {
478
+ const editorContent = quill.getText(); // Get plain text
479
+ const editorHtml = quill.root.innerHTML; // Get HTML content
480
+
481
+ // Try to copy HTML content first, fallback to plain text
482
+ if (navigator.clipboard && window.isSecureContext) {
483
+ // Use modern clipboard API
484
+ navigator.clipboard.writeText(editorContent).then(() => {
485
+ showCopyTooltip('Copied!');
486
+ }).catch(() => {
487
+ fallbackCopy(editorContent);
488
+ });
489
+ } else {
490
+ // Fallback for older browsers
491
+ fallbackCopy(editorContent);
492
+ }
493
+ }
494
+
495
+ // Fallback copy method
496
+ function fallbackCopy(text) {
497
+ const textarea = document.createElement('textarea');
498
+ textarea.value = text;
499
+ textarea.style.position = 'fixed';
500
+ textarea.style.left = '-999999px';
501
+ textarea.style.top = '-999999px';
502
+ document.body.appendChild(textarea);
503
+ textarea.focus();
504
+ textarea.select();
505
+
506
+ try {
507
+ document.execCommand('copy');
508
+ showCopyTooltip('Copied!');
509
+ } catch (err) {
510
+ showCopyTooltip('Copy failed');
511
+ }
512
+
513
+ document.body.removeChild(textarea);
514
+ }
515
+
516
+ // Show tooltip
517
+ function showCopyTooltip(message) {
518
+ const copyButton = document.querySelector('.ql-copy');
519
+ let tooltip = copyButton.querySelector('.copy-tooltip');
520
+
521
+ if (!tooltip) {
522
+ tooltip = document.createElement('div');
523
+ tooltip.className = 'copy-tooltip';
524
+ copyButton.appendChild(tooltip);
525
+ }
526
+
527
+ tooltip.textContent = message;
528
+ tooltip.classList.add('show');
529
+
530
+ setTimeout(() => {
531
+ tooltip.classList.remove('show');
532
+ }, 2000);
533
+ }
534
+
535
+ // Initialize Quill with custom toolbar
184
536
  var quill = new Quill("#editor", {
185
537
  theme: "snow",
186
538
  placeholder: "Your generated content will appear here...",
539
+ modules: {
540
+ toolbar: {
541
+ container: [
542
+ [{ 'header': [1, 2, 3, false] }],
543
+ ['bold', 'italic', 'underline', 'strike'],
544
+ [{ 'list': 'ordered'}, { 'list': 'bullet' }],
545
+ [{ 'color': [] }, { 'background': [] }],
546
+ [{ 'align': [] }],
547
+ ['link'],
548
+ ['clean'],
549
+ ['copy'] // Custom copy button
550
+ ],
551
+ handlers: {
552
+ 'copy': copyEditorContent
553
+ }
554
+ }
555
+ }
187
556
  });
557
+
558
+ // Add copy button to toolbar after Quill initialization
559
+ const toolbar = quill.getModule('toolbar');
560
+ const copyButton = document.querySelector('.ql-copy');
561
+ if (copyButton) {
562
+ copyButton.innerHTML = '📋<span class="copy-tooltip">Copy content</span>';
563
+ copyButton.title = 'Copy content';
564
+ }
188
565
  </script>
189
566
  </div>
190
567
  </div>
@@ -192,6 +569,7 @@ assign boxColor = site.data[page.folderName][page.lang][page.fileName].color -%}
192
569
  <!-- Bootstrap 4.6 JS Bundle -->
193
570
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
194
571
  <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.2/js/bootstrap.bundle.min.js"></script>
572
+
195
573
 
196
574
  <script>
197
575
  function toggleSidebar() {
@@ -298,6 +676,7 @@ assign boxColor = site.data[page.folderName][page.lang][page.fileName].color -%}
298
676
  $('[data-toggle="tooltip"]').tooltip();
299
677
  });
300
678
  </script>
679
+
301
680
  {%- if site.customCode -%} {%- include customCode.html -%} {%- endif -%} {%-
302
681
  include appscms/scripts/script.html -%}
303
682
  </body>
data/assets/.DS_Store CHANGED
Binary file