Included a `meta` tag in the base HTML template to provide the onion location for improved access through the Tor network. Enhanced context parameters to support this feature by adding the path generation logic. Updated argument parsing for better readability and consistency.
This change aims to enhance the privacy and accessibility of the site for users connecting via Tor.
Integrated a new "bridges.json" file to list various Matrix bot bridges, including Telegram, WhatsApp, Discord, and more. Updated the main script to load this data and render it on a new "bridges" template. The new "bridges.html" template provides users with a clear and intuitive interface to view available bridges and their respective Matrix IDs.
Improves user experience by providing a dedicated page for bridge information.
Introduced a new option `--serve` in `main.py` to provide an HTTP server for previewing the static site. Updated README with usage instructions. This enhancement allows users to quickly view the site on localhost without manually opening the `index.html` file.
Addresses usability improvements for local development.
Expanded the asset copying functionality to also handle the 'data' directory in addition to the 'assets' folder. This ensures that both static assets and data files are included in the output directory, streamlining the build process and ensuring all necessary resources are available in the generated static site.
Added a custom filter `month_name` to convert month numbers to their full names in templates. Updated the Transparency Report title to use this filter, enhancing readability and user experience. This change ensures that month names are displayed instead of numeric values, making the report titles clearer and more user-friendly.
Modified generate_transparency_table to include more detailed
transparency data by passing an additional boolean argument.
This change helps ensure all relevant data is captured and handled
properly, improving financial data accuracy and reporting.
- Added a new GitHub Actions workflow for the development branch to build and deploy the static site.
- Modified the existing workflow to trigger on the main branch instead of the static branch.
- Refactored the main.py script for consistency in string quotation.
The new workflow simplifies deployment processes during development, ensuring seamless and automated integration and testing.
Refactored the Flask application to generate a static site instead of running as a dynamic web app. Added a CI workflow to build and deploy the static site on pushes to the 'static' branch.
- Replaced Flask route handling with a function that generates HTML files using Jinja2 templates.
- Modified the argparse logic to trigger the static site generation.
- Updated the .gitignore file to exclude the build directory.
- Created a Forgejo Actions workflow to automate the build and deploy process.
This change improves performance and reduces server overhead by serving pre-rendered static content.
Changed the metrics route from "/_metrics/" to "/metrics/" for consistency and better readability. This should enhance usability and clarity for users accessing the metrics endpoint.
Extended `get_transparency_data` function to allow current balances by adding an `allow_current` parameter. This change facilitates the inclusion of up-to-date balance information in the metrics output, enhancing the accuracy of financial reporting.
Introduced a new debug configuration for production mode in VSCode, facilitating easier debugging in different environments. Additionally, updated the `get_transparency_data` function to handle year and month as strings, ensuring compatibility with subsequent operations. Added a necessary parameter to a function call in `main.py` to align with the updated function signature.
Enhanced `get_transparency_data` to support an `allow_current` flag, preventing the inclusion of data from the current month. This ensures historical data analysis remains consistent when current month data might be incomplete. Updated calls to the function to pass appropriate parameters.
Added a new /_metrics/ endpoint to expose financial data in Prometheus format, facilitating better monitoring and analytics.
Enhanced the get_latest_month function to optionally exclude the current month, preventing potential issues in incomplete data scenarios, with this behavior being toggled by the application's development mode status.
Introduced detailed financial reporting on a per-category basis, including notes for specific expenses and administrative costs in the data model. Enhanced the financial transparency feature by integrating a monthly financial report generator in the backend, enabling dynamic generation and display of detailed financial reports on the website. This commit also includes a new transparency report page, enriching user engagement with detailed insights into financial allocations and expenditures.
- Refactored finance-related data structures to include notes about specific financial activities.
- Extended the financial reporting capabilities to generate and display detailed notes and categorizations of expenses and incomes, improving transparency.
- Updated the UI to display these detailed reports, ensuring that users have access to comprehensive financial information.
This change aligns with our commitment to transparency and accountability by providing clear, detailed financial information to our members and donors.
Improved the `icon` function to handle attribute errors gracefully by falling back to an alternative reading method. This change addresses potential situations where the `file.response.file` attribute does not exist, ensuring icons are consistently loaded without causing runtime errors. The fallback method, `file.response.read()`, provides a reliable alternative for retrieving SVG files, thus enhancing the application's resilience and user experience.
Implemented a new template filter in Flask to dynamically render SVG icons, allowing for cleaner HTML templates and easier icon management. Added `coffee` and `envelope` SVG icons to the project's asset directory. This change not only streamlines the incorporation of new icons but also enhances the maintainability of the codebase by centralizing icon resources and reducing HTML clutter. Modified existing HTML templates to use this new dynamic icon rendering method, replacing hard-coded SVG and img tag icon implementations with the newly created template filter.
This update significantly improves the way icons are handled throughout the application, providing a more scalable and efficient approach to managing and displaying graphical elements.
- Moved `finances.json` and `services.json` to a new `data` directory for better organization.
- Introduced `get_latest_month` function in `helpers/finances.py` to dynamically determine the latest financial reporting period.
- Updated `main.py` to use the new data paths and implement dynamic generation of the transparency report date, improving the clarity of financial reports.
- Modified `membership.html` template to display financial report for the dynamically determined latest month, enhancing transparency for donations.
These changes aim to improve data management, make financial reporting more transparent, and ensure users have access to the most current financial information. Moving JSON files to a dedicated directory helps with organizing resources better. By dynamically determining the latest financial period, the application now avoids hard-coded dates, increasing accuracy and reducing maintenance effort.
Implemented dynamic financial transparency tables to automatically generate and display monthly financial data for memberships, including incomes, expenses, and balances across multiple currencies. This change involved adding a new `finances.py` helper to process financial data and integrate it with the existing Flask application. Additionally, adjusted the CSS for better alignment and readability of currency columns in the transparency tables.
- Introduced a `generate_transparency_table` function to generate HTML tables dynamically based on the latest financial data.
- Expanded the `main.py` Flask route for the membership page to include financial data rendering, ensuring up-to-date information is presented to users.
- Removed static HTML table from the membership template in favor of dynamically generated content, offering real-time insight into finances.
- Adjusted the width and text alignment of currency columns in `base.css` for enhanced table aesthetics and readability.
This update significantly improves the transparency of financial information, making it easier for members to understand the flow of funds within the organization.
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.
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.
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.