diff --git a/app/public/assets/css/repertoire.css b/app/public/assets/css/repertoire.css index eff232a..ef7c518 100644 --- a/app/public/assets/css/repertoire.css +++ b/app/public/assets/css/repertoire.css @@ -345,65 +345,110 @@ .student-popover { position: absolute; z-index: 200; - width: 320px; + width: 300px; background: var(--bg-primary, #fff); border: 1px solid var(--border-primary, #ddd); - box-shadow: 0 4px 18px rgba(0,0,0,.12); + box-shadow: 0 4px 20px rgba(0,0,0,.13); border-radius: 4px; overflow: hidden; pointer-events: auto; + max-height: 80vh; + overflow-y: auto; } .student-popover[hidden] { display: none; } -.student-popover__iframe { +/* ---- Student card (inside popover) ---- */ +.student-card { display: block; - width: 100%; - height: 400px; - border: none; -} - -.student-preview__iframe { - display: block; - width: 100%; - height: 400px; - border: none; -} - -.student-preview__name { - font-weight: 600; - font-size: var(--step--1); - padding: var(--space-xs) var(--space-s) var(--space-3xs); - margin: 0; + text-decoration: none; + color: inherit; + transition: background 0.12s; border-bottom: 1px solid var(--border-primary, #eee); } -.student-preview__list { - list-style: none; - margin: 0; - padding: var(--space-3xs) 0; -} - -.student-preview__list li { - border-bottom: 1px solid var(--border-primary, #eee); -} - -.student-preview__list li:last-child { +.student-card:last-child { border-bottom: none; } -.student-preview__link { - display: block; - padding: var(--space-2xs) var(--space-s); - font-size: var(--step--1); - color: var(--text-primary); - text-decoration: none; - transition: background 0.12s, color 0.12s; +.student-card:hover { + background: var(--bg-secondary, #f5f5f5); } -.student-preview__link:hover { - background: var(--accent-primary, #0055ff); - color: #fff; +.student-card__banner { + width: 100%; + height: 120px; + background-size: cover; + background-position: center; +} + +.student-card__banner--gradient { + background-image: none; + background: linear-gradient( + 180deg, + rgba(60, 133, 108, 1) 0%, + rgba(96, 236, 180, 1) 33%, + rgba(227, 144, 255, 1) 66%, + rgba(149, 87, 181, 1) 100% + ); + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: var(--space-s); + text-align: center; + box-sizing: border-box; +} + +.student-card__gradient-author { + color: var(--accent-foreground); + font-size: var(--step--2); + opacity: 0.85; + margin-bottom: 0.25rem; + display: block; +} + +.student-card__gradient-title { + color: var(--accent-foreground); + font-size: var(--step--1); + font-weight: 600; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; +} + +.student-card__body { + padding: var(--space-xs) var(--space-s) var(--space-s); +} + +.student-card__meta { + margin: 0 0 var(--space-3xs); + font-size: var(--step--2); + color: var(--text-secondary, #888); + letter-spacing: 0.03em; +} + +.student-card__title { + margin: 0 0 var(--space-3xs); + font-size: var(--step--1); + font-weight: 600; + line-height: 1.3; + color: var(--text-primary); +} + +.student-card__subtitle { + margin: 0 0 var(--space-3xs); + font-size: var(--step--2); + color: var(--text-secondary, #888); + font-style: italic; +} + +.student-card__synopsis { + margin: var(--space-3xs) 0 0; + font-size: var(--step--2); + color: var(--text-secondary, #888); + line-height: 1.5; } diff --git a/app/src/Database.php b/app/src/Database.php index 1838ada..1f0b5a3 100644 --- a/app/src/Database.php +++ b/app/src/Database.php @@ -461,13 +461,13 @@ class Database { */ public function getThesesByAuthorName(string $name): array { $stmt = $this->pdo->prepare( - "SELECT t.id, t.title - FROM theses t - JOIN thesis_authors ta ON ta.thesis_id = t.id + "SELECT vp.id, vp.title, vp.subtitle, vp.year, vp.synopsis, + vp.orientation, vp.finality_type, vp.banner_path, vp.authors + FROM v_theses_public vp + JOIN thesis_authors ta ON ta.thesis_id = vp.id JOIN authors a ON a.id = ta.author_id - WHERE t.is_published = 1 - AND a.name = ? - ORDER BY t.year DESC, t.title ASC" + WHERE a.name = ? + ORDER BY vp.year DESC, vp.title ASC" ); $stmt->execute([$name]); return $stmt->fetchAll(); diff --git a/app/storage/cache/rate_limit/ad921d60486366258809553a3db49a4a.json b/app/storage/cache/rate_limit/ad921d60486366258809553a3db49a4a.json deleted file mode 100644 index 3da2b3d..0000000 --- a/app/storage/cache/rate_limit/ad921d60486366258809553a3db49a4a.json +++ /dev/null @@ -1 +0,0 @@ -[1776449542] \ No newline at end of file diff --git a/app/storage/posterg.db b/app/storage/posterg.db index 9061624..64251a7 100644 Binary files a/app/storage/posterg.db and b/app/storage/posterg.db differ diff --git a/app/storage/test.db b/app/storage/test.db index e381c63..c302e59 100644 Binary files a/app/storage/test.db and b/app/storage/test.db differ diff --git a/app/templates/partials/student-preview.php b/app/templates/partials/student-preview.php index ff83b64..962f669 100644 --- a/app/templates/partials/student-preview.php +++ b/app/templates/partials/student-preview.php @@ -1,28 +1,42 @@ int, title => string] + * $theses array rows from Database::getThesesByAuthorName() * $name string student name */ + +foreach ($theses as $t): + $synopsis = $t['synopsis'] ?? ''; + // Truncate synopsis to ~160 chars + if (mb_strlen($synopsis) > 160) { + $synopsis = mb_substr($synopsis, 0, 157) . '…'; + } + $meta = array_filter([ + $t['year'] ?? null, + $t['orientation'] ?? null, + $t['finality_type'] ?? null, + ]); ?> - - - -

- - + + +
+ +
+ + +
+ +
+

+

+ +

+ + +

+ +
+
+