diff --git a/ref-test/app/install.py b/ref-test/app/install.py deleted file mode 100644 index 843259b..0000000 --- a/ref-test/app/install.py +++ /dev/null @@ -1,32 +0,0 @@ -from main import app, Config -from .data import data -from .modules import db -from .tools.data import save -from .tools.logs import write - -from os import mkdir, path, system -from cryptography.fernet import Fernet - -from sqlalchemy_utils import database_exists, create_database - -def install_scripts(): - if not path.isdir(f'./{data}'): mkdir(f'./{data}') - if not path.isdir(f'./{data}/questions'): mkdir(f'./{data}/questions') - if not path.isfile(f'./{data}/.gitignore'): - with open(f'./{data}/.gitignore', 'a+') as file: file.write(f'*') - if not path.isfile(f'./{data}/config.json'): save({}, 'config.json') - if not path.isdir(f'./{data}/logs'): mkdir(f'./{data}/logs') - if not path.isfile(f'./{data}/logs/users.log'): write('users.log', 'Log file created.') - if not path.isfile(f'./{data}/logs/system.log'): write('system.log', 'Log file created.') - if not path.isfile(f'./{data}/logs/tests.log'): write('tests.log', 'Log file created.') - if not database_exists(Config.SQLALCHEMY_DATABASE_URI): - create_database(Config.SQLALCHEMY_DATABASE_URI) - write('system.log', 'No database found. Creating a new database.') - from .models import Entry, Test, User - with app.app_context(): db.create_all() - write('system.log', 'Creating database schema.') - if not path.isfile(f'./{data}/.encryption.key'): - write('system.log', 'No encryption key found. Generating new encryption key.') - with open(f'./{data}/.encryption.key', 'wb') as key_file: - key = Fernet.generate_key() - key_file.write(key) \ No newline at end of file diff --git a/ref-test/app/quiz/templates/quiz/privacy.html b/ref-test/app/quiz/templates/quiz/privacy.html deleted file mode 100644 index 6e02e89..0000000 --- a/ref-test/app/quiz/templates/quiz/privacy.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends "quiz/components/base.html" %} - -{% block content %} -

Privacy Policy

- - This web app stores data using cookies. The web site only stores the minimum information it needs to function. -
Site Administrators
- - - -
Test Candidates
- - -
Requests to Delete Data
- -{% endblock %} \ No newline at end of file diff --git a/ref-test/app/root/css/style.css b/ref-test/app/root/css/style.css new file mode 100644 index 0000000..802ade7 --- /dev/null +++ b/ref-test/app/root/css/style.css @@ -0,0 +1,218 @@ +body { + padding: 80px 0; + line-height: 1.5; + font-size: 14pt; +} + +#cookie-alert { + padding-right: 16px; +} + +#dismiss-cookie-alert { + margin-top: 16px; + width: fit-content; +} + +.button-container { + margin: 2rem auto; + width: fit-content; +} + +.instruction-container { + margin: 2rem auto; +} + +.site-footer { + background-color: lightgray; + font-size: small; +} + +.site-footer p { + margin: 0; +} + +.quiz-container { + max-width: 720px; +} + +.form-container { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + padding-top: 40px; + padding-bottom: 40px; +} + +.form-quiz-start { + width: 100%; + max-width: 420px; + padding: 15px; + margin: auto; +} + +.form-heading { + margin-bottom: 2rem; +} + +.form-label-group { + position: relative; + margin-bottom: 2rem; +} + +.form-label-group input, +.form-label-group label { + padding: var(--input-padding-y) var(--input-padding-x); + font-size: 16pt; +} + +.form-label-group label { + position: absolute; + top: 0; + left: 0; + display: block; + width: 100%; + margin-bottom: 0; /* Override default `