summaryrefslogtreecommitdiffstats
path: root/roles/modernpaste/files/post.html
blob: 21451dd1aa586105b4c993eae8dae2ab0768a93e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{% extends 'base.html' %}

{% block title %}
    Modern Paste
{% endblock %}

{% block head %}
    {{ super() }}

    {{ import_css([
        'lib/date-time-picker/jquery.datetimepicker.css',
        'lib/codemirror/lib/codemirror.css',
    ])|safe }}

    {{ import_js([
        'lib/date-time-picker/build/jquery.datetimepicker.full.min.js',
        'lib/codemirror/lib/codemirror.js',
        'paste/PostController.js',
    ])|safe }}

    {% if config.BUILD_ENVIRONMENT == 'dev' %}
        {% for language in config.LANGUAGES %}
            {% if language != 'text' %}
                {{ import_js(['lib/codemirror/mode/' ~ language ~ '/' ~ language ~ '.js'], defer=True)|safe }}
            {% endif %}
        {% endfor %}
    {% else %}
        {{ import_js(['paste/modes.js'], defer=True)|safe }}
    {% endif %}
{% endblock %}

{% block content %}
    <!--Paste title-->
    <div class="paste-title-container section-label">
        <p class="sans-serif regular size-1 light-gray less-spaced">PASTE TITLE</p>
        <textarea class="paste-title minimal-input-field ubuntu-mono regular gray size-4" autocomplete="off">Untitled</textarea>
    </div>

    <!--Paste language-->
    <div class="paste-language-container section-label">
        <p class="sans-serif regular size-1 light-gray less-spaced">PASTE LANGUAGE</p>
        <select class="language-selector ubuntu-mono regular gray" name="languages" autocomplete="off">
            {% for language in config.LANGUAGES %}
                <option value="{{ language|lower }}">{{ language|title }}</option>
            {% endfor %}
        </select>
    </div>

    <!--More options-->
    <div class="more-options-container section-label">
        <span class="more-options-link">
            <span class="sans-serif regular size-1 light-gray less-spaced">MORE OPTIONS</span>
            <img class="arrow" src="/static/img/icons/arrows.png">
        </span>
        <!--<p class="option-description sans-serif regular size-1 light-gray less-spaced">PASTE EXPIRATION</p>
        <input id="date-time-picker" class="minimal-input-field underlined-input-field ubuntu-mono regular size-3" type="text" autocomplete="off" placeholder="Click to set a date">-->
        <p class="option-description sans-serif regular size-1 light-gray less-spaced">PASSWORD</p>
        <input type="password" class="paste-password minimal-input-field underlined-input-field regular size-3" autocomplete="off">
    </div>

    <!--Paste attachments-->
    {% if config.ENABLE_PASTE_ATTACHMENTS %}
        <div class="paste-attachments-container section-label">
            <p class="sans-serif regular size-1 light-gray less-spaced">PASTE ATTACHMENTS</p>
            <div class="attachments-upload-section">
                <a href="#" class="attachments-browse-button btn btn-default sans-serif semibold size-1 gray less-spaced">BROWSE FILES...</a>
                {% if config.MAX_ATTACHMENT_SIZE > 0 %}
                    <span class="max-size-notice sans-serif regular size-1 light-gray less-spaced">Max size {{ config.MAX_ATTACHMENT_SIZE }} MB</span>
                {% endif %}
            </div>
            <div class="attachments-list hidden ubuntu-mono regular size-2 gray">
                <template id="attachment-item-template">
                    <div class="attachment-item faded">
                        <i class="delete-attachment-icon fa fa-minus red hidden" aria-hidden="true"></i>
                        <i class="attachment-loading-icon fa fa-circle-o-notch fa-spin" aria-hidden="true"></i>
                        <span class="attachment-name"></span>
                    </div>
                </template>
            </div>
            <input id="attachments-browse-input" class="hidden" type="file" multiple>
        </div>
    {% endif %}

    <!--Paste contents-->
    <div class="paste-contents-container">
        <p class="sans-serif regular size-1 light-gray less-spaced">PASTE CONTENTS</p>
    </div>
    <div id="paste-post-contents"></div>

    <!--Footer (paste metadata, submit button)-->
    <div id="footer">
        <div class="statistics-section">
            <span>
                <span class="line-count sans-serif semibold size-1 white spaced">1</span>
                <span class="sans-serif regular size-1 white spaced">LINES</span>
                <span class="character-count sans-serif semibold size-1 white spaced">0</span>
                <span class="sans-serif regular size-1 white spaced">CHARACTERS</span>
            </span>
        </div>
        <div class="submit-section">
            <span class="dark-link-alt">
                <a class="paste-download-link sans-serif semibold size-1 white spaced" href="#">DOWNLOAD PASTE AS PLAIN TEXT</a>
                <!--Hidden from the user; used to store the plain text data for launching the download via the link above.-->
                <a class="paste-download-content hidden" href="#" download></a>
                <button type="button" class="submit-button sans-serif semibold white size-2 spaced btn btn-success">
                    SUBMIT
                    <i class="submit-arrow fa fa-long-arrow-right"></i>
                </button>
            </span>
        </div>
    </div>

    <div class="paste-submit-splash splash">
        <div class="spinner"><div></div></div>
        <p class="uploading-status sans-serif semibold size-2 gray less-spaced"></p>
    </div>

    <div id="metadata" class="hidden">
        <div id="max-attachment-size" data-max-attachment-size="{{ config.MAX_ATTACHMENT_SIZE }}"></div>
    </div>
{% endblock %}