diff --git a/public/dashboard.html b/public/dashboard.html index fa4b353..c4eecde 100644 --- a/public/dashboard.html +++ b/public/dashboard.html @@ -21,10 +21,24 @@ .post-task-hint { margin-top:6px; padding:6px 10px; border-radius:6px; background:rgba(239,68,68,.08); border:1px solid rgba(239,68,68,.3); color:#b91c1c; font-size:12px; line-height:1.4; } .post-task-actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; } .post-task-actions .btn-xs { padding:4px 10px; font-size:12px; } - .digest-dash-item { border:1px solid var(--border); border-radius:10px; padding:10px 12px; margin-bottom:8px; background:var(--card); } - .digest-dash-title { font-weight:600; font-size:.92rem; margin:0 0 4px 0; word-break:break-word; } - .digest-dash-body { font-size:.86rem; line-height:1.5; color:var(--text); margin-bottom:6px; word-break:break-word; } - .digest-dash-foot { font-size:.78rem; color:var(--muted); display:flex; gap:8px; align-items:center; } + .digest-dash-item { border:1px solid var(--border); border-radius:10px; padding:10px 12px; margin-bottom:8px; background:var(--card); display:flex; gap:10px; align-items:flex-start; } + .digest-dash-preview { width:70px; height:55px; object-fit:cover; border:1px solid var(--border); border-radius:6px; flex-shrink:0; margin-top:2px; } + .digest-dash-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:6px; } + .digest-dash-title { font-weight:600; font-size:.92rem; margin:0; word-break:break-word; } + .digest-dash-text { font-size:.86rem; line-height:1.5; color:var(--text); margin:0; word-break:break-word; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; } + .digest-dash-foot { font-size:.78rem; color:var(--muted); margin-top:auto; } + .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; } + .digest-view-head { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; } + .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); } + .digest-view-body a { color:var(--accent); text-decoration:underline; } + .digest-modal-body { max-height: 60vh; overflow-y: auto; padding: 12px 0 8px 0; } + .digest-view-images { display:flex; gap:10px; flex-wrap:wrap; margin-top:6px; } + .digest-view-image { position:relative; border:1px solid var(--border); border-radius:8px; overflow:hidden; width:150px; height:110px; flex-shrink:0; cursor:pointer; } + .digest-view-image img { width:100%; height:100%; object-fit:cover; display:block; }
@@ -112,6 +126,23 @@ + + + diff --git a/public/digest.html b/public/digest.html index caf711c..d839ee5 100644 --- a/public/digest.html +++ b/public/digest.html @@ -35,6 +35,7 @@ .digest-shot-zoom { position: absolute; bottom: 4px; right: 4px; background: rgba(0,0,0,.55); color: #fff; border-radius: 4px; padding: 2px 5px; font-size: .65rem; opacity: 0; transition: opacity .15s; } .digest-shot:hover .digest-shot-zoom { opacity: 1; } .digest-hidden { opacity: 0.72; } + .digest-highlight { outline: 2px solid #f59e0b; outline-offset: 2px; border-radius: 8px; } #digestModal .edit-modal { width: 1000px; max-width: none; } #digestModal .bookmark-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); } .digest-modal-body { max-height: 62vh; overflow-y: auto; padding: 12px 0 8px 0; } diff --git a/public/js/dashboard.js b/public/js/dashboard.js index a4db14f..1b910ad 100644 --- a/public/js/dashboard.js +++ b/public/js/dashboard.js @@ -222,17 +222,70 @@ function renderLessons(rows) { }).join(''); } +let dashDigestItems = []; + function renderDigest(rows) { const el = document.getElementById('dashDigest'); if (!el) return; + dashDigestItems = rows; if (!rows.length) { el.innerHTML = '