2019-02-24 10:30:57 +03:00
|
|
|
<!--
|
|
|
|
Copyright (c) 2019 Steven Spangler <132@ikl.sh>
|
|
|
|
This file is part of liteshort by 132ikl
|
|
|
|
This software is license under the MIT license. It should be included in your copy of this software.
|
|
|
|
A copy of the MIT license can be obtained at https://mit-license.org/
|
|
|
|
-->
|
2019-02-23 09:45:47 +03:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<title>{{ config.site_name }}</title>
|
2019-02-24 11:31:30 +03:00
|
|
|
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
2019-02-23 09:45:47 +03:00
|
|
|
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css">
|
|
|
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
|
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="form">
|
|
|
|
<h2>{{ config.site_name }}</h2>
|
|
|
|
<form class="pure-form">
|
|
|
|
<p>
|
2019-02-24 08:07:01 +03:00
|
|
|
<input name="long" type="url" placeholder="Long URL">
|
|
|
|
</p>
|
2019-02-23 09:45:47 +03:00
|
|
|
<p>
|
2019-02-24 08:07:01 +03:00
|
|
|
<input name="short" type="text" placeholder="Custom link (optional)">
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<button type="submit" class="pure-button pure-button-primary" formmethod="post">Shorten</button>
|
|
|
|
</p>
|
2019-02-23 09:45:47 +03:00
|
|
|
</form>
|
|
|
|
</div>
|
2019-02-24 09:36:10 +03:00
|
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
|
|
{% if messages %}
|
|
|
|
{% for category, message in messages %}
|
|
|
|
{% if category == 'success' %}
|
|
|
|
<div class="success">
|
|
|
|
✓ Shortlink successfully generated! Available at <a href="{{ message }}">{{ message }}</a>
|
|
|
|
</div>
|
|
|
|
{% elif category == 'error' %}
|
|
|
|
<div class="error">
|
|
|
|
✖ {{ message }}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
2019-02-24 10:30:57 +03:00
|
|
|
{% if config.show_github_link %}
|
|
|
|
<div class="github">
|
|
|
|
<a href="https://github.com/132ikl/liteshort">
|
|
|
|
<img src="{{ url_for('static', filename='GitHub.svg') }}">
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2019-02-23 09:45:47 +03:00
|
|
|
</body>
|
|
|
|
</html>
|