Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
8e22f1c0f6 | |||
6f9e20283f | |||
a8ca9da433 | |||
c218d407e5 |
@ -92,7 +92,14 @@ $config = getSiteConfig();
|
||||
<div class="empty-album"></div>
|
||||
<?php else: ?>
|
||||
<?php foreach ($album['images'] as $index => $image): ?>
|
||||
<div class="album-image" style="background-image: url('<?php echo htmlspecialchars($image); ?>')"></div>
|
||||
<div class="album-image">
|
||||
<div class="image-background <?php echo is_array($image) && $image['is_mature'] ? 'mature-preview' : ''; ?>"
|
||||
style="background-image: url('<?php echo htmlspecialchars(is_array($image) ? $image['url'] : $image); ?>')">
|
||||
</div>
|
||||
<?php if (is_array($image) && $image['is_mature']): ?>
|
||||
<div class="mature-preview-indicator">🔞</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php for ($i = count($album['images']); $i < 4; $i++): ?>
|
||||
<div class="empty-image"></div>
|
||||
|
@ -133,7 +133,7 @@ $config = getSiteConfig();
|
||||
|
||||
<div class="filters">
|
||||
<div class="filter-group">
|
||||
<label for="status-filter">Statut :</label>
|
||||
<label for="status-filter">Statut :</label>
|
||||
<select id="status-filter" class="form-select" onchange="updateFilters()">
|
||||
<option value="active" <?php echo $filter === 'active' ? 'selected' : ''; ?>>Clés actives</option>
|
||||
<option value="expired" <?php echo $filter === 'expired' ? 'selected' : ''; ?>>Clés expirées</option>
|
||||
@ -142,7 +142,7 @@ $config = getSiteConfig();
|
||||
</div>
|
||||
|
||||
<div class="filter-group">
|
||||
<label for="album-filter">Album :</label>
|
||||
<label for="album-filter">Album :</label>
|
||||
<select id="album-filter" class="form-select" onchange="updateFilters()">
|
||||
<option value="">Tous les albums</option>
|
||||
<?php foreach ($albums as $album): ?>
|
||||
|
@ -139,15 +139,22 @@ function getImagesRecursively($albumPath, $limit = 4) {
|
||||
if ($file->isFile()) {
|
||||
$extension = strtolower($file->getExtension());
|
||||
if (in_array($extension, ALLOWED_EXTENSIONS)) {
|
||||
// Récupérer les infos du dossier parent de l'image
|
||||
$parentDir = dirname($file->getPathname());
|
||||
$parentInfo = getAlbumInfo($parentDir);
|
||||
|
||||
$relativePath = str_replace('\\', '/', substr($file->getPathname(), strlen(realpath('./'))));
|
||||
$images[] = $baseUrl . '/' . ltrim($relativePath, '/');
|
||||
$images[] = [
|
||||
'url' => $baseUrl . '/' . ltrim($relativePath, '/'),
|
||||
'is_mature' => $parentInfo['mature_content']
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
usort($images, function($a, $b) {
|
||||
$pathA = realpath('.') . str_replace(getBaseUrl(), '', $a);
|
||||
$pathB = realpath('.') . str_replace(getBaseUrl(), '', $b);
|
||||
$pathA = realpath('.') . str_replace(getBaseUrl(), '', $a['url']);
|
||||
$pathB = realpath('.') . str_replace(getBaseUrl(), '', $b['url']);
|
||||
return filectime($pathB) - filectime($pathA);
|
||||
});
|
||||
|
||||
|
44
styles.css
44
styles.css
@ -186,9 +186,12 @@ body {
|
||||
}
|
||||
|
||||
/* Styles pour le contenu mature dans les albums */
|
||||
.album-card-mature {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.album-card-mature .album-images {
|
||||
filter: blur(10px);
|
||||
transition: filter 0.3s ease;
|
||||
}
|
||||
|
||||
.album-card-mature::before {
|
||||
@ -203,8 +206,12 @@ body {
|
||||
border-radius: 0.5rem;
|
||||
z-index: 2;
|
||||
white-space: nowrap;
|
||||
opacity: 1;
|
||||
transition: opacity 0.3s ease;
|
||||
transition: transform 0.3s ease, background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.album-card-mature:hover::before {
|
||||
transform: translate(-50%, -50%) scale(1.1);
|
||||
background-color: rgba(220, 53, 69, 1);
|
||||
}
|
||||
|
||||
.album-card-mature::after {
|
||||
@ -216,12 +223,34 @@ body {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.album-card-mature:hover .album-images {
|
||||
filter: blur(0);
|
||||
.image-background {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.album-card-mature:hover::before {
|
||||
opacity: 0;
|
||||
.image-background.mature-preview {
|
||||
filter: blur(10px);
|
||||
}
|
||||
|
||||
.mature-preview-indicator {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 10;
|
||||
font-size: 14px;
|
||||
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
.album-card {
|
||||
@ -257,6 +286,7 @@ body {
|
||||
}
|
||||
|
||||
.album-image {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-size: cover;
|
||||
|
@ -1 +1 @@
|
||||
1.1.1
|
||||
1.1.2
|
Loading…
x
Reference in New Issue
Block a user