Added a original url lookup

This commit is contained in:
xemeds
2020-08-25 12:11:00 +03:00
parent a138e24d79
commit e5e9b7a5f4
5 changed files with 59 additions and 5 deletions
+1 -1
View File
@@ -19,7 +19,7 @@
<li class="logo">tiny0 - URL Shortener</li>
<li class="items"><a href="{{ url_for('index') }}">Shortener</a></li>
<li class="items"><a href="{{ url_for('tracker') }}">Tracker</a></li>
<li class="items"><a href="#">Lookup</a></li>
<li class="items"><a href="{{ url_for('lookup') }}">Lookup</a></li>
<li class="items"><a href="#">Report</a></li>
<li class="items"><a href="{{ url_for('donate') }}">Donate</a></li>
<li class="btn"><a href="#"><i class="fas fa-bars"></i></a></li>
+17
View File
@@ -0,0 +1,17 @@
{% extends "layout.html" %}
{% block body %}
<form method="POST" action="" class="url-form">
<h1>&#60 URL Lookup &#62</h1>
{{ form.hidden_tag() }}
{{ form.url(placeholder="Enter the short URL here", autofocus=true, class="feedback-input") }}
{{ form.submit(class="button") }}
{% if form.errors %}
<div class="form-errors">
{% for error in form.url.errors %}
<h4>{{ error }}</h4>
{% endfor %}
</div>
{% endif %}
</form>
{% endblock %}
+18
View File
@@ -0,0 +1,18 @@
{% extends "layout.html" %}
{% block body %}
<div class="url-form">
<h1>&#60 Original URL &#62</h1>
<input type="text" value="{{ url }}" id="url" class="feedback-input" readonly>
<button onclick="copyURL()" class="button">Copy</button>
</div>
{% endblock %}
{% block script %}
function copyURL() {
var url = document.getElementById("url");
url.select();
url.setSelectionRange(0, 99999)
document.execCommand("copy");
}
{% endblock %}