feat(ui): base.html, macros (badges, lightbox), shared.js, register_shared_ui
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import os
|
||||
from flask import Blueprint, Flask
|
||||
from jinja2 import ChoiceLoader, FileSystemLoader
|
||||
|
||||
TEMPLATE_DIR = os.path.join(os.path.dirname(__file__), "templates")
|
||||
STATIC_DIR = os.path.join(os.path.dirname(__file__), "static")
|
||||
|
||||
|
||||
def register_shared_ui(app: Flask) -> None:
|
||||
app.jinja_loader = ChoiceLoader([app.jinja_loader, FileSystemLoader(TEMPLATE_DIR)])
|
||||
bp = Blueprint("shared_ui", __name__, static_folder=STATIC_DIR,
|
||||
static_url_path="/shared-static")
|
||||
app.register_blueprint(bp)
|
||||
|
||||
|
||||
__all__ = ["TEMPLATE_DIR", "STATIC_DIR", "register_shared_ui"]
|
||||
|
||||
Reference in New Issue
Block a user