hughyonng commited on
Commit
2ca86e3
·
1 Parent(s): 267e18d

fix: 去掉 /static/ 前缀,适配独立部署

Browse files
Files changed (4) hide show
  1. README.md +8 -0
  2. index.html +5 -5
  3. js/app.js +0 -1
  4. sw.js +4 -4
README.md CHANGED
@@ -1,4 +1,12 @@
1
  ---
2
  title: Shuku Web
 
 
 
3
  sdk: static
 
4
  ---
 
 
 
 
 
1
  ---
2
  title: Shuku Web
3
+ emoji: 📖
4
+ colorFrom: indigo
5
+ colorTo: green
6
  sdk: static
7
+ pinned: false
8
  ---
9
+
10
+ # Shuku Web
11
+
12
+ 书库 Web 前端
index.html CHANGED
@@ -7,7 +7,7 @@
7
  <title>BookNext</title>
8
  <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M30 65c-8 0-14-6-14-14 0-7 5-13 12-14 2-6 8-11 15-11 8 0 15 5 17 12 1 0 2 0 3 0 7 0 13 6 13 13s-6 13-13 13H30z' fill='%2370a1ff'/%3E%3Cpath d='M32 60c8-4 18-4 18 2V36c0-6-10-6-18-2v26zM68 60c-8-4-18-4-18 2V36c0-6 10-6 18-2v26z' fill='%23FFF' stroke='%231e90ff' stroke-width='2'/%3E%3C/svg%3E" />
9
  <link rel="apple-touch-icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M30 65c-8 0-14-6-14-14 0-7 5-13 12-14 2-6 8-11 15-11 8 0 15 5 17 12 1 0 2 0 3 0 7 0 13 6 13 13s-6 13-13 13H30z' fill='%2370a1ff'/%3E%3Cpath d='M32 60c8-4 18-4 18 2V36c0-6-10-6-18-2v26zM68 60c-8-4-18-4-18 2V36c0-6 10-6 18-2v26z' fill='%23FFF' stroke='%231e90ff' stroke-width='2'/%3E%3C/svg%3E" />
10
- <link rel="stylesheet" href="/static/css/main.css?v=1.1.0" />
11
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/4.4.168/pdf.min.mjs" type="module" id="pdfjs-script"></script>
12
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
13
  </head>
@@ -489,13 +489,13 @@
489
  </div>
490
  </div>
491
 
492
- <script type="module" src="/static/js/i18n.js?v=1.1.0"></script>
493
- <script type="module" src="/static/js/app.js?v=1.1.0"></script>
494
- <script type="module" src="/static/js/reader.js?v=1.1.0"></script>
495
  <script>
496
  if ('serviceWorker' in navigator) {
497
  window.addEventListener('load', () => {
498
- navigator.serviceWorker.register('/static/sw.js');
499
  });
500
  }
501
  </script>
 
7
  <title>BookNext</title>
8
  <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M30 65c-8 0-14-6-14-14 0-7 5-13 12-14 2-6 8-11 15-11 8 0 15 5 17 12 1 0 2 0 3 0 7 0 13 6 13 13s-6 13-13 13H30z' fill='%2370a1ff'/%3E%3Cpath d='M32 60c8-4 18-4 18 2V36c0-6-10-6-18-2v26zM68 60c-8-4-18-4-18 2V36c0-6 10-6 18-2v26z' fill='%23FFF' stroke='%231e90ff' stroke-width='2'/%3E%3C/svg%3E" />
9
  <link rel="apple-touch-icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M30 65c-8 0-14-6-14-14 0-7 5-13 12-14 2-6 8-11 15-11 8 0 15 5 17 12 1 0 2 0 3 0 7 0 13 6 13 13s-6 13-13 13H30z' fill='%2370a1ff'/%3E%3Cpath d='M32 60c8-4 18-4 18 2V36c0-6-10-6-18-2v26zM68 60c-8-4-18-4-18 2V36c0-6 10-6 18-2v26z' fill='%23FFF' stroke='%231e90ff' stroke-width='2'/%3E%3C/svg%3E" />
10
+ <link rel="stylesheet" href="/css/main.css?v=1.1.0" />
11
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/4.4.168/pdf.min.mjs" type="module" id="pdfjs-script"></script>
12
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
13
  </head>
 
489
  </div>
490
  </div>
491
 
492
+ <script type="module" src="/js/i18n.js?v=1.1.0"></script>
493
+ <script type="module" src="/js/app.js?v=1.1.0"></script>
494
+ <script type="module" src="/js/reader.js?v=1.1.0"></script>
495
  <script>
496
  if ('serviceWorker' in navigator) {
497
  window.addEventListener('load', () => {
498
+ navigator.serviceWorker.register('/sw.js');
499
  });
500
  }
501
  </script>
js/app.js CHANGED
@@ -1,4 +1,3 @@
1
- // filepath: backend/static/js/app.js
2
  import { t, setLang, getLang, applyI18n } from './i18n.js';
3
 
4
  const STATE = window.STATE || {
 
 
1
  import { t, setLang, getLang, applyI18n } from './i18n.js';
2
 
3
  const STATE = window.STATE || {
sw.js CHANGED
@@ -1,9 +1,9 @@
1
  const CACHE = 'booknext-v1';
2
  const PRECACHE = [
3
- '/static/css/main.css',
4
- '/static/js/i18n.js',
5
- '/static/js/app.js',
6
- '/static/js/reader.js',
7
  ];
8
  self.addEventListener('install', e => {
9
  e.waitUntil(
 
1
  const CACHE = 'booknext-v1';
2
  const PRECACHE = [
3
+ '/css/main.css',
4
+ '/js/i18n.js',
5
+ '/js/app.js',
6
+ '/js/reader.js',
7
  ];
8
  self.addEventListener('install', e => {
9
  e.waitUntil(