From 98697c651c1f3966b1aaf895773b8ad7c9f5cf5e Mon Sep 17 00:00:00 2001 From: Cailean Finn Date: Mon, 23 Sep 2024 18:03:44 +0100 Subject: [PATCH] logo update --- app.py | 23 ++++++++++++++++++++++- public/css/styles.css | 24 ++++++++++++++++++++++++ templates/index.html | 6 +++++- 3 files changed, 51 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index f32583b..f57460d 100644 --- a/app.py +++ b/app.py @@ -16,7 +16,8 @@ client = contentful.Client(SPACE_ID, ACCESS_TOKEN) @app.route('/') def index(): - return render_template('index.html', title='') + sup_img = get_support_images() + return render_template('index.html', title='', sup_img_list=sup_img) @app.route('/events') def events(): @@ -107,6 +108,26 @@ def process_content(entries, type): return content_list +def get_support_images(): + # Specify the folder where images are stored + image_folder = os.path.join(app.static_folder, 'images/support') + + # Define a list of supported image file extensions + valid_extensions = ['.jpg', '.jpeg', '.png', '.gif', '.bmp'] + + # List to hold the image file names + image_files = [] + + # Loop through files in the directory + for filename in os.listdir(image_folder): + # Check if the file is an image (by extension) + if os.path.splitext(filename)[1].lower() in valid_extensions: + image_files.append(filename) + print(filename) + + return image_files + + def format_datetime(dt): date_str = dt.strftime('%d.%m.%y') time_str = dt.strftime('%I%p').upper().lstrip('0') diff --git a/public/css/styles.css b/public/css/styles.css index 80d8510..4df0576 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -238,6 +238,26 @@ hr { text-transform: uppercase; } +#index-support { + flex-direction: row; + display: flex; + gap: 25px; + margin-top: 50px; + flex-wrap: wrap; + justify-content: space-between; + align-items: center; +} + +.index-support-img { + width: 100px; + height: auto; +} + +.index-support-img img { + width: 100%; + height: auto; +} + .socials { position: absolute; padding-top: 25px; @@ -766,6 +786,10 @@ animation: 2s fadeInUp; /* Mobile breakpoint (less than 768px) */ @media (max-width: 768px) { + #index-support { + order: -2; + } + #index-socials{ order: -1; } diff --git a/templates/index.html b/templates/index.html index a1c875a..9bfb604 100644 --- a/templates/index.html +++ b/templates/index.html @@ -43,7 +43,11 @@
- + {% for img in sup_img_list %} +
+ +
+ {% endfor %}