appscms-tools-theme 5.1.9 → 5.2.1

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.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/_data/.DS_Store +0 -0
  3. data/_data/aitools/en/all-in-one-social-post.json +217 -0
  4. data/_data/aitools/en/amazon-product-bullet-points-generator.json +2 -0
  5. data/_data/aitools/en/amazon-product-description-generator.json +15 -0
  6. data/_data/aitools/en/blog-conclusion-generator.json +253 -0
  7. data/_data/aitools/en/blog-content-calendar.json +232 -0
  8. data/_data/aitools/en/blog-introduction-generator.json +246 -0
  9. data/_data/aitools/en/blog-outline-generator.json +232 -0
  10. data/_data/aitools/en/blog-section-generator.json +253 -0
  11. data/_data/aitools/en/blog-title-generator.json +232 -0
  12. data/_data/aitools/en/blog-topic-ideas.json +232 -0
  13. data/_data/aitools/en/caption-generator.json +271 -0
  14. data/_data/aitools/en/engagement-post-generator.json +251 -0
  15. data/_data/aitools/en/facebook-post.json +232 -0
  16. data/_data/aitools/en/hidden-fact-finder.json +232 -0
  17. data/_data/aitools/en/human-written-blog-post.json +232 -0
  18. data/_data/aitools/en/instagram-bio-generator.json +246 -0
  19. data/_data/aitools/en/instagram-caption.json +232 -0
  20. data/_data/aitools/en/instagram-carousel.json +250 -0
  21. data/_data/aitools/en/instagram-hashtag-generator.json +231 -0
  22. data/_data/aitools/en/instagram-name-generator.json +239 -0
  23. data/_data/aitools/en/instagram-threads-generator.json +239 -0
  24. data/_data/aitools/en/interactive-content-creator.json +252 -0
  25. data/_data/aitools/en/linkedin-hashtag-generator.json +239 -0
  26. data/_data/aitools/en/linkedin-post.json +232 -0
  27. data/_data/aitools/en/motivational-posts.json +239 -0
  28. data/_data/aitools/en/pinterest-pin.json +217 -0
  29. data/_data/aitools/en/platform-specific-content-generator.json +246 -0
  30. data/_data/aitools/en/quick-article-writer.json +253 -0
  31. data/_data/aitools/en/replies-for-facebook.json +239 -0
  32. data/_data/aitools/en/replies-for-instagram.json +239 -0
  33. data/_data/aitools/en/replies-for-linkedin.json +239 -0
  34. data/_data/aitools/en/replies-for-twitter.json +239 -0
  35. data/_data/aitools/en/rewrite-article-with-keywords.json +246 -0
  36. data/_data/aitools/en/script-for-instagram-reel.json +246 -0
  37. data/_data/aitools/en/script-for-tiktok-video.json +246 -0
  38. data/_data/aitools/en/seo-optimized-blog-post.json +239 -0
  39. data/_data/aitools/en/snapchat-caption-maker.json +245 -0
  40. data/_data/aitools/en/social-media-bio-creator.json +274 -0
  41. data/_data/aitools/en/social-media-bio-generator.json +246 -0
  42. data/_data/aitools/en/social-media-calendar.json +250 -0
  43. data/_data/aitools/en/tiktok-caption.json +232 -0
  44. data/_data/aitools/en/tiktok-username-generator.json +239 -0
  45. data/_data/aitools/en/twitter-poll-generator.json +250 -0
  46. data/_data/aitools/en/twitter-post.json +272 -0
  47. data/_data/contenttool/en/features.json +18 -36
  48. data/_includes/.DS_Store +0 -0
  49. data/_layouts/appscms-feature.html +1 -1
  50. data/_layouts/content-tool-ai.html +38 -156
  51. data/assets/.DS_Store +0 -0
  52. data/assets/css/content-tool-ai.css +42 -12
  53. metadata +45 -19
  54. data/_includes/aitools/amazon-product-bullet-points-generator.html +0 -0
  55. data/_includes/aitools/amazon-product-description-generator.html +0 -0
  56. data/_includes/aitools/brand-name-generator.html +0 -0
  57. data/_includes/aitools/product-description.html +0 -0
  58. data/assets/js/.DS_Store +0 -0
  59. data/assets/js/ai-article-writer.js +0 -0
  60. data/assets/js/amazon-product-bullet-points-generator.js +0 -464
  61. data/assets/js/amazon-product-bullet-points-generator3.js +0 -176
  62. data/assets/js/amazon-product-description-generator.js +0 -309
  63. data/assets/js/blog-topic-ideas.js +0 -57
  64. data/assets/js/brand-name-generator.js +0 -127
  65. data/assets/js/human-written-blog-post.js +0 -57
  66. data/assets/js/instagram-caption.js +0 -57
  67. data/assets/js/instagram-hashtag-generator.js +0 -10
  68. data/assets/js/instagram-name-generator.js +0 -61
  69. data/assets/js/product-description.js +0 -299
  70. /data/_includes/aitools/{ai-article-writer.html → instagram-hashtag-generator.html} +0 -0
@@ -1,299 +0,0 @@
1
- // Auto-generated JS for Product Description
2
- document.addEventListener("DOMContentLoaded", function () {
3
- const form = document.getElementById("contentToolForm");
4
- const tool = "product_description";
5
-
6
- // Wait for Quill to be initialized
7
- let quill;
8
- const checkQuill = setInterval(() => {
9
- if (window.quill) {
10
- quill = window.quill;
11
- clearInterval(checkQuill);
12
- }
13
- }, 100);
14
-
15
- let input0 = form.querySelector('[name="input0"]');
16
- let input1 = form.querySelector('[name="input1"]');
17
- let language = form.querySelector('[name="language"]');
18
- let tone = form.querySelector('[name="tone"]');
19
-
20
- form.addEventListener("submit", async function (e) {
21
- e.preventDefault();
22
-
23
- // Check if Quill is available
24
- if (!quill) {
25
- console.error("Quill editor not found");
26
- return;
27
- }
28
-
29
- // Show loading state
30
- const submitButton = form.querySelector('button[type="submit"]');
31
- const originalText = submitButton ? submitButton.textContent : '';
32
- if (submitButton) {
33
- submitButton.textContent = 'Generating...';
34
- submitButton.disabled = true;
35
- }
36
-
37
- const options = {};
38
-
39
- options["input[0]"] = input0.value;
40
- options["input[1]"] = input1.value;
41
- options["language"] = language.value;
42
- options["tone"] = tone.value;
43
-
44
- const body = {
45
- tool: tool,
46
- llm: "gemini",
47
- model_name: "gemini-2.0-flash",
48
- options: options
49
- };
50
-
51
- try {
52
- const response = await fetch("https://contentool-api.onrender.com/api/v1/ecommerce-tools/product-description", {
53
- method: "POST",
54
- headers: {
55
- "Content-Type": "application/json"
56
- },
57
- body: JSON.stringify(body)
58
- });
59
-
60
- const data = await response.json();
61
-
62
- if (data.result) {
63
- // Clear the editor first
64
- quill.setText('');
65
-
66
- // Parse and render markdown content
67
- renderMarkdownToQuill(data.result, quill);
68
-
69
- console.log("✅ Content generated successfully");
70
- } else {
71
- quill.setText("No output received from server.");
72
- }
73
- } catch (err) {
74
- console.error("❌ API Error:", err);
75
- quill.setText("Error: " + err.message);
76
- } finally {
77
- // Reset button state
78
- if (submitButton) {
79
- submitButton.textContent = originalText;
80
- submitButton.disabled = false;
81
- }
82
- }
83
- });
84
- });
85
-
86
- // Function to render markdown content to Quill editor
87
- function renderMarkdownToQuill(markdownText, quill) {
88
- // Clear editor
89
- quill.setText('');
90
-
91
- let index = 0;
92
- const lines = markdownText.split('\n');
93
-
94
- lines.forEach((line, lineIndex) => {
95
- if (line.trim() === '') {
96
- // Empty line - add line break
97
- if (lineIndex < lines.length - 1) {
98
- quill.insertText(index, '\n');
99
- index += 1;
100
- }
101
- return;
102
- }
103
-
104
- // Handle different markdown patterns
105
- if (line.startsWith('**') && line.endsWith('**') && line.length > 4) {
106
- // Bold text (like **Product Title:** or **Key Features:**)
107
- const text = line.replace(/^\*\*(.*?)\*\*$/, '$1');
108
- quill.insertText(index, text, { 'bold': true });
109
- index += text.length;
110
- } else if (line.includes('**')) {
111
- // Mixed bold and normal text (like **Product Title:** Coffee Mug)
112
- const parts = line.split('**');
113
- for (let i = 0; i < parts.length; i++) {
114
- if (parts[i]) {
115
- if (i % 2 === 1) {
116
- // Odd index = bold text
117
- quill.insertText(index, parts[i], { 'bold': true });
118
- index += parts[i].length;
119
- } else {
120
- // Even index = normal text
121
- quill.insertText(index, parts[i]);
122
- index += parts[i].length;
123
- }
124
- }
125
- }
126
- } else if (line.startsWith('- ')) {
127
- // Bullet points
128
- const text = line.substring(2); // Remove '- '
129
- quill.insertText(index, '• ' + text);
130
- index += text.length + 2;
131
- } else if (line.match(/^\d+\.\s/)) {
132
- // Numbered lists
133
- const match = line.match(/^(\d+\.\s)(.*)$/);
134
- if (match) {
135
- const number = match[1];
136
- const content = match[2];
137
-
138
- // Insert number in bold
139
- quill.insertText(index, number, { 'bold': true });
140
- index += number.length;
141
-
142
- // Insert content in normal text
143
- quill.insertText(index, content);
144
- index += content.length;
145
- } else {
146
- quill.insertText(index, line);
147
- index += line.length;
148
- }
149
- } else if (line.startsWith('### ')) {
150
- // Headers (H3)
151
- const text = line.substring(4);
152
- quill.insertText(index, text, { 'bold': true });
153
- index += text.length;
154
- } else if (line.startsWith('## ')) {
155
- // Headers (H2)
156
- const text = line.substring(3);
157
- quill.insertText(index, text, { 'bold': true, 'size': 'large' });
158
- index += text.length;
159
- } else if (line.startsWith('# ')) {
160
- // Headers (H1)
161
- const text = line.substring(2);
162
- quill.insertText(index, text, { 'bold': true, 'size': 'huge' });
163
- index += text.length;
164
- } else if (line.startsWith('*') && line.endsWith('*') && line.length > 2) {
165
- // Italic text
166
- const text = line.replace(/^\*(.*?)\*$/, '$1');
167
- quill.insertText(index, text, { 'italic': true });
168
- index += text.length;
169
- } else {
170
- // Normal text
171
- quill.insertText(index, line);
172
- index += line.length;
173
- }
174
-
175
- // Add line break if not the last line
176
- if (lineIndex < lines.length - 1) {
177
- quill.insertText(index, '\n');
178
- index += 1;
179
- }
180
- });
181
- }
182
-
183
- // Alternative function using marked.js if available
184
- function renderMarkdownToQuillWithMarked(markdownText, quill) {
185
- if (typeof marked !== 'undefined') {
186
- try {
187
- // Convert markdown to HTML
188
- const html = marked.parse(markdownText);
189
-
190
- // Create a temporary div to parse HTML
191
- const tempDiv = document.createElement('div');
192
- tempDiv.innerHTML = html;
193
-
194
- // Clear editor
195
- quill.setText('');
196
-
197
- let index = 0;
198
-
199
- // Process each child element
200
- tempDiv.childNodes.forEach((node) => {
201
- if (node.nodeType === Node.TEXT_NODE) {
202
- const text = node.textContent.trim();
203
- if (text) {
204
- quill.insertText(index, text);
205
- index += text.length;
206
- }
207
- } else if (node.nodeType === Node.ELEMENT_NODE) {
208
- switch (node.tagName.toLowerCase()) {
209
- case 'h1':
210
- quill.insertText(index, node.textContent, { 'bold': true, 'size': 'huge' });
211
- index += node.textContent.length;
212
- break;
213
- case 'h2':
214
- quill.insertText(index, node.textContent, { 'bold': true, 'size': 'large' });
215
- index += node.textContent.length;
216
- break;
217
- case 'h3':
218
- case 'h4':
219
- case 'h5':
220
- case 'h6':
221
- quill.insertText(index, node.textContent, { 'bold': true });
222
- index += node.textContent.length;
223
- break;
224
- case 'strong':
225
- case 'b':
226
- quill.insertText(index, node.textContent, { 'bold': true });
227
- index += node.textContent.length;
228
- break;
229
- case 'em':
230
- case 'i':
231
- quill.insertText(index, node.textContent, { 'italic': true });
232
- index += node.textContent.length;
233
- break;
234
- case 'ul':
235
- node.querySelectorAll('li').forEach((li) => {
236
- quill.insertText(index, '• ' + li.textContent + '\n');
237
- index += li.textContent.length + 3;
238
- });
239
- break;
240
- case 'ol':
241
- node.querySelectorAll('li').forEach((li, i) => {
242
- const number = `${i + 1}. `;
243
- quill.insertText(index, number, { 'bold': true });
244
- index += number.length;
245
- quill.insertText(index, li.textContent + '\n');
246
- index += li.textContent.length + 1;
247
- });
248
- break;
249
- case 'p':
250
- const pText = node.textContent.trim();
251
- if (pText) {
252
- quill.insertText(index, pText + '\n');
253
- index += pText.length + 1;
254
- }
255
- break;
256
- case 'br':
257
- quill.insertText(index, '\n');
258
- index += 1;
259
- break;
260
- default:
261
- const defaultText = node.textContent.trim();
262
- if (defaultText) {
263
- quill.insertText(index, defaultText);
264
- index += defaultText.length;
265
- }
266
- }
267
- }
268
- });
269
-
270
- // Add final formatting cleanup
271
- if (index > 0) {
272
- quill.insertText(index, '\n');
273
- }
274
-
275
- } catch (error) {
276
- console.error('Error parsing markdown with marked.js:', error);
277
- // Fallback to basic markdown parsing
278
- renderMarkdownToQuill(markdownText, quill);
279
- }
280
- } else {
281
- // Fallback to basic markdown parsing
282
- renderMarkdownToQuill(markdownText, quill);
283
- }
284
- }
285
-
286
- // Enhanced function that tries marked.js first, then falls back to basic parsing
287
- function renderContentToQuill(content, quill) {
288
- // Try to detect if content is markdown
289
- const hasMarkdownPatterns = /\*\*|\*|#{1,6}\s|^\s*[-*+]\s|^\s*\d+\.\s/m.test(content);
290
-
291
- if (hasMarkdownPatterns && typeof marked !== 'undefined') {
292
- renderMarkdownToQuillWithMarked(content, quill);
293
- } else if (hasMarkdownPatterns) {
294
- renderMarkdownToQuill(content, quill);
295
- } else {
296
- // Plain text
297
- quill.setText(content);
298
- }
299
- }