Template
Feat(site): miniature de la première image du paquet dans le menu déroulant
This commit is contained in:
1 parent
8a7e83cd01
commit
6adebf4c97
2 files changed
+29
-3
No files matched your search
@@ -173,9 +173,15 @@ function fws_site_active(string $route, string $prefix): string
|
||||
<p class="nav-dropdown-error">Aucun paquet pour le moment.</p>
|
||||
<?php else: ?>
|
||||
<?php foreach ($packages as $i => $pkg): ?>
|
||||
<a class="nav-dropdown-item" href="/?p/paquets/<?= max($i + 1, (int) $pkg['dbId']) ?>/">
|
||||
<strong><?= e($pkg['name']) ?><?php if (!empty($pkg['latest']['name'])): ?><span class="nav-dropdown-version"><?= e($pkg['latest']['name']) ?></span><?php endif; ?></strong>
|
||||
<small><?= e($pkg['tagline'] ?? '') ?></small>
|
||||
<?php $navThumb = (string) ($pkg['screens'][0]['src'] ?? ''); ?>
|
||||
<a class="nav-dropdown-item<?= $navThumb !== '' ? ' has-thumb' : '' ?>" href="/?p/paquets/<?= max($i + 1, (int) $pkg['dbId']) ?>/">
|
||||
<?php if ($navThumb !== ''): ?>
|
||||
<img class="nav-dropdown-thumb" src="<?= e($navThumb) ?>" alt="" loading="lazy" width="30" height="30">
|
||||
<?php endif; ?>
|
||||
<span class="nav-dropdown-text">
|
||||
<strong><?= e($pkg['name']) ?><?php if (!empty($pkg['latest']['name'])): ?><span class="nav-dropdown-version"><?= e($pkg['latest']['name']) ?></span><?php endif; ?></strong>
|
||||
<small><?= e($pkg['tagline'] ?? '') ?></small>
|
||||
</span>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in new issue
Block a user