From 7605e5ab40a16b1182f91a87bde651ea10d45a7d Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Sat, 14 Jan 2023 01:46:11 +0000 Subject: [PATCH] Add Notification js system Load full image on first click of full resolution button Change background image Change way images load into the view Add Lazy Loading --- gallery/__init__.py | 2 +- gallery/api.py | 2 +- gallery/static/images/background.svg | 1 + gallery/templates/error.html | 2 +- gallery/templates/group.html | 2 +- gallery/templates/image.html | 37 ++++++++--- gallery/templates/index.html | 12 +++- gallery/templates/layout.html | 69 ++++++++++++++++++- gallery/templates/profile.html | 2 +- gallery/templates/settings.html | 2 +- gallery/templates/upload.html | 15 ++++- gallery/user/themes/default/style.scss | 91 ++++++++++++++++++++++++++ setup.py | 2 +- 13 files changed, 214 insertions(+), 25 deletions(-) create mode 100644 gallery/static/images/background.svg diff --git a/gallery/__init__.py b/gallery/__init__.py index 459afab..c7a40f9 100644 --- a/gallery/__init__.py +++ b/gallery/__init__.py @@ -5,7 +5,7 @@ print(""" | |_| | | | | | |_| | |__| __/ (_| \\__ \\ \\___/|_| |_|_|\\__, |_____\\___|\\__, |___/ |___/ |___/ -Created by Fluffy Bean - Version 130123 +Created by Fluffy Bean - Version 140123 """) # Import base packages diff --git a/gallery/api.py b/gallery/api.py index 6a5dee6..453405b 100644 --- a/gallery/api.py +++ b/gallery/api.py @@ -47,7 +47,7 @@ def upload(): img_name = f"GWAGWA_{uuid4().__str__()}{img_ext}" if not img_ext in current_app.config['ALLOWED_EXTENSIONS']: - return 'File extension not allowed: '+img_ext + abort(403) # Save to database try: diff --git a/gallery/static/images/background.svg b/gallery/static/images/background.svg new file mode 100644 index 0000000..ef824d3 --- /dev/null +++ b/gallery/static/images/background.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/gallery/templates/error.html b/gallery/templates/error.html index 9ee3992..8b877dd 100644 --- a/gallery/templates/error.html +++ b/gallery/templates/error.html @@ -1,7 +1,7 @@ {% extends 'layout.html' %} {% block header %} -leaves + {% endblock %} {% block content %} diff --git a/gallery/templates/group.html b/gallery/templates/group.html index 8999962..a54d4f5 100644 --- a/gallery/templates/group.html +++ b/gallery/templates/group.html @@ -1,7 +1,7 @@ {% extends 'layout.html' %} {% block header %} -leaves + {% endblock %} {% block content %} diff --git a/gallery/templates/image.html b/gallery/templates/image.html index 5e08977..1af5e42 100644 --- a/gallery/templates/image.html +++ b/gallery/templates/image.html @@ -1,15 +1,15 @@ {% extends 'layout.html' %} {% block header %} - leaves + leaves {% endblock %} {% block content %}
@@ -18,7 +18,7 @@ @@ -122,16 +122,29 @@ {% endif %} -
+