Added a simple home page
This commit is contained in:
+1
-1
@@ -33,4 +33,4 @@ def validate_URL(form, field):
|
|||||||
class URLForm(FlaskForm):
|
class URLForm(FlaskForm):
|
||||||
url = StringField(validators=[DataRequired(), Length(min=4, max=2000), validate_URL])
|
url = StringField(validators=[DataRequired(), Length(min=4, max=2000), validate_URL])
|
||||||
|
|
||||||
submit = SubmitField("Shorten URL")
|
submit = SubmitField("Shorten")
|
||||||
|
|||||||
+47
-1
@@ -1,3 +1,49 @@
|
|||||||
body {
|
body {
|
||||||
background: #2c2c2c;
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-family: sans-serif;
|
||||||
|
background: #121212;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form {
|
||||||
|
background: #2c2c2c;
|
||||||
|
border-radius: 15px;
|
||||||
|
padding: 7% 0;
|
||||||
|
position: absolute;
|
||||||
|
width: 85%;
|
||||||
|
top: 30%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%,-50%);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.url {
|
||||||
|
background: #121212;
|
||||||
|
border: 2px solid #bb86fc;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 2% 2%;
|
||||||
|
width: 50%;
|
||||||
|
margin-left: 2%;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.url:focus {
|
||||||
|
border-color: #7b59a5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.submit {
|
||||||
|
background: #bb86fc;
|
||||||
|
border: 2px solid #bb86fc;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 1% 1%;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 1% 1% 0px 1%;
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 120%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.submit:hover {
|
||||||
|
background: #7b59a5;
|
||||||
|
border-color: #7b59a5;
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
{% extends "layout.html" %}
|
{% extends "layout.html" %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div>
|
<form method="POST" action="" class="form">
|
||||||
<form method="POST" action="">
|
|
||||||
{{ form.hidden_tag() }}
|
{{ form.hidden_tag() }}
|
||||||
{{ form.url(placeholder="Enter the URL here") }}
|
{{ form.url(placeholder="Enter the URL here", class="url") }}
|
||||||
{{ form.submit }}
|
{{ form.submit(class="submit") }}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<link href="/static/style.css" rel="stylesheet" type="text/css"/>
|
<link href="/static/style.css" rel="stylesheet" type="text/css"/>
|
||||||
|
|
||||||
<title>tiny0 - Custom URL Shortener</title>
|
<title>tiny0 - Custom URL Shortener</title>
|
||||||
|
|||||||
Reference in New Issue
Block a user