浏览代码

using absolute paths instead of <base> to fix bug

Rodja Trappe 2 年之前
父节点
当前提交
1cb0b82c2f
共有 1 个文件被更改,包括 6 次插入7 次删除
  1. 6 7
      nicegui/templates/index.html

+ 6 - 7
nicegui/templates/index.html

@@ -2,17 +2,16 @@
 <html>
   <head>
     <title>{{ title }}</title>
-    <base href="{{ prefix | safe }}/" />
-    <script src="static/socket.io.min.js"></script>
+    <script src="{{ prefix | safe }}/static/socket.io.min.js"></script>
     <link rel="shortcut icon" href="{{ favicon_url }}" />
-    <link href="static/fonts.css" rel="stylesheet" type="text/css" />
-    <link href="static/quasar.prod.css" rel="stylesheet" type="text/css" />
-    <script src="static/tailwind.min.js"></script>
+    <link href="{{ prefix | safe }}/static/fonts.css" rel="stylesheet" type="text/css" />
+    <link href="{{ prefix | safe }}/static/quasar.prod.css" rel="stylesheet" type="text/css" />
+    <script src="{{ prefix | safe }}/static/tailwind.min.js"></script>
     {{ head_html | safe }}
   </head>
   <body>
-    <script src="static/vue.global.prod.js"></script>
-    <script src="static/quasar.umd.prod.js"></script>
+    <script src="{{ prefix | safe }}/static/vue.global.prod.js"></script>
+    <script src="{{ prefix | safe }}/static/quasar.umd.prod.js"></script>
 
     {{ body_html | safe }}