diff --git a/app.py b/app.py index 9f45e09..9b3e4bc 100644 --- a/app.py +++ b/app.py @@ -16,8 +16,8 @@ client = contentful.Client(SPACE_ID, ACCESS_TOKEN) @app.route('/') def index(): - sup_img, prio_img = get_support_images() - return render_template('index.html', title='', sup_img_list=sup_img, prio_img=prio_img) + sup_img, prio_img, prio_img_top = get_support_images() + return render_template('index.html', title='', sup_img_list=sup_img, prio_img=prio_img, prio_img_top=prio_img_top) @app.route('/grph') def graphics(): @@ -144,17 +144,20 @@ def get_support_images(): # List to hold the image file names image_files = [] prio_image_files = [] + prio_image_top_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: - if os.path.splitext(filename)[0].lower() == "dg" or os.path.splitext(filename)[0].lower() == "sw" or os.path.splitext(filename)[0].lower() == "french-emb" or os.path.splitext(filename)[0].lower() == "nn" or os.path.splitext(filename)[0].lower() == "if": + if os.path.splitext(filename)[0].lower() == "dg" or os.path.splitext(filename)[0].lower() == "sw": + prio_image_top_files.append(filename) + elif os.path.splitext(filename)[0].lower() == "french-emb" or os.path.splitext(filename)[0].lower() == "nn" or os.path.splitext(filename)[0].lower() == "if": prio_image_files.append(filename) else: image_files.append(filename) - return image_files, prio_image_files + return image_files, prio_image_files, prio_image_top_files def format_datetime(dt): diff --git a/public/images/support/ac.png b/public/images/support/ac.png new file mode 100644 index 0000000..f8d4aa8 Binary files /dev/null and b/public/images/support/ac.png differ diff --git a/templates/index.html b/templates/index.html index 65bec3c..98fc28d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -42,6 +42,14 @@ ↑ instagram +
+ {% for img in prio_img_top %} +
+ +
+ {% endfor %} +
+
{% for img in prio_img %}