changed from fixed columns to inline-block

This commit is contained in:
2024-10-17 09:07:07 +02:00
committed by Flo Greistorfer
parent cd06c526af
commit 0973868782
5 changed files with 7 additions and 13 deletions

View File

@@ -1 +1 @@
2.3.5
2.4.0

View File

@@ -58,13 +58,13 @@
"-t",
"Pictures",
"--theme",
"themes/catpuccin.css",
"themes/default.css",
"--use-fancy-folders",
"--web-manifest",
"-n",
"-m",
"--regenerate-thumbnails",
"--reread-metadata",
// "--regenerate-thumbnails",
// "--reread-metadata",
],
"console": "integratedTerminal",
"name": "woek",

View File

@@ -157,12 +157,12 @@ figure {
opacity: 1;
}
/* Create eight equal columns that sits next to each other */
.column {
-ms-flex: 12.5%;
flex: 12.5%;
max-width: 12.5%;
padding: 0 4px;
display: inline-block;
}
.column img {
@@ -187,7 +187,6 @@ figure {
border-style: none;
}
/* Responsive layout - makes a four column-layout instead of eight columns */
@media screen and (max-width: 1000px) {
.column {
-ms-flex: 25%;
@@ -209,7 +208,6 @@ figure {
}
}
/* Responsive layout - makes a two column-layout instead of four columns */
@media screen and (max-width: 800px) {
.column {
-ms-flex: 50%;
@@ -239,7 +237,6 @@ figure {
}
}
/* Responsive layout - makes the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
.column {
-ms-flex: 100%;

View File

@@ -314,7 +314,6 @@ def create_html_file(folder: str, title: str, foldername: str, images: List[Dict
"""
html_file = os.path.join(folder, "index.html")
logger.info("generating html file with jinja2", extra={"path": html_file})
image_chunks = np.array_split(images, 8) if images else []
header = os.path.basename(folder) or title
parent = None if not foldername else f"{_args.web_root_url}{urllib.parse.quote(foldername.removesuffix(folder.split('/')[-1] + '/'))}"
if parent and _args.web_root_url.startswith("file://"):
@@ -346,7 +345,7 @@ def create_html_file(folder: str, title: str, foldername: str, images: List[Dict
header=header,
license=license_info,
subdirectories=subfolders,
images=image_chunks,
images=images,
info=_info,
allimages=images,
webmanifest=_args.generate_webmanifest,

View File

@@ -56,9 +56,8 @@
{% if images %}
{%- set ns = namespace(count = 0) -%}
<div class="row">
{%- for imageblock in images %}
{%- for image in images %}
<div class="column">
{%- for image in imageblock %}
<figure>
<img src="{{ image.thumbnail }}" alt="{{ image.name }}" onclick="openSwipe({{ ns.count }})" />
{%- set ns.count = ns.count + 1 %}
@@ -71,7 +70,6 @@
{%- endif %}
</figcaption>
</figure>
{%- endfor %}
</div>
{%- endfor %}
</div>