From 02c41e71b7ffb0e3a27756c76eb006679355053d Mon Sep 17 00:00:00 2001 From: nsde Date: Fri, 22 Sep 2023 01:00:00 +0200 Subject: [PATCH] Added financial info --- web/app.py | 2 ++ web/finances.py | 52 +++++++++++++++++++++++++++++++++++++ web/static/css/base.css | 3 ++- web/static/css/base.css.map | 2 +- web/static/css/base.sass | 3 ++- web/static/css/home.css | 2 ++ web/static/css/home.css.map | 2 +- web/static/css/home.sass | 2 ++ web/templates/finances.html | 33 +++++++++++++++++++++++ 9 files changed, 97 insertions(+), 4 deletions(-) create mode 100755 web/finances.py create mode 100644 web/templates/finances.html diff --git a/web/app.py b/web/app.py index 91e43fe..4f29444 100755 --- a/web/app.py +++ b/web/app.py @@ -20,9 +20,11 @@ def create_app() -> flask.Flask: import tos import account + import finances tos.register(app) account.register(app) + finances.register(app) # max 100 MB app.config['MAX_CONTENT_LENGTH'] = 100 * 1024 * 1024 diff --git a/web/finances.py b/web/finances.py new file mode 100755 index 0000000..3078e36 --- /dev/null +++ b/web/finances.py @@ -0,0 +1,52 @@ +import os +import io +import time +import json +import flask +import requests + +from dotenv import load_dotenv + +load_dotenv() + +def get_finances(): + return requests.get( + url=f'{os.environ["CORE_API_URL"]}/finances', + headers={ + 'Authorization': f'{os.environ["CORE_API_KEY"]}' + }, + timeout=5 + ).json() + + +def register(app): + @app.route('/finances') + def finances_view(): + data = get_finances() + finances = { + 'donations_total': round(sum([i['amount_usd'] for i in data['donations']])), + 'donations_num': len(data['donations']), + 'donations_avg': round(sum([i['amount_usd'] for i in data['donations']]) / len(data['donations']), 2), + 'donations_max': round(max([i['amount_usd'] for i in data['donations']])), + 'most_used_donation_currency': max(data['donations'], key=lambda x: x['amount_usd'])['currency'], + + 'expenses_total': round(sum([i['amount_usd'] for i in data['expenses']])), + 'expenses_wages': round(sum([i['amount_usd'] for i in data['expenses'] if i['type'] == 'wage'])), + 'most_used_expense_currency': max(data['expenses'], key=lambda x: x['amount_usd'])['currency'], + } + + return flask.render_template('finances.html', finances=finances) + + @app.route('/finances/json') + def finances_download(): + virtual_file = io.StringIO() + json.dump(get_finances(), virtual_file, indent=4) + name = f'finances-{time.strftime("%Y-%m-%d")}.json' + virtual_file.seek(0) + + return flask.send_file( + io.BytesIO(virtual_file.read().encode('utf-8')), + mimetype='application/json', + as_attachment=True, + download_name=name + ) diff --git a/web/static/css/base.css b/web/static/css/base.css index 4837873..ba1363d 100644 --- a/web/static/css/base.css +++ b/web/static/css/base.css @@ -124,10 +124,11 @@ h6 { } .box { + margin-bottom: 1rem; background: rgba(204, 154, 247, 0.1411764706); border: 2px solid rgba(204, 154, 247, 0.1411764706); border-radius: 5px; - padding: 1rem 2rem; + padding: 0rem 1rem; } @media (max-width: 900px) { diff --git a/web/static/css/base.css.map b/web/static/css/base.css.map index 50d9bdd..775dc58 100644 --- a/web/static/css/base.css.map +++ b/web/static/css/base.css.map @@ -1 +1 @@ -{"version":3,"sources":["base.sass","base.css","_vars.sass"],"names":[],"mappings":"AAEA;EACI,uBAAA;ACDJ;;ADGA;EACI,yBELS;ADKb;;ADEA;EACI,gBEUS;EFTT,cAAA;ACCJ;;ADCA;EACI,sBAAA;EACA,YAAA;EACA,cEfG;EFgBH,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,8BE9BM;EF+BN,0BAAA;EACA,8BAAA;EAEA,gBAAA;ACGJ;ADDI;EACI,4BAAA;EACA,4CEpCO;ADuCf;;ADDA;EACI,YAAA;ACIJ;;ADFA;EACI,cAAA;EACA,eAAA;ACKJ;;ADHA;EACI,cEvDG;EFwDH,mBEjDM;EFkDN,gBAAA;EACA,kBAAA;ACMJ;;ADJA;EACI,8CAAA;EACA,gBAAA;EACA,mBE7DQ;EF8DR,kBE/CG;EFgDH,sBAAA;EACA,gCAAA;ACOJ;;ADLA;EACI,cAAA;EACA,kBAAA;EACA,8BAAA;EACA,YAAA;EACA,mBEvEQ;EFwER,WAAA;EACA,kBE1DG;ADkEP;ADNI;EACI,0BEjEA;ADyER;ADPI;EACI,0BElED;AD2EP;ADRI;EACI,0BEnEE;AD6EV;;ADRA;EACI,8CAAA;EACA,gBAAA;EACA,mBErFQ;EFsFR,kBEvEG;EFwEH,sBAAA;ACWJ;;ADRI;EACI,mBAAA;ACWR;;ADTA;EACI,iBAAA;ACYJ;;ADVA;EACI,YAAA;EACA,mBAAA;ACaJ;;ADXA;EAEI,aAAA;ACaJ;;ADXA;EACI,4DAAA;EACA,6BAAA;EACA,oCAAA;ACcJ;;ADZA;EACI,6CEtGW;EFuGX,mDAAA;EACA,kBEjGG;EFkGH,kBAAA;ACeJ;;ADbA;EACI;IACI,cAAA;IACA,gBAAA;ECgBN;AACF","file":"base.css","sourcesContent":["@import '_vars'\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\nh6\n opacity: 0.7\n font-weight: normal\n\n:focus:not(:focus-visible)\n\n outline: none\n\n.special-gradient\n background: linear-gradient(45deg, #be89ec 7%, #2867f0 100%)\n -webkit-background-clip: text\n -webkit-text-fill-color: transparent\n\n.box\n background: $primary-soft\n border: 2px solid $primary-soft\n border-radius: $edge\n padding: 1rem 2rem\n\n@media (max-width: 900px)\n body\n margin: 0 2rem\n margin-top: 2rem\n","html {\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: #5f44b9;\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(104, 58, 150, 0.2196078431);\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: #5f44b9;\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\nh6 {\n opacity: 0.7;\n font-weight: normal;\n}\n\n:focus:not(:focus-visible) {\n outline: none;\n}\n\n.special-gradient {\n background: linear-gradient(45deg, #be89ec 7%, #2867f0 100%);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n\n.box {\n background: rgba(204, 154, 247, 0.1411764706);\n border: 2px solid rgba(204, 154, 247, 0.1411764706);\n border-radius: 5px;\n padding: 1rem 2rem;\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$soft: #fcf7f824\n\n$primary: #5f44b9\n$primary-light: #b88df0\n$primary-glow: #683a9638\n$primary-soft: #cc9af724\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 +{"version":3,"sources":["base.sass","base.css","_vars.sass"],"names":[],"mappings":"AAEA;EACI,uBAAA;ACDJ;;ADGA;EACI,yBELS;ADKb;;ADEA;EACI,gBEUS;EFTT,cAAA;ACCJ;;ADCA;EACI,sBAAA;EACA,YAAA;EACA,cEfG;EFgBH,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,8BE9BM;EF+BN,0BAAA;EACA,8BAAA;EAEA,gBAAA;ACGJ;ADDI;EACI,4BAAA;EACA,4CEpCO;ADuCf;;ADDA;EACI,YAAA;ACIJ;;ADFA;EACI,cAAA;EACA,eAAA;ACKJ;;ADHA;EACI,cEvDG;EFwDH,mBEjDM;EFkDN,gBAAA;EACA,kBAAA;ACMJ;;ADJA;EACI,8CAAA;EACA,gBAAA;EACA,mBE7DQ;EF8DR,kBE/CG;EFgDH,sBAAA;EACA,gCAAA;ACOJ;;ADLA;EACI,cAAA;EACA,kBAAA;EACA,8BAAA;EACA,YAAA;EACA,mBEvEQ;EFwER,WAAA;EACA,kBE1DG;ADkEP;ADNI;EACI,0BEjEA;ADyER;ADPI;EACI,0BElED;AD2EP;ADRI;EACI,0BEnEE;AD6EV;;ADRA;EACI,8CAAA;EACA,gBAAA;EACA,mBErFQ;EFsFR,kBEvEG;EFwEH,sBAAA;ACWJ;;ADRI;EACI,mBAAA;ACWR;;ADTA;EACI,iBAAA;ACYJ;;ADVA;EACI,YAAA;EACA,mBAAA;ACaJ;;ADXA;EAEI,aAAA;ACaJ;;ADXA;EACI,4DAAA;EACA,6BAAA;EACA,oCAAA;ACcJ;;ADZA;EACI,mBAAA;EACA,6CEvGW;EFwGX,mDAAA;EACA,kBElGG;EFmGH,kBAAA;ACeJ;;ADbA;EACI;IACI,cAAA;IACA,gBAAA;ECgBN;AACF","file":"base.css","sourcesContent":["@import '_vars'\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\nh6\n opacity: 0.7\n font-weight: normal\n\n:focus:not(:focus-visible)\n\n outline: none\n\n.special-gradient\n background: linear-gradient(45deg, #be89ec 7%, #2867f0 100%)\n -webkit-background-clip: text\n -webkit-text-fill-color: transparent\n\n.box\n margin-bottom: 1rem\n background: $primary-soft\n border: 2px solid $primary-soft\n border-radius: $edge\n padding: 0rem 1rem\n\n@media (max-width: 900px)\n body\n margin: 0 2rem\n margin-top: 2rem\n","html {\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: #5f44b9;\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(104, 58, 150, 0.2196078431);\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: #5f44b9;\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\nh6 {\n opacity: 0.7;\n font-weight: normal;\n}\n\n:focus:not(:focus-visible) {\n outline: none;\n}\n\n.special-gradient {\n background: linear-gradient(45deg, #be89ec 7%, #2867f0 100%);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n\n.box {\n margin-bottom: 1rem;\n background: rgba(204, 154, 247, 0.1411764706);\n border: 2px solid rgba(204, 154, 247, 0.1411764706);\n border-radius: 5px;\n padding: 0rem 1rem;\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$soft: #fcf7f824\n\n$primary: #5f44b9\n$primary-light: #b88df0\n$primary-glow: #683a9638\n$primary-soft: #cc9af724\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/web/static/css/base.sass b/web/static/css/base.sass index d02557b..e918a75 100644 --- a/web/static/css/base.sass +++ b/web/static/css/base.sass @@ -110,10 +110,11 @@ h6 -webkit-text-fill-color: transparent .box + margin-bottom: 1rem background: $primary-soft border: 2px solid $primary-soft border-radius: $edge - padding: 1rem 2rem + padding: 0rem 1rem @media (max-width: 900px) body diff --git a/web/static/css/home.css b/web/static/css/home.css index d97493e..17b4c80 100644 --- a/web/static/css/home.css +++ b/web/static/css/home.css @@ -10,6 +10,7 @@ header h1 { } div.featured__facts { + padding: 1.5rem; margin-block: 2rem; display: flex; vertical-align: middle; @@ -37,6 +38,7 @@ div.featured__facts h2 span { } div.user-quotes div.user-quote__field { + padding: 1.5rem; cursor: pointer; margin-block: 2rem; background: rgba(204, 154, 247, 0.1411764706); diff --git a/web/static/css/home.css.map b/web/static/css/home.css.map index 7819c4f..902d0a2 100644 --- a/web/static/css/home.css.map +++ b/web/static/css/home.css.map @@ -1 +1 @@ -{"version":3,"sources":["home.css","home.sass","_vars.sass"],"names":[],"mappings":"AAAA,gBAAgB;ACEhB;EACI,gBCgBS;EDfT,cAAA;EACA,eAAA;EACA,oBAAA;ADAJ;ACEI;EACI,iBAAA;ADAR;;ACEA;EACI,kBAAA;EACA,aAAA;EACA,sBAAA;EACA,qBAAA;ADCJ;ACCI;EACI,YAAA;EACA,qCAAA;EACA,qDAAA;ADCR;ACCI;EACI,WAAA;EACA,YAAA;EACA,oBAAA;KAAA,iBAAA;ADCR;ACCI;EACI,sBAAA;EACA,kBAAA;EACA,iBAAA;EACA,iBAAA;ADCR;ACCQ;EACI,cC1BI;AF2BhB;;ACMI;EACI,eAAA;EACA,kBAAA;EACA,6CClCO;EDmCP,kDAAA;EACA,kBC7BD;ED8BC,kBAAA;EACA,qBAAA;EACA,gCAAA;EACA,iBAAA;ADHR;ACKQ;EACI,YAAA;EACA,qCAAA;EACA,qDAAA;ADHZ;ACKQ;EACI,4CAAA;EACA,YAAA;EACA,gBAAA;EACA,wCCnDG;EDoDH,kBAAA;EACA,aAAA;EACA,UAAA;EAGA,yBAAA;ADLZ;ACOQ;EACI,eAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,kDAAA;EACA,kBAAA;EACA,SAAA;EACA,WAAA;EACA,yBAAA;KAAA,sBAAA;ADLZ;ACOQ;EACI,eAAA;EACA,gBAAA;EACA,cC3EI;AFsEhB;ACOQ;EACI,eAAA;EACA,iBAAA;EACA,mBAAA;ADLZ;;ACOA;EACI;IACI,eAAA;EDJN;ECMM;IACI,iBAAA;EDJV;ECMM;IACI,eAAA;EDJV;AACF","file":"home.css","sourcesContent":["@charset \"UTF-8\";\nheader {\n max-width: 800px;\n margin: 0 auto;\n font-size: 40px;\n margin-bottom: 15rem;\n}\nheader h1 {\n line-height: 4rem;\n}\n\ndiv.featured__facts {\n margin-block: 2rem;\n display: flex;\n vertical-align: middle;\n transition: all 200ms;\n}\ndiv.featured__facts:hover {\n scale: 1.025;\n filter: brightness(1.1) saturate(1.1);\n box-shadow: 0 0 30px rgba(104, 58, 150, 0.2196078431);\n}\ndiv.featured__facts img, div.featured__facts svg {\n width: 50px;\n height: 50px;\n object-fit: cover;\n}\ndiv.featured__facts h2 {\n vertical-align: middle;\n margin-block: auto;\n margin-left: 1rem;\n font-size: 1.5rem;\n}\ndiv.featured__facts h2 span {\n color: #b88df0;\n}\n\ndiv.user-quotes div.user-quote__field {\n cursor: pointer;\n margin-block: 2rem;\n background: rgba(204, 154, 247, 0.1411764706);\n border: 2px solid rgba(104, 58, 150, 0.2196078431);\n border-radius: 5px;\n position: relative;\n transition: all 200ms;\n box-shadow: 0 0 30px transparent;\n min-height: 200px;\n}\ndiv.user-quotes div.user-quote__field:hover {\n scale: 1.025;\n filter: brightness(1.1) saturate(1.1);\n box-shadow: 0 0 30px rgba(104, 58, 150, 0.2196078431);\n}\ndiv.user-quotes div.user-quote__field::before {\n font-family: \"Times New Roman\", Times, serif;\n content: \"“\";\n font-size: 150px;\n color: rgba(204, 154, 247, 0.1411764706);\n position: absolute;\n bottom: -1rem;\n left: 1rem;\n transform: rotate(180deg);\n}\ndiv.user-quotes div.user-quote__field img {\n cursor: pointer;\n width: 100px;\n height: 100px;\n border-radius: 50%;\n border: 3px solid rgba(104, 58, 150, 0.2196078431);\n position: absolute;\n top: 1rem;\n right: 1rem;\n object-fit: scale-down;\n}\ndiv.user-quotes div.user-quote__field span.user-quote__username {\n font-size: 1rem;\n font-weight: 600;\n color: #b88df0;\n}\ndiv.user-quotes div.user-quote__field p {\n margin-block: 0;\n font-size: 1.5rem;\n padding-right: 7rem;\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}","@import '_vars'\n\nheader\n max-width: $main-width\n margin: 0 auto\n font-size: 40px\n margin-bottom: 15rem\n\n h1\n line-height: 4rem\n\ndiv.featured__facts\n margin-block: 2rem\n display: flex\n vertical-align: middle\n transition: all 200ms\n\n &:hover\n scale: 1.025\n filter: brightness(1.1) saturate(1.1)\n box-shadow: 0 0 30px $primary-glow\n\n img, svg\n width: 50px\n height: 50px\n object-fit: cover\n\n h2\n vertical-align: middle\n margin-block: auto\n margin-left: 1rem\n font-size: 1.5rem\n\n span\n color: $primary-light\n\ndiv.user-quotes\n // display: grid\n // grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))\n // grid-gap: 2rem\n\n div.user-quote__field\n cursor: pointer\n margin-block: 2rem\n background: $primary-soft\n border: 2px solid $primary-glow\n border-radius: $edge\n position: relative\n transition: all 200ms\n box-shadow: 0 0 30px transparent\n min-height: 200px\n\n &:hover\n scale: 1.025\n filter: brightness(1.1) saturate(1.1)\n box-shadow: 0 0 30px $primary-glow\n\n &::before\n font-family: 'Times New Roman', Times, serif\n content: '\\201c'\n font-size: 150px\n color: $primary-soft\n position: absolute\n bottom: -1rem\n left: 1rem\n \n // show at the bottom left\n transform: rotate(180deg)\n\n img\n cursor: pointer\n width: 100px\n height: 100px\n border-radius: 50%\n border: 3px solid $primary-glow\n position: absolute\n top: 1rem\n right: 1rem\n object-fit: scale-down\n\n span.user-quote__username\n font-size: 1rem\n font-weight: 600\n color: $primary-light\n\n p\n margin-block: 0\n font-size: 1.5rem\n padding-right: 7rem\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$soft: #fcf7f824\n\n$primary: #5f44b9\n$primary-light: #b88df0\n$primary-glow: #683a9638\n$primary-soft: #cc9af724\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 +{"version":3,"sources":["home.css","home.sass","_vars.sass"],"names":[],"mappings":"AAAA,gBAAgB;ACEhB;EACI,gBCgBS;EDfT,cAAA;EACA,eAAA;EACA,oBAAA;ADAJ;ACEI;EACI,iBAAA;ADAR;;ACEA;EACI,eAAA;EACA,kBAAA;EACA,aAAA;EACA,sBAAA;EACA,qBAAA;ADCJ;ACCI;EACI,YAAA;EACA,qCAAA;EACA,qDAAA;ADCR;ACCI;EACI,WAAA;EACA,YAAA;EACA,oBAAA;KAAA,iBAAA;ADCR;ACCI;EACI,sBAAA;EACA,kBAAA;EACA,iBAAA;EACA,iBAAA;ADCR;ACCQ;EACI,cC3BI;AF4BhB;;ACMI;EACI,eAAA;EACA,eAAA;EACA,kBAAA;EACA,6CCpCO;EDqCP,kDAAA;EACA,kBC/BD;EDgCC,kBAAA;EACA,qBAAA;EACA,gCAAA;EACA,iBAAA;ADHR;ACKQ;EACI,YAAA;EACA,qCAAA;EACA,qDAAA;ADHZ;ACKQ;EACI,4CAAA;EACA,YAAA;EACA,gBAAA;EACA,wCCrDG;EDsDH,kBAAA;EACA,aAAA;EACA,UAAA;EAGA,yBAAA;ADLZ;ACOQ;EACI,eAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,kDAAA;EACA,kBAAA;EACA,SAAA;EACA,WAAA;EACA,yBAAA;KAAA,sBAAA;ADLZ;ACOQ;EACI,eAAA;EACA,gBAAA;EACA,cC7EI;AFwEhB;ACOQ;EACI,eAAA;EACA,iBAAA;EACA,mBAAA;ADLZ;;ACOA;EACI;IACI,eAAA;EDJN;ECMM;IACI,iBAAA;EDJV;ECMM;IACI,eAAA;EDJV;AACF","file":"home.css","sourcesContent":["@charset \"UTF-8\";\nheader {\n max-width: 800px;\n margin: 0 auto;\n font-size: 40px;\n margin-bottom: 15rem;\n}\nheader h1 {\n line-height: 4rem;\n}\n\ndiv.featured__facts {\n padding: 1.5rem;\n margin-block: 2rem;\n display: flex;\n vertical-align: middle;\n transition: all 200ms;\n}\ndiv.featured__facts:hover {\n scale: 1.025;\n filter: brightness(1.1) saturate(1.1);\n box-shadow: 0 0 30px rgba(104, 58, 150, 0.2196078431);\n}\ndiv.featured__facts img, div.featured__facts svg {\n width: 50px;\n height: 50px;\n object-fit: cover;\n}\ndiv.featured__facts h2 {\n vertical-align: middle;\n margin-block: auto;\n margin-left: 1rem;\n font-size: 1.5rem;\n}\ndiv.featured__facts h2 span {\n color: #b88df0;\n}\n\ndiv.user-quotes div.user-quote__field {\n padding: 1.5rem;\n cursor: pointer;\n margin-block: 2rem;\n background: rgba(204, 154, 247, 0.1411764706);\n border: 2px solid rgba(104, 58, 150, 0.2196078431);\n border-radius: 5px;\n position: relative;\n transition: all 200ms;\n box-shadow: 0 0 30px transparent;\n min-height: 200px;\n}\ndiv.user-quotes div.user-quote__field:hover {\n scale: 1.025;\n filter: brightness(1.1) saturate(1.1);\n box-shadow: 0 0 30px rgba(104, 58, 150, 0.2196078431);\n}\ndiv.user-quotes div.user-quote__field::before {\n font-family: \"Times New Roman\", Times, serif;\n content: \"“\";\n font-size: 150px;\n color: rgba(204, 154, 247, 0.1411764706);\n position: absolute;\n bottom: -1rem;\n left: 1rem;\n transform: rotate(180deg);\n}\ndiv.user-quotes div.user-quote__field img {\n cursor: pointer;\n width: 100px;\n height: 100px;\n border-radius: 50%;\n border: 3px solid rgba(104, 58, 150, 0.2196078431);\n position: absolute;\n top: 1rem;\n right: 1rem;\n object-fit: scale-down;\n}\ndiv.user-quotes div.user-quote__field span.user-quote__username {\n font-size: 1rem;\n font-weight: 600;\n color: #b88df0;\n}\ndiv.user-quotes div.user-quote__field p {\n margin-block: 0;\n font-size: 1.5rem;\n padding-right: 7rem;\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}","@import '_vars'\n\nheader\n max-width: $main-width\n margin: 0 auto\n font-size: 40px\n margin-bottom: 15rem\n\n h1\n line-height: 4rem\n\ndiv.featured__facts\n padding: 1.5rem\n margin-block: 2rem\n display: flex\n vertical-align: middle\n transition: all 200ms\n\n &:hover\n scale: 1.025\n filter: brightness(1.1) saturate(1.1)\n box-shadow: 0 0 30px $primary-glow\n\n img, svg\n width: 50px\n height: 50px\n object-fit: cover\n\n h2\n vertical-align: middle\n margin-block: auto\n margin-left: 1rem\n font-size: 1.5rem\n\n span\n color: $primary-light\n\ndiv.user-quotes\n // display: grid\n // grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))\n // grid-gap: 2rem\n\n div.user-quote__field\n padding: 1.5rem\n cursor: pointer\n margin-block: 2rem\n background: $primary-soft\n border: 2px solid $primary-glow\n border-radius: $edge\n position: relative\n transition: all 200ms\n box-shadow: 0 0 30px transparent\n min-height: 200px\n\n &:hover\n scale: 1.025\n filter: brightness(1.1) saturate(1.1)\n box-shadow: 0 0 30px $primary-glow\n\n &::before\n font-family: 'Times New Roman', Times, serif\n content: '\\201c'\n font-size: 150px\n color: $primary-soft\n position: absolute\n bottom: -1rem\n left: 1rem\n \n // show at the bottom left\n transform: rotate(180deg)\n\n img\n cursor: pointer\n width: 100px\n height: 100px\n border-radius: 50%\n border: 3px solid $primary-glow\n position: absolute\n top: 1rem\n right: 1rem\n object-fit: scale-down\n\n span.user-quote__username\n font-size: 1rem\n font-weight: 600\n color: $primary-light\n\n p\n margin-block: 0\n font-size: 1.5rem\n padding-right: 7rem\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$soft: #fcf7f824\n\n$primary: #5f44b9\n$primary-light: #b88df0\n$primary-glow: #683a9638\n$primary-soft: #cc9af724\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/web/static/css/home.sass b/web/static/css/home.sass index f13defa..e2fbdc4 100644 --- a/web/static/css/home.sass +++ b/web/static/css/home.sass @@ -10,6 +10,7 @@ header line-height: 4rem div.featured__facts + padding: 1.5rem margin-block: 2rem display: flex vertical-align: middle @@ -40,6 +41,7 @@ div.user-quotes // grid-gap: 2rem div.user-quote__field + padding: 1.5rem cursor: pointer margin-block: 2rem background: $primary-soft diff --git a/web/templates/finances.html b/web/templates/finances.html new file mode 100644 index 0000000..3b42cb5 --- /dev/null +++ b/web/templates/finances.html @@ -0,0 +1,33 @@ +{% include 'common/begin.html' %} + +
+

Our finances - transparency is key!

+

+ Warning - no guarantees can be made that this information is 100% accurate. Crypto currency prices are updated once every hour. +

+ + + + + +

Donations

+ + + + + + + + +

Expenses

+ + + + +
+ +{% include 'common/end.html' %} \ No newline at end of file