From 50dd4dedb2c510bfb4f3b5b5034c345146eefe0f Mon Sep 17 00:00:00 2001 From: nsde Date: Tue, 25 Jul 2023 03:38:53 +0200 Subject: [PATCH] Small refractoring --- .gitignore | 4 + app.py | 42 ----- config/emojis.txt | 1 + screen.sh | 1 + static/css/base.css.map | 1 - static/css/home.css.map | 1 - static/css/input.css.map | 1 - templates/index.html | 23 --- web/__main__.py | 20 +++ web/app.py | 92 +++++++++++ {static => web/static}/css/_vars.sass | 3 + {static => web/static}/css/base.css | 34 ++++- web/static/css/base.css.map | 1 + {static => web/static}/css/base.sass | 31 +++- {static => web/static}/css/footer.css | 0 {static => web/static}/css/footer.css.map | 2 +- {static => web/static}/css/footer.sass | 0 {static => web/static}/css/home.css | 3 + web/static/css/home.css.map | 1 + {static => web/static}/css/home.sass | 3 + {static => web/static}/css/input.css | 1 + web/static/css/input.css.map | 1 + {static => web/static}/css/input.sass | 1 + {static => web/static}/css/navbar.css | 0 {static => web/static}/css/navbar.css.map | 2 +- {static => web/static}/css/navbar.sass | 0 {static => web/static}/ext/css/prism.css | 5 +- {static => web/static}/img/banner.png | Bin {static => web/static}/img/fav.ico | Bin {static => web/static}/img/icon.png | Bin {static => web/static}/js/menu.js | 0 web/templates/alt-design.html | 144 ++++++++++++++++++ web/templates/index.html | 22 +++ .../templates}/legal/imprint.html | 0 .../templates}/legal/privacy.html | 0 {templates => web/templates}/legal/terms.html | 21 ++- web/templates/novacord.html | 42 +++++ {templates => web/templates}/panel.html | 0 38 files changed, 420 insertions(+), 83 deletions(-) delete mode 100644 app.py create mode 100644 config/emojis.txt create mode 100755 screen.sh delete mode 100644 static/css/base.css.map delete mode 100644 static/css/home.css.map delete mode 100644 static/css/input.css.map delete mode 100644 templates/index.html create mode 100644 web/__main__.py create mode 100644 web/app.py rename {static => web/static}/css/_vars.sass (81%) rename {static => web/static}/css/base.css (72%) create mode 100644 web/static/css/base.css.map rename {static => web/static}/css/base.sass (71%) rename {static => web/static}/css/footer.css (100%) rename {static => web/static}/css/footer.css.map (55%) rename {static => web/static}/css/footer.sass (100%) rename {static => web/static}/css/home.css (86%) create mode 100644 web/static/css/home.css.map rename {static => web/static}/css/home.sass (85%) rename {static => web/static}/css/input.css (97%) create mode 100644 web/static/css/input.css.map rename {static => web/static}/css/input.sass (97%) rename {static => web/static}/css/navbar.css (100%) rename {static => web/static}/css/navbar.css.map (88%) rename {static => web/static}/css/navbar.sass (100%) rename {static => web/static}/ext/css/prism.css (96%) rename {static => web/static}/img/banner.png (100%) rename {static => web/static}/img/fav.ico (100%) rename {static => web/static}/img/icon.png (100%) rename {static => web/static}/js/menu.js (100%) create mode 100644 web/templates/alt-design.html create mode 100644 web/templates/index.html rename {templates => web/templates}/legal/imprint.html (100%) rename {templates => web/templates}/legal/privacy.html (100%) rename {templates => web/templates}/legal/terms.html (91%) create mode 100644 web/templates/novacord.html rename {templates => web/templates}/panel.html (100%) diff --git a/.gitignore b/.gitignore index 68bc17f..444c29d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +!.gitkeep + +data/ + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/app.py b/app.py deleted file mode 100644 index 0ebd65b..0000000 --- a/app.py +++ /dev/null @@ -1,42 +0,0 @@ -import os -import flask -import logging - -from dotenv import load_dotenv - -load_dotenv() - - -log = logging.getLogger('werkzeug') -log.disabled = True - -def create_app() -> flask.Flask: - app = flask.Flask(__name__) - - @app.context_processor - def inject_variables(): - return { - 'contact_email': os.getenv('CONTACT_EMAIL') - } - - @app.route('/') - def index(): - return flask.render_template('index.html') - - - @app.route('/panel') - def panel(): - return flask.render_template('panel.html') - - @app.route('/favicon.ico') - def favicon(): - return flask.send_file('static/img/fav.ico', mimetype='image/vnd.microsoft.icon') - - @app.route('/legal/') - def legal_site(subpath): - return flask.render_template(f'legal/{subpath}.html') - - return app - -if __name__ == '__main__': - create_app().run(debug=True, use_evalex=False, port=2323, host='0.0.0.0', threaded=True) diff --git a/config/emojis.txt b/config/emojis.txt new file mode 100644 index 0000000..b3f65a9 --- /dev/null +++ b/config/emojis.txt @@ -0,0 +1 @@ +🥇🥈🥉📒📕📗📘📙💩👻💀👽👾🤖🎃💛💚💙💜💔🐶🐱🐭🐹🐰🦊🐻🐼🐨🐯🦁🐮🐷🐽🐸🐵🙊🙉🙊🐒🐔🐧🐦🐤🐣🐥🦆🦅🦉🦇🐺🐗🐴🦄🐝🐛🦋🐌🐚🐞🐢🐍🦎🦂🦀🦑🐙🦐🐠🐟🐡🐬🦈🐳🐋🐊🐆🐅🐂🐄🦌🐪🐫🐘🦏🦍🐎🐖🐐🐏🐑🐕🐩🐈🐓🦃🐇🐁🐀🐾🐉🐲🌵🎄🌲🌳🌴🌱🌿🍀🎍🎋🍃🍂🍁🍄🌾💐🌷🌹🥀🌻🌼🌸🌺🌎🌍🌏🌕🌖🌗🌘🌑🌒🌓🌔🌚🌝🌞🌛🌜🌙💫⭐️🌟✨🔥💥⛅️🌈⛄️💨🌪🌊💧💦🍏🍎🍐🍊🍋🍌🍉🍇🍓🍈🍒🍑🍍🥝🥑🍅🍆🥒🥕🌽🥔🍠🌰🥜🍯🥐🍞🥖🧀🥚🍳🥓🥞🍤🍗🍖🍕🌭🍔🍟🥙🌮🌯🥗🥘🍝🍜🍲🍥🍣🍱🍛🍚🍙🍘🍢🍡🍧🍨🍦🍰🎂🍮🍭🍬🍫🍿🍩🍪🥛🍼🍵🍶🍺🍻🥂🍷🥃🍸🍹🍾🥄🍴⚽️🏀🏈⚾️🎾🏐🏉🎱🏓🏸🥅🏒🏑🏏⛳️🏹🎣🥊🥋 \ No newline at end of file diff --git a/screen.sh b/screen.sh new file mode 100755 index 0000000..e6452e0 --- /dev/null +++ b/screen.sh @@ -0,0 +1 @@ +screen -S nova-web python web #uvicorn app:production --host 0.0.0.0 --port 2323 --access-log --use-colors --no-server-header --limit-max-requests 666 \ No newline at end of file diff --git a/static/css/base.css.map b/static/css/base.css.map deleted file mode 100644 index 57599a7..0000000 --- a/static/css/base.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["base.sass","base.css","_vars.sass"],"names":[],"mappings":"AACQ,kFAAA;AAER;EACI,uBAAA;ACDJ;;ADGA;EACI,yBENS;ADMb;;ADEA;EACI,gBEKS;EFJT,cAAA;ACCJ;;ADCA;EACI,sBAAA;EACA,YAAA;EACA,cEhBG;EFiBH,gCAAA;ACEJ;;ADAA;EACI,qBAAA;ACGJ;;ADAI;EACI,gBAAA;EACA,iBAAA;EACA,+BAAA;ACGR;;ADAI;EACI,mBAAA;ACGR;;ADDA;EACI,0BAAA;EACA,8BE7BM;EF8BN,0BAAA;EACA,8BAAA;EAEA,gBAAA;ACGJ;ADDI;EACI,4BAAA;EACA,4CEnCO;ADsCf;;ADDA;EACI,YAAA;ACIJ;;ADFA;EACI,cAAA;EACA,eAAA;ACKJ;;ADHA;EACI,cEpDG;EFqDH,mBEhDM;EFiDN,gBAAA;EACA,kBAAA;ACMJ;;ADJA;EACI,cAAA;EACA,oBAAA;EACA,8BAAA;EACA,YAAA;EACA,mBE5DQ;ADmEZ;ADLI;EACI,0BEtDD;AD6DP;;ADLA;EACI,8CAAA;ACQJ;;ADNA;EACI,iBAAA;ACSJ;;ADPA;EAEI,aAAA;ACSJ;;ADPA;EACI,gFAAA;EACA,6BAAA;EACA,oCAAA;ACUJ;;ADRA;EACI;IACI,cAAA;ECWN;AACF","file":"base.css","sourcesContent":["@import '_vars'\n@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700&display=swap')\n\nhtml\n scroll-behavior: smooth\n\nbody\n background-color: $background\n\nnav, main, footer\n max-width: $main-width\n margin: 0 auto\n\n*, *::before, *::after\n box-sizing: border-box\n border: none\n color: $text\n font-family: 'Inter', sans-serif\n\na\n text-decoration: none\n\nh1, h2, h3\n &, *\n font-weight: 700\n line-height: 3rem\n font-family: 'Syne', sans-serif\n\nh3\n &, *\n line-height: 1.5rem\n\nmain a\n text-decoration: underline\n text-decoration-color: $primary\n text-underline-offset: 2px\n text-decoration-thickness: 5px\n\n transition: 0.2s\n\n &:hover\n text-decoration-thickness: 0\n background: $primary-glow\n\nmain p\n opacity: 0.9\n\nimg\n display: block\n max-width: 100%\n\nmark\n color: $text\n background: $primary\n padding: 5px 7px\n border-radius: 5px\n\nblockquote\n margin-left: 0\n padding: 0.6rem 1rem\n border-left: 5px solid $accent\n opacity: 0.8\n background: $secondary\n\n &.warning\n border-left-color: $warn\n\ncode\n font-family: 'Courier New', Courier, monospace\n\np, p *, main ul\n line-height: 32px\n\n:focus:not(:focus-visible)\n\n outline: none\n\n.special-gradient\n background: linear-gradient(83deg, rgba(244,90,136,1) 7%, rgba(40,170,240,1) 100%)\n -webkit-background-clip: text\n -webkit-text-fill-color: transparent\n\n@media (max-width: 900px)\n body\n margin: 0 2rem\n","@import url(\"https://fonts.googleapis.com/css2?family=Syne:wght@700&display=swap\");\nhtml {\n scroll-behavior: smooth;\n}\n\nbody {\n background-color: #03060d;\n}\n\nnav, main, footer {\n max-width: 800px;\n margin: 0 auto;\n}\n\n*, *::before, *::after {\n box-sizing: border-box;\n border: none;\n color: #f3f3f3;\n font-family: \"Inter\", sans-serif;\n}\n\na {\n text-decoration: none;\n}\n\nh1, h1 *, h2, h2 *, h3, h3 * {\n font-weight: 700;\n line-height: 3rem;\n font-family: \"Syne\", sans-serif;\n}\n\nh3, h3 * {\n line-height: 1.5rem;\n}\n\nmain a {\n text-decoration: underline;\n text-decoration-color: #b53d61;\n text-underline-offset: 2px;\n text-decoration-thickness: 5px;\n transition: 0.2s;\n}\nmain a:hover {\n text-decoration-thickness: 0;\n background: rgba(244, 90, 136, 0.3803921569);\n}\n\nmain p {\n opacity: 0.9;\n}\n\nimg {\n display: block;\n max-width: 100%;\n}\n\nmark {\n color: #f3f3f3;\n background: #b53d61;\n padding: 5px 7px;\n border-radius: 5px;\n}\n\nblockquote {\n margin-left: 0;\n padding: 0.6rem 1rem;\n border-left: 5px solid #28aaf0;\n opacity: 0.8;\n background: #252a38;\n}\nblockquote.warning {\n border-left-color: #f09928;\n}\n\ncode {\n font-family: \"Courier New\", Courier, monospace;\n}\n\np, p *, main ul {\n line-height: 32px;\n}\n\n:focus:not(:focus-visible) {\n outline: none;\n}\n\n.special-gradient {\n background: linear-gradient(83deg, rgb(244, 90, 136) 7%, rgb(40, 170, 240) 100%);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n\n@media (max-width: 900px) {\n body {\n margin: 0 2rem;\n }\n}","$text: #f3f3f3\n$background: #03060d\n$secondary: #252a38\n$border: #161d2bb0\n\n$primary: #b53d61\n$primary-light: #f45a88\n$primary-glow: #f45a8861\n$primary-soft: #f79ab624\n$accent: #28aaf0\n\n$warn: #f09928\n\n$edge: 5px\n\n$main-width: 800px\n$more-width: 1000px\n"]} \ No newline at end of file diff --git a/static/css/home.css.map b/static/css/home.css.map deleted file mode 100644 index ef97966..0000000 --- a/static/css/home.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["home.sass","_vars.sass","home.css"],"names":[],"mappings":"AAEA;EACI,gBCYS;EDXT,cAAA;EACA,eAAA;AEDJ;AFGI;EACI,iBAAA;AEDR;;AFGA;EACI;IACI,eAAA;EEAN;EFEM;IACI,iBAAA;EEAV;AACF","file":"home.css","sourcesContent":["@import '_vars'\n\nheader\n max-width: $main-width\n margin: 0 auto\n font-size: 40px\n\n h1\n line-height: 4rem\n\n@media (max-width: 800px)\n header\n font-size: 26px\n \n h1\n line-height: 3rem\n","$text: #f3f3f3\n$background: #03060d\n$secondary: #252a38\n$border: #161d2bb0\n\n$primary: #b53d61\n$primary-light: #f45a88\n$primary-glow: #f45a8861\n$primary-soft: #f79ab624\n$accent: #28aaf0\n\n$warn: #f09928\n\n$edge: 5px\n\n$main-width: 800px\n$more-width: 1000px\n","header {\n max-width: 800px;\n margin: 0 auto;\n font-size: 40px;\n}\nheader h1 {\n line-height: 4rem;\n}\n\n@media (max-width: 800px) {\n header {\n font-size: 26px;\n }\n header h1 {\n line-height: 3rem;\n }\n}"]} \ No newline at end of file diff --git a/static/css/input.css.map b/static/css/input.css.map deleted file mode 100644 index a00a69d..0000000 --- a/static/css/input.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["input.sass","_vars.sass","input.css"],"names":[],"mappings":"AAEA;EACI,cAAA;EACA,eAAA;EACA,eAAA;EACA,kBCOG;EDNH,sBAAA;EACA,gBAAA;EAEA,cCVG;EDWH,mBCNM;EDQN,2BAAA;AEHJ;AFKI;EACI,uBAAA;AEHR;AFKI;EACI,qDAAA;AEHR;AFKQ;EACI,4BAAA;AEHZ;AFKI;EACI,cCzBD;ED0BC,mBCxBI;EDyBJ,gDAAA;AEHR;AFKI;EACI,YAAA;EACA,qBAAA;EACA,sBAAA;EACA,mBAAA;AEHR;;AFKA;EACI,WAAA;EACA,eAAA;EACA,kBCzBG;ED0BH,oBAAA;EAEA,cCzCG;ED0CH,mBCxCQ;EDyCR,yBAAA;AEHJ;AFKI;EACI,aAAA;AEHR;;AFKA;EACI,yBAAA;AEFJ","file":"input.css","sourcesContent":["@import '_vars'\n\nbutton\n line-height: 2\n cursor: pointer\n font-size: 16px\n border-radius: $edge\n padding: 0.7rem 1.5rem\n font-weight: 600\n\n color: $text\n background: $primary\n\n transition: box-shadow 0.2s\n\n &:hover\n filter: brightness(1.2)\n\n &.special\n box-shadow: 0 0 20px $primary-glow\n\n &:hover\n box-shadow: 0 0 20px $primary\n\n &.secondary\n color: $text\n background: $secondary\n border: 1px solid $border\n\n svg, img\n height: 24px\n display: inline-block\n vertical-align: middle\n filter: invert(180)\n\ninput:not([type=\"checkbox\"]):not([type=\"radio\"])\n width: 100%\n font-size: 18px\n border-radius: $edge\n padding: 0.5rem 1rem\n\n color: $text\n background: $secondary\n border: 1px solid $primary\n\n &:focus\n outline: none\n\ninput[type=\"radio\"]\n filter: hue-rotate(50deg)\n","$text: #f3f3f3\n$background: #03060d\n$secondary: #252a38\n$border: #161d2bb0\n\n$primary: #b53d61\n$primary-light: #f45a88\n$primary-glow: #f45a8861\n$primary-soft: #f79ab624\n$accent: #28aaf0\n\n$warn: #f09928\n\n$edge: 5px\n\n$main-width: 800px\n$more-width: 1000px\n","button {\n line-height: 2;\n cursor: pointer;\n font-size: 16px;\n border-radius: 5px;\n padding: 0.7rem 1.5rem;\n font-weight: 600;\n color: #f3f3f3;\n background: #b53d61;\n transition: box-shadow 0.2s;\n}\nbutton:hover {\n filter: brightness(1.2);\n}\nbutton.special {\n box-shadow: 0 0 20px rgba(244, 90, 136, 0.3803921569);\n}\nbutton.special:hover {\n box-shadow: 0 0 20px #b53d61;\n}\nbutton.secondary {\n color: #f3f3f3;\n background: #252a38;\n border: 1px solid rgba(22, 29, 43, 0.6901960784);\n}\nbutton svg, button img {\n height: 24px;\n display: inline-block;\n vertical-align: middle;\n filter: invert(180);\n}\n\ninput:not([type=checkbox]):not([type=radio]) {\n width: 100%;\n font-size: 18px;\n border-radius: 5px;\n padding: 0.5rem 1rem;\n color: #f3f3f3;\n background: #252a38;\n border: 1px solid #b53d61;\n}\ninput:not([type=checkbox]):not([type=radio]):focus {\n outline: none;\n}\n\ninput[type=radio] {\n filter: hue-rotate(50deg);\n}"]} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html deleted file mode 100644 index 270ea06..0000000 --- a/templates/index.html +++ /dev/null @@ -1,23 +0,0 @@ -{% include 'parts/begin.html' %} - - -
-

Free Generative AI for Everyone

-

Make AI Open Again

- - - - - - -
-
- -
-{% include 'parts/end.html' %} diff --git a/web/__main__.py b/web/__main__.py new file mode 100644 index 0000000..723a6fc --- /dev/null +++ b/web/__main__.py @@ -0,0 +1,20 @@ +try: + from cheroot.wsgi import Server as WSGIServer, PathInfoDispatcher +except ImportError: + from cherrypy.wsgiserver import CherryPyWSGIServer as WSGIServer, WSGIPathInfoDispatcher as PathInfoDispatcher + +from app import production + +d = PathInfoDispatcher({'/': production}) +server = WSGIServer(('0.0.0.0', 2323), d) + +print('Ready...') + +try: + print('Starting...') + print() + print('* http://localhost:2323') + print('* https://nova-oss.com') + server.start() +except KeyboardInterrupt: + server.stop() diff --git a/web/app.py b/web/app.py new file mode 100644 index 0000000..9b37947 --- /dev/null +++ b/web/app.py @@ -0,0 +1,92 @@ +import os +import json +import flask +import random +import secrets +import logging + +from dotenv import load_dotenv +from werkzeug.middleware.proxy_fix import ProxyFix + +load_dotenv() + +log = logging.getLogger('werkzeug') +log.disabled = True + +def create_app() -> flask.Flask: + app = flask.Flask(__name__) + app.wsgi_app = ProxyFix( + app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_prefix=1 + ) + + @app.context_processor + def inject_variables(): + return { + 'contact_email': os.getenv('CONTACT_EMAIL') + } + + @app.route('/') + def index(): + return flask.render_template('index.html') + + @app.route('/alt-design') + def alt_design(): + return flask.render_template('alt-design.html') + + @app.route('/panel') + def panel(): + return flask.render_template('panel.html') + + @app.route('/novacord') + def novacord(): + return flask.render_template('novacord.html') + + @app.route('/favicon.ico') + def favicon(): + return flask.send_file('static/img/fav.ico', mimetype='image/vnd.microsoft.icon') + + @app.route('/legal/') + def legal_site(subpath): + emoji = None + if subpath == 'terms': + emoji = json.load(open('data/tos.json', encoding='utf8')).get(flask.request.args.get('verify')) + + return flask.render_template(f'legal/{subpath}.html', verify=emoji) + + @app.route('/api/tos-verification', methods=['POST']) + def tos_verification_api(): + if not flask.request.headers.get('Authorization') == os.getenv('TOS_VERIFICATION_KEY'): + return 'Unauthorized', 401 + + code = secrets.token_urlsafe(6) + emoji = random.choice(open('config/emojis.txt', encoding='utf8').read()) + + if not os.path.exists('data/tos.json'): + open('data/tos.json', 'w', encoding='utf8').write('{}') + + data = json.load(open('data/tos.json', encoding='utf8')) + data[code] = emoji + json.dump(data, open('data/tos.json', 'w', encoding='utf8')) + + return { + 'code': code, + 'emoji': emoji + } + + @app.route('/api/tos-verification/', methods=['DELETE']) + def tos_verification_api_delete(code): + if not flask.request.headers.get('Authorization') == os.getenv('TOS_VERIFICATION_KEY'): + return 'Unauthorized', 401 + + data = json.load(open('data/tos.json', encoding='utf8')) + del data[code] + json.dump(secrets, open('data/tos.json', 'w', encoding='utf8')) + + return 'Removed.', 204 + + return app + +production = create_app() + +if __name__ == '__main__': + create_app().run(debug=True, use_evalex=False, port=2323, host='0.0.0.0', threaded=True) diff --git a/static/css/_vars.sass b/web/static/css/_vars.sass similarity index 81% rename from static/css/_vars.sass rename to web/static/css/_vars.sass index 4a12b2c..688e691 100644 --- a/static/css/_vars.sass +++ b/web/static/css/_vars.sass @@ -1,6 +1,7 @@ $text: #f3f3f3 $background: #03060d $secondary: #252a38 +$secondary-dark: #0e0e0e $border: #161d2bb0 $primary: #b53d61 @@ -9,7 +10,9 @@ $primary-glow: #f45a8861 $primary-soft: #f79ab624 $accent: #28aaf0 +$error: #ef3628 $warn: #f09928 +$success: #28ef6b $edge: 5px diff --git a/static/css/base.css b/web/static/css/base.css similarity index 72% rename from static/css/base.css rename to web/static/css/base.css index 5a3118c..5db892b 100644 --- a/static/css/base.css +++ b/web/static/css/base.css @@ -29,6 +29,10 @@ h1, h1 *, h2, h2 *, h3, h3 * { font-family: "Syne", sans-serif; } +h2, h2 * { + line-height: 2.2rem; +} + h3, h3 * { line-height: 1.5rem; } @@ -61,22 +65,47 @@ mark { border-radius: 5px; } +kbd { + font-family: "Courier New", Courier, monospace; + font-weight: 600; + background: #252a38; + border-radius: 5px; + padding: 0.2rem 0.4rem; + border-bottom: 3px solid #0e0e0e; +} + blockquote { margin-left: 0; - padding: 0.6rem 1rem; + padding: 1rem 1rem; border-left: 5px solid #28aaf0; opacity: 0.8; background: #252a38; + width: 100%; + border-radius: 5px; +} +blockquote.error { + border-left-color: #ef3628; } blockquote.warning { border-left-color: #f09928; } +blockquote.success { + border-left-color: #28ef6b; +} code { font-family: "Courier New", Courier, monospace; + font-weight: 600; + background: #252a38; + border-radius: 5px; + padding: 0.2rem 0.4rem; } -p, p *, main ul { +pre code *, pre code { + font-weight: normal; +} + +p, p *, ol, ul, li { line-height: 32px; } @@ -93,5 +122,6 @@ p, p *, main ul { @media (max-width: 900px) { body { margin: 0 2rem; + margin-top: 2rem; } }/*# sourceMappingURL=base.css.map */ \ No newline at end of file diff --git a/web/static/css/base.css.map b/web/static/css/base.css.map new file mode 100644 index 0000000..00446c4 --- /dev/null +++ b/web/static/css/base.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["base.sass","base.css","_vars.sass"],"names":[],"mappings":"AACQ,kFAAA;AAER;EACI,uBAAA;ACDJ;;ADGA;EACI,yBENS;ADMb;;ADEA;EACI,gBEQS;EFPT,cAAA;ACCJ;;ADCA;EACI,sBAAA;EACA,YAAA;EACA,cEhBG;EFiBH,gCAAA;ACEJ;;ADAA;EACI,qBAAA;ACGJ;;ADAI;EACI,gBAAA;EACA,iBAAA;EACA,+BAAA;ACGR;;ADAI;EACI,mBAAA;ACGR;;ADAI;EACI,mBAAA;ACGR;;ADDA;EACI,0BAAA;EACA,8BEhCM;EFiCN,0BAAA;EACA,8BAAA;EAEA,gBAAA;ACGJ;ADDI;EACI,4BAAA;EACA,4CEtCO;ADyCf;;ADDA;EACI,YAAA;ACIJ;;ADFA;EACI,cAAA;EACA,eAAA;ACKJ;;ADHA;EACI,cExDG;EFyDH,mBEnDM;EFoDN,gBAAA;EACA,kBAAA;ACMJ;;ADJA;EACI,8CAAA;EACA,gBAAA;EACA,mBE9DQ;EF+DR,kBEjDG;EFkDH,sBAAA;EACA,gCAAA;ACOJ;;ADLA;EACI,cAAA;EACA,kBAAA;EACA,8BAAA;EACA,YAAA;EACA,mBExEQ;EFyER,WAAA;EACA,kBE5DG;ADoEP;ADNI;EACI,0BEnEA;AD2ER;ADPI;EACI,0BEpED;AD6EP;ADRI;EACI,0BErEE;AD+EV;;ADRA;EACI,8CAAA;EACA,gBAAA;EACA,mBEtFQ;EFuFR,kBEzEG;EF0EH,sBAAA;ACWJ;;ADRI;EACI,mBAAA;ACWR;;ADTA;EACI,iBAAA;ACYJ;;ADVA;EAEI,aAAA;ACYJ;;ADVA;EACI,gFAAA;EACA,6BAAA;EACA,oCAAA;ACaJ;;ADXA;EACI;IACI,cAAA;IACA,gBAAA;ECcN;AACF","file":"base.css","sourcesContent":["@import '_vars'\n@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700&display=swap')\n\nhtml\n scroll-behavior: smooth\n\nbody\n background-color: $background\n\nnav, main, footer\n max-width: $main-width\n margin: 0 auto\n\n*, *::before, *::after\n box-sizing: border-box\n border: none\n color: $text\n font-family: 'Inter', sans-serif\n\na\n text-decoration: none\n\nh1, h2, h3\n &, *\n font-weight: 700\n line-height: 3rem\n font-family: 'Syne', sans-serif\n\nh2\n &, *\n line-height: 2.2rem\n\nh3\n &, *\n line-height: 1.5rem\n\nmain a\n text-decoration: underline\n text-decoration-color: $primary\n text-underline-offset: 2px\n text-decoration-thickness: 5px\n\n transition: 0.2s\n\n &:hover\n text-decoration-thickness: 0\n background: $primary-glow\n\nmain p\n opacity: 0.9\n\nimg\n display: block\n max-width: 100%\n\nmark\n color: $text\n background: $primary\n padding: 5px 7px\n border-radius: 5px\n\nkbd\n font-family: 'Courier New', Courier, monospace\n font-weight: 600\n background: $secondary\n border-radius: $edge\n padding: 0.2rem 0.4rem\n border-bottom: 3px solid $secondary-dark\n\nblockquote\n margin-left: 0\n padding: 1rem 1rem\n border-left: 5px solid $accent\n opacity: 0.8\n background: $secondary\n width: 100%\n border-radius: $edge\n\n &.error\n border-left-color: $error\n &.warning\n border-left-color: $warn\n &.success\n border-left-color: $success\n\ncode\n font-family: 'Courier New', Courier, monospace\n font-weight: 600\n background: $secondary\n border-radius: $edge\n padding: 0.2rem 0.4rem\n\npre code\n *, &\n font-weight: normal\n\np, p *, ol, ul, li\n line-height: 32px\n\n:focus:not(:focus-visible)\n\n outline: none\n\n.special-gradient\n background: linear-gradient(83deg, rgba(244,90,136,1) 7%, rgba(40,170,240,1) 100%)\n -webkit-background-clip: text\n -webkit-text-fill-color: transparent\n\n@media (max-width: 900px)\n body\n margin: 0 2rem\n margin-top: 2rem\n","@import url(\"https://fonts.googleapis.com/css2?family=Syne:wght@700&display=swap\");\nhtml {\n scroll-behavior: smooth;\n}\n\nbody {\n background-color: #03060d;\n}\n\nnav, main, footer {\n max-width: 800px;\n margin: 0 auto;\n}\n\n*, *::before, *::after {\n box-sizing: border-box;\n border: none;\n color: #f3f3f3;\n font-family: \"Inter\", sans-serif;\n}\n\na {\n text-decoration: none;\n}\n\nh1, h1 *, h2, h2 *, h3, h3 * {\n font-weight: 700;\n line-height: 3rem;\n font-family: \"Syne\", sans-serif;\n}\n\nh2, h2 * {\n line-height: 2.2rem;\n}\n\nh3, h3 * {\n line-height: 1.5rem;\n}\n\nmain a {\n text-decoration: underline;\n text-decoration-color: #b53d61;\n text-underline-offset: 2px;\n text-decoration-thickness: 5px;\n transition: 0.2s;\n}\nmain a:hover {\n text-decoration-thickness: 0;\n background: rgba(244, 90, 136, 0.3803921569);\n}\n\nmain p {\n opacity: 0.9;\n}\n\nimg {\n display: block;\n max-width: 100%;\n}\n\nmark {\n color: #f3f3f3;\n background: #b53d61;\n padding: 5px 7px;\n border-radius: 5px;\n}\n\nkbd {\n font-family: \"Courier New\", Courier, monospace;\n font-weight: 600;\n background: #252a38;\n border-radius: 5px;\n padding: 0.2rem 0.4rem;\n border-bottom: 3px solid #0e0e0e;\n}\n\nblockquote {\n margin-left: 0;\n padding: 1rem 1rem;\n border-left: 5px solid #28aaf0;\n opacity: 0.8;\n background: #252a38;\n width: 100%;\n border-radius: 5px;\n}\nblockquote.error {\n border-left-color: #ef3628;\n}\nblockquote.warning {\n border-left-color: #f09928;\n}\nblockquote.success {\n border-left-color: #28ef6b;\n}\n\ncode {\n font-family: \"Courier New\", Courier, monospace;\n font-weight: 600;\n background: #252a38;\n border-radius: 5px;\n padding: 0.2rem 0.4rem;\n}\n\npre code *, pre code {\n font-weight: normal;\n}\n\np, p *, ol, ul, li {\n line-height: 32px;\n}\n\n:focus:not(:focus-visible) {\n outline: none;\n}\n\n.special-gradient {\n background: linear-gradient(83deg, rgb(244, 90, 136) 7%, rgb(40, 170, 240) 100%);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n\n@media (max-width: 900px) {\n body {\n margin: 0 2rem;\n margin-top: 2rem;\n }\n}","$text: #f3f3f3\n$background: #03060d\n$secondary: #252a38\n$secondary-dark: #0e0e0e\n$border: #161d2bb0\n\n$primary: #b53d61\n$primary-light: #f45a88\n$primary-glow: #f45a8861\n$primary-soft: #f79ab624\n$accent: #28aaf0\n\n$error: #ef3628\n$warn: #f09928\n$success: #28ef6b\n\n$edge: 5px\n\n$main-width: 800px\n$more-width: 1000px\n"]} \ No newline at end of file diff --git a/static/css/base.sass b/web/static/css/base.sass similarity index 71% rename from static/css/base.sass rename to web/static/css/base.sass index a4249c4..2c61126 100644 --- a/static/css/base.sass +++ b/web/static/css/base.sass @@ -26,6 +26,10 @@ h1, h2, h3 line-height: 3rem font-family: 'Syne', sans-serif +h2 + &, * + line-height: 2.2rem + h3 &, * line-height: 1.5rem @@ -55,20 +59,42 @@ mark padding: 5px 7px border-radius: 5px +kbd + font-family: 'Courier New', Courier, monospace + font-weight: 600 + background: $secondary + border-radius: $edge + padding: 0.2rem 0.4rem + border-bottom: 3px solid $secondary-dark + blockquote margin-left: 0 - padding: 0.6rem 1rem + padding: 1rem 1rem border-left: 5px solid $accent opacity: 0.8 background: $secondary + width: 100% + border-radius: $edge + &.error + border-left-color: $error &.warning border-left-color: $warn + &.success + border-left-color: $success code font-family: 'Courier New', Courier, monospace + font-weight: 600 + background: $secondary + border-radius: $edge + padding: 0.2rem 0.4rem -p, p *, main ul +pre code + *, & + font-weight: normal + +p, p *, ol, ul, li line-height: 32px :focus:not(:focus-visible) @@ -83,3 +109,4 @@ p, p *, main ul @media (max-width: 900px) body margin: 0 2rem + margin-top: 2rem diff --git a/static/css/footer.css b/web/static/css/footer.css similarity index 100% rename from static/css/footer.css rename to web/static/css/footer.css diff --git a/static/css/footer.css.map b/web/static/css/footer.css.map similarity index 55% rename from static/css/footer.css.map rename to web/static/css/footer.css.map index f4f55a3..69c2f1b 100644 --- a/static/css/footer.css.map +++ b/web/static/css/footer.css.map @@ -1 +1 @@ -{"version":3,"sources":["footer.sass","_vars.sass","footer.css"],"names":[],"mappings":"AAEA;EACI,iBAAA;EACA,iBAAA;EACA,gBCUS;ACXb;AFGI;EACI,iBCQK;ACTb;AFGI;EACI,aAAA;EACA,sBAAA;EAEA,mBAAA;AEFR;AFIQ;EACI,oBAAA;EACA,qBAAA;AEFZ;AFIY;EACI,eAAA;EACA,gBAAA;AEFhB;AFIY;EACI,UAAA;EACA,eAAA;EACA,gBAAA;EACA,cAAA;EACA,mBAAA;AEFhB;AFIY;EACI,uBAAA;EAAA,kBAAA;EACA,eAAA;EACA,YAAA;EACA,cAAA;EACA,qBAAA;EACA,mBAAA;AEFhB;AFIgB;EACI,YAAA;AEFpB;AFII;EACI,YAAA;AEFR;;AFIA;EAEQ;IACI,mBAAA;IACA,qCAAA;EEFV;EFIU;IACI,mBAAA;EEFd;AACF;AFGA;EAEQ;IACI,0BAAA;EEFV;AACF","file":"footer.css","sourcesContent":["@import '_vars'\n\nfooter\n padding-top: 4rem\n margin: 4rem auto\n max-width: $main-width\n\n &.wide\n max-width: $more-width\n\n div.rows\n display: grid\n grid-auto-flow: column\n // justify-content: space-between\n margin-bottom: 2rem\n\n div.row\n margin-right: 1.5rem\n margin-bottom: 0.5rem\n\n &:last-child\n margin-right: 0\n margin-bottom: 0\n\n h2\n opacity: 1\n font-size: 1rem\n font-weight: 500\n margin: 1rem 0\n line-height: normal\n\n a\n width: fit-content\n font-size: 14px\n opacity: 0.6\n display: block\n text-decoration: none\n margin-bottom: 1rem\n\n &:hover\n opacity: 0.8\n\n p\n opacity: 0.7\n\n@media (max-width: 1000px)\n footer\n div.rows\n grid-auto-flow: row\n grid-template-columns: repeat(2, 1fr)\n\n div.row\n margin-bottom: 1rem\n\n@media (max-width: 600px)\n footer\n div.rows\n grid-template-columns: 1fr\n","$text: #f3f3f3\n$background: #03060d\n$secondary: #252a38\n$border: #161d2bb0\n\n$primary: #b53d61\n$primary-light: #f45a88\n$primary-glow: #f45a8861\n$primary-soft: #f79ab624\n$accent: #28aaf0\n\n$warn: #f09928\n\n$edge: 5px\n\n$main-width: 800px\n$more-width: 1000px\n","footer {\n padding-top: 4rem;\n margin: 4rem auto;\n max-width: 800px;\n}\nfooter.wide {\n max-width: 1000px;\n}\nfooter div.rows {\n display: grid;\n grid-auto-flow: column;\n margin-bottom: 2rem;\n}\nfooter div.rows div.row {\n margin-right: 1.5rem;\n margin-bottom: 0.5rem;\n}\nfooter div.rows div.row:last-child {\n margin-right: 0;\n margin-bottom: 0;\n}\nfooter div.rows div.row h2 {\n opacity: 1;\n font-size: 1rem;\n font-weight: 500;\n margin: 1rem 0;\n line-height: normal;\n}\nfooter div.rows div.row a {\n width: fit-content;\n font-size: 14px;\n opacity: 0.6;\n display: block;\n text-decoration: none;\n margin-bottom: 1rem;\n}\nfooter div.rows div.row a:hover {\n opacity: 0.8;\n}\nfooter p {\n opacity: 0.7;\n}\n\n@media (max-width: 1000px) {\n footer div.rows {\n grid-auto-flow: row;\n grid-template-columns: repeat(2, 1fr);\n }\n footer div.rows div.row {\n margin-bottom: 1rem;\n }\n}\n@media (max-width: 600px) {\n footer div.rows {\n grid-template-columns: 1fr;\n }\n}"]} \ No newline at end of file +{"version":3,"sources":["footer.sass","_vars.sass","footer.css"],"names":[],"mappings":"AAEA;EACI,iBAAA;EACA,iBAAA;EACA,gBCaS;ACdb;AFGI;EACI,iBCWK;ACZb;AFGI;EACI,aAAA;EACA,sBAAA;EAEA,mBAAA;AEFR;AFIQ;EACI,oBAAA;EACA,qBAAA;AEFZ;AFIY;EACI,eAAA;EACA,gBAAA;AEFhB;AFIY;EACI,UAAA;EACA,eAAA;EACA,gBAAA;EACA,cAAA;EACA,mBAAA;AEFhB;AFIY;EACI,uBAAA;EAAA,kBAAA;EACA,eAAA;EACA,YAAA;EACA,cAAA;EACA,qBAAA;EACA,mBAAA;AEFhB;AFIgB;EACI,YAAA;AEFpB;AFII;EACI,YAAA;AEFR;;AFIA;EAEQ;IACI,mBAAA;IACA,qCAAA;EEFV;EFIU;IACI,mBAAA;EEFd;AACF;AFGA;EAEQ;IACI,0BAAA;EEFV;AACF","file":"footer.css","sourcesContent":["@import '_vars'\n\nfooter\n padding-top: 4rem\n margin: 4rem auto\n max-width: $main-width\n\n &.wide\n max-width: $more-width\n\n div.rows\n display: grid\n grid-auto-flow: column\n // justify-content: space-between\n margin-bottom: 2rem\n\n div.row\n margin-right: 1.5rem\n margin-bottom: 0.5rem\n\n &:last-child\n margin-right: 0\n margin-bottom: 0\n\n h2\n opacity: 1\n font-size: 1rem\n font-weight: 500\n margin: 1rem 0\n line-height: normal\n\n a\n width: fit-content\n font-size: 14px\n opacity: 0.6\n display: block\n text-decoration: none\n margin-bottom: 1rem\n\n &:hover\n opacity: 0.8\n\n p\n opacity: 0.7\n\n@media (max-width: 1000px)\n footer\n div.rows\n grid-auto-flow: row\n grid-template-columns: repeat(2, 1fr)\n\n div.row\n margin-bottom: 1rem\n\n@media (max-width: 600px)\n footer\n div.rows\n grid-template-columns: 1fr\n","$text: #f3f3f3\n$background: #03060d\n$secondary: #252a38\n$secondary-dark: #0e0e0e\n$border: #161d2bb0\n\n$primary: #b53d61\n$primary-light: #f45a88\n$primary-glow: #f45a8861\n$primary-soft: #f79ab624\n$accent: #28aaf0\n\n$error: #ef3628\n$warn: #f09928\n$success: #28ef6b\n\n$edge: 5px\n\n$main-width: 800px\n$more-width: 1000px\n","footer {\n padding-top: 4rem;\n margin: 4rem auto;\n max-width: 800px;\n}\nfooter.wide {\n max-width: 1000px;\n}\nfooter div.rows {\n display: grid;\n grid-auto-flow: column;\n margin-bottom: 2rem;\n}\nfooter div.rows div.row {\n margin-right: 1.5rem;\n margin-bottom: 0.5rem;\n}\nfooter div.rows div.row:last-child {\n margin-right: 0;\n margin-bottom: 0;\n}\nfooter div.rows div.row h2 {\n opacity: 1;\n font-size: 1rem;\n font-weight: 500;\n margin: 1rem 0;\n line-height: normal;\n}\nfooter div.rows div.row a {\n width: fit-content;\n font-size: 14px;\n opacity: 0.6;\n display: block;\n text-decoration: none;\n margin-bottom: 1rem;\n}\nfooter div.rows div.row a:hover {\n opacity: 0.8;\n}\nfooter p {\n opacity: 0.7;\n}\n\n@media (max-width: 1000px) {\n footer div.rows {\n grid-auto-flow: row;\n grid-template-columns: repeat(2, 1fr);\n }\n footer div.rows div.row {\n margin-bottom: 1rem;\n }\n}\n@media (max-width: 600px) {\n footer div.rows {\n grid-template-columns: 1fr;\n }\n}"]} \ No newline at end of file diff --git a/static/css/footer.sass b/web/static/css/footer.sass similarity index 100% rename from static/css/footer.sass rename to web/static/css/footer.sass diff --git a/static/css/home.css b/web/static/css/home.css similarity index 86% rename from static/css/home.css rename to web/static/css/home.css index b65e6a3..0bc4fd0 100644 --- a/static/css/home.css +++ b/web/static/css/home.css @@ -14,4 +14,7 @@ header h1 { header h1 { line-height: 3rem; } + header h3 { + font-size: 28px; + } }/*# sourceMappingURL=home.css.map */ \ No newline at end of file diff --git a/web/static/css/home.css.map b/web/static/css/home.css.map new file mode 100644 index 0000000..284008d --- /dev/null +++ b/web/static/css/home.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["home.sass","_vars.sass","home.css"],"names":[],"mappings":"AAEA;EACI,gBCeS;EDdT,cAAA;EACA,eAAA;AEDJ;AFGI;EACI,iBAAA;AEDR;;AFGA;EACI;IACI,eAAA;EEAN;EFEM;IACI,iBAAA;EEAV;EFEM;IACI,eAAA;EEAV;AACF","file":"home.css","sourcesContent":["@import '_vars'\n\nheader\n max-width: $main-width\n margin: 0 auto\n font-size: 40px\n\n h1\n line-height: 4rem\n\n@media (max-width: 800px)\n header\n font-size: 26px\n \n h1\n line-height: 3rem\n\n h3\n font-size: 28px\n","$text: #f3f3f3\n$background: #03060d\n$secondary: #252a38\n$secondary-dark: #0e0e0e\n$border: #161d2bb0\n\n$primary: #b53d61\n$primary-light: #f45a88\n$primary-glow: #f45a8861\n$primary-soft: #f79ab624\n$accent: #28aaf0\n\n$error: #ef3628\n$warn: #f09928\n$success: #28ef6b\n\n$edge: 5px\n\n$main-width: 800px\n$more-width: 1000px\n","header {\n max-width: 800px;\n margin: 0 auto;\n font-size: 40px;\n}\nheader h1 {\n line-height: 4rem;\n}\n\n@media (max-width: 800px) {\n header {\n font-size: 26px;\n }\n header h1 {\n line-height: 3rem;\n }\n header h3 {\n font-size: 28px;\n }\n}"]} \ No newline at end of file diff --git a/static/css/home.sass b/web/static/css/home.sass similarity index 85% rename from static/css/home.sass rename to web/static/css/home.sass index 77edbee..9970ebc 100644 --- a/static/css/home.sass +++ b/web/static/css/home.sass @@ -14,3 +14,6 @@ header h1 line-height: 3rem + + h3 + font-size: 28px diff --git a/static/css/input.css b/web/static/css/input.css similarity index 97% rename from static/css/input.css rename to web/static/css/input.css index 7bc2404..a274cac 100644 --- a/static/css/input.css +++ b/web/static/css/input.css @@ -5,6 +5,7 @@ button { border-radius: 5px; padding: 0.7rem 1.5rem; font-weight: 600; + margin-bottom: 1rem; color: #f3f3f3; background: #b53d61; transition: box-shadow 0.2s; diff --git a/web/static/css/input.css.map b/web/static/css/input.css.map new file mode 100644 index 0000000..54df162 --- /dev/null +++ b/web/static/css/input.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["input.sass","_vars.sass","input.css"],"names":[],"mappings":"AAEA;EACI,cAAA;EACA,eAAA;EACA,eAAA;EACA,kBCUG;EDTH,sBAAA;EACA,gBAAA;EACA,mBAAA;EAEA,cCXG;EDYH,mBCNM;EDQN,2BAAA;AEHJ;AFKI;EACI,uBAAA;AEHR;AFKI;EACI,qDAAA;AEHR;AFKQ;EACI,4BAAA;AEHZ;AFKI;EACI,cC1BD;ED2BC,mBCzBI;ED0BJ,gDAAA;AEHR;AFKI;EACI,YAAA;EACA,qBAAA;EACA,sBAAA;EACA,mBAAA;AEHR;;AFKA;EACI,WAAA;EACA,eAAA;EACA,kBCvBG;EDwBH,oBAAA;EAEA,cC1CG;ED2CH,mBCzCQ;ED0CR,yBAAA;AEHJ;AFKI;EACI,aAAA;AEHR;;AFKA;EACI,yBAAA;AEFJ","file":"input.css","sourcesContent":["@import '_vars'\n\nbutton\n line-height: 2\n cursor: pointer\n font-size: 16px\n border-radius: $edge\n padding: 0.7rem 1.5rem\n font-weight: 600\n margin-bottom: 1rem\n\n color: $text\n background: $primary\n\n transition: box-shadow 0.2s\n\n &:hover\n filter: brightness(1.2)\n\n &.special\n box-shadow: 0 0 20px $primary-glow\n\n &:hover\n box-shadow: 0 0 20px $primary\n\n &.secondary\n color: $text\n background: $secondary\n border: 1px solid $border\n\n svg, img\n height: 24px\n display: inline-block\n vertical-align: middle\n filter: invert(180)\n\ninput:not([type=\"checkbox\"]):not([type=\"radio\"])\n width: 100%\n font-size: 18px\n border-radius: $edge\n padding: 0.5rem 1rem\n\n color: $text\n background: $secondary\n border: 1px solid $primary\n\n &:focus\n outline: none\n\ninput[type=\"radio\"]\n filter: hue-rotate(50deg)\n","$text: #f3f3f3\n$background: #03060d\n$secondary: #252a38\n$secondary-dark: #0e0e0e\n$border: #161d2bb0\n\n$primary: #b53d61\n$primary-light: #f45a88\n$primary-glow: #f45a8861\n$primary-soft: #f79ab624\n$accent: #28aaf0\n\n$error: #ef3628\n$warn: #f09928\n$success: #28ef6b\n\n$edge: 5px\n\n$main-width: 800px\n$more-width: 1000px\n","button {\n line-height: 2;\n cursor: pointer;\n font-size: 16px;\n border-radius: 5px;\n padding: 0.7rem 1.5rem;\n font-weight: 600;\n margin-bottom: 1rem;\n color: #f3f3f3;\n background: #b53d61;\n transition: box-shadow 0.2s;\n}\nbutton:hover {\n filter: brightness(1.2);\n}\nbutton.special {\n box-shadow: 0 0 20px rgba(244, 90, 136, 0.3803921569);\n}\nbutton.special:hover {\n box-shadow: 0 0 20px #b53d61;\n}\nbutton.secondary {\n color: #f3f3f3;\n background: #252a38;\n border: 1px solid rgba(22, 29, 43, 0.6901960784);\n}\nbutton svg, button img {\n height: 24px;\n display: inline-block;\n vertical-align: middle;\n filter: invert(180);\n}\n\ninput:not([type=checkbox]):not([type=radio]) {\n width: 100%;\n font-size: 18px;\n border-radius: 5px;\n padding: 0.5rem 1rem;\n color: #f3f3f3;\n background: #252a38;\n border: 1px solid #b53d61;\n}\ninput:not([type=checkbox]):not([type=radio]):focus {\n outline: none;\n}\n\ninput[type=radio] {\n filter: hue-rotate(50deg);\n}"]} \ No newline at end of file diff --git a/static/css/input.sass b/web/static/css/input.sass similarity index 97% rename from static/css/input.sass rename to web/static/css/input.sass index 8d78266..d63d170 100644 --- a/static/css/input.sass +++ b/web/static/css/input.sass @@ -7,6 +7,7 @@ button border-radius: $edge padding: 0.7rem 1.5rem font-weight: 600 + margin-bottom: 1rem color: $text background: $primary diff --git a/static/css/navbar.css b/web/static/css/navbar.css similarity index 100% rename from static/css/navbar.css rename to web/static/css/navbar.css diff --git a/static/css/navbar.css.map b/web/static/css/navbar.css.map similarity index 88% rename from static/css/navbar.css.map rename to web/static/css/navbar.css.map index 32a7fa8..3b48a1e 100644 --- a/static/css/navbar.css.map +++ b/web/static/css/navbar.css.map @@ -1 +1 @@ -{"version":3,"sources":["navbar.sass","navbar.css","_vars.sass"],"names":[],"mappings":"AAEA;EACI,aAAA;EACA,mBAAA;EACA,kBAAA;ACDJ;ADGI;EACI,qBAAA;EACA,eEHQ;EFIR,gBAAA;EACA,eAAA;EACA,YAAA;EACA,WAAA;EAEA,iBAAA;EACA,uBAAA;ACFR;ADII;EACI,gBAAA;EACA,eAAA;EACA,yBAAA;KAAA,sBAAA;UAAA,iBAAA;ACFR;ADIQ;EACI,eAAA;EACA,kBAAA;EACA,SAAA;ACFZ;ADKI;EACI,YAAA;ACHR;ADMI;EACI,aAAA;EACA,eAAA;ACJR;;ADOI;EACI,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,qBAAA;EACA,sBAAA;ACJR;ADMQ;EACI,cExCI;ADoChB;;ADMA;EACI;IACI,sCAAA;IACA,UAAA;IAEA,YAAA;IACA,YAAA;IACA,kBAAA;IACA,SAAA;IACA,WAAA;IACA,mBExDI;IFyDJ,eAAA;IACA,kBE/CD;IFgDC,kCAAA;YAAA,0BAAA;IACA,gDAAA;IAEA,wCAAA;ECLN;EDOM;IACI,UAAA;IACA,kBAAA;ECLV;EDOM;IACI,eAAA;IACA,cAAA;IACA,iBAAA;ECLV;EDQM;IACI,eEvEI;EDiEd;EDQM;IACI,cAAA;IACA,gBAAA;IACA,eAAA;IACA,YAAA;IACA,WAAA;IACA,eAAA;IACA,gBAAA;ECNV;EDQU;IACI,wBAAA;ECNd;AACF;ADOA;EAEQ;IACI,aAAA;ECNV;AACF","file":"navbar.css","sourcesContent":["@import '_vars'\n\nnav\n display: flex\n align-items: center\n position: relative\n\n >.logo\n display: inline-block\n stroke: $primary-light\n min-height: 40px\n min-width: 40px\n height: 40px\n width: 40px\n\n margin-right: 8px\n transition: stroke 0.2s\n\n >h1\n font-weight: 500\n font-size: 20px\n user-select: none\n\n mark\n font-size: 1rem\n position: relative\n top: -3px\n\n\n >span\n flex-grow: 1\n\n\n #menu\n display: none\n cursor: pointer\n\n.link-menu\n >a\n font-size: 14px\n font-weight: 600\n margin-left: 2rem\n text-decoration: none\n transition: color 0.1s\n\n &:hover\n color: $primary-light\n\n@media (max-width: 800px)\n .link-menu\n transform: scale(0.8) translateX(1rem)\n opacity: 0\n\n z-index: 100\n width: 200px\n position: absolute\n top: 5rem\n right: 2rem\n background: $secondary\n padding: 1rem 0\n border-radius: $edge\n backdrop-filter: blur(4px)\n border: 1px solid $border\n\n transition: transform 0.2s, opacity 0.2s\n\n &.open\n opacity: 1\n transform: inherit\n\n a\n font-size: 20px\n display: block\n line-height: 3rem\n\n nav\n .logo\n stroke: $primary-light\n\n #menu\n display: block\n min-height: 32px\n min-width: 32px\n height: 32px\n width: 32px\n cursor: pointer\n transition: 0.5s\n\n &.active\n transform: rotate(90deg)\n\n@media (max-width: 400px)\n nav\n h1\n display: none","nav {\n display: flex;\n align-items: center;\n position: relative;\n}\nnav > .logo {\n display: inline-block;\n stroke: #f45a88;\n min-height: 40px;\n min-width: 40px;\n height: 40px;\n width: 40px;\n margin-right: 8px;\n transition: stroke 0.2s;\n}\nnav > h1 {\n font-weight: 500;\n font-size: 20px;\n user-select: none;\n}\nnav > h1 mark {\n font-size: 1rem;\n position: relative;\n top: -3px;\n}\nnav > span {\n flex-grow: 1;\n}\nnav #menu {\n display: none;\n cursor: pointer;\n}\n\n.link-menu > a {\n font-size: 14px;\n font-weight: 600;\n margin-left: 2rem;\n text-decoration: none;\n transition: color 0.1s;\n}\n.link-menu > a:hover {\n color: #f45a88;\n}\n\n@media (max-width: 800px) {\n .link-menu {\n transform: scale(0.8) translateX(1rem);\n opacity: 0;\n z-index: 100;\n width: 200px;\n position: absolute;\n top: 5rem;\n right: 2rem;\n background: #252a38;\n padding: 1rem 0;\n border-radius: 5px;\n backdrop-filter: blur(4px);\n border: 1px solid rgba(22, 29, 43, 0.6901960784);\n transition: transform 0.2s, opacity 0.2s;\n }\n .link-menu.open {\n opacity: 1;\n transform: inherit;\n }\n .link-menu a {\n font-size: 20px;\n display: block;\n line-height: 3rem;\n }\n nav .logo {\n stroke: #f45a88;\n }\n nav #menu {\n display: block;\n min-height: 32px;\n min-width: 32px;\n height: 32px;\n width: 32px;\n cursor: pointer;\n transition: 0.5s;\n }\n nav #menu.active {\n transform: rotate(90deg);\n }\n}\n@media (max-width: 400px) {\n nav h1 {\n display: none;\n }\n}","$text: #f3f3f3\n$background: #03060d\n$secondary: #252a38\n$border: #161d2bb0\n\n$primary: #b53d61\n$primary-light: #f45a88\n$primary-glow: #f45a8861\n$primary-soft: #f79ab624\n$accent: #28aaf0\n\n$warn: #f09928\n\n$edge: 5px\n\n$main-width: 800px\n$more-width: 1000px\n"]} \ No newline at end of file +{"version":3,"sources":["navbar.sass","navbar.css","_vars.sass"],"names":[],"mappings":"AAEA;EACI,aAAA;EACA,mBAAA;EACA,kBAAA;ACDJ;ADGI;EACI,qBAAA;EACA,eEFQ;EFGR,gBAAA;EACA,eAAA;EACA,YAAA;EACA,WAAA;EAEA,iBAAA;EACA,uBAAA;ACFR;ADII;EACI,gBAAA;EACA,eAAA;EACA,yBAAA;KAAA,sBAAA;UAAA,iBAAA;ACFR;ADIQ;EACI,eAAA;EACA,kBAAA;EACA,SAAA;ACFZ;ADKI;EACI,YAAA;ACHR;ADMI;EACI,aAAA;EACA,eAAA;ACJR;;ADOI;EACI,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,qBAAA;EACA,sBAAA;ACJR;ADMQ;EACI,cEvCI;ADmChB;;ADMA;EACI;IACI,sCAAA;IACA,UAAA;IAEA,YAAA;IACA,YAAA;IACA,kBAAA;IACA,SAAA;IACA,WAAA;IACA,mBExDI;IFyDJ,eAAA;IACA,kBE5CD;IF6CC,kCAAA;YAAA,0BAAA;IACA,gDAAA;IAEA,wCAAA;ECLN;EDOM;IACI,UAAA;IACA,kBAAA;ECLV;EDOM;IACI,eAAA;IACA,cAAA;IACA,iBAAA;ECLV;EDQM;IACI,eEtEI;EDgEd;EDQM;IACI,cAAA;IACA,gBAAA;IACA,eAAA;IACA,YAAA;IACA,WAAA;IACA,eAAA;IACA,gBAAA;ECNV;EDQU;IACI,wBAAA;ECNd;AACF;ADOA;EAEQ;IACI,aAAA;ECNV;AACF","file":"navbar.css","sourcesContent":["@import '_vars'\n\nnav\n display: flex\n align-items: center\n position: relative\n\n >.logo\n display: inline-block\n stroke: $primary-light\n min-height: 40px\n min-width: 40px\n height: 40px\n width: 40px\n\n margin-right: 8px\n transition: stroke 0.2s\n\n >h1\n font-weight: 500\n font-size: 20px\n user-select: none\n\n mark\n font-size: 1rem\n position: relative\n top: -3px\n\n\n >span\n flex-grow: 1\n\n\n #menu\n display: none\n cursor: pointer\n\n.link-menu\n >a\n font-size: 14px\n font-weight: 600\n margin-left: 2rem\n text-decoration: none\n transition: color 0.1s\n\n &:hover\n color: $primary-light\n\n@media (max-width: 800px)\n .link-menu\n transform: scale(0.8) translateX(1rem)\n opacity: 0\n\n z-index: 100\n width: 200px\n position: absolute\n top: 5rem\n right: 2rem\n background: $secondary\n padding: 1rem 0\n border-radius: $edge\n backdrop-filter: blur(4px)\n border: 1px solid $border\n\n transition: transform 0.2s, opacity 0.2s\n\n &.open\n opacity: 1\n transform: inherit\n\n a\n font-size: 20px\n display: block\n line-height: 3rem\n\n nav\n .logo\n stroke: $primary-light\n\n #menu\n display: block\n min-height: 32px\n min-width: 32px\n height: 32px\n width: 32px\n cursor: pointer\n transition: 0.5s\n\n &.active\n transform: rotate(90deg)\n\n@media (max-width: 400px)\n nav\n h1\n display: none","nav {\n display: flex;\n align-items: center;\n position: relative;\n}\nnav > .logo {\n display: inline-block;\n stroke: #f45a88;\n min-height: 40px;\n min-width: 40px;\n height: 40px;\n width: 40px;\n margin-right: 8px;\n transition: stroke 0.2s;\n}\nnav > h1 {\n font-weight: 500;\n font-size: 20px;\n user-select: none;\n}\nnav > h1 mark {\n font-size: 1rem;\n position: relative;\n top: -3px;\n}\nnav > span {\n flex-grow: 1;\n}\nnav #menu {\n display: none;\n cursor: pointer;\n}\n\n.link-menu > a {\n font-size: 14px;\n font-weight: 600;\n margin-left: 2rem;\n text-decoration: none;\n transition: color 0.1s;\n}\n.link-menu > a:hover {\n color: #f45a88;\n}\n\n@media (max-width: 800px) {\n .link-menu {\n transform: scale(0.8) translateX(1rem);\n opacity: 0;\n z-index: 100;\n width: 200px;\n position: absolute;\n top: 5rem;\n right: 2rem;\n background: #252a38;\n padding: 1rem 0;\n border-radius: 5px;\n backdrop-filter: blur(4px);\n border: 1px solid rgba(22, 29, 43, 0.6901960784);\n transition: transform 0.2s, opacity 0.2s;\n }\n .link-menu.open {\n opacity: 1;\n transform: inherit;\n }\n .link-menu a {\n font-size: 20px;\n display: block;\n line-height: 3rem;\n }\n nav .logo {\n stroke: #f45a88;\n }\n nav #menu {\n display: block;\n min-height: 32px;\n min-width: 32px;\n height: 32px;\n width: 32px;\n cursor: pointer;\n transition: 0.5s;\n }\n nav #menu.active {\n transform: rotate(90deg);\n }\n}\n@media (max-width: 400px) {\n nav h1 {\n display: none;\n }\n}","$text: #f3f3f3\n$background: #03060d\n$secondary: #252a38\n$secondary-dark: #0e0e0e\n$border: #161d2bb0\n\n$primary: #b53d61\n$primary-light: #f45a88\n$primary-glow: #f45a8861\n$primary-soft: #f79ab624\n$accent: #28aaf0\n\n$error: #ef3628\n$warn: #f09928\n$success: #28ef6b\n\n$edge: 5px\n\n$main-width: 800px\n$more-width: 1000px\n"]} \ No newline at end of file diff --git a/static/css/navbar.sass b/web/static/css/navbar.sass similarity index 100% rename from static/css/navbar.sass rename to web/static/css/navbar.sass diff --git a/static/ext/css/prism.css b/web/static/ext/css/prism.css similarity index 96% rename from static/ext/css/prism.css rename to web/static/ext/css/prism.css index 1798656..b31b48a 100644 --- a/static/ext/css/prism.css +++ b/web/static/ext/css/prism.css @@ -19,6 +19,7 @@ code[class*=language-], pre[class*=language-] { tab-size: 4; -webkit-hyphens: none; hyphens: none; + border-radius: 5px !important; } pre[class*=language-] { @@ -26,7 +27,7 @@ code[class*=language-], pre[class*=language-] { padding: 1rem; margin: 0 0; overflow: auto; - border-radius: 4px; + border-radius: 5px; border-top-left-radius: 0; } @@ -38,7 +39,7 @@ code[class*=language-], pre[class*=language-] { :not(pre) > code[class*=language-] { padding: 0.1em; - border-radius: 0.3em; + border-radius: 5px; white-space: normal; } diff --git a/static/img/banner.png b/web/static/img/banner.png similarity index 100% rename from static/img/banner.png rename to web/static/img/banner.png diff --git a/static/img/fav.ico b/web/static/img/fav.ico similarity index 100% rename from static/img/fav.ico rename to web/static/img/fav.ico diff --git a/static/img/icon.png b/web/static/img/icon.png similarity index 100% rename from static/img/icon.png rename to web/static/img/icon.png diff --git a/static/js/menu.js b/web/static/js/menu.js similarity index 100% rename from static/js/menu.js rename to web/static/js/menu.js diff --git a/web/templates/alt-design.html b/web/templates/alt-design.html new file mode 100644 index 0000000..9900533 --- /dev/null +++ b/web/templates/alt-design.html @@ -0,0 +1,144 @@ + + + + + + Alternative Design for NovaAI + + + + + + + + + + + + + + + + + +
+

+ Empower. + Envision. + Excel. +

+

NovaAI is an AI API that allows developers to integrate advanced capabilities like NLP into their apps for free.

+ + + +
+ + DISCOVER NOVA
+ +
+ + \ No newline at end of file diff --git a/web/templates/index.html b/web/templates/index.html new file mode 100644 index 0000000..2da2c4c --- /dev/null +++ b/web/templates/index.html @@ -0,0 +1,22 @@ +{% include 'parts/begin.html' %} + + +
+

Free Generative AI for Everyone

+

Make AI Open Again

+ + + + + + +
+
+ +
+{% include 'parts/end.html' %} diff --git a/templates/legal/imprint.html b/web/templates/legal/imprint.html similarity index 100% rename from templates/legal/imprint.html rename to web/templates/legal/imprint.html diff --git a/templates/legal/privacy.html b/web/templates/legal/privacy.html similarity index 100% rename from templates/legal/privacy.html rename to web/templates/legal/privacy.html diff --git a/templates/legal/terms.html b/web/templates/legal/terms.html similarity index 91% rename from templates/legal/terms.html rename to web/templates/legal/terms.html index 2060d76..927bff7 100644 --- a/templates/legal/terms.html +++ b/web/templates/legal/terms.html @@ -73,22 +73,29 @@ 1 You are allowed to talk about these topics, but do not endorse them or depict them in any way.

It goes without saying that illegal content, is forbidden, too! Copyright is a thing, if you like it or not.

+ {% if verify %} +

+ Because you just ran /key: + + If you accept both the privacy policy and terms of service, answer with the emoji below . + Tip: you can use the search feature to find the emoji more quickly. + +

{{ verify }}

+

+ {% endif %} +

What you can expect from us

-

We're working on getting all of these points. +

We're working on getting all of these points done.

  1. You get notified when we're changing our Terms of Service. (How?)
  2. We provide a history of our Terms of Service. (Just check our source code)
  3. -
  4. Your account won't be deleted without us stating a clear reason.
  5. We won't ever sell your personal data to advertisers.
  6. When asked, we will give the government as little information as possible about you, unless we genuinely think you have made a strong violation of our ethics.
  7. You maintain ownership of the content you create and upload on our platforms.
  8. -
  9. We only collect logs when necessary to ensure the functionality of our service.
  10. -
  11. You can delete all your data at any time.
  12. -
  13. You can retrieve an archive of your data at any time.
  14. -
  15. We offer a hidden service, which especially comes in handy if you live in a country with a lot of censorship.
  16. +
  17. We only collect logs when necessary to ensure the functionality and security of our service.

@@ -96,7 +103,7 @@

We ask you to...

  1. Follow our ethics
  2. -
  3. Follow the German law
  4. +
  5. Obey the German law
  6. Use our APIs etc. responsibly and don't spam

diff --git a/web/templates/novacord.html b/web/templates/novacord.html new file mode 100644 index 0000000..2127301 --- /dev/null +++ b/web/templates/novacord.html @@ -0,0 +1,42 @@ +{% include 'parts/begin.html' %} + + +
+

NovaCord

+

+ Our Discord bot NovaCord can't be invited to your server as it's private, but its source code is at + NovaOSS/nova-cord, so feel free to self-host it. +

+

+ Nontheless, you can freely use most commands of NovaCord on our Discord server. +

+ +

How to use it

+

+ On our Discord server (assuming you're already verified and can write in channels like #general), go to the channel #commands and type /. + You should then see a popup with a list of commands. On the left side of the popup, there should be an icon for each bot. Click the blue NovaAI icon with the caption BOT. + Then, you'll see all NovaCord commands which you can use. +

+ +

Troubleshooting

+

If you don't see the commands, try the following: +

    +
  • Update your Discord app/program.
  • +
  • Use Discord's website.
  • +
  • Contact the staff.
  • +
+

+

If you don't have access to the commands channel: +

    +
  • Open the server options and tick Show All Channels.
  • +
  • Press Ctrl+K + (PC) or open up the search tab on the mobile app and search for + #commands. There might be multiple channels with the + same name, so make sure it says NovaAI at the right. +
  • +
  • Contact the staff.
  • +
+

+
+ +{% include 'parts/end.html' %} diff --git a/templates/panel.html b/web/templates/panel.html similarity index 100% rename from templates/panel.html rename to web/templates/panel.html