appscms-tools-theme 4.0.2 → 4.0.4

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 (107) hide show
  1. checksums.yaml +4 -4
  2. data/_data/about/en/about.json +16 -16
  3. data/_data/blog/nav.json +13 -13
  4. data/_data/blog/relatedblogs.json +6932 -6932
  5. data/_data/download/en/download.json +73 -73
  6. data/_data/feature/en/3_shop_posters.json +361 -361
  7. data/_data/feature/en/allele-frequency.json +321 -321
  8. data/_data/feature/en/batch-conversion.json +153 -153
  9. data/_data/feature/en/compress-pdf.json +308 -308
  10. data/_data/feature/en/devtools.json +299 -299
  11. data/_data/feature/en/face-detection.json +123 -123
  12. data/_data/feature/en/split-pdf.json +176 -176
  13. data/_data/feature/en/theframe.json +126 -126
  14. data/_data/feature/hi/compress-pdf.json +162 -162
  15. data/_data/feature/tr/compress-pdf.json +161 -161
  16. data/_data/footer/en/data.json +167 -167
  17. data/_data/header/en/data.json +174 -174
  18. data/_data/home/en/en.json +381 -381
  19. data/_data/home/en/photoeffects.json +97 -97
  20. data/_data/home/en/posters.json +322 -322
  21. data/_data/home-1/en/en.json +308 -308
  22. data/_includes/appscms/customblog/pageRelatedPosts.html +84 -84
  23. data/_includes/appscms/customblog/recentposts.html +67 -67
  24. data/_includes/appscms/customblog/relatedBlogs.html +83 -83
  25. data/_includes/appscms/customblog/relatedposts.html +196 -200
  26. data/_includes/appscms/extras/appscms-postbox.html +65 -0
  27. data/_includes/appscms/featurePageAuthors/featurePageAuthors.html +97 -97
  28. data/_includes/appscms/featurehighlight/featurehighlight.html +1 -1
  29. data/_includes/appscms/head/bloghead.html +238 -238
  30. data/_includes/appscms/infographics/infographics.html +109 -109
  31. data/_includes/appscms/recent-posts/recent_posts.html +92 -90
  32. data/_includes/appscms/recent-posts/related_categories_post.html +198 -198
  33. data/_includes/author_bio.html +41 -41
  34. data/_includes/authorpagehead/index.html +47 -47
  35. data/_includes/authors/authors.html +117 -117
  36. data/_includes/batch-conversion.html +141 -141
  37. data/_includes/cssfile/links.html +54 -54
  38. data/_includes/custom-head.html +138 -138
  39. data/_includes/customCode.html +1 -1
  40. data/_includes/customScripts.html +1 -1
  41. data/_includes/customblog/pageRelatedPosts.html +87 -87
  42. data/_includes/customblog/relatedBlogs.html +86 -86
  43. data/_includes/dropdown/langdropdown.html +32 -32
  44. data/_includes/feature.html +39 -39
  45. data/_includes/featurePageAuthors/featurePageAuthors.html +97 -97
  46. data/_includes/footer/index.html +538 -538
  47. data/_includes/google-analytics.html +32 -32
  48. data/_includes/head/index.html +623 -623
  49. data/_includes/header/blogHeader.html +34 -34
  50. data/_includes/header/index.html +192 -192
  51. data/_includes/infographics/infographics.html +230 -230
  52. data/_includes/paginationBlogPage.html +70 -70
  53. data/_includes/script.html +557 -557
  54. data/_includes/share/socialshare.html +21 -21
  55. data/_includes/userTracking.html +43 -43
  56. data/_layouts/aboutUs.html +98 -98
  57. data/_layouts/allAuthors.html +131 -131
  58. data/_layouts/appscms-about.html +163 -163
  59. data/_layouts/appscms-audio.html +33 -33
  60. data/_layouts/appscms-author.html +408 -408
  61. data/_layouts/appscms-authors.html +132 -132
  62. data/_layouts/appscms-calculator.html +93 -93
  63. data/_layouts/appscms-categories.html +26 -0
  64. data/_layouts/appscms-contact.html +132 -132
  65. data/_layouts/appscms-disclaimer.html +124 -124
  66. data/_layouts/appscms-download.html +289 -289
  67. data/_layouts/appscms-feature-result.html +94 -94
  68. data/_layouts/appscms-help.html +25 -25
  69. data/_layouts/appscms-imagekit.html +113 -113
  70. data/_layouts/appscms-post.html +243 -243
  71. data/_layouts/appscms-privacy-policy.html +781 -781
  72. data/_layouts/appscms-terms-and-conditions.html +646 -646
  73. data/_layouts/appscms-video.html +33 -33
  74. data/_layouts/audio.html +33 -33
  75. data/_layouts/author.html +408 -408
  76. data/_layouts/batch.html +177 -177
  77. data/_layouts/blog.html +131 -131
  78. data/_layouts/calculator.html +99 -99
  79. data/_layouts/devtools.html +57 -57
  80. data/_layouts/feature-1.html +406 -406
  81. data/_layouts/feature.html +434 -434
  82. data/_layouts/featureResultPage.html +80 -80
  83. data/_layouts/frame.html +222 -222
  84. data/_layouts/home.html +300 -300
  85. data/_layouts/imagekit.html +303 -303
  86. data/_layouts/photo-effects-home.html +190 -190
  87. data/_layouts/post.html +233 -233
  88. data/assets/app.js +75 -75
  89. data/assets/css/appscms-blog.css +500 -500
  90. data/assets/css/appscms-home.css +5 -5
  91. data/assets/css/appscms-imagekit.css +854 -854
  92. data/assets/css/appscms-variables.css +18 -18
  93. data/assets/css/blog.css +509 -509
  94. data/assets/css/calculators.css +46 -46
  95. data/assets/css/devtools.css +105 -105
  96. data/assets/css/feature-1.css +293 -293
  97. data/assets/css/imagekit copy.css +848 -848
  98. data/assets/css/tools.css +1817 -1817
  99. data/assets/images/digipaint.svg +6 -6
  100. data/assets/images/logo.svg +2 -2
  101. data/assets/images/manthink.svg +3552 -3552
  102. data/assets/js/batch.js +256 -256
  103. data/assets/js/devtools.js +81 -81
  104. data/assets/js/sharePage.js +65 -65
  105. data/assets/js/usageTracking.js +143 -143
  106. data/assets/js/usageTrackingEvents.js +6 -6
  107. metadata +4 -2
@@ -1,82 +1,82 @@
1
- let input_editor, output_editor, data;
2
- output_editor = ace.edit("output_editor");
3
- output_editor.setReadOnly(true)
4
- output_editor.session.setMode("ace/mode/json");
5
- input_editor = ace.edit("input_editor");
6
- input_editor.session.setMode("ace/mode/json");
7
- let upload_div_inner = document.getElementById("upload_div_inner")
8
- let file_upload = document.getElementById("file_upload")
9
- let format_btn = document.getElementById("format_btn")
10
- let inputcopyButton = document.querySelector("#inputcopy");
11
- let outputcopyButton = document.querySelector("#outputcopy");
12
- let deleteEditorInputTxt = document.querySelector(".input_editor_bar .cross_icon");
13
- let deleteEditorOuputTxt = document.querySelector(".output_editor_bar .cross_icon");
14
- const siteName = file_upload.dataset.sitename
15
- let selectedFile
16
-
17
- upload_div_inner.onclick = function () {
18
- document.querySelector("#file_upload").click();
19
- };
20
- file_upload.onchange = function (e) {
21
- var input = e.target.files[0];
22
- selectedFile = input
23
- input_editor = ace.edit("input_editor");
24
- input_editor.session.setMode("ace/mode/json");
25
- var reader = new FileReader();
26
- reader.onload = function () {
27
- input_editor.setValue(reader.result);
28
- }
29
- reader.readAsText(input);
30
- };
31
- document.querySelector("#input_editor_bar .save_icon").onclick = function () {
32
- file_saving_decision(1);
33
- };
34
- editorActions();
35
- function editorActions() {
36
- deleteEditorInputTxt.onclick = function () {
37
- input_editor.setValue("");
38
- }
39
- deleteEditorOuputTxt.onclick = function () {
40
- output_editor.setValue("");
41
- }
42
- inputcopyButton.addEventListener("click", (e) => {
43
- const el = document.createElement("textarea");
44
- el.value = input_editor.getValue();
45
- document.body.appendChild(el);
46
- el.select();
47
- document.execCommand("copy");
48
- e.target.setAttribute('data-original-title', 'Copied !')
49
- })
50
- outputcopyButton.addEventListener("click", (e) => {
51
- const el = document.createElement("textarea");
52
- el.value = output_editor.getValue();
53
- document.body.appendChild(el);
54
- el.select();
55
- document.execCommand("copy");
56
- e.target.setAttribute('data-original-title', 'Copied !')
57
- })
58
- }
59
- function file_saving_decision(flag) {
60
- if (flag == 1) {
61
- if (input_editor.getValue == "" || input_editor.getValue == undefined) {
62
- return false;
63
- } else {
64
- file_download(input_editor.getValue(), "application/json", "json");
65
- }
66
- } else if (flag == 0) {
67
- if (output_editor.getValue == "" || output_editor.getValue == undefined) {
68
- return false;
69
- } else {
70
- file_download(output_editor.getValue(), "text/plain", "txt");
71
- }
72
- }
73
- }
74
- function file_download(code, mimetype, extension) {
75
- var a = document.createElement("a");
76
- var data = new Blob([code], {
77
- type: mimetype,
78
- });
79
- a.href = window.URL.createObjectURL(data);
80
- a.download = `${siteName}.` + extension;
81
- a.click();
1
+ let input_editor, output_editor, data;
2
+ output_editor = ace.edit("output_editor");
3
+ output_editor.setReadOnly(true)
4
+ output_editor.session.setMode("ace/mode/json");
5
+ input_editor = ace.edit("input_editor");
6
+ input_editor.session.setMode("ace/mode/json");
7
+ let upload_div_inner = document.getElementById("upload_div_inner")
8
+ let file_upload = document.getElementById("file_upload")
9
+ let format_btn = document.getElementById("format_btn")
10
+ let inputcopyButton = document.querySelector("#inputcopy");
11
+ let outputcopyButton = document.querySelector("#outputcopy");
12
+ let deleteEditorInputTxt = document.querySelector(".input_editor_bar .cross_icon");
13
+ let deleteEditorOuputTxt = document.querySelector(".output_editor_bar .cross_icon");
14
+ const siteName = file_upload.dataset.sitename
15
+ let selectedFile
16
+
17
+ upload_div_inner.onclick = function () {
18
+ document.querySelector("#file_upload").click();
19
+ };
20
+ file_upload.onchange = function (e) {
21
+ var input = e.target.files[0];
22
+ selectedFile = input
23
+ input_editor = ace.edit("input_editor");
24
+ input_editor.session.setMode("ace/mode/json");
25
+ var reader = new FileReader();
26
+ reader.onload = function () {
27
+ input_editor.setValue(reader.result);
28
+ }
29
+ reader.readAsText(input);
30
+ };
31
+ document.querySelector("#input_editor_bar .save_icon").onclick = function () {
32
+ file_saving_decision(1);
33
+ };
34
+ editorActions();
35
+ function editorActions() {
36
+ deleteEditorInputTxt.onclick = function () {
37
+ input_editor.setValue("");
38
+ }
39
+ deleteEditorOuputTxt.onclick = function () {
40
+ output_editor.setValue("");
41
+ }
42
+ inputcopyButton.addEventListener("click", (e) => {
43
+ const el = document.createElement("textarea");
44
+ el.value = input_editor.getValue();
45
+ document.body.appendChild(el);
46
+ el.select();
47
+ document.execCommand("copy");
48
+ e.target.setAttribute('data-original-title', 'Copied !')
49
+ })
50
+ outputcopyButton.addEventListener("click", (e) => {
51
+ const el = document.createElement("textarea");
52
+ el.value = output_editor.getValue();
53
+ document.body.appendChild(el);
54
+ el.select();
55
+ document.execCommand("copy");
56
+ e.target.setAttribute('data-original-title', 'Copied !')
57
+ })
58
+ }
59
+ function file_saving_decision(flag) {
60
+ if (flag == 1) {
61
+ if (input_editor.getValue == "" || input_editor.getValue == undefined) {
62
+ return false;
63
+ } else {
64
+ file_download(input_editor.getValue(), "application/json", "json");
65
+ }
66
+ } else if (flag == 0) {
67
+ if (output_editor.getValue == "" || output_editor.getValue == undefined) {
68
+ return false;
69
+ } else {
70
+ file_download(output_editor.getValue(), "text/plain", "txt");
71
+ }
72
+ }
73
+ }
74
+ function file_download(code, mimetype, extension) {
75
+ var a = document.createElement("a");
76
+ var data = new Blob([code], {
77
+ type: mimetype,
78
+ });
79
+ a.href = window.URL.createObjectURL(data);
80
+ a.download = `${siteName}.` + extension;
81
+ a.click();
82
82
  }
@@ -1,65 +1,65 @@
1
- document
2
- .getElementsByClassName("close-share-modal")[0]
3
- .addEventListener("click", function () {
4
- document.getElementsByClassName("shareModal")[0].style.display = "none";
5
- });
6
-
7
- document
8
- .getElementsByClassName("facebook")[0]
9
- .addEventListener("click", function () {
10
- window.open(
11
- "https://www.facebook.com/sharer/sharer.php?u=" +
12
- encodeURIComponent(window.location.href)
13
- );
14
- });
15
-
16
- document
17
- .getElementsByClassName("instagram")[0]
18
- .addEventListener("click", function () {
19
- window.open("https://www.instagram.com/");
20
- });
21
-
22
- document
23
- .getElementsByClassName("twitter")[0]
24
- .addEventListener("click", function () {
25
- window.open(
26
- "https://twitter.com/share?url=" +
27
- encodeURIComponent(window.location.href)
28
- );
29
- });
30
-
31
- document
32
- .getElementsByClassName("whatsapp")[0]
33
- .addEventListener("click", function () {
34
- window.open(
35
- "https://api.whatsapp.com/send?text=" +
36
- encodeURIComponent(window.location.href)
37
- );
38
- });
39
-
40
- document
41
- .getElementsByClassName("telegram")[0]
42
- .addEventListener("click", function () {
43
- window.open(
44
- "https://telegram.me/share/url?url=" +
45
- encodeURIComponent(window.location.href)
46
- );
47
- });
48
-
49
- document
50
- .getElementsByClassName("pinterest")[0]
51
- .addEventListener("click", function () {
52
- window.open(
53
- "https://pinterest.com/pin/create/button/?url=" +
54
- encodeURIComponent(window.location.href)
55
- );
56
- });
57
-
58
- document
59
- .getElementsByClassName("linkedin")[0]
60
- .addEventListener("click", function () {
61
- window.open(
62
- "https://www.linkedin.com/shareArticle?mini=true&url=" +
63
- encodeURIComponent(window.location.href)
64
- );
65
- });
1
+ document
2
+ .getElementsByClassName("close-share-modal")[0]
3
+ .addEventListener("click", function () {
4
+ document.getElementsByClassName("shareModal")[0].style.display = "none";
5
+ });
6
+
7
+ document
8
+ .getElementsByClassName("facebook")[0]
9
+ .addEventListener("click", function () {
10
+ window.open(
11
+ "https://www.facebook.com/sharer/sharer.php?u=" +
12
+ encodeURIComponent(window.location.href)
13
+ );
14
+ });
15
+
16
+ document
17
+ .getElementsByClassName("instagram")[0]
18
+ .addEventListener("click", function () {
19
+ window.open("https://www.instagram.com/");
20
+ });
21
+
22
+ document
23
+ .getElementsByClassName("twitter")[0]
24
+ .addEventListener("click", function () {
25
+ window.open(
26
+ "https://twitter.com/share?url=" +
27
+ encodeURIComponent(window.location.href)
28
+ );
29
+ });
30
+
31
+ document
32
+ .getElementsByClassName("whatsapp")[0]
33
+ .addEventListener("click", function () {
34
+ window.open(
35
+ "https://api.whatsapp.com/send?text=" +
36
+ encodeURIComponent(window.location.href)
37
+ );
38
+ });
39
+
40
+ document
41
+ .getElementsByClassName("telegram")[0]
42
+ .addEventListener("click", function () {
43
+ window.open(
44
+ "https://telegram.me/share/url?url=" +
45
+ encodeURIComponent(window.location.href)
46
+ );
47
+ });
48
+
49
+ document
50
+ .getElementsByClassName("pinterest")[0]
51
+ .addEventListener("click", function () {
52
+ window.open(
53
+ "https://pinterest.com/pin/create/button/?url=" +
54
+ encodeURIComponent(window.location.href)
55
+ );
56
+ });
57
+
58
+ document
59
+ .getElementsByClassName("linkedin")[0]
60
+ .addEventListener("click", function () {
61
+ window.open(
62
+ "https://www.linkedin.com/shareArticle?mini=true&url=" +
63
+ encodeURIComponent(window.location.href)
64
+ );
65
+ });
@@ -1,143 +1,143 @@
1
- // Generate a unique ID for the user (if not already generated)
2
- const generateUserID = () => {
3
- // Check if the user ID is already stored in cookies or local storage
4
- const storedUserID = getStoredUserID();
5
-
6
- if (storedUserID) {
7
- return storedUserID;
8
- }
9
-
10
- // Example: Generating a random string
11
- const characters =
12
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
13
- let id = "";
14
- for (let i = 0; i < 10; i++) {
15
- id += characters.charAt(Math.floor(Math.random() * characters.length));
16
- }
17
-
18
- // Store the generated user ID in cookies or local storage
19
- storeUserID(id);
20
-
21
- return id;
22
- };
23
-
24
- // Get the stored user ID from cookies or local storage
25
- const getStoredUserID = () => {
26
- return localStorage.getItem("userID");
27
- };
28
-
29
- // Store the user ID in cookies or local storage
30
- const storeUserID = (userID) => {
31
- localStorage.setItem("userID", userID);
32
- };
33
-
34
- // Get the current date in YYYY-MM-DD format
35
- const getCurrentDate = () => {
36
- const today = new Date();
37
- const year = today.getFullYear();
38
- const month = String(today.getMonth() + 1).padStart(2, "0");
39
- const day = String(today.getDate()).padStart(2, "0");
40
- return `${year}-${month}-${day}`;
41
- };
42
-
43
- let userTrackingCountLimit = "20";
44
- const checkUsage = () => {
45
- const today = new Date().toDateString();
46
- const usageCount = getCookie("featureUsageCount");
47
-
48
- if (usageCount) {
49
- // User has already used the feature today
50
- if (usageCount >= Number(userTrackingCountLimit)) {
51
- showShareModal();
52
- } else {
53
- incrementUsageCount(usageCount);
54
- }
55
- } else {
56
- // First usage of the day
57
- setCookie("featureUsageCount", 1, getExpirationDate());
58
- }
59
- const userID = generateUserID();
60
- try {
61
- if ((usageCount + 1) % 5 === 0) {
62
- gtag("event", `feature_used_${usageCount + 1}_times`, {
63
- user_id: userID,
64
- userID: userID,
65
- feature: window.location.pathname + location.search,
66
- });
67
- }
68
- } catch (error) {
69
- console.log(error);
70
- }
71
-
72
- try {
73
- gtag("event", "feature_used", {
74
- user_id: userID,
75
- userID: userID,
76
- feature: window.location.pathname + location.search,
77
- });
78
- } catch (error) {
79
- console.log(error);
80
- }
81
- };
82
- const incrementUsageCount = (count) => {
83
- const today = new Date().toDateString();
84
-
85
- if (count >= Number(userTrackingCountLimit)) {
86
- showShareModal();
87
- } else {
88
- count++;
89
- setCookie("featureUsageCount", count, getExpirationDate());
90
- }
91
- };
92
-
93
- const showShareModal = () => {
94
- document.getElementById("shareModal").style.display = "block";
95
- };
96
-
97
- const handleShare = () => {
98
- const usageCount = getCookie("featureUsageCount");
99
- if (usageCount) {
100
- setCookie("featureUsageCount", 0, getExpirationDate());
101
- }
102
- document.getElementById("shareModal").style.display = "none";
103
- try {
104
- const userID = generateUserID();
105
- gtag("event", "feature_shared", {
106
- user_id: userID,
107
- userID: userID,
108
- feature: window.location.pathname + location.search,
109
- });
110
- } catch (error) {
111
- console.log(error);
112
- }
113
- };
114
-
115
- const getCookie = (name) => {
116
- const cookies = document.cookie.split(";");
117
- for (let i = 0; i < cookies.length; i++) {
118
- const cookie = cookies[i].trim();
119
- if (cookie.indexOf(name + "=") === 0) {
120
- return parseInt(cookie.substring((name + "=").length, cookie.length));
121
- }
122
- }
123
- return null;
124
- };
125
-
126
- const setCookie = (name, value, expires) => {
127
- document.cookie = `${name}=${value};expires=${expires};path=/`;
128
- };
129
-
130
- const getExpirationDate = () => {
131
- const date = new Date();
132
- date.setTime(date.getTime() + 24 * 60 * 60 * 1000); // 24 hours in milliseconds
133
- return date.toUTCString();
134
- };
135
- const socialShare = document.querySelectorAll(".social-share");
136
-
137
- if (socialShare) {
138
- Array.from(socialShare).map((item) => {
139
- item.addEventListener("click", () => {
140
- handleShare();
141
- });
142
- });
143
- }
1
+ // Generate a unique ID for the user (if not already generated)
2
+ const generateUserID = () => {
3
+ // Check if the user ID is already stored in cookies or local storage
4
+ const storedUserID = getStoredUserID();
5
+
6
+ if (storedUserID) {
7
+ return storedUserID;
8
+ }
9
+
10
+ // Example: Generating a random string
11
+ const characters =
12
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
13
+ let id = "";
14
+ for (let i = 0; i < 10; i++) {
15
+ id += characters.charAt(Math.floor(Math.random() * characters.length));
16
+ }
17
+
18
+ // Store the generated user ID in cookies or local storage
19
+ storeUserID(id);
20
+
21
+ return id;
22
+ };
23
+
24
+ // Get the stored user ID from cookies or local storage
25
+ const getStoredUserID = () => {
26
+ return localStorage.getItem("userID");
27
+ };
28
+
29
+ // Store the user ID in cookies or local storage
30
+ const storeUserID = (userID) => {
31
+ localStorage.setItem("userID", userID);
32
+ };
33
+
34
+ // Get the current date in YYYY-MM-DD format
35
+ const getCurrentDate = () => {
36
+ const today = new Date();
37
+ const year = today.getFullYear();
38
+ const month = String(today.getMonth() + 1).padStart(2, "0");
39
+ const day = String(today.getDate()).padStart(2, "0");
40
+ return `${year}-${month}-${day}`;
41
+ };
42
+
43
+ let userTrackingCountLimit = "20";
44
+ const checkUsage = () => {
45
+ const today = new Date().toDateString();
46
+ const usageCount = getCookie("featureUsageCount");
47
+
48
+ if (usageCount) {
49
+ // User has already used the feature today
50
+ if (usageCount >= Number(userTrackingCountLimit)) {
51
+ showShareModal();
52
+ } else {
53
+ incrementUsageCount(usageCount);
54
+ }
55
+ } else {
56
+ // First usage of the day
57
+ setCookie("featureUsageCount", 1, getExpirationDate());
58
+ }
59
+ const userID = generateUserID();
60
+ try {
61
+ if ((usageCount + 1) % 5 === 0) {
62
+ gtag("event", `feature_used_${usageCount + 1}_times`, {
63
+ user_id: userID,
64
+ userID: userID,
65
+ feature: window.location.pathname + location.search,
66
+ });
67
+ }
68
+ } catch (error) {
69
+ console.log(error);
70
+ }
71
+
72
+ try {
73
+ gtag("event", "feature_used", {
74
+ user_id: userID,
75
+ userID: userID,
76
+ feature: window.location.pathname + location.search,
77
+ });
78
+ } catch (error) {
79
+ console.log(error);
80
+ }
81
+ };
82
+ const incrementUsageCount = (count) => {
83
+ const today = new Date().toDateString();
84
+
85
+ if (count >= Number(userTrackingCountLimit)) {
86
+ showShareModal();
87
+ } else {
88
+ count++;
89
+ setCookie("featureUsageCount", count, getExpirationDate());
90
+ }
91
+ };
92
+
93
+ const showShareModal = () => {
94
+ document.getElementById("shareModal").style.display = "block";
95
+ };
96
+
97
+ const handleShare = () => {
98
+ const usageCount = getCookie("featureUsageCount");
99
+ if (usageCount) {
100
+ setCookie("featureUsageCount", 0, getExpirationDate());
101
+ }
102
+ document.getElementById("shareModal").style.display = "none";
103
+ try {
104
+ const userID = generateUserID();
105
+ gtag("event", "feature_shared", {
106
+ user_id: userID,
107
+ userID: userID,
108
+ feature: window.location.pathname + location.search,
109
+ });
110
+ } catch (error) {
111
+ console.log(error);
112
+ }
113
+ };
114
+
115
+ const getCookie = (name) => {
116
+ const cookies = document.cookie.split(";");
117
+ for (let i = 0; i < cookies.length; i++) {
118
+ const cookie = cookies[i].trim();
119
+ if (cookie.indexOf(name + "=") === 0) {
120
+ return parseInt(cookie.substring((name + "=").length, cookie.length));
121
+ }
122
+ }
123
+ return null;
124
+ };
125
+
126
+ const setCookie = (name, value, expires) => {
127
+ document.cookie = `${name}=${value};expires=${expires};path=/`;
128
+ };
129
+
130
+ const getExpirationDate = () => {
131
+ const date = new Date();
132
+ date.setTime(date.getTime() + 24 * 60 * 60 * 1000); // 24 hours in milliseconds
133
+ return date.toUTCString();
134
+ };
135
+ const socialShare = document.querySelectorAll(".social-share");
136
+
137
+ if (socialShare) {
138
+ Array.from(socialShare).map((item) => {
139
+ item.addEventListener("click", () => {
140
+ handleShare();
141
+ });
142
+ });
143
+ }
@@ -1,6 +1,6 @@
1
- const inputBoxOfFeatureFile = document.querySelector("#inputbox");
2
- if (inputBoxOfFeatureFile) {
3
- inputBoxOfFeatureFile.addEventListener("click", () => {
4
- checkUsage();
5
- });
6
- }
1
+ const inputBoxOfFeatureFile = document.querySelector("#inputbox");
2
+ if (inputBoxOfFeatureFile) {
3
+ inputBoxOfFeatureFile.addEventListener("click", () => {
4
+ checkUsage();
5
+ });
6
+ }
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: 4.0.2
4
+ version: 4.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - vivek-appscms
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-27 00:00:00.000000000 Z
11
+ date: 2023-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -114,6 +114,7 @@ files:
114
114
  - _includes/appscms/customblog/recentposts.html
115
115
  - _includes/appscms/customblog/relatedBlogs.html
116
116
  - _includes/appscms/customblog/relatedposts.html
117
+ - _includes/appscms/extras/appscms-postbox.html
117
118
  - _includes/appscms/extras/ratings.html
118
119
  - _includes/appscms/extras/recent-posts.html
119
120
  - _includes/appscms/extras/traffic-count.html
@@ -188,6 +189,7 @@ files:
188
189
  - _layouts/appscms-authors.html
189
190
  - _layouts/appscms-blog.html
190
191
  - _layouts/appscms-calculator.html
192
+ - _layouts/appscms-categories.html
191
193
  - _layouts/appscms-contact.html
192
194
  - _layouts/appscms-disclaimer.html
193
195
  - _layouts/appscms-download.html