From 28ec20edc5f7e0fdfe2181b91fbb1e9ce6d8ea3c Mon Sep 17 00:00:00 2001 From: Jakob Moser <moser@cl.uni-heidelberg.de> Date: Thu, 26 Sep 2024 20:52:39 +0200 Subject: [PATCH] Revert "Reformat files" This reverts commit 5dfb6a96d2210d17f5220fe2fa1c0ab16184192d. Because it actually also commits a color change I don't want to have. --- AUTHORS.md | 2 +- JS-README.md | 45 ++++++++++--------- README.md | 25 ++++++----- portal/static/css/main.css | 26 +++-------- .../js/components/pieces/AccountRequired.mjs | 2 +- 5 files changed, 45 insertions(+), 55 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 40aa9ca..9d4fea9 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -6,4 +6,4 @@ - Daniela Jaramillo <jaramillo@cl.uni-heidelberg.de> - Leander Karp <karp@cl.uni-heidelberg.de> -- Elias Hanke <hanke@cl.uni-heidelberg.de> +- Elias Hanke <hanke@cl.uni-heidelberg.de> diff --git a/JS-README.md b/JS-README.md index 6d02a35..743caf1 100644 --- a/JS-README.md +++ b/JS-README.md @@ -10,37 +10,41 @@ This is mostly Mithril.js. This is where the frontend components are located. The components are divided into two categories: `pages` and `pieces`. **Mithril.js** uses `pages` to render the main content of the website, while `pieces` are used to render smaller components that are used in multiple places. `pieces` then are embedded into `pages`. This could help you around ++ [Mithril.js documentation](https://mithril.js.org/) ++ [Convert plain HTML to Mithril](https://arthurclemens.github.io/mithril-template-converter/index.html) + -- [Mithril.js documentation](https://mithril.js.org/) -- [Convert plain HTML to Mithril](https://arthurclemens.github.io/mithril-template-converter/index.html) ### `/portal/static/js/components/pages` + + Generally, everything having its own tab in the Navbar is a `page`. They are the first components that are rendered when the website is loaded. -- `Base.mjs` -- `Fachschaftssitzung.mjs` -- `FsServices.mjs` -- `Login.mjs` -- `Me.mjs` -- `Start.mjs` -- `UniServices.mjs` -- `Unlock.mjs` ++ `Base.mjs` ++ `Fachschaftssitzung.mjs` ++ `FsServices.mjs` ++ `Login.mjs` ++ `Me.mjs` ++ `Start.mjs` ++ `UniServices.mjs` ++ `Unlock.mjs` ### `/portal/static/js/components/pieces` These are the smaller components that are embedded in multiple places. -- `AccountRequired.mjs` -- `Agenda.mjs` -- `BoxedButton.mjs` -- `ButtonAndTextLink.mjs` -- `Nav.mjs` -- `NavPageLink.mjs` -- `PasswordinVault.mjs` -- `ServiceLink.mjs` -- `Toast.mjs` -- `UnlockRequired` + ++ `AccountRequired.mjs` ++ `Agenda.mjs` ++ `BoxedButton.mjs` ++ `ButtonAndTextLink.mjs` ++ `Nav.mjs` ++ `NavPageLink.mjs` ++ `PasswordinVault.mjs` ++ `ServiceLink.mjs` ++ `Toast.mjs` ++ `UnlockRequired` ## `/portal/static/js/model` @@ -66,3 +70,4 @@ Also, there's some yapping about the Same Origin Policy, might be interesting, b ## `/portal/static/js/portal.mjs` This is the main file that initializes the Mithril.js app and sets up the routing. + diff --git a/README.md b/README.md index 6717fb3..9dd644d 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ # Portal: this service can fit so many services in it! + Aren't you tired of having to remember shortlinks or URLs for all the services offered by the Fachschaft? Does it embarrass you to always ask about the agenda of a Fachschaftssitzung, because you never worked with a Taiga implementation? How was the shortlink to Sturacloud again? Are you overwhelmed by 19 (and counting, **fast**) different services offered by the Fachschaft, the Institute and the University? **Well, that is a thing of the past!** That's why we created Portal, a service-aggregating meta-service for over-zealous students like us, the FS Coli. @@ -14,15 +15,16 @@ If you are a rather visual learner, we got you covered:  + ## What can you do with Portal? Most importantly, you can access all the services that the Fachschaft offers in one place. Also, Portal offers -- a neat LDAP integration -- a Taiga (fsco.li/todo) integration -- even a f\*cking GitLab integration (we are so proud of this one) -- an user-friendly interface -- a responsive design (mostly) ++ a neat LDAP integration ++ a Taiga (fsco.li/todo) integration ++ even a f*cking GitLab integration (we are so proud of this one) ++ an user-friendly interface ++ a responsive design (mostly) # If you are a contributor... @@ -80,18 +82,15 @@ db.session.add(l) db.session.commit() exit() ``` - The app should run without problems now. Also, if you are using an Apple device, please deactivate the "AirPlay Receiver" as it might cause problems with the LDAP connection. --- - #### Important: Alembic must always be up to date in order to update the database schema. Please run `alembic upgrade head` after pulling changes from the repository. - --- ## How to move around in this repo @@ -121,6 +120,7 @@ Here you can find the CSS files for the frontend. The main CSS file is `main.css Here you can find the documentation for the API in its respective versions. API specifications (`openapi-spec.yaml`) are written in OpenAPI 3.0.0 and are located in the `/api/{version}` folder. + #### `/portal/static/img`: Frag nicht, was für Bilder. Einfach Bilder. I won't translate this. What did you expect? @@ -131,13 +131,14 @@ Lol, that should actually . It contains all the JavaScript files that are responsible for the frontend interactions. + ### `/portal/templates` These are the HTML files that Flask renders. They are written in Jinja2, which is a template engine for Python. ### `.py`-files -- `__init__.py`: Fortunately, explaining this was not a Prog2 exam question -- `db_config.py`: [TODO] Have fun, Jakob. Database configuration (arcane magic). -- `main.py`: The Flask server is in here -- `problem_details.py`: RFC 7807-compliant problem details responses for the API. ++ `__init__.py`: Fortunately, explaining this was not a Prog2 exam question ++ `db_config.py`: [TODO] Have fun, Jakob. Database configuration (arcane magic). ++ `main.py`: The Flask server is in here ++ `problem_details.py`: RFC 7807-compliant problem details responses for the API. diff --git a/portal/static/css/main.css b/portal/static/css/main.css index 8f4a54c..4022a13 100644 --- a/portal/static/css/main.css +++ b/portal/static/css/main.css @@ -4,11 +4,6 @@ :root { --shadow-width: 2px; - --box-bg: radial-gradient( - circle, - rgba(255, 255, 255, 1) 0%, - rgba(255, 255, 255, 0.85) 100% - ); } .blue { @@ -26,21 +21,6 @@ --primary-light: #2aac6d; } -:root { - --box-bg: radial-gradient( - circle, - rgb(43, 43, 43) 0%, - rgba(43, 43, 43, 0.85) 100% - ); -} - -.blue { - --primary: white; -} - -@media (prefers-color-scheme: dark) { -} - /* ---------------------- Scaffolding ---------------------- */ body { @@ -110,7 +90,11 @@ a { .box { border-radius: 1em; box-shadow: var(--shadow-width) var(--shadow-width) 5px rgba(0, 0, 0, 0.5); - background: var(--box-bg); + background: radial-gradient( + circle, + rgba(255, 255, 255, 1) 0%, + rgba(255, 255, 255, 0.85) 100% + ); } .button { diff --git a/portal/static/js/components/pieces/AccountRequired.mjs b/portal/static/js/components/pieces/AccountRequired.mjs index 9f0a566..35fd2ea 100644 --- a/portal/static/js/components/pieces/AccountRequired.mjs +++ b/portal/static/js/components/pieces/AccountRequired.mjs @@ -4,7 +4,7 @@ export const AccountRequired = { "CL-Account": "fa-regular fa-user", "Eigener Account": "fa-solid fa-user-plus", "Geteilter Account": "fa-solid fa-user-group", - "Uni-ID": "fa-solid fa-id-card", + "Uni-ID": "fa-solid fa-id-card" } return m("span.detail", [ -- GitLab