Procházet zdrojové kódy

Fix some mistakes in generation of galleries

master
Marien Fressinaud před 6 roky
rodič
revize
69a9fa4e38
2 změnil soubory, kde provedl 5 přidání a 4 odebrání
  1. 1
    1
      Herisson/index.html.j2
  2. 4
    3
      boop.py

+ 1
- 1
Herisson/index.html.j2 Zobrazit soubor

@@ -23,7 +23,7 @@
<div class="galleries">
{% for gallery in galleries -%}
<div class="gallery-cover">
<a href="{{ gallery.url }}.html">
<a href="{{ gallery.url }}">
<img src="{{ gallery.cover_photo.thumb_url }}" alt="" />
<span class="gallery-cover-name">
{{ gallery.name }}

+ 4
- 3
boop.py Zobrazit soubor

@@ -28,7 +28,8 @@ def list_galleries_in(path):
gallery = {
"name": gallery_dir.name,
"path": gallery_dir.path,
"url": gallery_dir.name,
"output_path": gallery_dir.name,
"url": f"{gallery_dir.name}.html",
"num_photos": len(photos),
"photos": photos,
"cover_photo": photos[cover_index],
@@ -93,7 +94,7 @@ def generate_gallery(output_path, gallery):


def generate_gallery_index(output_path, gallery):
gallery_index_path = os.path.join(output_path, f"{gallery['name']}.html")
gallery_index_path = os.path.join(output_path, f"{gallery['url']}")

theme_path = os.path.join(os.curdir, THEME)
jinja_env = Environment(
@@ -113,7 +114,7 @@ def generate_gallery_index(output_path, gallery):


def generate_gallery_dir(output_path, gallery):
gallery_output_path = os.path.join(output_path, gallery["name"])
gallery_output_path = os.path.join(output_path, gallery["output_path"])
if not os.path.isdir(gallery_output_path):
os.mkdir(gallery_output_path)


Načítá se…
Zrušit
Uložit