diff --git a/app/__init__.py b/app/__init__.py index 925e3b95..b70fbf35 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -1,4 +1,4 @@ -from apifairy import APIFairy +# from apifairy import APIFairy from config import Config from docker import DockerClient from flask import Flask @@ -14,7 +14,7 @@ from flask_sqlalchemy import SQLAlchemy from flask_hashids import Hashids -apifairy = APIFairy() +# apifairy = APIFairy() assets = Environment() db = SQLAlchemy() docker_client = DockerClient() @@ -45,7 +45,7 @@ def create_app(config: Config = Config) -> Flask: registry=app.config['NOPAQUE_DOCKER_REGISTRY'] ) - apifairy.init_app(app) + # apifairy.init_app(app) assets.init_app(app) db.init_app(app) hashids.init_app(app) diff --git a/app/models/user.py b/app/models/user.py index 341e49aa..95010d61 100644 --- a/app/models/user.py +++ b/app/models/user.py @@ -146,7 +146,8 @@ class User(HashidMixin, UserMixin, db.Model): @password.setter def password(self, password): - self.password_hash = generate_password_hash(password) + #pbkdf2:sha256 + self.password_hash = generate_password_hash(password, method='pbkdf2') @property def path(self) -> Path: diff --git a/app/static/css/helpers.scss b/app/static/css/helpers.scss index b7595c26..fce90a27 100644 --- a/app/static/css/helpers.scss +++ b/app/static/css/helpers.scss @@ -1,7 +1,7 @@ /* * Spacing */ -$spacing-shortcuts: ("margin": "mg", "padding": "pd"); +$spacing-shortcuts: ("margin": "m", "padding": "p"); $spacing-directions: ("top": "t", "right": "r", "bottom": "b", "left": "l"); $spacing-values: ("0": 0, "1": 0.25rem, "2": 0.5rem, "3": 0.75rem, "4": 1rem, "5": 1.5rem, "6": 3rem, "auto": auto); diff --git a/app/static/css/materialize/sidenav_fixed.css b/app/static/css/materialize/sidenav_fixed.css deleted file mode 100644 index 7cf789da..00000000 --- a/app/static/css/materialize/sidenav_fixed.css +++ /dev/null @@ -1,12 +0,0 @@ -/* - * The sidenav-fixed class is used which causes the sidenav to be fixed and open - * on large screens and hides to the regular functionality on smaller screens. - * In order to prevent the sidenav to overlap the content, the content (in our - * case header, main and footer) gets an offset equal to the width of the - * sidenav. - */ -@media only screen and (min-width : 993px) { - header, main, footer {padding-left: 300px;} - .modal:not(.bottom-sheet) {left: 300px;} - .navbar-fixed > nav {width: calc(100% - 300px)} -} diff --git a/app/static/css/spacing.css b/app/static/css/spacing.css deleted file mode 100644 index b88aafe2..00000000 --- a/app/static/css/spacing.css +++ /dev/null @@ -1,482 +0,0 @@ -/************************** - Utility Spacing Classes -**************************/ -.m-0 { - margin: 0 !important; -} - -.mt-0 { - margin-top: 0 !important; -} - -.mr-0 { - margin-right: 0 !important; -} - -.mb-0 { - margin-bottom: 0 !important; -} - -.ml-0 { - margin-left: 0 !important; -} - -.mx-0 { - margin-left: 0 !important; - margin-right: 0 !important; -} - -.my-0 { - margin-top: 0 !important; - margin-bottom: 0 !important; -} - -.m-1 { - margin: 0.25rem !important; -} - -.mt-1 { - margin-top: 0.25rem !important; -} - -.mr-1 { - margin-right: 0.25rem !important; -} - -.mb-1 { - margin-bottom: 0.25rem !important; -} - -.ml-1 { - margin-left: 0.25rem !important; -} - -.mx-1 { - margin-left: 0.25rem !important; - margin-right: 0.25rem !important; -} - -.my-1 { - margin-top: 0.25rem !important; - margin-bottom: 0.25rem !important; -} - -.m-2 { - margin: 0.5rem !important; -} - -.mt-2 { - margin-top: 0.5rem !important; -} - -.mr-2 { - margin-right: 0.5rem !important; -} - -.mb-2 { - margin-bottom: 0.5rem !important; -} - -.ml-2 { - margin-left: 0.5rem !important; -} - -.mx-2 { - margin-left: 0.5rem !important; - margin-right: 0.5rem !important; -} - -.my-2 { - margin-top: 0.5rem !important; - margin-bottom: 0.5rem !important; -} - -.m-3 { - margin: 0.75rem !important; -} - -.mt-3 { - margin-top: 0.75rem !important; -} - -.mr-3 { - margin-right: 0.75rem !important; -} - -.mb-3 { - margin-bottom: 0.75rem !important; -} - -.ml-3 { - margin-left: 0.75rem !important; -} - -.mx-3 { - margin-left: 0.75rem !important; - margin-right: 0.75rem !important; -} - -.my-3 { - margin-top: 0.75rem !important; - margin-bottom: 0.75rem !important; -} - -.m-4 { - margin: 1rem !important; -} - -.mt-4 { - margin-top: 1rem !important; -} - -.mr-4 { - margin-right: 1rem !important; -} - -.mb-4 { - margin-bottom: 1rem !important; -} - -.ml-4 { - margin-left: 1rem !important; -} - -.mx-4 { - margin-left: 1rem !important; - margin-right: 1rem !important; -} - -.my-4 { - margin-top: 1rem !important; - margin-bottom: 1rem !important; -} - -.m-5 { - margin: 1.5rem !important; -} - -.mt-5 { - margin-top: 1.5rem !important; -} - -.mr-5 { - margin-right: 1.5rem !important; -} - -.mb-5 { - margin-bottom: 1.5rem !important; -} - -.ml-5 { - margin-left: 1.5rem !important; -} - -.mx-5 { - margin-left: 1.5rem !important; - margin-right: 1.5rem !important; -} - -.my-5 { - margin-top: 1.5rem !important; - margin-bottom: 1.5rem !important; -} - -.m-6 { - margin: 3rem !important; -} - -.mt-6 { - margin-top: 3rem !important; -} - -.mr-6 { - margin-right: 3rem !important; -} - -.mb-6 { - margin-bottom: 3rem !important; -} - -.ml-6 { - margin-left: 3rem !important; -} - -.mx-6 { - margin-left: 3rem !important; - margin-right: 3rem !important; -} - -.my-6 { - margin-top: 3rem !important; - margin-bottom: 3rem !important; -} - -.m-auto { - margin: auto !important; -} - -.mt-auto { - margin-top: auto !important; -} - -.mr-auto { - margin-right: auto !important; -} - -.mb-auto { - margin-bottom: auto !important; -} - -.ml-auto { - margin-left: auto !important; -} - -.mx-auto { - margin-left: auto !important; - margin-right: auto !important; -} - -.my-auto { - margin-top: auto !important; - margin-bottom: auto !important; -} - -.p-0 { - padding: 0 !important; -} - -.pt-0 { - padding-top: 0 !important; -} - -.pr-0 { - padding-right: 0 !important; -} - -.pb-0 { - padding-bottom: 0 !important; -} - -.pl-0 { - padding-left: 0 !important; -} - -.px-0 { - padding-left: 0 !important; - padding-right: 0 !important; -} - -.py-0 { - padding-top: 0 !important; - padding-bottom: 0 !important; -} - -.p-1 { - padding: 0.25rem !important; -} - -.pt-1 { - padding-top: 0.25rem !important; -} - -.pr-1 { - padding-right: 0.25rem !important; -} - -.pb-1 { - padding-bottom: 0.25rem !important; -} - -.pl-1 { - padding-left: 0.25rem !important; -} - -.px-1 { - padding-left: 0.25rem !important; - padding-right: 0.25rem !important; -} - -.py-1 { - padding-top: 0.25rem !important; - padding-bottom: 0.25rem !important; -} - -.p-2 { - padding: 0.5rem !important; -} - -.pt-2 { - padding-top: 0.5rem !important; -} - -.pr-2 { - padding-right: 0.5rem !important; -} - -.pb-2 { - padding-bottom: 0.5rem !important; -} - -.pl-2 { - padding-left: 0.5rem !important; -} - -.px-2 { - padding-left: 0.5rem !important; - padding-right: 0.5rem !important; -} - -.py-2 { - padding-top: 0.5rem !important; - padding-bottom: 0.5rem !important; -} - -.p-3 { - padding: 0.75rem !important; -} - -.pt-3 { - padding-top: 0.75rem !important; -} - -.pr-3 { - padding-right: 0.75rem !important; -} - -.pb-3 { - padding-bottom: 0.75rem !important; -} - -.pl-3 { - padding-left: 0.75rem !important; -} - -.px-3 { - padding-left: 0.75rem !important; - padding-right: 0.75rem !important; -} - -.py-3 { - padding-top: 0.75rem !important; - padding-bottom: 0.75rem !important; -} - -.p-4 { - padding: 1rem !important; -} - -.pt-4 { - padding-top: 1rem !important; -} - -.pr-4 { - padding-right: 1rem !important; -} - -.pb-4 { - padding-bottom: 1rem !important; -} - -.pl-4 { - padding-left: 1rem !important; -} - -.px-4 { - padding-left: 1rem !important; - padding-right: 1rem !important; -} - -.py-4 { - padding-top: 1rem !important; - padding-bottom: 1rem !important; -} - -.p-5 { - padding: 1.5rem !important; -} - -.pt-5 { - padding-top: 1.5rem !important; -} - -.pr-5 { - padding-right: 1.5rem !important; -} - -.pb-5 { - padding-bottom: 1.5rem !important; -} - -.pl-5 { - padding-left: 1.5rem !important; -} - -.px-5 { - padding-left: 1.5rem !important; - padding-right: 1.5rem !important; -} - -.py-5 { - padding-top: 1.5rem !important; - padding-bottom: 1.5rem !important; -} - -.p-6 { - padding: 3rem !important; -} - -.pt-6 { - padding-top: 3rem !important; -} - -.pr-6 { - padding-right: 3rem !important; -} - -.pb-6 { - padding-bottom: 3rem !important; -} - -.pl-6 { - padding-left: 3rem !important; -} - -.px-6 { - padding-left: 3rem !important; - padding-right: 3rem !important; -} - -.py-6 { - padding-top: 3rem !important; - padding-bottom: 3rem !important; -} - -.p-auto { - padding: auto !important; -} - -.pt-auto { - padding-top: auto !important; -} - -.pr-auto { - padding-right: auto !important; -} - -.pb-auto { - padding-bottom: auto !important; -} - -.pl-auto { - padding-left: auto !important; -} - -.px-auto { - padding-left: auto !important; - padding-right: auto !important; -} - -.py-auto { - padding-top: auto !important; - padding-bottom: auto !important; -} diff --git a/app/static/fonts/nopaque_icons/nopaqueIcons-Regular.otf b/app/static/fonts/nopaque_icons/nopaqueIcons-Regular.otf deleted file mode 100644 index 37d2b481..00000000 Binary files a/app/static/fonts/nopaque_icons/nopaqueIcons-Regular.otf and /dev/null differ diff --git a/app/static/fonts/nopaque_icons/nopaqueIcons-Regular.woff b/app/static/fonts/nopaque_icons/nopaqueIcons-Regular.woff deleted file mode 100644 index 7dbe2a8b..00000000 Binary files a/app/static/fonts/nopaque_icons/nopaqueIcons-Regular.woff and /dev/null differ diff --git a/app/static/fonts/nopaque_icons/nopaqueIcons-Regular.woff2 b/app/static/fonts/nopaque_icons/nopaqueIcons-Regular.woff2 deleted file mode 100644 index 47d01275..00000000 Binary files a/app/static/fonts/nopaque_icons/nopaqueIcons-Regular.woff2 and /dev/null differ diff --git a/app/static/images/nopaque-logo+wordmark.png b/app/static/images/nopaque-logo+wordmark.png new file mode 100644 index 00000000..64d19252 Binary files /dev/null and b/app/static/images/nopaque-logo+wordmark.png differ diff --git a/app/static/images/nopaque-wordmark.png b/app/static/images/nopaque-wordmark.png new file mode 100644 index 00000000..507565d8 Binary files /dev/null and b/app/static/images/nopaque-wordmark.png differ diff --git a/app/static/js/app.js b/app/static/js/app.js index 57dd7ca1..e69fc3ed 100644 --- a/app/static/js/app.js +++ b/app/static/js/app.js @@ -150,14 +150,14 @@ nopaque.App = class App { M.CharacterCounter.init(document.querySelectorAll('input[data-length]:not(.no-autoinit), textarea[data-length]:not(.no-autoinit)')); // Header navigation "more" Dropdown. - M.Dropdown.init( - document.querySelector('#nav-more-dropdown-trigger'), - { - alignment: 'right', - constrainWidth: false, - coverTrigger: false - } - ); + // M.Dropdown.init( + // document.querySelector('#nav-more-dropdown-trigger'), + // { + // alignment: 'right', + // constrainWidth: false, + // coverTrigger: false + // } + // ); // Manual modal M.Modal.init( diff --git a/app/static/css/materialize/fixes.css b/app/static/materialize/css/fixes.css similarity index 100% rename from app/static/css/materialize/fixes.css rename to app/static/materialize/css/fixes.css diff --git a/app/static/materialize/css/sidenav-fixed.css b/app/static/materialize/css/sidenav-fixed.css new file mode 100644 index 00000000..116ad4b9 --- /dev/null +++ b/app/static/materialize/css/sidenav-fixed.css @@ -0,0 +1,26 @@ +/* + * Fixed HTML Structure: https://materializecss.com/sidenav.html#variations + * The sidenav-fixed class is used which causes the sidenav to be fixed and open + * on large screens and hides to the regular functionality on smaller screens. + * In order to prevent the sidenav to overlap the content, the content (header, main and footer) + * gets an offset equal to the width of the sidenav. + */ +header, main, footer { + padding-left: 300px; +} + +@media only screen and (max-width : 992px) { + header, main, footer { + padding-left: 0; + } +} + +.navbar-fixed > nav { + width: calc(100% - 300px); +} + +@media only screen and (max-width : 992px) { + .navbar-fixed > nav { + width: 100%; + } +} diff --git a/app/static/css/materialize/sticky_footer.css b/app/static/materialize/css/sticky-footer.css similarity index 100% rename from app/static/css/materialize/sticky_footer.css rename to app/static/materialize/css/sticky-footer.css index 3a992ccc..cbe032f3 100644 --- a/app/static/css/materialize/sticky_footer.css +++ b/app/static/materialize/css/sticky-footer.css @@ -9,8 +9,8 @@ */ body { display: flex; - flex-direction: column; min-height: 100vh; + flex-direction: column; } main { diff --git a/app/static/css/nopaque_icons.css b/app/static/nopaque-icons/css/nopaque-icons.css similarity index 72% rename from app/static/css/nopaque_icons.css rename to app/static/nopaque-icons/css/nopaque-icons.css index 94ef391c..37407c13 100644 --- a/app/static/css/nopaque_icons.css +++ b/app/static/nopaque-icons/css/nopaque-icons.css @@ -2,9 +2,13 @@ font-family: 'Nopaque Icons'; font-style: normal; font-weight: 400; + /* For IE6-8 */ + /* src: url("../font/NopaqueIcons-Regular.eot"); */ src: local('nopaque Icons'), local('NopaqueIcons-Regular'), - url(../fonts/nopaque_icons/NopaqueIcons-Regular.otf) format('opentype'); + url("../font/NopaqueIcons-Regular.woff2") format('woff2'), + url("../font/NopaqueIcons-Regular.woff") format('woff'), + url("../font/nopaque_icons/NopaqueIcons-Regular.otf") format('opentype'); } .nopaque-icons { diff --git a/app/static/fonts/nopaque_icons/NopaqueIcons-Regular.otf b/app/static/nopaque-icons/font/NopaqueIcons-Regular.otf similarity index 100% rename from app/static/fonts/nopaque_icons/NopaqueIcons-Regular.otf rename to app/static/nopaque-icons/font/NopaqueIcons-Regular.otf diff --git a/app/static/fonts/nopaque_icons/NopaqueIcons-Regular.woff b/app/static/nopaque-icons/font/NopaqueIcons-Regular.woff similarity index 100% rename from app/static/fonts/nopaque_icons/NopaqueIcons-Regular.woff rename to app/static/nopaque-icons/font/NopaqueIcons-Regular.woff diff --git a/app/static/fonts/nopaque_icons/NopaqueIcons-Regular.woff2 b/app/static/nopaque-icons/font/NopaqueIcons-Regular.woff2 similarity index 100% rename from app/static/fonts/nopaque_icons/NopaqueIcons-Regular.woff2 rename to app/static/nopaque-icons/font/NopaqueIcons-Regular.woff2 diff --git a/app/templates/_base/navbar.html.j2 b/app/templates/_base/navbar.html.j2 index 7dc49dd8..cadfe423 100644 --- a/app/templates/_base/navbar.html.j2 +++ b/app/templates/_base/navbar.html.j2 @@ -1,36 +1,48 @@
+ +{# {% if current_user.is_authenticated %} +{% endif %} #} diff --git a/app/templates/_base/roadmap.html.j2 b/app/templates/_base/roadmap.html.j2 deleted file mode 100644 index eaf428ac..00000000 --- a/app/templates/_base/roadmap.html.j2 +++ /dev/null @@ -1,36 +0,0 @@ -