Skip to content

Instantly share code, notes, and snippets.

@patx
Created December 15, 2025 07:36
Show Gist options
  • Select an option

  • Save patx/7b3afbc676d42a0860c047f77d07daa4 to your computer and use it in GitHub Desktop.

Select an option

Save patx/7b3afbc676d42a0860c047f77d07daa4 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shorten URL - Shorty</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
font-family: system-ui, -apple-system, sans-serif;
}
form {
width: 90%;
max-width: 600px;
display: flex;
flex-direction: column;
gap: 1rem;
}
input {
padding: 1rem;
font-size: 1.1rem;
border: 2px solid #ddd;
border-radius: 8px;
}
button {
padding: 1rem;
font-size: 1.1rem;
background: #000;
color: #fff;
border: none;
border-radius: 8px;
cursor: pointer;
}
button:hover {
background: #333;
}
</style>
</head>
<body>
<form method="POST" action="/">
<input type="url" name="url_str" placeholder="Enter URL to shorten" required>
<button type="submit">Shorten</button>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment