Skip to content

Commit

Permalink
Add more buttons with higher XP
Browse files Browse the repository at this point in the history
  • Loading branch information
lulunac27a committed Jan 21, 2025
1 parent 0f30eda commit bd6d5f2
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,33 @@ <h1>Flask User Level XP System</h1>
<input type="hidden" name="amount" value="50" />
<button type="submit">Add 50 XP</button>
</form>
{% endif %} {% if user.level >= 60 %}<!--show if user has reached level 60-->
<form
action="{{ url_for('add_xp', user_id=user.id, amount=60) }}"
method="post"
>
<!--form to add XP-->
<input type="hidden" name="amount" value="60" />
<button type="submit">Add 60 XP</button>
</form>
{% endif %} {% if user.level >= 75 %}<!--show if user has reached level 75-->
<form
action="{{ url_for('add_xp', user_id=user.id, amount=75) }}"
method="post"
>
<!--form to add XP-->
<input type="hidden" name="amount" value="75" />
<button type="submit">Add 75 XP</button>
</form>
{% endif %} {% if user.level >= 100 %}<!--show if user has reached level 100-->
<form
action="{{ url_for('add_xp', user_id=user.id, amount=100) }}"
method="post"
>
<!--form to add XP-->
<input type="hidden" name="amount" value="100" />
<button type="submit">Add 100 XP</button>
</form>
{% endif %}
</ul>
</body>
Expand Down

0 comments on commit bd6d5f2

Please sign in to comment.