mirror of
https://github.com/greflm13/StaticGalleryBuilder.git
synced 2026-02-05 02:59:27 +00:00
changed from fixed columns to inline-block
This commit is contained in:
@@ -58,13 +58,13 @@
|
|||||||
"-t",
|
"-t",
|
||||||
"Pictures",
|
"Pictures",
|
||||||
"--theme",
|
"--theme",
|
||||||
"themes/catpuccin.css",
|
"themes/default.css",
|
||||||
"--use-fancy-folders",
|
"--use-fancy-folders",
|
||||||
"--web-manifest",
|
"--web-manifest",
|
||||||
"-n",
|
"-n",
|
||||||
"-m",
|
"-m",
|
||||||
"--regenerate-thumbnails",
|
// "--regenerate-thumbnails",
|
||||||
"--reread-metadata",
|
// "--reread-metadata",
|
||||||
],
|
],
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"name": "woek",
|
"name": "woek",
|
||||||
|
|||||||
@@ -157,12 +157,12 @@ figure {
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create eight equal columns that sits next to each other */
|
|
||||||
.column {
|
.column {
|
||||||
-ms-flex: 12.5%;
|
-ms-flex: 12.5%;
|
||||||
flex: 12.5%;
|
flex: 12.5%;
|
||||||
max-width: 12.5%;
|
max-width: 12.5%;
|
||||||
padding: 0 4px;
|
padding: 0 4px;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.column img {
|
.column img {
|
||||||
@@ -187,7 +187,6 @@ figure {
|
|||||||
border-style: none;
|
border-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Responsive layout - makes a four column-layout instead of eight columns */
|
|
||||||
@media screen and (max-width: 1000px) {
|
@media screen and (max-width: 1000px) {
|
||||||
.column {
|
.column {
|
||||||
-ms-flex: 25%;
|
-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) {
|
@media screen and (max-width: 800px) {
|
||||||
.column {
|
.column {
|
||||||
-ms-flex: 50%;
|
-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) {
|
@media screen and (max-width: 600px) {
|
||||||
.column {
|
.column {
|
||||||
-ms-flex: 100%;
|
-ms-flex: 100%;
|
||||||
|
|||||||
@@ -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")
|
html_file = os.path.join(folder, "index.html")
|
||||||
logger.info("generating html file with jinja2", extra={"path": html_file})
|
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
|
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] + '/'))}"
|
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://"):
|
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,
|
header=header,
|
||||||
license=license_info,
|
license=license_info,
|
||||||
subdirectories=subfolders,
|
subdirectories=subfolders,
|
||||||
images=image_chunks,
|
images=images,
|
||||||
info=_info,
|
info=_info,
|
||||||
allimages=images,
|
allimages=images,
|
||||||
webmanifest=_args.generate_webmanifest,
|
webmanifest=_args.generate_webmanifest,
|
||||||
|
|||||||
@@ -56,9 +56,8 @@
|
|||||||
{% if images %}
|
{% if images %}
|
||||||
{%- set ns = namespace(count = 0) -%}
|
{%- set ns = namespace(count = 0) -%}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{%- for imageblock in images %}
|
{%- for image in images %}
|
||||||
<div class="column">
|
<div class="column">
|
||||||
{%- for image in imageblock %}
|
|
||||||
<figure>
|
<figure>
|
||||||
<img src="{{ image.thumbnail }}" alt="{{ image.name }}" onclick="openSwipe({{ ns.count }})" />
|
<img src="{{ image.thumbnail }}" alt="{{ image.name }}" onclick="openSwipe({{ ns.count }})" />
|
||||||
{%- set ns.count = ns.count + 1 %}
|
{%- set ns.count = ns.count + 1 %}
|
||||||
@@ -71,7 +70,6 @@
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
</figcaption>
|
</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
{%- endfor %}
|
|
||||||
</div>
|
</div>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user