From 32593fe64fd002e79fdebb9d28eaec7eab429c2a Mon Sep 17 00:00:00 2001 From: Stratos Thivaios Date: Fri, 17 May 2024 01:47:15 +0300 Subject: [PATCH] added themes option and Sleek.css theme --- builder/imgal-build.py | 8 +++++++- builder/templates/{style.css => oldstyle.css} | 0 2 files changed, 7 insertions(+), 1 deletion(-) rename builder/templates/{style.css => oldstyle.css} (100%) diff --git a/builder/imgal-build.py b/builder/imgal-build.py index fe3308e..12574dd 100644 --- a/builder/imgal-build.py +++ b/builder/imgal-build.py @@ -8,6 +8,7 @@ authorContact = input("\nEnter the author's email. You can leave this blank to hide the contact link. > ") showWatermark = input("\nDo you want to show a small 'made with Imgal' note at the bottom of the website? (Y/N/y/n) > ") directory = input("\nWhat folder/directory are the images located in (example : ./pics/pngFiles) > ") +theme = input("\nChoose the theme you want to use (Sleek or OldStyle) (S/O) > ").upper() def resize_image(directory, image_path, max_size): # Open the image file @@ -52,6 +53,11 @@ def createPage(picsList): contactAuthorA = f"Contact Author" footerHr = "
" + if theme == "S": + stylesheet = "sleek.css" + elif theme == "O": + stylesheet = "oldstyle.css" + data = { "title":title, "description":description, @@ -88,7 +94,7 @@ def createPage(picsList): with open(f"{directory}/view.html", "w", encoding="utf-8") as f: f.write(templateView) - stylesheet = open("./templates/style.css").read() + stylesheet = open(f"./templates/{stylesheet}").read() with open(f"{directory}/style.css","w") as f: f.write(stylesheet) diff --git a/builder/templates/style.css b/builder/templates/oldstyle.css similarity index 100% rename from builder/templates/style.css rename to builder/templates/oldstyle.css