Skip to content

Commit

Permalink
Create _tag_progress.html.jinja
Browse files Browse the repository at this point in the history
  • Loading branch information
vanvianen committed Jul 14, 2024
1 parent b4527ea commit 8603b59
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/jinja/tags/_tag_progress.html.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{#
Copyright 2024 Scape Agency BV
#}

{#
Progress Bar (<progress>)
===========================================================================
Represents the completion progress of a task.
Variables:
- `progress_value`: The current value of the progress bar. Defaults to "0".
- `progress_max`: The maximum value of the progress bar. Defaults to "100".
- `progress_text`: The text to be displayed inside the progress bar. Defaults to "Progress".
Notes:
- The `| e` filter is used to escape any special characters in the variables to prevent XSS attacks.
Links:
- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress
- https://www.w3schools.com/tags/tag_progress.asp
#}

<progress
value="{{ progress_value | default('0') | e }}"
max="{{ progress_max | default('100') | e }}"
>
{{ progress_text | default('Progress') | e }}
</progress>

0 comments on commit 8603b59

Please sign in to comment.