mirror of
https://github.com/aykhans/oh-my-url.git
synced 2025-04-17 02:23:13 +00:00
108 lines
2.3 KiB
HTML
108 lines
2.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
<title>Oh My URL</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
margin: 0;
|
|
padding: 0;
|
|
background-color: #f4f4f4;
|
|
}
|
|
|
|
.container {
|
|
max-width: 600px;
|
|
margin: 50px auto;
|
|
background-color: #fff;
|
|
padding: 20px;
|
|
border-radius: 5px;
|
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
h1 {
|
|
text-align: center;
|
|
}
|
|
|
|
form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
label {
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
input[type="url"] {
|
|
padding: 8px;
|
|
margin-bottom: 15px;
|
|
border-radius: 3px;
|
|
border: 1px solid #ccc;
|
|
}
|
|
|
|
button {
|
|
padding: 10px 15px;
|
|
width: 20%;
|
|
margin: 0 auto;
|
|
font-size: medium;
|
|
border: none;
|
|
border-radius: 3px;
|
|
background-color: #007bff;
|
|
color: #fff;
|
|
cursor: pointer;
|
|
transition: background-color 0.3s ease;
|
|
}
|
|
|
|
button:hover {
|
|
background-color: #0056b3;
|
|
}
|
|
|
|
button:active {
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
/* Responsive styles */
|
|
@media screen and (max-width: 768px) {
|
|
.container {
|
|
margin: 15px 10px;
|
|
}
|
|
|
|
button {
|
|
padding: 10px 15px;
|
|
width: 33%;
|
|
margin: 0 auto;
|
|
font-size: medium;
|
|
border: none;
|
|
border-radius: 3px;
|
|
background-color: #007bff;
|
|
color: #fff;
|
|
cursor: pointer;
|
|
transition: background-color 0.3s ease;
|
|
}
|
|
|
|
input[type="url"] {
|
|
width: calc(100% - 16px);
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="container">
|
|
<h1>Oh My URL!</h1>
|
|
<form action="/" method="post">
|
|
{{ if .Error }}
|
|
<label for="urlInput" style="color: red;">{{ .Error.Error }}</label>
|
|
{{ end }}
|
|
<input type="url" id="urlInput" name="url" placeholder="https://example.com/" value="{{ if .MainURL }}{{ .MainURL }}{{ end }}" required>
|
|
{{ if .ShortedURL }}
|
|
<label for="urlOutput">Shortened URL: <a href="{{.ShortedURL}}" target="_blank">{{.ShortedURL}}</a></label>
|
|
{{ end }}
|
|
<button type="submit">Get URL</button>
|
|
</form>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|