pimp my gallery even harder :D

This commit is contained in:
deflax 2024-01-19 05:17:48 +02:00
parent e56f02443c
commit a863cbcd92

View file

@ -2,47 +2,81 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DeflaxTV Video Gallery</title>
<style> <style>
body { body {
background-color: #333;
color: #fff;
font-family: Arial, sans-serif; font-family: Arial, sans-serif;
margin: 0; margin: 0;
padding: 0; padding: 0;
background-color: #333;
color: #fff;
}
.gallery {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-around;
margin: 20px;
} }
.gallery-item { .gallery-item {
box-sizing: border-box; flex: 0 1 calc(33.3333% - 20px);
width: calc(33.33% - 20px); /* Adjust the percentage based on the number of images you want in a row */
margin: 10px; margin: 10px;
overflow: hidden; overflow: hidden;
position: relative;
cursor: pointer;
} }
.gallery-item img { .gallery-item img {
max-height: 320px; max-height: 420px;
width: 100%; width: 100%;
height: auto; height: auto;
display: block; display: block;
} }
</style>
.overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
transition: opacity 0.3s ease;
}
.gallery-item:hover .overlay {
opacity: 1;
}
.overlay-content {
text-align: center;
color: #fff;
}
</style>
<title>DeflaxTV Video Gallery</title>
</head> </head>
<body> <body>
<h1>Video Gallery</h1>
<div> <div class="gallery">
{% for thumbnail in thumbnails %} {% for thumbnail in thumbnails %}
<div class="gallery-item"> <div class="gallery-item">
<a href="{{ url_for('video_watch_route', file_name_no_extension=thumbnail[:-4]) }}"> <a href="{{ url_for('video_watch_route', file_name_no_extension=thumbnail[:-4]) }}">
<img src="{{ url_for('thumb_route', file_name=thumbnail) }}" alt="{{ thumbnail }}"> <img src="{{ url_for('thumb_route', file_name=thumbnail) }}" alt="{{ thumbnail }}">
</a> </a>
<div class="overlay">
<div class="overlay-content">
<h3>{{ thumbnail }}</h3>
<p>Description for {{ thumbnail }}</p>
</div>
</div>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
</body> </body>
</html> </html>