LinksGPT commited on
Commit
fa332ee
·
verified ·
1 Parent(s): d5a7e0d

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +426 -19
index.html CHANGED
@@ -1,19 +1,426 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <script>
3
+ document.documentElement.className = 'js';
4
+ </script>
5
+ <script>
6
+ let jqueryParams = [],
7
+ jQuery = function(r) {
8
+ return jqueryParams = [...jqueryParams, r], jQuery
9
+ },
10
+ $ = function(r) {
11
+ return jqueryParams = [...jqueryParams, r], $
12
+ };
13
+ window.jQuery = jQuery, window.$ = jQuery;
14
+ let customHeadScripts = !1;
15
+ jQuery.fn = jQuery.prototype = {}, $.fn = jQuery.prototype = {}, jQuery.noConflict = function(r) {
16
+ if (window.jQuery) return jQuery = window.jQuery, $ = window.jQuery, customHeadScripts = !0, jQuery.noConflict
17
+ }, jQuery.ready = function(r) {
18
+ jqueryParams = [...jqueryParams, r]
19
+ }, $.ready = function(r) {
20
+ jqueryParams = [...jqueryParams, r]
21
+ }, jQuery.load = function(r) {
22
+ jqueryParams = [...jqueryParams, r]
23
+ }, $.load = function(r) {
24
+ jqueryParams = [...jqueryParams, r]
25
+ }, jQuery.fn.ready = function(r) {
26
+ jqueryParams = [...jqueryParams, r]
27
+ }, $.fn.ready = function(r) {
28
+ jqueryParams = [...jqueryParams, r]
29
+ };
30
+ </script>
31
+ <script src="https://d3btrheyejmivy.cloudfront.net/wp-includes/js/jquery/jquery.min.js?ver=3.6.4" id="jquery-core-js"></script>
32
+ <script src="https://d3btrheyejmivy.cloudfront.net/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.0" id="jquery-migrate-js"></script>
33
+ <script id="jquery-js-after">
34
+ jqueryParams.length && $.each(jqueryParams, function(e, r) {
35
+ if ("function" == typeof r) {
36
+ var n = String(r);
37
+ n.replace("$", "jQuery");
38
+ var a = new Function("return " + n)();
39
+ $(document).ready(a)
40
+ }
41
+ });
42
+ </script>
43
+ <div class="introduction">
44
+ <h2>Welcome to LinksGPT's Space</h2>
45
+ <p>
46
+ <a href="https://www.linksgpt.com" target="_blank" class="text-blue-600 hover:underline">LinksGPT</a> is a professional link management platform for custom short URLs, brand building, and conversion optimization.
47
+ It offers intelligent URL shortening and expansion, custom domains, team roles, customizable QR codes, tracking and AI-based in-depth analytics, deep linking, openAPI, and enhanced link security.
48
+ </p>
49
+ <p>
50
+ <a href="https://www.linksgpt.com/url-expander" target="_blank" class="text-blue-600 hover:underline">URL Expander</a> is a tool that reveals the final destination of any URL, including shortened links. It allows users to see the original or expanded URL that is hidden behind a short link.
51
+ </p>
52
+ </div>
53
+ <div class="et_pb_module et_pb_code et_pb_code_0">
54
+ <div class="et_pb_code_inner">
55
+ <div class="relative px-4 mx-auto">
56
+ <div class="max-w-3xl mx-auto">
57
+ <form class="sm:flex items-center mb-8">
58
+ <input class="input w-full mb-3 sm:mb-0 sm:mr-4 py-4 px-6 rounded-[4px] text-gray-500 placeholder-gray-400 border border-gray-200 focus:border-purple-500 focus:outline-purple" id="url" placeholder="Try to shorten your URL, it expires in 7 days. Log in to create a permanent link." required="">
59
+ <button id="shorten-btn" class="relative group sm:flex-shrink-0 inline-block w-full sm:w-auto py-4 px-6 text-center text-white bg-black font-semibold rounded-[4px] overflow-hidden" type="submit">
60
+ <div class="absolute top-0 right-full w-full h-full bg-[#00DFAA] transform group-hover:translate-x-full group-hover:scale-102 transition duration-500"></div>
61
+ <span class="relative" id="shorten-btn-text">Shorten URL</span>
62
+ </button>
63
+ </form>
64
+ <div class="" id="shortern-table-container">
65
+ <div class="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
66
+ <div class="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
67
+ <div class="shadow overflow-hidden border-b border-gray-200 sm:rounded-lg">
68
+ <table class="min-w-full divide-y divide-gray-200 !mb-0 !border-none" id="shortened-links-list">
69
+ <thead class="bg-gray-50">
70
+ <tr>
71
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
72
+ <div class="flex items-center">
73
+ <span>Shortened URL</span>
74
+ <div class="inline-block text-left">
75
+ <svg class="w-3 h-3 ml-2 text-gray-500 cursor-pointer tooltip-icon" fill="#000000" viewBox="0 0 32 32">
76
+ <path d="M18 23l-1-0v-8.938c0-0.011-0.003-0.021-0.003-0.031s0.003-0.020 0.003-0.031c0-0.552-0.448-1-1-1h-2c-0.552 0-1 0.448-1 1s0.448 1 1 1h1v8h-1c-0.552 0-1 0.448-1 1s0.448 1 1 1h4c0.552 0 1-0.448 1-1s-0.448-1-1-1zM16 11c1.105 0 2-0.896 2-2s-0.895-2-2-2-2 0.896-2 2 0.896 2 2 2zM16-0c-8.836 0-16 7.163-16 16s7.163 16 16 16c8.837 0 16-7.163 16-16s-7.163-16-16-16zM16 30.031c-7.72 0-14-6.312-14-14.032s6.28-14 14-14 14 6.28 14 14-6.28 14.032-14 14.032z"></path>
77
+ </svg>
78
+ <div class="absolute z-10 w-56 p-2 mt-4 ml-2 text-xs leading-tight text-white transform bg-black rounded-lg normal-case tooltip-text hidden font-normal">
79
+ <p> The temporary link will expire in 7 days. You can visit linksgpt.com to use more features.</p>
80
+ </div>
81
+ </div>
82
+ </div>
83
+ </th>
84
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> Original URL</th>
85
+ <th scope="col" class="relative px-6 py-3">
86
+ <span class="sr-only">Delete</span>
87
+ </th>
88
+ </tr>
89
+ </thead>
90
+ <tbody class="bg-white divide-y divide-gray-200">
91
+ </tbody>
92
+ </table>
93
+ </div>
94
+ </div>
95
+ </div>
96
+ </div>
97
+ <div class="relative mt-3 px-6 py-4 overflow-hidden rounded-xl">
98
+ <div class="relative z-10 flex flex-wrap items-center justify-between -m-2">
99
+ <div class="w-auto p-2">
100
+ <a class="inline-flex flex-wrap items-center px-5 py-3.5 text-sm text-black font-bold rounded-lg transition duration-300 bg-[#00DFAA] hover:bg-[#1affc9]" href="https://www.linksgpt.com/" target="_blank" rel="noopener">
101
+ <span class="mr-3 font-bold">Start using LinksGPT's professional url shortener service</span>
102
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
103
+ <path d="M9.33333 3.33337L14 8.00004M14 8.00004L9.33333 12.6667M14 8.00004L2 8.00004" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
104
+ </svg>
105
+ </a>
106
+ </div>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ </div>
111
+ <script>jQuery(function ($) {
112
+ const baseurl = "https://app.linksgpt.com";
113
+ const data = localStorage.getItem("shorten_links") || "[]";
114
+ const dataArr = JSON.parse(data);
115
+
116
+ const deleteSvg = `<svg xmlns=http://www.w3.org/2000/svg width=20 height=20 viewBox="0 0 24 24" fill=none stroke=#ff6565 stroke-width=1.5 stroke-linecap=butt stroke-linejoin=round><line x1=20 y1=5 x2=5 y2=20></line><line x1=5 y1=5 x2=20 y2=20></line></svg>`;
117
+ const copySvg = `<svg width=20px height=20px viewBox="0 0 1024 1024" xmlns=http://www.w3.org/2000/svg><path d="M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64h64z"/><path d="M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64H384zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64z"/></svg>`;
118
+
119
+
120
+ function renderData(item) {
121
+ $("#shortern-table-container").removeClass("hidden");
122
+ $("#shortened-links-list tbody").prepend(
123
+ "<tr><td class='px-6 py-4 whitespace-nowrap'><a class='text-[#00DFAA] font-bold' href='" +
124
+ item.short_link +
125
+ "' target=_blank>" +
126
+ item.short_link +
127
+ "</a></td><td class='px-6 py-4 whitespace-nowrap '><a class='inline-block w-64 truncate' href='" +
128
+ item.original_link +
129
+ "' target=_blank title='" +
130
+ item.original_link +
131
+ "'>" +
132
+ item.original_link +
133
+ "</a></td><td class='px-6 py-4 whitespace-nowrap text-right text-sm font-medium'><div class='flex gap-[4px]'><a href=# class='w-[20px] copy-link hover:fill-[#818cf8]' data-id='" +
134
+ item.code +
135
+ "'>" +
136
+ copySvg +
137
+ "</a><a href=# class='w-[20px] fill-red-400 hover:fill-red-600 delete-link' data-id='" +
138
+ item.code +
139
+ "'>" +
140
+ deleteSvg +
141
+ "</a></div></td></tr>"
142
+ );
143
+ }
144
+
145
+ dataArr.forEach((item) => {
146
+ renderData(item);
147
+ });
148
+
149
+ if (dataArr.length > 0) {
150
+ $("#shortern-table-container").removeClass("hidden");
151
+ }
152
+
153
+ $("#shortened-links-list").on("click", ".delete-link", function (e) {
154
+ e.preventDefault();
155
+ var id = $(this).data("id");
156
+ $(this).parents("tr").remove();
157
+ dataArr.forEach((item, index) => {
158
+ if (item.code === id) {
159
+ dataArr.splice(index, 1);
160
+ }
161
+ });
162
+ localStorage.setItem("shorten_links", JSON.stringify(dataArr));
163
+
164
+ if (dataArr.length === 0) {
165
+ $("#shortern-table-container").addClass("hidden");
166
+ }
167
+ });
168
+
169
+ $("form").submit(function (e) {
170
+ e.preventDefault();
171
+ var url = $("#url").val();
172
+
173
+ // loading
174
+ $("#shorten-btn-text").text("Shortening...");
175
+ $("#shorten-btn").attr("disabled", true);
176
+ $("#shorten-btn").addClass("bg-gray-400");
177
+
178
+ $.ajax({
179
+ url: `${baseurl}/api/v1/links/shorten`,
180
+ type: "POST",
181
+ data: {
182
+ destination: url,
183
+ },
184
+ dataType: "json",
185
+ success: function (data) {
186
+ var shortLink = data.data.link;
187
+ var originalLink = data.data.destination;
188
+ const item = {
189
+ short_link: shortLink,
190
+ original_link: originalLink,
191
+ code: data.data.file,
192
+ };
193
+ renderData(item);
194
+ $("#url").val("");
195
+
196
+ if (dataArr.length >= 3) {
197
+ dataArr.shift();
198
+
199
+ $("#shortened-links-list tbody tr:last-child").remove();
200
+ }
201
+
202
+ dataArr.push(item);
203
+ localStorage.setItem("shorten_links", JSON.stringify(dataArr));
204
+
205
+ $("#shorten-btn-text").text("Shorten URL");
206
+ $("#shorten-btn").attr("disabled", false);
207
+ $("#shorten-btn").removeClass("bg-gray-400").addClass("bg-black");
208
+ },
209
+ error: function (error) {
210
+ showMessage("error", error.responseJSON.message);
211
+ $("#shorten-btn-text").text("Shorten URL");
212
+ $("#shorten-btn").attr("disabled", false);
213
+ $("#shorten-btn").removeClass("bg-gray-400").addClass("bg-black");
214
+ },
215
+ });
216
+ });
217
+
218
+ // message component
219
+ function showMessage(type, message) {
220
+ }
221
+
222
+ function copyToClipboard(val) {
223
+ var aux = document.createElement("input");
224
+ aux.setAttribute("value", val);
225
+ document.body.appendChild(aux);
226
+ aux.select();
227
+ document.execCommand("copy");
228
+ document.body.removeChild(aux);
229
+ }
230
+
231
+ $("#shortened-links-list").on("click", ".copy-link", function (e) {
232
+ e.preventDefault();
233
+ var id = $(this).data("id");
234
+ var link = "";
235
+ dataArr.forEach((item) => {
236
+ if (item.code === id) {
237
+ link = item.short_link;
238
+ }
239
+ });
240
+ copyToClipboard(link);
241
+ showMessage("success", "Link copied to clipboard");
242
+ });
243
+
244
+ $(".tooltip-icon").hover(
245
+ function () {
246
+ $(this).next().removeClass("hidden");
247
+ },
248
+ function () {
249
+ $(this).next().addClass("hidden");
250
+ }
251
+ );
252
+ });
253
+ </script>
254
+ </div>
255
+ </div>
256
+ <style>
257
+ /* Container styling */
258
+ .relative {
259
+ margin-top: 0px;
260
+ }
261
+
262
+ /* Form styling */
263
+ form input.input {
264
+ font-size: 14px;
265
+ color: #333;
266
+ transition: border-color 0.3s, box-shadow 0.3s;
267
+ }
268
+
269
+ form input.input:focus {
270
+ border-color: #6B46C1;
271
+ box-shadow: 0 0 5px rgba(107, 70, 193, 0.5);
272
+ }
273
+
274
+ form button {
275
+ cursor: pointer;
276
+ transition: transform 0.3s, background 0.3s;
277
+ }
278
+
279
+ form button:hover {
280
+ transform: scale(1.05);
281
+ }
282
+
283
+ /* Table styling */
284
+ table {
285
+ border-collapse: collapse;
286
+ width: 100%;
287
+ margin-top: 15px;
288
+ }
289
+
290
+ thead th {
291
+ background: #f9fafb;
292
+ text-align: left;
293
+ padding: 10px;
294
+ }
295
+
296
+ tbody tr:nth-child(even) {
297
+ background: #f1f5f9;
298
+ }
299
+
300
+ tbody td {
301
+ padding: 10px;
302
+ }
303
+
304
+ /* Tooltip icon styling */
305
+ .tooltip-icon {
306
+ width: 12px;
307
+ height: 12px;
308
+ margin-left: 6px;
309
+ cursor: pointer;
310
+ display: inline-block;
311
+ vertical-align: middle;
312
+ fill: #6B7280;
313
+ transition: fill 0.3s;
314
+ }
315
+
316
+ .tooltip-icon:hover {
317
+ fill: #4F46E5;
318
+ }
319
+
320
+ /* Tooltip text styling */
321
+ .tooltip-text {
322
+ position: absolute;
323
+ z-index: 10;
324
+ background: rgba(0, 0, 0, 0.8);
325
+ color: #fff;
326
+ border-radius: 4px;
327
+ padding: 5px 10px;
328
+ font-size: 12px;
329
+ line-height: 1.5;
330
+ white-space: normal;
331
+ opacity: 0;
332
+ visibility: hidden;
333
+ transition: opacity 0.3s, visibility 0.3s;
334
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
335
+ }
336
+
337
+ .tooltip-icon:hover + .tooltip-text {
338
+ opacity: 1;
339
+ visibility: visible;
340
+ }
341
+
342
+ /* Call-to-action box styling */
343
+ .relative.mt-3 {
344
+ position: relative;
345
+ overflow: hidden;
346
+ color: white;
347
+ padding: 20px;
348
+ }
349
+
350
+ .relative.mt-3 h3 {
351
+ margin: 0;
352
+ }
353
+
354
+ .relative.mt-3 a {
355
+ color: black;
356
+ transition: background 0.3s, transform 0.3s;
357
+ }
358
+
359
+ .relative.mt-3 a:hover {
360
+ transform: translateY(-3px);
361
+ }
362
+
363
+ /* General button hover effect */
364
+ button:hover, a:hover {
365
+ background: linear-gradient(to right, #00DFAA, #1affc9);
366
+ transition: background 0.3s;
367
+ }
368
+
369
+ #url {
370
+ width: 100%;
371
+ max-width: 550px;
372
+ padding: 12px 16px;
373
+ border: 1px solid #ddd;
374
+ border-radius: 4px;
375
+ font-size: 14px;
376
+ color: #333;
377
+ background-color: #fff;
378
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
379
+ transition: border-color 0.3s ease, box-shadow 0.3s ease;
380
+ }
381
+
382
+ #url:focus {
383
+ border-color: #7c3aed;
384
+ box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
385
+ outline: none;
386
+ }
387
+
388
+ form .input,
389
+ #shorten-btn {
390
+ height: 48px;
391
+ }
392
+
393
+ body {
394
+ font-family: 'Arial', 'Helvetica', sans-serif;
395
+ font-size: 16px;
396
+ line-height: 1.5;
397
+ color: #333;
398
+ margin: 0;
399
+ padding: 0;
400
+ }
401
+
402
+ .introduction {
403
+ margin-bottom: 24px;
404
+ padding: 16px;
405
+ background-color: #f9f9f9;
406
+ border: 1px solid #e0e0e0;
407
+ border-radius: 8px;
408
+ font-size: 16px;
409
+ line-height: 1.6;
410
+ color: #333;
411
+ box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
412
+ }
413
+
414
+ .introduction h2 {
415
+ margin: 0 0 12px;
416
+ font-size: 20px;
417
+ font-weight: 600;
418
+ color: #000;
419
+ }
420
+
421
+ .introduction p {
422
+ margin: 0 0 8px;
423
+ }
424
+
425
+
426
+ </style>