mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-10 15:07:35 +01:00
Add game jam 2022 ad
This commit is contained in:
parent
294037ec70
commit
ac3047f124
@ -7,6 +7,31 @@ from sqlalchemy.orm import joinedload
|
|||||||
from sqlalchemy.sql.expression import func
|
from sqlalchemy.sql.expression import func
|
||||||
|
|
||||||
|
|
||||||
|
class GameJam:
|
||||||
|
cover_image = type("", (), dict(url="https://raw.githubusercontent.com/GreenXenith/minetestgamejam/master/2022/images/banner.png"))()
|
||||||
|
tags = []
|
||||||
|
|
||||||
|
def getCoverImageURL(self):
|
||||||
|
return "https://raw.githubusercontent.com/GreenXenith/minetestgamejam/master/2022/images/banner.png"
|
||||||
|
|
||||||
|
def getURL(self, _name):
|
||||||
|
return "/gamejam/"
|
||||||
|
|
||||||
|
title = "Minetest Game Jam 2022"
|
||||||
|
author = None
|
||||||
|
|
||||||
|
short_desc = "It's back! We're holding a 3-week Game Jam starting November 1st. Sharpen your gamedev skills with a " \
|
||||||
|
"chance for cash prizes. "
|
||||||
|
type = type("", (), dict(value="Competition"))()
|
||||||
|
content_warnings = []
|
||||||
|
reviews = []
|
||||||
|
|
||||||
|
|
||||||
|
@bp.route("/gamejam/")
|
||||||
|
def gamejam():
|
||||||
|
return redirect("https://forum.minetest.net/viewtopic.php?t=28802")
|
||||||
|
|
||||||
|
|
||||||
@bp.route("/")
|
@bp.route("/")
|
||||||
def home():
|
def home():
|
||||||
def join(query):
|
def join(query):
|
||||||
@ -18,6 +43,7 @@ def home():
|
|||||||
count = query.count()
|
count = query.count()
|
||||||
|
|
||||||
featured = query.filter(Package.tags.any(name="featured")).order_by(func.random()).limit(6).all()
|
featured = query.filter(Package.tags.any(name="featured")).order_by(func.random()).limit(6).all()
|
||||||
|
featured.insert(0, GameJam())
|
||||||
|
|
||||||
new = join(query.order_by(db.desc(Package.approved_at))).limit(4).all()
|
new = join(query.order_by(db.desc(Package.approved_at))).limit(4).all()
|
||||||
pop_mod = join(query.filter_by(type=PackageType.MOD).order_by(db.desc(Package.score))).limit(8).all()
|
pop_mod = join(query.filter_by(type=PackageType.MOD).order_by(db.desc(Package.score))).limit(8).all()
|
||||||
|
Loading…
Reference in New Issue
Block a user