From 56c82513ba812a715aa10e5bd37439d9166af1fd Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Wed, 8 Mar 2023 13:36:35 +0000 Subject: [PATCH] Fixing inconsistent sass files Removed useless styling Fixed date --- gallery/__init__.py | 2 +- gallery/routing.py | 7 +- gallery/templates/error.html | 7 +- gallery/templates/group.html | 16 +- gallery/templates/image.html | 323 ++++++++-------- gallery/templates/index.html | 21 +- gallery/templates/layout.html | 41 +- gallery/templates/profile.html | 27 +- .../templates/settings/settings_layout.html | 11 +- gallery/themes/default/components/banner.sass | 96 +++++ .../{ => components}/buttons/jumpUp.sass | 0 .../{ => components}/buttons/pill.sass | 0 .../elements}/notification.sass | 0 .../{ui => components/elements}/pop-up.sass | 0 .../elements}/upload-panel.sass | 0 .../themes/default/components/gallery.sass | 112 ++++++ .../image-view}/background.sass | 8 +- .../components/image-view/fullscreen.sass | 51 +++ .../default/components/image-view/image.sass | 21 ++ .../components/image-view/info-tab.sass | 185 +++++++++ .../default/components/image-view/view.sass | 66 ++++ .../{ui => components}/navigation.sass | 0 gallery/themes/default/style.sass | 70 +++- gallery/themes/default/ui/banner.sass | 104 ------ gallery/themes/default/ui/content.sass | 16 - gallery/themes/default/ui/gallery.sass | 115 ------ gallery/themes/default/ui/wrappers/error.sass | 35 -- gallery/themes/default/ui/wrappers/image.sass | 351 ------------------ gallery/themes/default/ui/wrappers/index.sass | 12 - .../themes/default/ui/wrappers/settings.sass | 115 ------ pyproject.toml | 2 +- 31 files changed, 805 insertions(+), 1009 deletions(-) create mode 100644 gallery/themes/default/components/banner.sass rename gallery/themes/default/{ => components}/buttons/jumpUp.sass (100%) rename gallery/themes/default/{ => components}/buttons/pill.sass (100%) rename gallery/themes/default/{ui => components/elements}/notification.sass (100%) rename gallery/themes/default/{ui => components/elements}/pop-up.sass (100%) rename gallery/themes/default/{ui => components/elements}/upload-panel.sass (100%) create mode 100644 gallery/themes/default/components/gallery.sass rename gallery/themes/default/{ui => components/image-view}/background.sass (91%) create mode 100644 gallery/themes/default/components/image-view/fullscreen.sass create mode 100644 gallery/themes/default/components/image-view/image.sass create mode 100644 gallery/themes/default/components/image-view/info-tab.sass create mode 100644 gallery/themes/default/components/image-view/view.sass rename gallery/themes/default/{ui => components}/navigation.sass (100%) delete mode 100644 gallery/themes/default/ui/banner.sass delete mode 100644 gallery/themes/default/ui/content.sass delete mode 100644 gallery/themes/default/ui/gallery.sass delete mode 100644 gallery/themes/default/ui/wrappers/error.sass delete mode 100644 gallery/themes/default/ui/wrappers/image.sass delete mode 100644 gallery/themes/default/ui/wrappers/index.sass delete mode 100644 gallery/themes/default/ui/wrappers/settings.sass diff --git a/gallery/__init__.py b/gallery/__init__.py index ccb3cec..501afd9 100644 --- a/gallery/__init__.py +++ b/gallery/__init__.py @@ -5,7 +5,7 @@ | |_| | | | | | |_| | |__| __/ (_| \__ \ \___/|_| |_|_|\__, |_____\___|\__, |___/ |___/ |___/ -Created by Fluffy Bean - Version 23.03.04 +Created by Fluffy Bean - Version 23.03.09 """ # Import system modules diff --git a/gallery/routing.py b/gallery/routing.py index 02b9f11..693ac17 100644 --- a/gallery/routing.py +++ b/gallery/routing.py @@ -41,12 +41,13 @@ def image(image_id): Image view, shows the image and its metadata """ img = db_session.query(db.Posts).filter(db.Posts.id == image_id).first() - author = db_session.query(db.Users.username).filter(db.Users.id == img.author_id).first()[0] - img.author_username = author - + if img is None: abort(404, 'Image not found') + author = db_session.query(db.Users.username).filter(db.Users.id == img.author_id).first()[0] + img.author_username = author + return render_template('image.html', image=img, exif=img.image_exif) @blueprint.route('/group', methods=['GET', 'POST']) diff --git a/gallery/templates/error.html b/gallery/templates/error.html index 0d63473..72b570e 100644 --- a/gallery/templates/error.html +++ b/gallery/templates/error.html @@ -1,7 +1,8 @@ {% extends 'layout.html' %} -{% block wrapper_class %}error-wrapper{% endblock %} {% block content %} -

{{error}}

-

{{msg}}

+ +

{{error}}

+

{{msg}}

+
{% endblock %} \ No newline at end of file diff --git a/gallery/templates/group.html b/gallery/templates/group.html index 3503fd1..af7f60c 100644 --- a/gallery/templates/group.html +++ b/gallery/templates/group.html @@ -1,29 +1,27 @@ {% extends 'layout.html' %} -{% block header %} +{% block nav_groups %}navigation-item__selected{% endblock %} + +{% block content %}