Files
flask_url_shortener/tiny0/templates/layout.html
T

94 lines
2.4 KiB
HTML
Raw Normal View History

2020-07-18 16:40:51 +00:00
<!DOCTYPE html>
<html>
<head>
2020-07-18 23:39:18 +00:00
<meta charset="utf-8">
2020-08-17 09:20:08 +03:00
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1">
2020-07-18 23:39:18 +00:00
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
2020-08-07 11:02:46 +03:00
<link href="{{ url_for('static', filename='font.css') }}" rel="stylesheet">
2020-07-18 16:40:51 +00:00
<link href="/static/style.css" rel="stylesheet" type="text/css"/>
<title>tiny0 - Custom URL Shortener</title>
</head>
2020-07-19 21:52:15 +00:00
<div id="page-container">
<div id="content-wrap">
2020-08-19 16:31:22 +03:00
{% if form %}
2020-08-21 12:17:17 +03:00
{% if not form.url.errors and not form.token.errors %}
2020-08-19 16:31:22 +03:00
<body onload="typeTitle()">
<div class="headers">
<a class="title" id="title" href="{{ url_for('index') }}"></a>
<p id="desc" class="desc"></p>
2020-08-19 16:31:22 +03:00
</div>
{% else %}
<body>
<div class="headers">
<a class="title" href="{{ url_for('index') }}">tiny0</a>
<h1 class="desc">Custom URL Shortener</h1>
</div>
{% endif %}
{% else %}
<body>
<div class="headers">
<a class="title" href="{{ url_for('index') }}">tiny0</a>
<h1 class="desc">Custom URL Shortener</h1>
</div>
{% endif %}
{% block body %}{% endblock %}
2020-08-19 16:31:22 +03:00
{% if form %}
2020-08-21 12:17:17 +03:00
{% if not form.url.errors and not form.token.errors %}
2020-08-19 16:31:22 +03:00
<script>
var i = 0;
var title_text = "tiny0";
var desc_text = "Custom URL Shortener";
var speed = 120;
function typeTitle() {
if (i < title_text.length) {
document.getElementById("title").innerHTML += title_text.charAt(i);
i++;
setTimeout(typeTitle, speed);
}
else {
i = 0;
setTimeout(typeDesc, 200)
}
}
function typeDesc() {
if (i < desc_text.length) {
document.getElementById("desc").innerHTML += desc_text.charAt(i);
i++;
setTimeout(typeDesc, speed);
}
}
</script>
{% endif %}
{% elif url %}
<script>
function copyURL() {
var url = document.getElementById("url");
url.select();
url.setSelectionRange(0, 99999)
document.execCommand("copy");
}
</script>
{% endif %}
</body>
2020-07-19 21:52:15 +00:00
</div>
</div>
<footer>
<ul class="footer-list">
<li class="copyright">&#169; </li>
<li>2020 Muhammed Ali Dilek</li>
2020-07-23 18:26:18 +00:00
<ul>
<li><a href="{{ url_for('donate') }}">Donate</a></li>
<li><a href="https://github.com/xemeds" target="_blank">GitHub</a></li>
</ul>
2020-07-19 21:52:15 +00:00
</ul>
</footer>
2020-07-18 16:40:51 +00:00
</html>