better way of handling injection of webmanifests

This commit is contained in:
Lee Salminen
2022-07-05 15:05:31 -06:00
parent 80f8d83548
commit 2cb87d96f2
3 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,3 @@
<link rel="manifest" href="/manifest/{{ user.id }}.webmanifest" />
{% extends "base.html" %} {% extends "base.html" %}
<!----> <!---->
{% from "macros.jinja" import window_vars with context %} {% from "macros.jinja" import window_vars with context %}

View File

@ -145,6 +145,7 @@ async def wallet(
"user": user.dict(), "user": user.dict(),
"wallet": wallet.dict(), "wallet": wallet.dict(),
"service_fee": service_fee, "service_fee": service_fee,
"web_manifest": f"/manifest/{user.id}.webmanifest"
}, },
) )

View File

@ -16,6 +16,10 @@
/> />
<meta name="mobile-web-app-capable" content="yes" /> <meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-capable" content="yes" />
{% if web_manifest %}
<link async="async" rel="manifest" href="{{ web_manifest }}" />
{% endif %}
{% block head_scripts %}{% endblock %} {% block head_scripts %}{% endblock %}
</head> </head>