Commit graph

3 commits

Author SHA1 Message Date
Kumi 0601a39829
feat: add dev mode warning and styling
Introduced a development mode toggle for the app, which, when enabled, displays a distinctive warning on every page to inform users they are viewing a development version of the site. This warning is styled for clear visibility. Development mode is toggled with a new `--dev` command line argument or by setting an environment variable. The change aims to prevent confusion between the development and production environments for both developers and early users.

- Added new CSS rules for a warning alert style in `base.css`.
- Modified `main.py` to check for a development mode flag and pass a warning message to the template if the flag is set.
- Updated `base.html` to include the warning message when present.
- Added a new template for the development warning message.
2024-05-27 17:37:30 +02:00
Kumi a6157c1f1e
feat: add CLI for server config
Introduced argument parsing to provide command-line options for configuring the server port and enabling debug mode, enhancing flexibility for local development or deployment needs. The changes include adjusting string quotes for consistency and minor formatting improvements.

This addition allows users to start the web server with custom configurations without modifying the source code directly, making it more convenient to run in different environments or debug as needed.
2024-04-17 10:45:28 +02:00
Kumi 193546fcde
Implement dynamic service rendering with Flask
Refactored the website to serve dynamic content using Flask, replacing static HTML pages. This allows for the centralized management of service data through a JSON file. Optimizations include:

- Added a .gitignore file to exclude Python and Flask-specific temporary files.
- Migrated static assets into an organized directory structure to facilitate Flask's static file serving.
- Removed redundant HTML files and created Flask template versions with dynamic content rendering.
- Introduced Caddy server configuration for the new Flask architecture, including headers for security and CORS policy, and reverse proxy settings for route handling.

With these changes, website maintenance and updates are simplified, allowing for service information to be updated in a single location (`services.json`), which then propagates to the user-facing pages automatically.
2023-12-31 13:59:13 +01:00