forked from Hay1tsme/artemis
refactor template directory to be artemis root dir
This commit is contained in:
@ -6,6 +6,7 @@ from core.frontend import FE_Base
|
||||
from core.config import CoreConfig
|
||||
from titles.wacca.database import WaccaData
|
||||
from titles.wacca.config import WaccaConfig
|
||||
from titles.wacca.const import WaccaConstants
|
||||
|
||||
class WaccaFrontend(FE_Base):
|
||||
def __init__(self, cfg: CoreConfig, environment: jinja2.Environment, cfg_dir: str) -> None:
|
||||
@ -13,6 +14,11 @@ class WaccaFrontend(FE_Base):
|
||||
self.data = WaccaData(cfg)
|
||||
self.game_cfg = WaccaConfig()
|
||||
self.game_cfg.update(yaml.safe_load(open(f"{cfg_dir}/wacca.yaml")))
|
||||
self.nav_name = "Wacca"
|
||||
|
||||
def render_GET(self, request: Request) -> bytes:
|
||||
return b""
|
||||
template = self.environment.get_template("titles/wacca/frontend/wacca_index.jinja")
|
||||
return template.render(
|
||||
title=f"{self.core_config.server.name} | {self.nav_name}",
|
||||
game_list=self.environment.globals["game_list"]
|
||||
).encode("utf-16")
|
||||
|
4
titles/wacca/frontend/wacca_index.jinja
Normal file
4
titles/wacca/frontend/wacca_index.jinja
Normal file
@ -0,0 +1,4 @@
|
||||
{% extends "core/frontend/index.jinja" %}
|
||||
{% block content %}
|
||||
<h1>Wacca</h1>
|
||||
{% endblock content %}
|
Reference in New Issue
Block a user