Skip to content

Commit

Permalink
fix: add manifest for standalone PWA
Browse files Browse the repository at this point in the history
  • Loading branch information
loiccoyle committed Nov 15, 2024
1 parent f90dce5 commit f13218d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tinyticker/web/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ def send_js(path):
def send_css(path):
return send_from_directory(TEMPLATE_PATH + "/css", path)

@app.route("/public/<path:path>")
def send_public(path):
return send_from_directory(TEMPLATE_PATH + "/public", path)

@app.errorhandler(500)
def internal_error(_):
sys.exit(1)
Expand Down
1 change: 1 addition & 0 deletions tinyticker/web/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
/>
<!-- CSS FILES -->
<link rel="stylesheet" type="text/css" href="css/uikit.min.css" />
<link rel="manifest" href="public/site.webmanifest" />
<!-- JS FILES -->
<script src="js/uikit.min.js"></script>
<script src="js/uikit-icons.min.js"></script>
Expand Down
5 changes: 5 additions & 0 deletions tinyticker/web/templates/public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "TinyTicker",
"short_name": "TinyTicker",
"display": "standalone"
}

0 comments on commit f13218d

Please sign in to comment.