From c3096a8ca318a3b6dfd42ecf1c3593339486b3c7 Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Mon, 9 Jan 2023 21:07:02 +0000 Subject: [PATCH] Adding Upload page Added templates for main pages Updated Nav urls Made error page prettier --- app.py | 30 ++++++++++++++++ packages/onlylegsSass.py | 30 +--------------- templates/error.html | 2 +- templates/group.html | 11 ++++++ templates/layout.html | 6 ++-- templates/profile.html | 11 ++++++ templates/settings.html | 10 ++++++ templates/upload.html | 40 ++++++++++++++++++++- usr/themes/default/style.scss | 29 +++++++++++++++ usr/themes/default/ui/nav.scss | 2 +- usr/themes/default/ui/reset.scss | 1 + usr/themes/default/variables/variables.scss | 2 +- 12 files changed, 138 insertions(+), 36 deletions(-) create mode 100644 templates/group.html create mode 100644 templates/profile.html create mode 100644 templates/settings.html diff --git a/app.py b/app.py index 803cee3..b1335e7 100644 --- a/app.py +++ b/app.py @@ -74,10 +74,40 @@ def internal_server_error(e): def home(): return render_template('home.html') +@app.route('/group') +def group(): + return render_template('group.html', group_id='gwa gwa') + +@app.route('/group/') +def group_id(group_id): + try: + group_id = int(group_id) + except ValueError: + abort(404) + + return render_template('group.html', group_id=group_id) + @app.route('/upload') def upload(): return render_template('upload.html') +@app.route('/profile') +def profile(): + return render_template('profile.html', user_id='gwa gwa') + +@app.route('/profile/') +def profile_id(user_id): + try: + user_id = int(user_id) + except ValueError: + abort(404) + + return render_template('profile.html', user_id=user_id) + +@app.route('/settings') +def settings(): + return render_template('settings.html') + @app.route('/image/') def image(request_id): # Check if request_id is valid diff --git a/packages/onlylegsSass.py b/packages/onlylegsSass.py index 7b5fc65..eb37b36 100644 --- a/packages/onlylegsSass.py +++ b/packages/onlylegsSass.py @@ -61,32 +61,4 @@ class Sassy(): print("Copied fonts to:", dest) except Exception as e: print("Failed to copy fonts!\nFull error:", e) - sys.exit(1) - - #print ("Removing old fonts from:", dest) - #for old in os.listdir(dest): - # dir = os.path.join(dest , old) - # - # try: - # if os.path.isfile(dir) or os.path.islink(dir): - # os.unlink(dir) - # print("Removed:", old) - # elif os.path.isdir(dir): - # shutil.rmtree(dir) - # print("Removed:", old) - # except Exception as e: - # print("Failed to remove:", dir) - # print("Full error:", e) - - #print ("Loading new fonts") - #for font in os.listdir(font_path): - # dir = os.path.join(font_path, dest) - # new_dir = os.path.join(dest, font) - # - # try: - # if os.path.isfile(dir): - # shutil.copy(dir, new_dir) - # print("Copied font:", font) - # except Exception as e: - # print("Failed to copy font:", font) - # print("Full error:", e) \ No newline at end of file + sys.exit(1) \ No newline at end of file diff --git a/templates/error.html b/templates/error.html index 7f278d0..719ed6d 100644 --- a/templates/error.html +++ b/templates/error.html @@ -4,7 +4,7 @@ leaves -
+

{{error}}

{{msg}}

diff --git a/templates/group.html b/templates/group.html new file mode 100644 index 0000000..069832e --- /dev/null +++ b/templates/group.html @@ -0,0 +1,11 @@ +{% extends 'layout.html' %} +{% block content %} +
+ leaves + +
+
+

Image Group

+

{{group_id}}

+
+{% endblock %} \ No newline at end of file diff --git a/templates/layout.html b/templates/layout.html index 69c2d2f..c5d856a 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -21,7 +21,7 @@ Home - + @@ -36,14 +36,14 @@
- + Profile - + diff --git a/templates/profile.html b/templates/profile.html new file mode 100644 index 0000000..1135822 --- /dev/null +++ b/templates/profile.html @@ -0,0 +1,11 @@ +{% extends 'layout.html' %} +{% block content %} +
+ leaves + +
+
+

User

+

{{user_id}}

+
+{% endblock %} \ No newline at end of file diff --git a/templates/settings.html b/templates/settings.html new file mode 100644 index 0000000..1baefa9 --- /dev/null +++ b/templates/settings.html @@ -0,0 +1,10 @@ +{% extends 'layout.html' %} +{% block content %} +
+ leaves + +
+
+

Settings

+
+{% endblock %} \ No newline at end of file diff --git a/templates/upload.html b/templates/upload.html index 7bdcbba..9c9c34f 100644 --- a/templates/upload.html +++ b/templates/upload.html @@ -6,7 +6,45 @@

Upload!!!!!

-
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+