mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-26 08:39:18 +02:00
merge banners into covers: remove banner field, migrate files, add covers to search/home/repertoire cards
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
* Partial: student popover preview card(s).
|
||||
*
|
||||
* Expected variables:
|
||||
* $theses array rows from Database::getThesesByAuthorName()
|
||||
* $name string student name
|
||||
* $theses array rows from Database::getThesesByAuthorName()
|
||||
* $name string student name
|
||||
* $coverMap array<int,string> thesis_id => cover file_path
|
||||
*/
|
||||
|
||||
foreach ($theses as $t):
|
||||
@@ -20,8 +21,9 @@ foreach ($theses as $t):
|
||||
]);
|
||||
?>
|
||||
<a href="/tfe?id=<?= (int)$t['id'] ?>" class="student-card">
|
||||
<?php if (!empty($t['banner_path'])): ?>
|
||||
<div class="student-card__banner" style="background-image:url('<?= htmlspecialchars($t['banner_path']) ?>')"></div>
|
||||
<?php $cover = $coverMap[$t['id']] ?? null; ?>
|
||||
<?php if ($cover): ?>
|
||||
<div class="student-card__banner" style="background-image:url('/media?path=<?= urlencode($cover) ?>')"></div>
|
||||
<?php else: ?>
|
||||
<div class="student-card__banner student-card__banner--gradient">
|
||||
<span class="student-card__gradient-author"><?= htmlspecialchars($t['authors'] ?? '') ?></span>
|
||||
|
||||
Reference in New Issue
Block a user