-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
47 lines (45 loc) · 1.57 KB
/
index.php
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
<?php
// REDIRECT
// let api handle it
if(isset($_GET['p'])){
$p = $_GET['p'];
header("Location: ./api/api.php?p=".$p);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>URL Shortener</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="./styles.css" rel="stylesheet">
</head>
<body>
<div id="popup">
<div class="popup-content">
<p>Here is your result:</p>
<div id="result">asd</div>
<button type="button" id="close">Close</button>
</div>
</div>
<header>
<h1>URL Shortener</h1>
</header>
<main>
<form method="POST" action="#" id="form" class="form">
<label for="name">Short name</label>
<input name="name" type="text" id="name" placholder="name" placeholder="short name (optional)">
<label for="url">URL</label>
<input name="url" type="text" id="url" placeholder="http://google.com" required>
<button type="submit" id="submit">
<div id="spinner"><img src="./images/spinner.svg"></div>
<div id="submitText">Here we go!</div>
</button>
</form>
</main>
<footer>
made by <a target="_blank" href="https://github.com/markiewiczjakub">kuba</a>
</footer>
<script type="module" src="./js/main.js"></script>
</body>
</html>