Skip to content

Commit

Permalink
Add gamejam 2023 banner
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenwardy committed Dec 2, 2023
1 parent 12664a4 commit 884e73e
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion app/blueprints/homepage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,31 @@

PKGS_PER_ROW = 4

GAMEJAM_BANNER = "https://jam.minetest.net/img/banner.png"


class GameJam:
cover_image = type("", (), dict(url=GAMEJAM_BANNER))()
tags = []

def get_cover_image_url(self):
return GAMEJAM_BANNER

def get_url(self, _name):
return "/gamejam/"

title = "Minetest Game Jam 2023: \"Unexpected\""
author = None

short_desc = "The game jam has begun! You have until December 21st to make a game with the theme \"Unexpected\"."
type = type("", (), dict(value="Competition"))()
content_warnings = []
reviews = []


@bp.route("/gamejam/")
def gamejam():
return redirect("https://forum.minetest.net/viewtopic.php?t=28802")
return redirect("https://jam.minetest.net/")


@bp.route("/")
Expand Down Expand Up @@ -71,6 +92,7 @@ def review_load(query):
spotlight_pkgs = package_spotlight_load(query.filter(
Package.collections.any(and_(Collection.name == "spotlight", Collection.author.has(username="ContentDB"))))
.order_by(func.random())).limit(6).all()
spotlight_pkgs.insert(0, GameJam())

new = package_load(query).order_by(db.desc(Package.approved_at)).limit(PKGS_PER_ROW).all() # 0.06
pop_mod = package_load(query).filter_by(type=PackageType.MOD).order_by(db.desc(Package.score)).limit(2*PKGS_PER_ROW).all()
Expand Down

0 comments on commit 884e73e

Please sign in to comment.