Files
godot-showreel-voting/templates/home.html
2025-10-22 13:26:28 +02:00

88 lines
3.2 KiB
HTML

<style>
h1 {
margin-bottom: 0.5em;
}
h2 span a {
font-size: 14px;
font-weight: 400;
color: gray;
position: relative;
left: 7px;
top: -3px;
text-decoration: none;
}
.grid-2 {
display: grid;
gap: 10px;
@media (min-width: 768px) {
grid-template-columns: 1fr 1fr;
}
}
</style>
<main>
<div class="panel padded">
{% comment %}
<!-- During the voting period -->
{% if user %}
{% if user.can_vote() %}
<p>Cast your votes until <strong>October 20th</strong> 📅</p>
<ul>
<li>Videos are presented in random order, and scores are hidden until the voting period ends</li>
<li>Your votes are anonymous</li>
<li>You can change your votes until the voting period ends</li>
<li>We encourage you to vote for as many entries as you can</li>
<li>If you found any issue or if you have a suggestion, please create an issue in our <a href="https://github.com/godotengine/godot-showreel-voting/issues">issue tracker</a></li>
</ul>
<p style="margin: 20px 0;">Happy voting!</p>
<a class="button primary" id="vote-link" href="/vote">Start Voting</a> <a class="button dim" href="/history">History</a>
{% else %}
<p>Only Godot Engine maintainers or members of the Development Fund can vote.</p>
<p>If you would like to participate in the process, make sure to sign up to <a href="https://fund.godotengine.org">the Development Fund</a>.</p>
<p style="margin-top: 20px;">
<a href="https://fund.godotengine.org" class="button">Sign Up</a>
</p>
<p style="margin-top: 20px;">
<strong>Already a fund member?</strong><br>
If you became a member recently, try to <a href="{{ url_for('oidc.logout') }}">logout</a> and then log in again. Also make sure that you use the same account as you used on the fund page!
</p>
{% endif %}
{% else %}
<hr>
You need to be logged in to vote:
<a href="/login" class="button dim small">Log In</a>
{% endif %}
{% endcomment %}
<h1>Welcome!</h1>
<p>The voting period for this years showreel videos has finished.</p>
<p style="margin: 20px 0;">Thank you to everyone who participated!</p>
</div>
<div class="panel padded" style="margin-top: 20px;">
<h2>Previous editions:<span><a href="https://www.youtube.com/playlist?list=PLeG_dAglpVo6EpaO9A1nkwJZOwrfiLdQ8">(View all)</a></span></h2>
<div class="grid-2" style="margin-top: 10px;">
<iframe width="560" height="315" src="https://www.youtube.com/embed/n1Lon_Q2T18" frameborder="0" allowfullscreen="" style="width:100%;aspect-ratio:16/9;height:auto; border-radius: 11px;"></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/W1_zKxYEP6Q" frameborder="0" allowfullscreen="" style="width:100%;aspect-ratio:16/9;height:auto; border-radius: 11px;"></iframe>
</div>
</div>
</main>
<script>
document.addEventListener("DOMContentLoaded", function() {
const voteLink = document.getElementById("vote-link");
if (voteLink) {
const token = localStorage.getItem("first-vote") || false;
if (!token) {
voteLink.href = "/before-you-vote";
voteLink.textContent = "Start Voting";
} else {
voteLink.href = "/vote";
voteLink.textContent = "Continue Voting";
}
}
});
</script>