Skip to content

Commit bd6d5f2

Browse files
committed
Add more buttons with higher XP
1 parent 0f30eda commit bd6d5f2

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

templates/index.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,33 @@ <h1>Flask User Level XP System</h1>
113113
<input type="hidden" name="amount" value="50" />
114114
<button type="submit">Add 50 XP</button>
115115
</form>
116+
{% endif %} {% if user.level >= 60 %}<!--show if user has reached level 60-->
117+
<form
118+
action="{{ url_for('add_xp', user_id=user.id, amount=60) }}"
119+
method="post"
120+
>
121+
<!--form to add XP-->
122+
<input type="hidden" name="amount" value="60" />
123+
<button type="submit">Add 60 XP</button>
124+
</form>
125+
{% endif %} {% if user.level >= 75 %}<!--show if user has reached level 75-->
126+
<form
127+
action="{{ url_for('add_xp', user_id=user.id, amount=75) }}"
128+
method="post"
129+
>
130+
<!--form to add XP-->
131+
<input type="hidden" name="amount" value="75" />
132+
<button type="submit">Add 75 XP</button>
133+
</form>
134+
{% endif %} {% if user.level >= 100 %}<!--show if user has reached level 100-->
135+
<form
136+
action="{{ url_for('add_xp', user_id=user.id, amount=100) }}"
137+
method="post"
138+
>
139+
<!--form to add XP-->
140+
<input type="hidden" name="amount" value="100" />
141+
<button type="submit">Add 100 XP</button>
142+
</form>
116143
{% endif %}
117144
</ul>
118145
</body>

0 commit comments

Comments
 (0)