diff --git a/cfg/standalone/config.json b/cfg/standalone/config.json index 74572a2..060a077 100644 --- a/cfg/standalone/config.json +++ b/cfg/standalone/config.json @@ -1,4 +1,5 @@ { + "showcase_url": "https://sample.spr.mcrn.ar", "framework": { "name": "soleprint", "slug": "soleprint", diff --git a/soleprint/Dockerfile b/soleprint/Dockerfile index 9848d09..3a38b0f 100644 --- a/soleprint/Dockerfile +++ b/soleprint/Dockerfile @@ -17,4 +17,4 @@ COPY . . EXPOSE 8000 -CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] +CMD ["uvicorn", "run:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/soleprint/artery/index.html b/soleprint/artery/index.html index 0b1cf81..faf28ec 100644 --- a/soleprint/artery/index.html +++ b/soleprint/artery/index.html @@ -419,6 +419,21 @@
Cada paso deja huella
+ {% if showcase_url %} + + {% endif %} + diff --git a/soleprint/run.py b/soleprint/run.py index 27f2b91..da8aba0 100644 --- a/soleprint/run.py +++ b/soleprint/run.py @@ -351,6 +351,10 @@ def artery_index(request: Request): from jinja2 import Template + # Load rooms and depots + rooms = load_data("rooms.json") or [] + depots = load_data("depots.json") or [] + template = Template(html_path.read_text()) return HTMLResponse( template.render( @@ -361,6 +365,8 @@ def artery_index(request: Request): pulses=pulses, shunts=shunts, plexuses=plexuses, + rooms=rooms, + depots=depots, soleprint_url="/", ) ) @@ -601,6 +607,7 @@ def index(request: Request): config = load_config() managed = config.get("managed", {}) managed_url = get_managed_url(request, managed) + showcase_url = config.get("showcase_url") return templates.TemplateResponse( "index.html", @@ -611,6 +618,7 @@ def index(request: Request): "station": "/station", "managed": managed, "managed_url": managed_url, + "showcase_url": showcase_url, }, )