Обновление страницы и логики дашборда
This commit is contained in:
@@ -30,7 +30,9 @@
|
||||
.digest-dash-actions { display:flex; gap:8px; margin-top:6px; flex-shrink:0; }
|
||||
.digest-view { display:flex; flex-direction:column; gap:12px; }
|
||||
.digest-view-preview { width:100%; max-height:320px; object-fit:cover; border:1px solid var(--border); border-radius:10px; }
|
||||
.bookmark-modal-head { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:0 0 12px 0; border-bottom:1px solid var(--border); }
|
||||
.digest-view-head { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; }
|
||||
#digestViewGo { text-decoration:none; }
|
||||
.digest-view-title { margin:0; font-size:1.25rem; word-break:break-word; }
|
||||
.digest-view-meta { font-size:.82rem; color:var(--muted); }
|
||||
.digest-view-body { font-size:1rem; line-height:1.7; color:var(--text); }
|
||||
|
||||
@@ -272,9 +272,15 @@ function digestViewImagesHtml(d) {
|
||||
}).join('') + '</div>';
|
||||
}
|
||||
|
||||
function previewSrc(p) {
|
||||
if (!p) return p;
|
||||
if (p.startsWith('/uploads/')) return `${API}${p}`;
|
||||
return thumbSrc(p);
|
||||
}
|
||||
|
||||
function renderDigestView(d) {
|
||||
const pinned = !!d.is_pinned;
|
||||
const preview = d.preview_path ? '<img src="' + thumbSrc(d.preview_path) + '" data-img="' + API + d.preview_path + '" class="digest-view-preview" alt="превью">' : '';
|
||||
const preview = d.preview_path ? '<img src="' + previewSrc(d.preview_path) + '" data-img="' + API + d.preview_path + '" class="digest-view-preview" alt="превью">' : '';
|
||||
const images = digestViewImagesHtml(d);
|
||||
const body = linkifyTextHtml(d.body || '');
|
||||
return '<div class="digest-view">' +
|
||||
|
||||
Reference in New Issue
Block a user