diff --git a/.gitignore b/.gitignore index 7ddc266..a27e6fa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,139 +1,22 @@ # Remove all development files uploads/ -static/theme/* +gallery/static/theme/* -# remove all PyCharm files .idea - -# remove all VSCode files .vscode -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -pip-wheel-metadata/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -.python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ venv/ -ENV/ -env.bak/ -venv.bak/ +.env -# Spyder project settings -.spyderproject -.spyproject +*.pyc +__pycache__/ -# Rope project settings -.ropeproject +instance/ -# mkdocs documentation -/site +.pytest_cache/ +.coverage +htmlcov/ -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ +dist/ +build/ +*.egg-info/ \ No newline at end of file diff --git a/app.py b/app.py deleted file mode 100644 index 405b8e3..0000000 --- a/app.py +++ /dev/null @@ -1,161 +0,0 @@ -print(""" - ___ _ _ - / _ \\ _ __ | |_ _| | ___ __ _ ___ -| | | | '_ \\| | | | | | / _ \\/ _` / __| -| |_| | | | | | |_| | |__| __/ (_| \\__ \\ - \\___/|_| |_|_|\\__, |_____\\___|\\__, |___/ - |___/ |___/ -Created by Fluffy Bean - Version 100123 -""") - -# Import base packages -import time -import sys -import os - -# Import required OnlyLegs packages -from packages import onlylegsDB -onlylegsDB = onlylegsDB.DBmanager() -onlylegsDB.initialize() - -from packages import onlylegsSass -onlylegsSass = onlylegsSass.Sassy('default') - -# Import flask -from flask import Flask, render_template, send_from_directory, abort, url_for, jsonify, redirect, request, session -from werkzeug.utils import secure_filename - -# Set flask config -BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -UPLOAD_FOLDER = os.path.join(BASE_DIR, 'usr', 'uploads') - -app = Flask(__name__) -app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER - - -# -# ERROR HANDLERS -# -@app.errorhandler(405) -def method_not_allowed(e): - error = '405' - msg = 'Method sussy wussy' - return render_template('error.html', error=error, msg=msg), 404 - -@app.errorhandler(404) -def page_not_found(e): - error = '404' - msg = 'Could not find what you need!' - return render_template('error.html', error=error, msg=msg), 404 - -@app.errorhandler(403) -def forbidden(e): - error = '403' - msg = 'Go away! This is no place for you!' - return render_template('error.html', error=error, msg=msg), 403 - -@app.errorhandler(410) -def gone(e): - error = '410' - msg = 'The page is no longer available! *sad face*' - return render_template('error.html', error=error, msg=msg), 410 - -@app.errorhandler(500) -def internal_server_error(e): - error = '500' - msg = 'Server died inside :c' - return render_template('error.html', error=error, msg=msg), 500 - - -# -# ROUTES -# -@app.route('/') -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('/upload/form', methods=['POST']) -def upload_form(): - if request.method != 'POST': - abort(405) - - return 'balls' - -@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 - try: - request_id = int(request_id) - except ValueError: - abort(404) - - result = onlylegsDB.getImage(request_id) - - return render_template('image.html', fileName=result[1], id=request_id) - - -# -# METHODS -# -@app.route('/fileList/', methods=['GET']) -def image_list(item_type): - if request.method != 'GET': - abort(405) - - cursor = onlylegsDB.database.cursor() - cursor.execute("SELECT * FROM posts ORDER BY id DESC") - - item_list = cursor.fetchall() - - return jsonify(item_list) - -@app.route('/uploads//', methods=['GET']) -def uploads(quality, request_file): - if request.method != 'GET': - abort(405) - - quality = secure_filename(quality) - quality_dir = os.path.join(app.config['UPLOAD_FOLDER'], quality) - if not os.path.isdir(quality_dir): - abort(404) - - request_file = secure_filename(request_file) - - if not os.path.isfile(os.path.join(quality_dir, request_file)): - abort(404) - - return send_from_directory(quality_dir, request_file) diff --git a/gallery/__init__.py b/gallery/__init__.py new file mode 100644 index 0000000..3f82f0e --- /dev/null +++ b/gallery/__init__.py @@ -0,0 +1,126 @@ +print(""" + ___ _ _ + / _ \\ _ __ | |_ _| | ___ __ _ ___ +| | | | '_ \\| | | | | | / _ \\/ _` / __| +| |_| | | | | | |_| | |__| __/ (_| \\__ \\ + \\___/|_| |_|_|\\__, |_____\\___|\\__, |___/ + |___/ |___/ +Created by Fluffy Bean - Version 100123 +""") + +# Import base packages +import time +import sys +import os + +# Import required OnlyLegs packages +#from packages import onlylegsDB +#onlylegsDB = onlylegsDB.DBmanager() +#onlylegsDB.initialize() + +#from packages import onlylegsSass +#onlylegsSass = onlylegsSass.Sassy('default') + +# Import flask +from flask import * +from werkzeug.utils import secure_filename + +def create_app(test_config=None): + from dotenv import load_dotenv + load_dotenv(os.path.join('./gallery', 'user', '.env')) + + # create and configure the app + app = Flask(__name__) + + app.config.from_mapping( + SECRET_KEY=os.environ.get('FLASK_SECRET'), + DATABASE=os.path.join(app.instance_path, 'gallery.sqlite'), + ) + + if test_config is None: + # load the instance config, if it exists, when not testing + app.config.from_pyfile('config.py', silent=True) + else: + # load the test config if passed in + app.config.from_mapping(test_config) + + # ensure the instance folder exists + try: + os.makedirs(app.instance_path) + except OSError: + pass + + @app.errorhandler(405) + def method_not_allowed(e): + error = '405' + msg = 'Method sussy wussy' + return render_template('error.html', error=error, msg=msg), 404 + + @app.errorhandler(404) + def page_not_found(e): + error = '404' + msg = 'Could not find what you need!' + return render_template('error.html', error=error, msg=msg), 404 + + @app.errorhandler(403) + def forbidden(e): + error = '403' + msg = 'Go away! This is no place for you!' + return render_template('error.html', error=error, msg=msg), 403 + + @app.errorhandler(410) + def gone(e): + error = '410' + msg = 'The page is no longer available! *sad face*' + return render_template('error.html', error=error, msg=msg), 410 + + @app.errorhandler(500) + def internal_server_error(e): + error = '500' + msg = 'Server died inside :c' + return render_template('error.html', error=error, msg=msg), 500 + + from . import auth + app.register_blueprint(auth.bp) + + from . import routes + app.register_blueprint(routes.bp) + app.add_url_rule('/', endpoint='index') + + + # + # METHODS + # + @app.route('/fileList/', methods=['GET']) + def image_list(item_type): + if request.method != 'GET': + abort(405) + + cursor = onlylegsDB.database.cursor() + cursor.execute("SELECT * FROM posts ORDER BY id DESC") + + item_list = cursor.fetchall() + + return jsonify(item_list) + + @app.route('/uploads//', methods=['GET']) + def uploads(quality, request_file): + if request.method != 'GET': + abort(405) + + quality = secure_filename(quality) + quality_dir = os.path.join(app.config['UPLOAD_FOLDER'], quality) + if not os.path.isdir(quality_dir): + abort(404) + + request_file = secure_filename(request_file) + + if not os.path.isfile(os.path.join(quality_dir, request_file)): + abort(404) + + return send_from_directory(quality_dir, request_file) + + from . import db + db.init_app(app) + + return app \ No newline at end of file diff --git a/gallery/auth.py b/gallery/auth.py new file mode 100644 index 0000000..37fa817 --- /dev/null +++ b/gallery/auth.py @@ -0,0 +1,93 @@ +import functools +from flask import ( + Blueprint, flash, g, redirect, render_template, request, session, url_for +) +from werkzeug.security import check_password_hash, generate_password_hash +from gallery.db import get_db + +bp = Blueprint('auth', __name__, url_prefix='/auth') + + +@bp.before_app_request +def load_logged_in_user(): + user_id = session.get('user_id') + + if user_id is None: + g.user = None + else: + g.user = get_db().execute( + 'SELECT * FROM users WHERE id = ?', (user_id,) + ).fetchone() + + +@bp.route('/register', methods=('GET', 'POST')) +def register(): + if request.method == 'POST': + username = request.form['username'] + password = request.form['password'] + db = get_db() + error = None + + if not username: + error = 'Username is required.' + elif not password: + error = 'Password is required.' + + if error is None: + try: + db.execute( + "INSERT INTO users (username, email, password) VALUES (?, ?, ?)", + (username,'dummy@email.com' , generate_password_hash(password)), + ) + db.commit() + except db.IntegrityError: + error = f"User {username} is already registered." + else: + return redirect(url_for("auth.login")) + + flash(error) + + return render_template('auth/register.html') + + +@bp.route('/login', methods=('GET', 'POST')) +def login(): + if request.method == 'POST': + username = request.form['username'] + password = request.form['password'] + db = get_db() + error = None + user = db.execute( + 'SELECT * FROM users WHERE username = ?', (username,) + ).fetchone() + + if user is None: + error = 'Incorrect username.' + elif not check_password_hash(user['password'], password): + error = 'Incorrect password.' + + if error is None: + session.clear() + session['user_id'] = user['id'] + return redirect(url_for('index')) + + flash(error) + + return render_template('auth/login.html') + + +@bp.route('/logout') +def logout(): + session.clear() + return redirect(url_for('index')) + + +def login_required(view): + @functools.wraps(view) + def wrapped_view(**kwargs): + if g.user is None: + return redirect(url_for('auth.login')) + + return view(**kwargs) + + return wrapped_view diff --git a/gallery/db.py b/gallery/db.py new file mode 100644 index 0000000..dc2648d --- /dev/null +++ b/gallery/db.py @@ -0,0 +1,41 @@ +import sqlite3 + +import click +from flask import current_app, g + + +def get_db(): + if 'db' not in g: + g.db = sqlite3.connect( + current_app.config['DATABASE'], + detect_types=sqlite3.PARSE_DECLTYPES + ) + g.db.row_factory = sqlite3.Row + + return g.db + + +def close_db(e=None): + db = g.pop('db', None) + + if db is not None: + db.close() + + +def init_db(): + db = get_db() + + with current_app.open_resource('schema.sql') as f: + db.executescript(f.read().decode('utf8')) + + +@click.command('init-db') +def init_db_command(): + """Create tables if not already created""" + init_db() + click.echo('Initialized the database!') + + +def init_app(app): + app.teardown_appcontext(close_db) + app.cli.add_command(init_db_command) \ No newline at end of file diff --git a/packages/onlylegsDB.py b/gallery/packages/onlylegsDB.py similarity index 100% rename from packages/onlylegsDB.py rename to gallery/packages/onlylegsDB.py diff --git a/packages/onlylegsSass.py b/gallery/packages/onlylegsSass.py similarity index 100% rename from packages/onlylegsSass.py rename to gallery/packages/onlylegsSass.py diff --git a/packages/tables/generate.sql b/gallery/packages/tables/generate.sql similarity index 100% rename from packages/tables/generate.sql rename to gallery/packages/tables/generate.sql diff --git a/packages/tables/junctions.sql b/gallery/packages/tables/junctions.sql similarity index 100% rename from packages/tables/junctions.sql rename to gallery/packages/tables/junctions.sql diff --git a/gallery/routes.py b/gallery/routes.py new file mode 100644 index 0000000..6ce3ea5 --- /dev/null +++ b/gallery/routes.py @@ -0,0 +1,69 @@ +from flask import ( + Blueprint, flash, g, redirect, render_template, request, url_for +) +from werkzeug.exceptions import abort + +from gallery.auth import login_required +from gallery.db import get_db + +bp = Blueprint('routes', __name__) + +# +# ROUTES +# +@bp.route('/') +def index(): + return render_template('index.html') + +@bp.route('/group') +def group(): + return render_template('group.html', group_id='gwa gwa') + +@bp.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) + +@bp.route('/upload') +def upload(): + return render_template('upload.html') + +@bp.route('/upload/form', methods=['POST']) +def upload_form(): + if request.method != 'POST': + abort(405) + + return 'balls' + +@bp.route('/profile') +def profile(): + return render_template('profile.html', user_id='gwa gwa') + +@bp.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) + +@bp.route('/settings') +def settings(): + return render_template('settings.html') + +@bp.route('/image/') +def image(request_id): + # Check if request_id is valid + try: + request_id = int(request_id) + except ValueError: + abort(404) + + result = onlylegsDB.getImage(request_id) + + return render_template('image.html', fileName=result[1], id=request_id) \ No newline at end of file diff --git a/gallery/schema.sql b/gallery/schema.sql new file mode 100644 index 0000000..16448b6 --- /dev/null +++ b/gallery/schema.sql @@ -0,0 +1,78 @@ +CREATE TABLE IF NOT EXISTS users ( + id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + username TEXT NOT NULL UNIQUE, + email TEXT NOT NULL, + password TEXT NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +); + +CREATE TABLE IF NOT EXISTS posts ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + file_name TEXT NOT NULL UNIQUE, + author_id INTEGER NOT NULL, + description TEXT NOT NULL, + alt TEXT NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (author_id) REFERENCES users (id) +); + +CREATE TABLE IF NOT EXISTS groups ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + author_id INTEGER NOT NULL, + name TEXT NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (author_id) REFERENCES users (id) +); + +CREATE TABLE IF NOT EXISTS group_junction ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + group_id INTEGER NOT NULL, + image_id INTEGER NOT NULL, + FOREIGN KEY (group_id) REFERENCES groups (id), + FOREIGN KEY (image_id) REFERENCES posts (id) +); + +CREATE TABLE IF NOT EXISTS permissions ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + user_id INTEGER NOT NULL, + admin BOOLEAN NOT NULL DEFAULT FALSE, + create_posts BOOLEAN NOT NULL DEFAULT TRUE, + FOREIGN KEY (user_id) REFERENCES users (id) +); + +CREATE TABLE IF NOT EXISTS devices ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + user_id INTEGER NOT NULL, + device_id TEXT NOT NULL, + cookie TEXT NOT NULL, + ip TEXT NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (user_id) REFERENCES users (id) +); + +CREATE TABLE IF NOT EXISTS tokens ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + token TEXT NOT NULL UNIQUE, + is_used BOOLEAN NOT NULL DEFAULT FALSE, + used_by INTEGER DEFAULT NULL, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (used_by) REFERENCES users (id) +); + +CREATE TABLE IF NOT EXISTS logs ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + ip TEXT NOT NULL, + user_id INTEGER DEFAULT NULL, + code INTEGER NOT NULL, + note TEXT DEFAULT NULL, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (user_id) REFERENCES users (id) +); + +CREATE TABLE IF NOT EXISTS bans ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + ip TEXT NOT NULL, + code INTEGER NOT NULL, + note TEXT DEFAULT NULL, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +); diff --git a/static/images/leaves.jpg b/gallery/static/images/leaves.jpg similarity index 100% rename from static/images/leaves.jpg rename to gallery/static/images/leaves.jpg diff --git a/gallery/templates/auth/login.html b/gallery/templates/auth/login.html new file mode 100644 index 0000000..7287d9f --- /dev/null +++ b/gallery/templates/auth/login.html @@ -0,0 +1,24 @@ +{% extends 'layout.html' %} + +{% block header %} + leaves +{% endblock %} + +{% block content %} +
+

Login

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

register

+
+
+ + + + + +
+ + {% for message in get_flashed_messages() %} +
{{ message }}
+ {% endfor %} +
+
+{% endblock %} \ No newline at end of file diff --git a/gallery/templates/error.html b/gallery/templates/error.html new file mode 100644 index 0000000..9ee3992 --- /dev/null +++ b/gallery/templates/error.html @@ -0,0 +1,12 @@ +{% extends 'layout.html' %} + +{% block header %} +leaves +{% endblock %} + +{% block content %} +
+

{{error}}

+

{{msg}}

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

Image Group

+

{{group_id}}

+
+{% endblock %} \ No newline at end of file diff --git a/templates/image.html b/gallery/templates/image.html similarity index 70% rename from templates/image.html rename to gallery/templates/image.html index 75bee52..cac5b52 100644 --- a/templates/image.html +++ b/gallery/templates/image.html @@ -1,6 +1,10 @@ {% extends 'layout.html' %} -{% block content %} +{% block header %} +leaves +{% endblock %} + +{% block content %}
diff --git a/templates/home.html b/gallery/templates/index.html similarity index 89% rename from templates/home.html rename to gallery/templates/index.html index 2b57ba9..afa222b 100644 --- a/templates/home.html +++ b/gallery/templates/index.html @@ -1,9 +1,10 @@ {% extends 'layout.html' %} + +{% block header %} + leaves +{% endblock %} + {% block content %} -
- leaves - -

Gallery

diff --git a/templates/layout.html b/gallery/templates/layout.html similarity index 97% rename from templates/layout.html rename to gallery/templates/layout.html index c5d856a..a706940 100644 --- a/templates/layout.html +++ b/gallery/templates/layout.html @@ -14,7 +14,7 @@
+
+ {% block header %}{% endblock %} + +
+ {% block content %} {% endblock %} diff --git a/gallery/templates/profile.html b/gallery/templates/profile.html new file mode 100644 index 0000000..30f4d8e --- /dev/null +++ b/gallery/templates/profile.html @@ -0,0 +1,22 @@ +{% extends 'layout.html' %} + +{% block header %} +leaves +{% endblock %} + +{% block content %} +
+{% endblock %} + diff --git a/gallery/templates/settings.html b/gallery/templates/settings.html new file mode 100644 index 0000000..ca3d003 --- /dev/null +++ b/gallery/templates/settings.html @@ -0,0 +1,11 @@ +{% extends 'layout.html' %} + +{% block header %} +leaves +{% endblock %} + +{% block content %} +
+

Settings

+
+{% endblock %} \ No newline at end of file diff --git a/templates/upload.html b/gallery/templates/upload.html similarity index 96% rename from templates/upload.html rename to gallery/templates/upload.html index b5767d9..71c55d6 100644 --- a/templates/upload.html +++ b/gallery/templates/upload.html @@ -1,9 +1,10 @@ {% extends 'layout.html' %} + +{% block header %} +leaves +{% endblock %} + {% block content %} -
- leaves - -

Upload!!!!!

diff --git a/usr/example.env b/gallery/user/example.env similarity index 100% rename from usr/example.env rename to gallery/user/example.env diff --git a/usr/themes/default/buttons/btn.scss b/gallery/user/themes/default/buttons/btn.scss similarity index 100% rename from usr/themes/default/buttons/btn.scss rename to gallery/user/themes/default/buttons/btn.scss diff --git a/usr/themes/default/buttons/up.scss b/gallery/user/themes/default/buttons/up.scss similarity index 100% rename from usr/themes/default/buttons/up.scss rename to gallery/user/themes/default/buttons/up.scss diff --git a/usr/themes/default/fonts/Hubot-Sans.woff2 b/gallery/user/themes/default/fonts/Hubot-Sans.woff2 similarity index 100% rename from usr/themes/default/fonts/Hubot-Sans.woff2 rename to gallery/user/themes/default/fonts/Hubot-Sans.woff2 diff --git a/usr/themes/default/fonts/Mona-Sans.woff2 b/gallery/user/themes/default/fonts/Mona-Sans.woff2 similarity index 100% rename from usr/themes/default/fonts/Mona-Sans.woff2 rename to gallery/user/themes/default/fonts/Mona-Sans.woff2 diff --git a/usr/themes/default/fonts/worksans-black.woff2 b/gallery/user/themes/default/fonts/worksans-black.woff2 similarity index 100% rename from usr/themes/default/fonts/worksans-black.woff2 rename to gallery/user/themes/default/fonts/worksans-black.woff2 diff --git a/usr/themes/default/fonts/worksans-bold.woff2 b/gallery/user/themes/default/fonts/worksans-bold.woff2 similarity index 100% rename from usr/themes/default/fonts/worksans-bold.woff2 rename to gallery/user/themes/default/fonts/worksans-bold.woff2 diff --git a/usr/themes/default/fonts/worksans-regular.woff2 b/gallery/user/themes/default/fonts/worksans-regular.woff2 similarity index 100% rename from usr/themes/default/fonts/worksans-regular.woff2 rename to gallery/user/themes/default/fonts/worksans-regular.woff2 diff --git a/usr/themes/default/style.scss b/gallery/user/themes/default/style.scss similarity index 100% rename from usr/themes/default/style.scss rename to gallery/user/themes/default/style.scss diff --git a/usr/themes/default/ui/main.scss b/gallery/user/themes/default/ui/main.scss similarity index 100% rename from usr/themes/default/ui/main.scss rename to gallery/user/themes/default/ui/main.scss diff --git a/usr/themes/default/ui/nav.scss b/gallery/user/themes/default/ui/nav.scss similarity index 100% rename from usr/themes/default/ui/nav.scss rename to gallery/user/themes/default/ui/nav.scss diff --git a/usr/themes/default/ui/reset.scss b/gallery/user/themes/default/ui/reset.scss similarity index 100% rename from usr/themes/default/ui/reset.scss rename to gallery/user/themes/default/ui/reset.scss diff --git a/usr/themes/default/variables/fonts.scss b/gallery/user/themes/default/variables/fonts.scss similarity index 100% rename from usr/themes/default/variables/fonts.scss rename to gallery/user/themes/default/variables/fonts.scss diff --git a/usr/themes/default/variables/variables.scss b/gallery/user/themes/default/variables/variables.scss similarity index 100% rename from usr/themes/default/variables/variables.scss rename to gallery/user/themes/default/variables/variables.scss diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..e69de29 diff --git a/templates/error.html b/templates/error.html deleted file mode 100644 index ea3c026..0000000 --- a/templates/error.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends 'layout.html' %} -{% block content %} -
- leaves - -
-
-

{{error}}

-

{{msg}}

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

Image Group

-

{{group_id}}

-
-{% endblock %} \ No newline at end of file diff --git a/templates/profile.html b/templates/profile.html deleted file mode 100644 index b9c3c6f..0000000 --- a/templates/profile.html +++ /dev/null @@ -1,11 +0,0 @@ -{% 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 deleted file mode 100644 index e498e90..0000000 --- a/templates/settings.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends 'layout.html' %} -{% block content %} -
- leaves - -
-
-

Settings

-
-{% endblock %} \ No newline at end of file