mirror-chhoto-url/resources/index.html

88 lines
3.7 KiB
HTML
Raw Normal View History

2024-04-04 01:40:26 +00:00
<!-- SPDX-FileCopyrightText: 2023 Sayantan Santra <sayantan.santra689@gmail.com> -->
<!-- SPDX-License-Identifier: MIT -->
2020-02-14 18:52:14 +00:00
<!DOCTYPE html>
<html lang="en">
2022-11-02 08:09:36 +00:00
2020-02-14 18:52:14 +00:00
<head>
<meta charset="UTF-8">
<meta name="viewport"
2022-11-02 08:09:36 +00:00
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
2020-02-14 18:52:14 +00:00
<meta http-equiv="X-UA-Compatible" content="ie=edge">
2022-11-16 06:05:31 +00:00
<title>Chhoto URL</title>
2022-11-16 06:05:31 +00:00
<meta name="description" content="A simple selfhosted URL shortener with no unnecessary features.">
<meta name="keywords" content="url shortener, link shortener, self hosted, open source">
<link rel="icon" type="image/x-icon" href="assets/favicon.ico" sizes="any">
<link rel="icon" type="image/svg+xml" href="assets/favicon.svg">
2022-11-09 08:16:12 +00:00
<link rel="icon" type="image/png" href="assets/favicon-32.png" sizes="32x32">
2022-11-16 06:05:31 +00:00
<link rel="icon" type="image/png" href="assets/favicon-196.png" sizes="196x196">
2020-02-14 18:52:14 +00:00
<script src="static/script.js"></script>
2020-02-14 18:52:14 +00:00
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.1/build/pure-min.css"
2022-11-02 08:09:36 +00:00
integrity="sha384-oAOxQR6DkCoMliIh8yFnu25d7Eq/PHS21PClpwjOTeU2jRSq11vu66rf90/cZr47" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" target="_blank" href="static/styles.css">
2020-02-14 18:52:14 +00:00
</head>
2022-11-02 08:09:36 +00:00
2020-02-14 18:52:14 +00:00
<body>
2023-04-12 00:17:04 +00:00
<div class="container" id="container">
2022-11-02 08:09:36 +00:00
<form class="pure-form pure-form-aligned" name="new-url-form">
<fieldset>
<legend id="logo"><img src="assets/favicon-32.png" width="26px" alt="logo"> Chhoto URL</legend>
2022-11-02 08:09:36 +00:00
<div class="pure-control-group">
<label for="longUrl">Long URL</label>
<input type="url" name="longUrl" id="longUrl" placeholder="Please enter a valid URL"
onblur="addProtocol(this)" required />
2022-11-02 08:09:36 +00:00
</div>
<div class=" pure-control-group">
2022-11-09 23:46:54 +00:00
<label for="shortUrl">Short URL (optional)</label>
<input type="text" name="shortUrl" id="shortUrl" placeholder="Only a-z, 0-9, - and _ are allowed"
pattern="[a-z0-9\-_]+" title="Only a-z, 0-9, - and _ are allowed"/>
2022-11-02 08:09:36 +00:00
</div>
<div class="pure-controls">
2022-11-10 01:26:17 +00:00
<button class="pure-button pure-button-primary">Shorten!</button>
<p id="alert-box">&nbsp;</p>
2022-11-02 08:09:36 +00:00
</div>
</fieldset>
</form>
<p id="loading-text">Loading links table...</p>
<table class="pure-table" hidden>
2023-04-10 20:20:20 +00:00
<caption>Active links</caption>
2024-03-17 06:47:01 +00:00
<br />
2022-11-02 08:09:36 +00:00
<thead>
<tr>
2024-03-17 06:47:01 +00:00
<td id="short-url-header">Short URL (click to copy)</td>
<td>Long URL</td>
<td name="hitsColumn">Hits</td>
2022-11-10 00:55:50 +00:00
<td name="deleteBtn">&times;</td>
2022-11-02 08:09:36 +00:00
</tr>
</thead>
<tbody id="url-table">
2023-04-10 20:20:20 +00:00
<!-- The links would be inserted here -->
2022-11-02 08:09:36 +00:00
</tbody>
</table>
</div>
2020-02-14 18:52:14 +00:00
<div name="links-div">
<a id="admin-button" href="javascript:getLogin()" hidden>login</a>
&nbsp;
2024-02-11 01:41:50 +00:00
<a id="version-number" href="https://github.com/SinTan1729/chhoto-url" target="_blank" rel="noopener noreferrer"
hidden>Source Code</a>
<!-- The version number would be inserted here -->
2023-01-13 07:53:48 +00:00
</div>
2023-04-12 00:17:04 +00:00
<dialog id="login-dialog">
<form class="pure-form" name="login-form">
<p>Please enter password to access this website</p>
<input type="password" id="password" />
2024-04-10 18:33:30 +00:00
<button class="pure-button pure-button-primary" value="default">Log in</button>
2023-04-12 00:17:04 +00:00
<p id="wrong-pass">&nbsp;</p>
</form>
</dialog>
2020-02-14 18:52:14 +00:00
</body>
2022-11-02 08:09:36 +00:00
</html>