- Move all inline <script> blocks (layout head/theme, topbar dark toggle, foot, paste, new, history, mine, settings, admin, unlock) to external files under internal/web/static/. Page data reaches scripts via data-* attributes (data-paste-id, data-default-dark) instead of template vars. - Replace inline onclick handlers (copy, delete, stats toggle) with addEventListener wiring. - Convert inline style="" attributes to CSS utility classes; swatch colors are now set via CSSOM/DOM APIs instead of innerHTML strings. - script-src/style-src are now plain 'self'; img-src data: stays for the SVG data-URI backgrounds. Verified with headless chromium: zero CSP violations on all pages in dark and light presets, theme swatches, admin lock, tables and paste view render correctly.
32 lines
1.4 KiB
HTML
32 lines
1.4 KiB
HTML
{{template "head" .}}
|
|
{{template "topbar" .}}
|
|
<div class="page">
|
|
<div class="head-row">
|
|
<h1>Saved pastes</h1>
|
|
<span class="count" id="count"></span>
|
|
</div>
|
|
<div class="search"><input id="filter" placeholder="Search…"><span class="search-spinner" id="search-spinner"></span></div>
|
|
<div class="float">
|
|
<table>
|
|
<colgroup><col class="col-a"><col class="col-b"><col class="col-c"><col class="col-d2"><col class="col-e"><col class="col-f"></colgroup>
|
|
<thead><tr>
|
|
<th data-sort="title" class="sortable"><span class="sort-ind"></span>Paste</th>
|
|
<th data-sort="language" class="sortable"><span class="sort-ind"></span>Language</th>
|
|
<th data-sort="size" class="sortable"><span class="sort-ind"></span>Size</th>
|
|
<th data-sort="created_at" class="sortable"><span class="sort-ind"></span>Created</th>
|
|
<th data-sort="custom_slug" class="sortable"><span class="sort-ind"></span>URL</th>
|
|
<th data-sort="id" class="sortable"><span class="sort-ind"></span>ID</th>
|
|
</tr></thead>
|
|
<tbody id="rows"></tbody>
|
|
</table>
|
|
<div class="empty hidden" id="empty">No pastes from this browser yet.</div>
|
|
</div>
|
|
<div class="pager float">
|
|
<span id="showing"></span>
|
|
<div class="pg" id="pg"></div>
|
|
</div>
|
|
</div>
|
|
<script src="/static/table.js"></script>
|
|
<script src="/static/mine.js" defer></script>
|
|
{{template "foot" .}}
|