update landing with dynamic links and counter for Seeds
This commit is contained in:
parent
882c5841f0
commit
2a2452e30f
|
@ -6,5 +6,6 @@ from datetime import timedelta
|
||||||
@app.route('/', methods=['GET', 'POST'])
|
@app.route('/', methods=['GET', 'POST'])
|
||||||
@cache.cached(timeout=300) # cache has to appear under app route for caching to work
|
@cache.cached(timeout=300) # cache has to appear under app route for caching to work
|
||||||
def landing():
|
def landing():
|
||||||
multiworlds = count(room for room in Room if room.creation_time >= datetime.utcnow() - timedelta(days=7))
|
rooms = count(room for room in Room if room.creation_time >= datetime.utcnow() - timedelta(days=7))
|
||||||
return render_template("landing.html", multiworlds=multiworlds)
|
seeds = count(seed for seed in Seed if seed.creation_time >= datetime.utcnow() - timedelta(days=7))
|
||||||
|
return render_template("landing.html", rooms=rooms, seeds=seeds)
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<a href="{{ url_for("uploads") }}">
|
<a href="{{ url_for("uploads") }}">
|
||||||
<button>Host Existing Game</button>
|
<button>Host Existing Game</button>
|
||||||
</a>
|
</a>
|
||||||
<a href="/tutorial">
|
<a href="{{ url_for('readme') }}">
|
||||||
<button>Setup Guide</button>
|
<button>Setup Guide</button>
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ url_for("mysterycheck") }}">
|
<a href="{{ url_for("mysterycheck") }}">
|
||||||
|
@ -43,11 +43,11 @@
|
||||||
<p>Currently, a locally installed client is required to play. This client should handle patching
|
<p>Currently, a locally installed client is required to play. This client should handle patching
|
||||||
your ROM files and connecting to the multiworld server. More information on how to set up a local
|
your ROM files and connecting to the multiworld server. More information on how to set up a local
|
||||||
client may be found on the
|
client may be found on the
|
||||||
<a href="/tutorial">Setup Guide</a>.</p>
|
<a href="{{ url_for("readme") }}">Setup Guide</a>.</p>
|
||||||
<p>This website is under active development. As such, your hosted rooms may occasionally disappear,
|
<p>This website is under active development. As such, your hosted rooms may occasionally disappear,
|
||||||
and there may be bugs. If you do happen to find a bug, please report it
|
and there may be bugs. If you do happen to find a bug, please report it
|
||||||
<a href="https://github.com/Berserker66/MultiWorld-Utilities/issues">here</a>.</p>
|
<a href="https://github.com/Berserker66/MultiWorld-Utilities/issues">here</a>.</p>
|
||||||
<p>{{ multiworlds }} games were started in the last 7 days.</p>
|
<p>{{ seeds }} games were created and {{ rooms }} hosted in the last 7 days.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<iframe src="https://discordapp.com/widget?id=731205301247803413&theme=light"
|
<iframe src="https://discordapp.com/widget?id=731205301247803413&theme=light"
|
||||||
|
|
Loading…
Reference in New Issue