feat(journal): превью последних вложений и фото с занятий в карточке отчёта
- эндпоинты /api/students/image-files-by-name и /api/students/works-by-name (requireAuth, branchScope) - галерея вложений карточки грузится асинхронно по имени ученика, кэш по имени - новый тумблер «Фото на занятиях» (localStorage reportCardStudentWorks) - выравнивание высоты галереи, обработка landscape-фото, CSS .sc-w__* - shorts: правка выравнивания автора в строке
This commit is contained in:
+15
-2
@@ -1110,7 +1110,7 @@ body[data-page=settings] .page-head{align-items:flex-end}
|
||||
border-top:1px solid var(--sc-border);
|
||||
background:linear-gradient(to bottom,#FBFDFF 0%,#FFFFFF 100%);
|
||||
}
|
||||
.student-card__footer-badges{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-width:0}
|
||||
.student-card__footer-badges{display:flex;align-items:center;gap:10px;width:100%;min-width:0}
|
||||
.student-card__badge{
|
||||
display:inline-flex;
|
||||
align-items:center;
|
||||
@@ -1127,7 +1127,7 @@ body[data-page=settings] .page-head{align-items:flex-end}
|
||||
user-select:none;
|
||||
}
|
||||
.student-card__badge--time{background:rgba(23,59,120,.94)}
|
||||
.student-card__badge--tool{background:var(--sc-primary);box-shadow:0 4px 12px rgba(52,120,246,.28)}
|
||||
.student-card__badge--tool{background:var(--sc-primary);box-shadow:0 4px 12px rgba(52,120,246,.28);margin-left:auto}
|
||||
.student-card__badge[hidden]{display:none}
|
||||
.student-card__badge > span{overflow:hidden;text-overflow:ellipsis}
|
||||
.student-card__icon{display:block;flex:none}
|
||||
@@ -1212,6 +1212,7 @@ body.report-card-open .report-fields{display:flex}
|
||||
|
||||
/* --- Галерея вложений в карточке отчёта (журнал) --- */
|
||||
.student-card__gallery-grid{columns:118px 3;column-gap:10px}
|
||||
.student-card__gallery-grid.is-loading{display:flex;align-items:center;justify-content:center;min-height:64px;columns:auto}
|
||||
.sc-gal__shot{position:relative;display:block;width:100%;padding:0;margin:0 0 10px;border:1px solid var(--sc-border);border-radius:12px;overflow:hidden;background:var(--sc-primary-soft);aspect-ratio:4/3;cursor:zoom-in;break-inside:avoid;-webkit-column-break-inside:avoid;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;-webkit-tap-highlight-color:transparent}
|
||||
.sc-gal__shot.is-ready{aspect-ratio:auto}
|
||||
.sc-gal__shot:hover{transform:translateY(-3px);border-color:#BCD6FA;box-shadow:0 10px 22px rgba(23,59,120,.18)}
|
||||
@@ -1219,6 +1220,9 @@ body.report-card-open .report-fields{display:flex}
|
||||
.sc-gal__img{position:relative;z-index:1;display:block;width:100%;height:auto;max-height:min(340px,52vh);object-fit:contain;opacity:0;transition:opacity .28s ease}
|
||||
.sc-gal__img.is-loaded{opacity:1}
|
||||
.sc-gal__img.is-error{opacity:0}
|
||||
.student-card__gallery-grid.is-equal .sc-gal__shot{height:var(--gal-h);aspect-ratio:auto}
|
||||
.student-card__gallery-grid.is-equal .sc-gal__img{height:100%;object-fit:contain}
|
||||
.student-card__gallery-grid.is-equal .sc-gal__img.is-landscape{object-fit:cover}
|
||||
.sc-gal__spin{position:absolute;inset:0;z-index:0;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:.6rem}
|
||||
.sc-gal__spin::before{content:'';position:absolute;inset:0;background:linear-gradient(100deg,transparent 20%,rgba(52,120,246,.13) 50%,transparent 80%);background-size:220% 100%;animation:imgShimmer 1.4s ease-in-out infinite}
|
||||
.sc-gal__spin::after{content:'';position:relative;width:20px;height:20px;border-radius:50%;border:2px solid var(--border);border-top-color:var(--sc-primary);animation:spin .7s linear infinite}
|
||||
@@ -1230,6 +1234,15 @@ body.report-card-open .report-fields{display:flex}
|
||||
.sc-gal__shot:hover .sc-gal__zoom,.sc-gal__shot:focus-visible .sc-gal__zoom{opacity:1;transform:translateY(0)}
|
||||
@media(prefers-reduced-motion:reduce){.sc-gal__spin::before,.sc-gal__spin::after{animation:none}.sc-gal__shot{transition:none}}
|
||||
|
||||
/* --- Фото на занятиях в карточке отчёта (журнал) --- */
|
||||
.student-card__student-works{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
|
||||
.student-card__student-works.is-loading{display:flex;align-items:center;justify-content:center;min-height:64px}
|
||||
.sc-w__spin{width:22px;height:22px;border-radius:50%;border:2px solid var(--sc-border);border-top-color:var(--sc-primary);animation:spin .7s linear infinite}
|
||||
.sc-w__shot{position:relative;display:block;width:100%;padding:0;margin:0;border:1px solid var(--sc-border);border-radius:10px;overflow:hidden;background:var(--sc-primary-soft);aspect-ratio:1/1;cursor:zoom-in;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;-webkit-tap-highlight-color:transparent}
|
||||
.sc-w__shot:hover{transform:translateY(-3px);border-color:#BCD6FA;box-shadow:0 10px 22px rgba(23,59,120,.18)}
|
||||
.sc-w__shot:active{transform:translateY(-1px)}
|
||||
.sc-w__img{display:block;width:100%;height:100%;object-fit:cover}
|
||||
|
||||
/* --- Навигация лайтбокса карточки отчёта --- */
|
||||
.img-modal-nav{position:absolute;left:50%;bottom:22px;transform:translateX(-50%);display:flex;align-items:center;gap:14px;padding:7px 12px;border-radius:999px;background:rgba(23,59,120,.82);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);box-shadow:0 8px 24px rgba(0,0,0,.3)}
|
||||
.img-modal-nav[hidden]{display:none}
|
||||
|
||||
Reference in New Issue
Block a user