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