Add web interface styling and configuration, fix existing long URL retrieval and duplicate short URL checks

This commit is contained in:
132ikl 2019-02-23 01:45:47 -05:00
parent 513050e131
commit b58f1dd273
5 changed files with 123 additions and 45 deletions

View file

@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>liteshort</title>
</head>
<body>
<form>
Long URL:
<br>
<input name="long" type="url">
<br>
Short URL:
<br>
<input name="short" type="text">
<br> <!-- TODO: Use CSS to do linebreaks -->
<input type="submit" value="Shorten" formmethod="post">
</form>
</body>
</html>

46
static/styles.css Normal file
View file

@ -0,0 +1,46 @@
div.form {
margin-top: 5%;
text-align: center;
}
input {
margin: auto;
}
div.success {
display: inline-block;
font-family: Open Sans;
border-radius: 2vh;
padding: 2vh;
color: #62ad2c;
background-color: #E9FFD9;
border: 1px solid #62ad2c;
}
div.error {
display: inline-block;
font-family: Open Sans;
border-radius: 2vh;
padding: 2vh;
color: #a86464;
background-color: #FCE9E9;
border: 1px solid #a86464;
}
body {
text-align: center
}
div.success > a:link {
color: #62ad2c;
}
div.success > a:visited {
color: #507c52;
}
h2 {
font-weight: normal;
font-family: Open Sans;
}