From efb4252f81e563c117ef1f661fc5ac403c41b015 Mon Sep 17 00:00:00 2001 From: crunk Date: Wed, 5 Jan 2022 15:10:18 +0100 Subject: [PATCH] some small updates --- README.md | 5 ++++- verse/app.py | 2 +- verse/start.py | 4 ++-- verse/static/css/style.css | 14 ++++++++++++++ verse/templates/base.html | 5 ----- verse/templates/distribusi.html | 4 ++++ verse/templates/index.html | 13 +++++++++++++ 7 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 verse/templates/distribusi.html diff --git a/README.md b/README.md index a48d443..c7e23aa 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# distribusi verse +# Distribusi verse Distribusi is a content management system for the web that produces static index pages based on folders in the files system. It is inspired by the automatic index functions featured in several popular web servers. Distribusi works by traversing the file system and directory hierarchy to automatically list all the files in the directory, detect the file types and providing them with relevant html classes and tags for easy styling. @@ -9,6 +9,9 @@ The contribution consisted of setting up distribusi. ruruhuis.nl (distribusi is This particular work in progress project is an attempt to make distribusi into a webinterface that can be operated remotely without any knowlegde of CLI. Trying to somehow combine the ideas of distribusi with the ideas of a [tildeverse](https://tildeverse.org/) or [Tilde club ](https://tilde.club/), but also be neither of these ideas. This project is made for Autonomous Practices at the WDKA in Rotterdam. +## Work in progress + +Nothing is working yet but I need to do this project in smaller steps then everything in one go. ## Start your engines! diff --git a/verse/app.py b/verse/app.py index 8921454..61e4d19 100644 --- a/verse/app.py +++ b/verse/app.py @@ -21,7 +21,7 @@ def create_app(): APP.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True login_manager.session_protection = "strong" - login_manager.login_view = "login" + login_manager.login_view = "index" login_manager.login_message_category = "info" csrf = CSRFProtect() diff --git a/verse/start.py b/verse/start.py index 858b1b2..dc2ed87 100644 --- a/verse/start.py +++ b/verse/start.py @@ -7,7 +7,6 @@ from flask import ( url_for, session, abort, - is_safe_url, ) from sqlalchemy.exc import ( IntegrityError, @@ -20,6 +19,7 @@ from flask_login import ( login_user, logout_user, login_required, + current_user, ) from werkzeug.routing import BuildError @@ -121,7 +121,7 @@ def admin(): @login_required def logout(): logout_user() - return redirect(url_for("login")) + return redirect(url_for("index")) @APP.errorhandler(CSRFError) diff --git a/verse/static/css/style.css b/verse/static/css/style.css index 28317da..a601248 100644 --- a/verse/static/css/style.css +++ b/verse/static/css/style.css @@ -42,6 +42,20 @@ section#buttons{ align-items: center; } +section#buttons .logout input{ + border: none; + background: #E0B0FF; + text-decoration: none; + margin: 1px; +} + +section#buttons .distribusi input{ + border: none; + background: #fff600; + text-decoration: none; + margin: 1px; +} + .signin input { border: none; background: #E0B0FF; diff --git a/verse/templates/base.html b/verse/templates/base.html index 0818d9e..f7f3eb5 100644 --- a/verse/templates/base.html +++ b/verse/templates/base.html @@ -14,11 +14,6 @@ {% block main %} {% endblock main %} - -
- -
- diff --git a/verse/templates/distribusi.html b/verse/templates/distribusi.html new file mode 100644 index 0000000..a5d0c56 --- /dev/null +++ b/verse/templates/distribusi.html @@ -0,0 +1,4 @@ +{% extends "base.html" %} +{% block main %} + +{% endblock main %} diff --git a/verse/templates/index.html b/verse/templates/index.html index 43dfa5d..ee0e993 100644 --- a/verse/templates/index.html +++ b/verse/templates/index.html @@ -1,6 +1,7 @@ {% extends "base.html" %} {% block main %}
+ {% if not current_user.is_authenticated %} + {% else %} +
+ + + +
+
+ + + +
+ {% endif %}
{% if current_user.is_authenticated %}