Commit graph

25 commits

Author SHA1 Message Date
250daddcc6
feat: add 'membership-rallly' template and enhance matching
All checks were successful
Build and Deploy Static Site (Pride Theme) / build (push) Successful in 55s
Build and Deploy Static Site / build (push) Successful in 56s
Expanded the template matching condition to support templates starting with "membership". Added a new 'membership-rallly' template that extends the base 'membership' template, providing information about the Rallly Pro benefit for logged-in users and encouraging community support through donations.

This change improves the flexibility of template handling and introduces a specialized membership page aimed at enhancing user experience and engagement.
2024-09-24 14:43:17 +02:00
92238bcfa2
feat: add theme support and refactor assets
All checks were successful
Build and Deploy Static Site / build (push) Successful in 57s
Introduce support for themes by adding a `theme` parameter to the site generation process and as an argument to the main script. Created separate CSS files for different themes and adjusted the structure to accommodate the style changes. Also, updated the use of assets with new SVG images and logos.

Refactored HTML templates to dynamically select the theme and updated path references to images accordingly. Improved the development experience by adding a default "plain" theme and enhancing command-line argument parsing for theme selection.

Closes #7
2024-09-24 08:02:05 +02:00
9e8b54083a
feat: add dynamic timestamp to CSS cache-busting
All checks were successful
Build and Deploy Static Site / build (push) Successful in 1m2s
Included a timestamp in the static site generation to dynamically append to the CSS file version parameter. This ensures that users always get the latest CSS changes, reducing cache-related issues.
2024-08-04 16:24:17 +02:00
af29b0f3f5
feat: add onion location meta tag for Tor accessibility
All checks were successful
Build and Deploy Static Site / build (push) Successful in 57s
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.
2024-07-24 21:29:58 +02:00
440ef9828a
feat: add bridge data and display page for Matrix bots
All checks were successful
Build and Deploy Static Site / build (push) Successful in 58s
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.
2024-07-19 09:49:32 +02:00
a684c8b9df
feat: add built-in HTTP server to preview static site
Some checks failed
Build and Deploy Static Site / build (push) Has been cancelled
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.
2024-07-10 09:37:55 +02:00
ee2d53a36d
feat: extend asset copying to include data directory
All checks were successful
Build and Deploy Static Site / build (push) Successful in 58s
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.
2024-07-01 12:12:39 +02:00
5cdb9ad43b
feat: add filter to convert month number to name
All checks were successful
Build and Deploy Static Site / build (push) Successful in 57s
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.
2024-07-01 12:06:30 +02:00
feb273a8b0
Merge branch 'main' into dev
All checks were successful
Build and Deploy Static Site / build (push) Successful in 57s
2024-07-01 11:11:25 +02:00
7e89a67951
fix: include additional transparency data
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.
2024-07-01 11:11:04 +02:00
d337e8a207
feat(ci): automate build and deploy for dev and main branches
Some checks failed
Build and Deploy Static Site / build (push) Failing after 59s
- 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.
2024-07-01 10:24:24 +02:00
61de9ec81b
feat: convert Flask app to static site generator
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.
2024-07-01 09:56:04 +02:00
f9fa18a8c1
fix: update metrics endpoint URL
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.
2024-07-01 07:10:13 +02:00
1e2d1e4119
feat: add support for current balances in metrics
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.
2024-07-01 07:06:19 +02:00
1acc142dba
feat: add production debug config and enhance data handling
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.
2024-07-01 07:04:47 +02:00
a37e8ec5c3
feat: add option to exclude current month data
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.
2024-07-01 06:57:16 +02:00
2357427d96
feat: add metrics endpoint and improve month handling
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.
2024-06-30 19:15:45 +02:00
1a10e8968b
feat: Enhance financial transparency
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.
2024-06-03 16:12:21 +02:00
45e6b36260
feat: enhance icon loading robustness
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.
2024-05-29 19:02:19 +02:00
e77fc521bf
feat: introduce dynamic SVG icon functionality
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.
2024-05-29 18:57:32 +02:00
2a174aa342
feat: Enhance data structure and transparency features
- 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.
2024-05-29 15:04:57 +02:00
6033a47b6a
feat: enhance financial transparency with dynamic tables
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.
2024-05-29 14:50:52 +02:00
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
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
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