mirror of
https://github.com/godotengine/godot-showreel-voting.git
synced 2025-12-31 17:49:06 +03:00
* initial backend setup
* copied db setup
* added login
* added autoincrement to ids
* update db again
* added script to populate with test data
* added functionality to fetch videos
* added vote functionality
* added logic to update video info
* added history
* updated readme
* Update thank you page
* fixed small bugs
* small improvements
* added admin view, UI fix
* fix vote buttons style
* added pagination
* added command to load sample data from csv
* Autoplay videos
* Adding before you vote page
* added yt video id extractor
* improve visibility for the history page votes
* added logic for before you vote disclaimer
* Remind people to set videos to unlisted and allowed for embed
* Update home.html
* Update home.html
* Add progress bar to total
* Small adjustments
* fix home {% if user %}
* Update macros.html
* limit vote views to users with specific roles
* added endpoint to delete votes
* added confirmation to the delete vote action
* Update non-fund members CTA
* allow voting to specific fund members
* added result csv endpoint
* updated auth
* revert adding 'vote_allowed' column, merged it into is_staff
* added `is_fund_member` attribute to table and updated code
* refactored code
* update style for voting page
* updated readme
* Add static files
* remove options from dropdown for users that can't vote
* added keyboard shortcuts to vote buttons
* added azerty support for shortcuts
* update skip to S key
* remove placeholder
---------
Co-authored-by: Emi <2206700+coppolaemilio@users.noreply.github.com>
46 lines
1.3 KiB
HTML
46 lines
1.3 KiB
HTML
<style>
|
|
.pagination {
|
|
text-align: center;
|
|
margin-top: 20px;
|
|
}
|
|
.pagination .button.current {
|
|
cursor: initial;
|
|
color: #409bff;
|
|
}
|
|
@media (prefers-color-scheme: light) {
|
|
.pagination .button.dim {
|
|
background: white;
|
|
color: inherit;
|
|
}
|
|
.pagination .button:disabled {
|
|
background: #f0f0f0;
|
|
color: #999;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
{% if elements.pages > 1 %}
|
|
<div class="pagination">
|
|
Page:
|
|
{% for page in elements.iter_pages() %}
|
|
{% if page %}
|
|
{% if page != elements.page %}
|
|
<button
|
|
class="button small dim"
|
|
type="button"
|
|
hx-get="{{ url_for(request_url, page=page) }}"
|
|
hx-target="{{ hx_target }}"
|
|
hx-swap="{{ strategy }} show:window:top"
|
|
>
|
|
{{ page }}
|
|
</button>
|
|
{% else %}
|
|
<button class="button small current" disabled>{{ page }}</button>
|
|
{% endif %}
|
|
{% else %}
|
|
<span class="ellipsis">…</span>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|