ctucx.git: gallery

static-site-generator for image-galleries [used @ photos.ctu.cx]

commit 76a0106ce3540d8ba3a91509c21094316dfb7a8b
parent 8fbed97307bc8632d73549806d8e8a0432ffd9dd
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sun, 14 Mar 2021 11:43:00 +0100

gallery.nim: improve placeAssets()
1 file changed, 4 insertions(+), 3 deletions(-)
M
src/gallery.nim
|
7
++++---
diff --git a/src/gallery.nim b/src/gallery.nim
@@ -152,9 +152,10 @@ proc placeAssets(targetDir: string, enableJS: bool) =
     writeFile(joinPath(targetDir, "style.css"), asset_style_css)
     writeFile(joinPath(targetDir, "no_images.svg"), asset_noimages_svg)
     writeFile(joinPath(targetDir, "iconic.svg"), asset_iconic_svg)
-    if enableJS: writeFile(joinPath(targetDir, "exif.js"), asset_exif_js)
-    if enableJS: writeFile(joinPath(targetDir, "justified-layout.min.js"), asset_justified_layout_js)
-    if enableJS: writeFile(joinPath(targetDir, "albums.js"), asset_albums_js)
+    if enableJS:
+        writeFile(joinPath(targetDir, "exif.js"), asset_exif_js)
+        writeFile(joinPath(targetDir, "justified-layout.min.js"), asset_justified_layout_js)
+        writeFile(joinPath(targetDir, "albums.js"), asset_albums_js)
 
 
 proc removeOrphans (targetDir: string) =