Starting from scratch as a Flask app

This commit is contained in:
Emi
2025-09-04 13:50:46 +02:00
parent ae00f402aa
commit 3d92366a1d
59 changed files with 159 additions and 8033 deletions

87
templates/about.html Normal file
View File

@@ -0,0 +1,87 @@
<style>
main {
max-width: 990px;
margin: 20px auto;
background-color: #7d7d7d1c;
padding: 20px;
border-radius: 15px;
}
section {
margin: 40px 0px;
}
h2 {
margin-top: 1em;
margin-bottom: 0.5em;
}
</style>
<main>
<p>
The Godot Engine showreel website is a platform to help with the submissions and voting of videos for the annual showreels. Each showreel is a roughly 5 minutes-long video featuring a set of games and tools that highlight the capabilities of Godot Engine. You can see the full list of past showreels on this <a href="https://youtube.com/playlist?list=PLeG_dAglpVo6EpaO9A1nkwJZOwrfiLdQ8">YouTube playlist</a>.
</p>
<p>
Users can submit their videos for one of the categories (desktop, mobile, or tools), and maintainers + <a href="https://fund.godotengine.org">development fund members</a> will be able to cast votes on each entry. During the voting process, scores will be hidden and videos will be presented in a random order to avoid any bias. After the voting phase ends, the video editors will use the highest-rated entries together with some current popular games selected by the <a href="https://godot.foundation">Godot Foundation</a> for the final showreels. The selection stages and deadlines are announced <a href="https://godotengine.org/blog/">on our blog</a>.
</p>
<h2 id="requirements-and-recommendations">Submission requirements:</h2>
<p>
When submitting your video, please make sure to ensure that these requirements are met. We withold the right to disqualify submissions that do not follow the rules.
</p>
<ul>
<li>Your game or tool has to be made in Godot.</li>
<li>If your game was featured in last year's showreel, it can not be submitted again.</li>
<li>Submit your game to <em>one catergory only</em>; the final showreel combines all entries into one video.</li>
<li>Your video should be short, ideally between 1 and 3 minutes.</li>
<li>Do not add logos or text overlays to your video. Our final edit will incorporate watermarks to credit you.</li>
<li>Your video must be captured with good quality and stable framerate. If your project uses Godot 4, consider using <a href="https://docs.godotengine.org/en/latest/tutorials/animation/creating_movies.html">Movie Maker mode</a>.</li>
<li>All content has to comply with <a href="https://support.google.com/youtube/answer/9288567">YouTube content guideliens</a> since the final video will posted there. Avoid nudity, gore, hateful or shocking content.</li>
</ul>
<p>
For desktop games, we recommend the minimum resolution to be 1080p. 60 FPS is a big plus. For mobile games, 720p or higher. The final showreel video will be edited and uploaded in 4K @ 60 FPS to maximize quality.
</p>
<p>
Don't worry about not having a perfect video! If your game is selected, we may contact you to discuss the video content and give you a chance to improve your submission for the final edit, so please provide with an up to date contact in the submission form.
</p>
<h2 id="how-to">How can I make a submission?</h2>
<p>
To submit your video, go to <a href="/submissions">your submissions</a> and click on the "New submission" button (it will be disabled if there is no currently opened showreel).
Select the showreel category you want to submit a video to, then fill in the fields with your game's title and a link to your video. You can add a link where interested viewers can follow the progress of your game (e.g. your website, a linktree, one social media account, etc.).
This link will be added in the description of the showreel's video.
</p>
<p>
Once submitted, your video will be visible in the list of your submissions. It can be edited or deleted there until voting starts.
If you want your submission to be edited or deleted during the vote, please <a href="#contact_us">contact us</a>.
</p>
<p>
If you are participating in the review, be informed that you will <em>not</em> be able to see your own video in the vote page, as a user cannot vote for their own proposals.
</p>
<h2 id="contact_us">Contact us</h2>
<p>You can contact the showreel administrators via our email address <a href="mailto:contact@godotengine.org">contact@godotengine.org</a>. Make sure to include your details so we can resolve any potential issue faster.</p>
<h2>License</h2>
<p>Kindly ensure that you are the rights-holder to all content you submit. We will only use your submission for the purpose of creating the previously described showreel video, which will be shared across official Godot Engine channels.</p>
<p>This website's code, built with Flask, is freely available on <a href="https://github.com/groud/godot-showreel-voting">GitHub</a> under the MIT license.</p>
<h2>Personal data</h2>
<p>
To run this website, we store the following data:
</p>
<ul>
<li>Your account username and email address.</li>
<li>Your video proposals and their associated data.</li>
<li>Your votes on other users' proposals.</li>
</ul>
<p>
For any request regarding the data associated with your account, please <a href="#contact_us">contact us</a>.
</p>
</main>

41
templates/default.html Normal file
View File

@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{% if description %}{{ description }}{% else %}Godot's annual showreel voting platform.{% endif %}">
<title>{% if title %}{{ title }} - {% endif %}Godot Showreel Voting</title>
<link rel="icon" href="https://store-beta.godotengine.org/static/favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="https://store-beta.godotengine.org/static/base.css">
<link rel="stylesheet" href="https://store-beta.godotengine.org/static/style/main.css">
<link rel="stylesheet" href="https://store-beta.godotengine.org/static/style/nav.css">
<link rel="stylesheet" href="https://store-beta.godotengine.org/static/style/asset-dashboard.css">
<link rel="stylesheet" href="https://store-beta.godotengine.org/static/style/asset-item.css">
<link rel="stylesheet" href="https://store-beta.godotengine.org/static/style/generic-form.css">
<link rel="stylesheet" href="https://store-beta.godotengine.org/static/style/popup.css">
<link rel="stylesheet" href="https://store-beta.godotengine.org/static/style/tags.css">
<link rel="stylesheet" href="https://store-beta.godotengine.org/static/style/page/library.css">
<link rel="stylesheet" href="https://store-beta.godotengine.org/static/style/code-hilite.css">
<script src="https://unpkg.com/htmx.org@1.9.12"></script>
<script src="https://store-beta.godotengine.org/static/js/tiny-slider.js"></script>
<meta property="og:site_name" content="Godot Showreel Voting">
<meta property="og:type" content="website">
<meta property="og:title" content="{% if title %}{{ title }} - {% endif %}Godot Showreel Voting">
<meta property="og:description" content="{% if description %}{{ description }}{% else %}Godot's annual showreel voting platform.{% endif %}">
<meta property="og:image" content="{% if thumbnail %}{{ storage.backend.url_for(thumbnail) }}{% else %}/static/images/share-image.webp{% endif %}">
<meta name="twitter:card" content="summary_large_image">
</head>
<body>
<noscript style="display: block; margin-top: 68px; background-color: #f8d7da; color: #721c24; padding: 1rem; margin-bottom: -68px; text-align: center;">
<p>JavaScript is disabled in your browser. Some features of this site may not work properly.</p>
</noscript>
{% import "macros.html" as macros %}
{{ macros.nav(user) }}
{{ content | safe }}
{{ macros.footer() }}
<script src="/static/main.js"></script>
</body>
</html>

1
templates/home.html Normal file
View File

@@ -0,0 +1 @@
Index

71
templates/macros.html Normal file
View File

@@ -0,0 +1,71 @@
{% macro nav(user) %}
<div class="nav-gap"></div>
<nav>
<div class="wrapper">
<a href="/">
<img class="logo" src="/static/images/nav-logo.svg" alt="Godot Showreel Voting">
</a>
<!-- search bar -->
<div style="height: 58px;"></div>
<!-- navigation links -->
<div class="navigation-links">
<a class="desktop" href="/about">About</a>
{% if user %}
<a class="desktop" href="/">My Library</a>
<div class="dropdown">
<a href="#" class="dd-button-view" onclick="document.getElementById('dropdown-menu').classList.toggle('show'); event.preventDefault();">
<img src="https://www.gravatar.com/avatar/{{ user.gravatar_hash }}?d=retro" alt="User" title="{{ user.name }}" class="user-icon gravatar">
</a>
<div id="dropdown-menu" class="dropdown-content">
<a href="/">{{ user.name }}</a>
<hr>
<a class="mobile" href="/about">About</a>
<hr class="mobile">
{% if user.moderator %}
<a href="/">Queue</a>
<a href="/">Administration</a>
<hr>
{% endif %}
<a href="/">My Library</a>
<a href="/">My Uploads</a>
<a href="/">Settings</a>
<a href="/" >Support</a>
<hr>
<a href="/">Logout</a>
</div>
</div>
{% else %}
<div class="dropdown">
<a href="/" class="dd-button-view logged-out">
<p class="desktop">Log in</p>
<img src="https://store-beta.godotengine.org/static/images/user.svg" alt="User" class="user-icon">
</a>
</div>
{% endif %}
<script>
// Close the dropdown if the user clicks outside of it
window.onclick = function(event) {
if (!event.target.closest('.dd-button-view')) {
var dropdowns = document.getElementsByClassName("dropdown-content");
for (var i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
}
</script>
</div>
</div>
</nav>
{% endmacro %}
{% macro footer() %}
<footer>
<p>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>.</p>
<br>
<p>&copy; 2025 - Godot Showreel Voting by <a href="https://godot.foundation">Godot Foundation</a></p>
</footer>
{% endmacro %}