Added a original url lookup
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block body %}
|
||||
<form method="POST" action="" class="url-form">
|
||||
<h1>< URL Lookup ></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 %}
|
||||
@@ -0,0 +1,18 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block body %}
|
||||
<div class="url-form">
|
||||
<h1>< Original URL ></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 %}
|
||||
Reference in New Issue
Block a user