78 lines
3.6 KiB
HTML
78 lines
3.6 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}{{ cfg.site.name }}{% endblock %}
|
|
{% block main_class %}full-page{% endblock %}
|
|
|
|
{% block nav_actions %}
|
|
<input type="text" id="title" placeholder="Title (optional)" class="nav-input" maxlength="100" autocomplete="off">
|
|
<select id="language" class="nav-select"></select>
|
|
<select id="expires_in" class="nav-select">
|
|
{% for opt in cfg.pastes.allow_expiry_options %}
|
|
<option value="{{ opt }}" {% if opt == cfg.pastes.default_expiry %}selected{% endif %}>
|
|
{{ cfg.pastes.expiry_labels.get(opt, opt) }}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
<button id="clearBtn" class="nav-btn">Clear</button>
|
|
<label class="nav-label" title="Allow discussions on this paste">
|
|
<input type="checkbox" id="allowDiscussions"> Discuss
|
|
</label>
|
|
<label class="nav-label" title="Delete this paste the moment it is first opened">
|
|
<input type="checkbox" id="burnAfterRead"> 🔥 Burn
|
|
</label>
|
|
<button id="passwordBtn" class="nav-btn" title="Set a password for this paste">🔒 Lock</button>
|
|
<button id="submitBtn" class="nav-btn nav-btn-save">Save</button>
|
|
{% if cfg.theme.allow_user_toggle %}
|
|
<button id="themeToggle" class="theme-toggle">🌙</button>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div id="passwordModal" class="modal-overlay" style="display:none" role="dialog" aria-modal="true" aria-labelledby="passwordModalTitle">
|
|
<div class="modal-box">
|
|
<h2 id="passwordModalTitle" class="modal-title">🔒 Password Protect</h2>
|
|
<p class="modal-desc">The password is never sent to the server. Anyone viewing this paste will need it to decrypt.</p>
|
|
<div class="form-group">
|
|
<label for="pastePassword">Password</label>
|
|
<input type="password" id="pastePassword" class="modal-input" placeholder="Enter password…" autocomplete="new-password">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="pastePasswordConfirm">Confirm Password</label>
|
|
<input type="password" id="pastePasswordConfirm" class="modal-input" placeholder="Confirm password…" autocomplete="new-password">
|
|
</div>
|
|
<div id="passwordModalError" class="modal-error" style="display:none"></div>
|
|
<div class="modal-actions">
|
|
<button id="passwordModalClear" class="btn">Remove Lock</button>
|
|
<button id="passwordModalCancel" class="btn">Cancel</button>
|
|
<button id="passwordModalSave" class="btn btn-primary">Set Password</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<textarea
|
|
id="content"
|
|
class="full-editor"
|
|
placeholder="Paste your code or text here…"
|
|
spellcheck="false"
|
|
autocomplete="off"
|
|
autocorrect="off"
|
|
autocapitalize="off"></textarea>
|
|
<div id="burnSharePanel" class="burn-share-panel" style="display:none" aria-live="polite">
|
|
<div class="burn-share-inner">
|
|
<div class="burn-share-icon">■</div>
|
|
<h2 class="burn-share-title">Burn link ready</h2>
|
|
<p class="burn-share-desc">This link can only be opened <strong>once</strong>. Share it with the intended recipient — do not open it yourself.</p>
|
|
<div class="burn-share-link-row">
|
|
<input type="text" id="burnShareUrl" class="burn-share-url" readonly>
|
|
<button id="burnShareCopy" class="nav-btn nav-btn-save">Copy</button>
|
|
</div>
|
|
<div class="burn-share-actions">
|
|
<a href="/" class="btn btn-primary">Create another</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<script src="{{ url_for('static', filename='js/paste_create.js') }}" nonce="{{ csp_nonce }}"></script>
|
|
{% endblock %}
|