diff --git a/public/js/student.js b/public/js/student.js index f590783..ccd0726 100644 --- a/public/js/student.js +++ b/public/js/student.js @@ -147,7 +147,7 @@ function entriesHtml() { const items = data.entries.items; if (!items.length) return emptyHtml('Записей в журнале пока нет'); - return `
${items.map(e => { + return `
${items.map(e => { const photos = (e.photos || []).filter(p => p.photo_path !== e.photo_path).map(p => photoTile(p.photo_path)); if (e.photo_path) photos.unshift(photoTile(e.photo_path, null, e.photo_original_path)); return `
diff --git a/public/student.html b/public/student.html index 3c665dc..6c7bef3 100644 --- a/public/student.html +++ b/public/student.html @@ -47,6 +47,9 @@ .sp-tab-count{font-size:.7rem;background:var(--bg);border:1px solid var(--border);border-radius:999px;padding:1px 7px;color:var(--muted);min-width:20px;text-align:center} .sp-tab.active .sp-tab-count{background:rgba(37,99,235,.1);border-color:rgba(37,99,235,.2);color:var(--accent)} .sp-list{display:flex;flex-direction:column;gap:10px} + .sp-list.cards-3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;align-items:stretch} + @media(max-width:1200px){.sp-list.cards-3{grid-template-columns:repeat(2,1fr)}} + @media(max-width:720px){.sp-list.cards-3{grid-template-columns:1fr}} .sp-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px} .sp-photo{position:relative;aspect-ratio:1;border-radius:13px;overflow:hidden;border:1px solid var(--border);background:var(--bg);cursor:zoom-in;transition:transform .15s,box-shadow .15s} .sp-photo:hover{transform:translateY(-2px);box-shadow:0 8px 18px rgba(0,0,0,.1)}