-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
172 lines (147 loc) · 8.82 KB
/
Copy pathindex.html
File metadata and controls
172 lines (147 loc) · 8.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta property="og:title" content="🚀 Link Rocket: Unleash the Power of Short URLs!"/>
<meta property="og:url" content="https://exitdump.github.io/link-rocket/"/>
<meta property="og:site_name" content="Link Rocket"/>
<meta property="og:image" content="https://exitdump.github.io/link-rocket/thumbnail.png"/>
<meta property="og:type" content="website"/>
<meta property="og:description" content="Experience the speed of Link Rocket as it propels your links across the digital landscape. Our user-friendly interface ensures accessibility for everyone."/>
<title>🚀 Link Rocket: Unleash the Power of Short URLs!</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<link rel="stylesheet" href="https://unpkg.com/tailwindcss@2.2.19/dist/tailwind.min.css"/>
<!--Replace with your tailwind.css once created-->
<link href="https://unpkg.com/@tailwindcss/custom-forms/dist/custom-forms.min.css" rel="stylesheet" />
<style>
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap");
html {
font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
</style>
</head>
<body class="leading-normal tracking-normal text-indigo-400 m-6 bg-cover bg-fixed" style="background-image: url('header.png');">
<div class="h-full">
<!--Nav-->
<div class="w-full container mx-auto">
<div class="w-full flex items-center justify-between">
<a class="flex items-center text-indigo-400 no-underline hover:no-underline font-bold text-2xl lg:text-4xl" href="#">
Link<span class="bg-clip-text text-transparent bg-gradient-to-r from-green-400 via-pink-500 to-purple-500">Rocket</span>
</a>
<div class="flex w-1/2 justify-end content-center">
<a class="inline-block text-blue-300 no-underline hover:text-pink-500 hover:text-underline text-center h-10 p-2 md:h-auto md:p-4 transform hover:scale-125 duration-300 ease-in-out" href="https://twitter.com/jahidorjahid">
<svg class="fill-current h-6" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<path
d="M30.063 7.313c-.813 1.125-1.75 2.125-2.875 2.938v.75c0 1.563-.188 3.125-.688 4.625a15.088 15.088 0 0 1-2.063 4.438c-.875 1.438-2 2.688-3.25 3.813a15.015 15.015 0 0 1-4.625 2.563c-1.813.688-3.75 1-5.75 1-3.25 0-6.188-.875-8.875-2.625.438.063.875.125 1.375.125 2.688 0 5.063-.875 7.188-2.5-1.25 0-2.375-.375-3.375-1.125s-1.688-1.688-2.063-2.875c.438.063.813.125 1.125.125.5 0 1-.063 1.5-.25-1.313-.25-2.438-.938-3.313-1.938a5.673 5.673 0 0 1-1.313-3.688v-.063c.813.438 1.688.688 2.625.688a5.228 5.228 0 0 1-1.875-2c-.5-.875-.688-1.813-.688-2.75 0-1.063.25-2.063.75-2.938 1.438 1.75 3.188 3.188 5.25 4.25s4.313 1.688 6.688 1.813a5.579 5.579 0 0 1 1.5-5.438c1.125-1.125 2.5-1.688 4.125-1.688s3.063.625 4.188 1.813a11.48 11.48 0 0 0 3.688-1.375c-.438 1.375-1.313 2.438-2.563 3.188 1.125-.125 2.188-.438 3.313-.875z"
></path>
</svg>
</a>
<a
class="inline-block text-blue-300 no-underline hover:text-pink-500 hover:text-underline text-center h-10 p-2 md:h-auto md:p-4 transform hover:scale-125 duration-300 ease-in-out"
href="https://www.facebook.com/jahidorjahid"
>
<svg class="fill-current h-6" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<path d="M19 6h5V0h-5c-3.86 0-7 3.14-7 7v3H8v6h4v16h6V16h5l1-6h-6V7c0-.542.458-1 1-1z"></path>
</svg>
</a>
</div>
</div>
</div>
<!--Main-->
<div class="container pt-24 md:pt-36 mx-auto flex flex-wrap flex-col md:flex-row items-center">
<!--Left Col-->
<div class="flex flex-col w-full xl:w-2/5 justify-center lg:items-start overflow-y-hidden">
<h1 class="my-4 text-3xl md:text-5xl text-white opacity-75 font-bold leading-tight text-center md:text-left">
Unleash the Power of
<span class="bg-clip-text text-transparent bg-gradient-to-r from-green-400 via-pink-500 to-purple-500">
Short
</span>
URLs!
</h1>
<p class="leading-normal text-base md:text-2xl mb-8 text-center md:text-left">
Shorten. Share. Soar. Elevate Your Links with Link Rocket!
</p>
<form class="bg-gray-900 opacity-75 w-full shadow-lg rounded-lg px-8 pt-6 pb-8 mb-4">
<div class="mb-4">
<label class="block text-blue-300 py-2 font-bold mb-2" for="emailaddress">
Enter Full Link Here
</label>
<input
class="shadow appearance-none border rounded w-full p-3 text-gray-700 leading-tight focus:ring "
id="shortenInput"
type="text"
placeholder="https://facebook.com/jahidorjahid"
/>
</div>
<div class="flex items-center justify-between pt-4">
<button
id="shortenBtn"
class="bg-gradient-to-r from-purple-800 to-green-500 hover:from-pink-500 hover:to-green-500 text-white font-bold py-2 px-4 rounded focus:ring transform transition hover:scale-105 duration-300 ease-in-out"
type="button"
onclick="shortenUrl()"
>
Shortener
</button>
</div>
</form>
</div>
<!--Right Col-->
<div id="shortenedUrl" class="w-full xl:w-3/5 p-12 overflow-hidden mx-auto">
<!-- <img class="mx-auto w-full md:w-4/5 transform -rotate-6 transition hover:scale-105 duration-700 ease-in-out hover:rotate-6" src="macbook.svg" /> -->
</div>
<!--Footer-->
<div class="w-full pt-16 pb-6 text-sm text-center md:text-left fade-in">
<a class="text-gray-500 no-underline hover:no-underline" href="#">© Link Rocket 2024</a>
- Developed by
<a class="text-gray-500 no-underline hover:no-underline" href="https://facebook.com/jahidorjahid">Jahid</a>
</div>
</div>
</div>
<script>
function shortenUrl() {
document.getElementById('shortenBtn').innerHTML = 'Loading...';
const longUrl = document.getElementById('shortenInput').value;
const inputBody = `{
"url": "${longUrl}",
"expiry": "never"
}`;
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'sk_a8a979e8a51c458482b57d24e9709c19'
};
fetch('https://api.manyapis.com/v1-create-short-url',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
// In a real-world scenario, you would make an API call to a server to shorten the URL.
// For simplicity, we are just displaying the long URL here.
const shortenedUrl = body.shortUrl;
document.getElementById('shortenedUrl').innerHTML = `<p class="mx-auto w-full md:w-2/5 text-gray-400 text-muted">Shortened URL Click to Copy</p>
<p class="mx-auto w-full md:w-2/5 mt-2 cursor-pointer" id="shortUrl" onclick="copyToClipboard()">🔗 ${shortenedUrl}</p>`;
document.getElementById('shortenInput').value = '';
document.getElementById('shortenBtn').innerHTML = 'Shortener';
});
}
function copyToClipboard() {
const shortenedUrlText = document.getElementById('shortUrl').innerText.substring(3);
const tempInput = document.createElement('input');
tempInput.value = shortenedUrlText;
document.body.appendChild(tempInput);
tempInput.select();
document.execCommand('copy');
document.body.removeChild(tempInput);
alert('Copied to clipboard!');
}
</script>
</body>
</html>