67 lines
3.3 KiB
HTML
67 lines
3.3 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}{{ cfg.site.name }}{% endblock %}
|
|
{% block main_class %}full-page view-page{% endblock %}
|
|
|
|
{% block nav_actions %}
|
|
<span id="navPasteTitle" class="nav-paste-title"></span>
|
|
<label class="nav-label" title="Toggle line numbers">
|
|
<input type="checkbox" id="lineNoToggle" checked> Lines
|
|
</label>
|
|
<label class="nav-label" title="Toggle word wrap">
|
|
<input type="checkbox" id="wrapToggle" checked> Wrap
|
|
</label>
|
|
<button id="rawBtn" class="nav-btn">Raw</button>
|
|
<button id="copyBtn" class="nav-btn">Copy</button>
|
|
<button id="downloadBtn" class="nav-btn">Download</button>
|
|
<button id="deleteBtn" class="nav-btn nav-btn-danger" style="display:none">Delete</button>
|
|
<a href="{{ url_for('index') }}" class="nav-btn nav-btn-save">New</a>
|
|
{% if cfg.theme.allow_user_toggle %}
|
|
<button id="themeToggle" class="theme-toggle">🌙</button>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block content %}<div id="passwordPrompt" class="modal-overlay" style="display:none" role="dialog" aria-modal="true" aria-labelledby="ppTitle">
|
|
<div class="modal-box">
|
|
<h2 id="ppTitle" class="modal-title">🔒 Password Required</h2>
|
|
<p class="modal-desc">This paste is password protected. Enter the password to view it.</p>
|
|
<div class="form-group">
|
|
<label for="viewPassword">Password</label>
|
|
<input type="password" id="viewPassword" class="modal-input" placeholder="Enter password…" autocomplete="current-password">
|
|
</div>
|
|
<div id="ppError" class="modal-error" style="display:none">Incorrect password or corrupted data.</div>
|
|
<div class="modal-actions">
|
|
<a href="/" class="btn">Cancel</a>
|
|
<button id="ppSubmit" class="btn btn-primary">Decrypt</button>
|
|
</div>
|
|
</div>
|
|
</div><div id="errorState" class="error-inline" style="display:none">
|
|
🔐 <strong id="errorTitle">Decryption Failed</strong> — <span id="errorDetail"></span>
|
|
</div>
|
|
<div class="view-full" id="viewFull" style="display:none">
|
|
<pre id="viewPre"><code id="codeBlock"></code></pre>
|
|
</div>
|
|
<div id="discussionsPanel" class="discussions-panel" style="display:none">
|
|
<div class="discussions-header" id="discussionsToggle">
|
|
<span class="discussions-title">💬 Discussions (<span id="discussionsCount">0</span>)</span>
|
|
<span class="discussions-chevron" id="discussionsChevron">▼</span>
|
|
</div>
|
|
<div class="discussions-body">
|
|
<div id="commentsList" class="comments-list"></div>
|
|
<div class="comment-form-wrap">
|
|
<div class="comment-form-fields">
|
|
<input type="text" id="commentNick" class="comment-nick" placeholder="Nickname (optional)" maxlength="32" autocomplete="off">
|
|
<textarea id="commentInput" class="comment-input" placeholder="Add a comment… (Ctrl+Enter to post)" rows="2"></textarea>
|
|
</div>
|
|
<button id="commentSubmit" class="nav-btn nav-btn-save">Post</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="application/json" id="encryptedPayload">{{ paste.encrypted_data | tojson }}</script>
|
|
<script type="application/json" id="burnMeta">{{ {'burn_after_read': burn_after_read, 'burn_token': burn_token} | tojson }}</script>
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<script src="{{ url_for('static', filename='js/paste_view.js') }}" nonce="{{ csp_nonce }}"></script>
|
|
{% endblock %}
|