diff --git a/albums.php b/albums.php index 7e4d899..0620ffa 100644 --- a/albums.php +++ b/albums.php @@ -33,7 +33,8 @@ foreach (new DirectoryIterator($currentPath) as $item) { 'description' => $info['description'], 'images' => $images, 'hasSubfolders' => hasSubfolders($albumPath), - 'hasImages' => hasImages($albumPath) + 'hasImages' => hasImages($albumPath), + 'mature_content' => $info['mature_content'] ]; } } @@ -43,7 +44,8 @@ $parentPath = dirname($currentPath); if (!isSecurePath($parentPath)) { $parentPath = null; } -?> +?> + @@ -69,7 +71,8 @@ if (!isSecurePath($parentPath)) {
+ class="album-card" + data-mature-warning="Contenu réservé aux plus de 18 ans">
@@ -84,6 +87,9 @@ if (!isSecurePath($parentPath)) {

+ +

+
diff --git a/styles.css b/styles.css index b980d24..b0ccf9f 100644 --- a/styles.css +++ b/styles.css @@ -105,6 +105,45 @@ body { overflow-y: auto; } +/* Styles pour le contenu mature */ +.album-card-mature .album-images { + filter: blur(10px); + transition: filter 0.3s ease; +} + +.album-card-mature::before { + content: attr(data-mature-warning); + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background-color: rgba(220, 53, 69, 0.9); + color: white; + padding: 0.5rem 1rem; + border-radius: 0.5rem; + z-index: 2; + white-space: nowrap; + opacity: 1; + transition: opacity 0.3s ease; +} + +.album-card-mature::after { + content: "🔞"; + position: absolute; + top: 1rem; + right: 1rem; + font-size: 1.5rem; + z-index: 2; +} + +.album-card-mature:hover .album-images { + filter: blur(0); +} + +.album-card-mature:hover::before { + opacity: 0; +} + .album-info { max-width: 1800px; margin: 0 auto;