forked from MarseyWorld/MarseyWorld
Added offline service worker (serves a static webpage when no internet connection is present) (#285)
basedmaster
parent
07095e9737
commit
d6b4c3b166
|
@ -555,6 +555,10 @@ def formatting(v):
|
|||
def serviceworker():
|
||||
with open("files/assets/js/service-worker.js", "r", encoding="utf-8") as f: return Response(f.read(), mimetype='application/javascript')
|
||||
|
||||
@app.get("/offline-service-worker.js")
|
||||
def offlineserviceworker():
|
||||
with open("files/assets/js/offline-service-worker.js", "r", encoding="utf-8") as f: return Response(f.read(), mimetype='application/javascript')
|
||||
|
||||
@app.get("/settings/security")
|
||||
@auth_required
|
||||
def settings_security(v):
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
</head>
|
||||
|
||||
<body>
|
||||
<script src="/assets/js/bootstrap.js?v=252"></script>
|
||||
<script src="/assets/js/bootstrap.js?v=253"></script>
|
||||
|
||||
{% include "header.html" %}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
|
||||
{% endif %}
|
||||
|
||||
<script src="/assets/js/bootstrap.js?v=252"></script>
|
||||
<script src="/assets/js/bootstrap.js?v=253"></script>
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="{{asset('css/main.css')}}">
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<meta name="description" content="{{config('DESCRIPTION')}}">
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
|
||||
|
||||
<script src="/assets/js/bootstrap.js?v=252"></script>
|
||||
<script src="/assets/js/bootstrap.js?v=253"></script>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta name="description" content="{{config('DESCRIPTION')}}">
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
|
||||
|
||||
<script src="/assets/js/bootstrap.js?v=252"></script>
|
||||
<script src="/assets/js/bootstrap.js?v=253"></script>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<meta name="description" content="{{config('DESCRIPTION')}}">
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
|
||||
|
||||
<script src="/assets/js/bootstrap.js?v=252"></script>
|
||||
<script src="/assets/js/bootstrap.js?v=253"></script>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta name="description" content="{{config('DESCRIPTION')}}">
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
|
||||
|
||||
<script src="/assets/js/bootstrap.js?v=252"></script>
|
||||
<script src="/assets/js/bootstrap.js?v=253"></script>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<meta name="description" content="{{config('DESCRIPTION')}}">
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
|
||||
|
||||
<script src="/assets/js/bootstrap.js?v=252"></script>
|
||||
<script src="/assets/js/bootstrap.js?v=253"></script>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta name="description" content="{{config('DESCRIPTION')}}">
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
|
||||
|
||||
<script src="/assets/js/bootstrap.js?v=252"></script>
|
||||
<script src="/assets/js/bootstrap.js?v=253"></script>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
|
Loading…
Reference in New Issue