Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitAuto: [FEATURE] Add various styles to the progress bars: Flat #51

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
10 changes: 10 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Progress Bar Styles

This application supports multiple styles for progress bars. You can select a style using the `style` query parameter in the URL.

## Available Styles

- **Default**: The original style of the progress bar.
- **Flat**: A new flat design for the progress bar.

To use a specific style, append `?style=flat` to your progress bar URL for the flat style.
10 changes: 10 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
from flask import Flask, request, render_template

app = Flask(__name__)

@app.route('/progress')
def progress():
style = request.args.get('style', 'default')
if style not in ['default', 'flat']:
style = 'default'
return render_template(f'{style}_progress.svg')
from flask import Flask, make_response, redirect, render_template, request

app = Flask(__name__)
Expand Down
5 changes: 5 additions & 0 deletions templates/flat_progress.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion vercel.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
{

Check failure on line 2 in vercel.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

vercel.json#L2

Unexpected character ('{' (code 123)): was expecting double-quote to start field name
"src": "app.py",
"version": 2,
{
"src": "/(.*)",
"builds": [
"dest": "app.py"
}
{
"src": "app.py",
"use": "@vercel/python"
Expand All @@ -12,4 +18,4 @@
"dest": "app.py"
}
]
}
}