From 2a2452e30f20944185ce83eac1c57c85ccfaf251 Mon Sep 17 00:00:00 2001
From: Fabian Dill
Date: Thu, 13 Aug 2020 09:23:52 +0200
Subject: [PATCH] update landing with dynamic links and counter for Seeds
---
WebHostLib/landing.py | 7 ++++---
WebHostLib/templates/landing.html | 6 +++---
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/WebHostLib/landing.py b/WebHostLib/landing.py
index d06a978d1f..377758ed70 100644
--- a/WebHostLib/landing.py
+++ b/WebHostLib/landing.py
@@ -4,7 +4,8 @@ from .models import *
from datetime import timedelta
@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():
- multiworlds = count(room for room in Room if room.creation_time >= datetime.utcnow() - timedelta(days=7))
- return render_template("landing.html", multiworlds=multiworlds)
+ rooms = count(room for room in Room if room.creation_time >= datetime.utcnow() - timedelta(days=7))
+ 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)
diff --git a/WebHostLib/templates/landing.html b/WebHostLib/templates/landing.html
index 6635110f25..1d49303746 100644
--- a/WebHostLib/templates/landing.html
+++ b/WebHostLib/templates/landing.html
@@ -25,7 +25,7 @@
Host Existing Game
-
+
Setup Guide
@@ -43,11 +43,11 @@
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
client may be found on the
- Setup Guide .
+ Setup Guide .
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
here .
- {{ multiworlds }} games were started in the last 7 days.
+ {{ seeds }} games were created and {{ rooms }} hosted in the last 7 days.