main.html 1.53 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{{ config.site_name }}</title>
    <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>
132ikl's avatar
132ikl committed
16
17
                <input name="long" type="url" placeholder="Long URL">
            </p>
18
            <p>
132ikl's avatar
132ikl committed
19
20
21
22
23
                <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>
24
25
        </form>
    </div>
132ikl's avatar
132ikl committed
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
    {% 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 %}
41
42
</body>
</html>