diff --git a/favicon.png b/docs/assets/favicon.png similarity index 100% rename from favicon.png rename to docs/assets/favicon.png diff --git a/docs/manifest.webmanifest b/docs/manifest.webmanifest index f6c1e5f..40abee6 100644 --- a/docs/manifest.webmanifest +++ b/docs/manifest.webmanifest @@ -1 +1 @@ -{"name":"魔曰","short_name":"Abracadabra","start_url":".","display":"standalone","background_color":"#ffffff","lang":"en","scope":"./","id":"abracadabra","description":"对文字施以神秘魔法","theme_color":"#5753c9","icons":[{"src":"/favicon.png","sizes":"1024x1024","type":"image/png"}]} +{"name":"魔曰","short_name":"Abracadabra","start_url":".","display":"standalone","background_color":"#ffffff","lang":"en","scope":"./","id":"abracadabra","description":"对文字施以神秘魔法","theme_color":"#5753c9","icons":[{"src":"assets/favicon.png","sizes":"1024x1024","type":"image/png"}]} diff --git a/docs/sw.js b/docs/sw.js index 31c7e1e..4385526 100644 --- a/docs/sw.js +++ b/docs/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const n=(n,i)=>(n=new URL(n+".js",i).href,s[n]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=s,document.head.appendChild(e)}else e=n,importScripts(n),s()})).then((()=>{let e=s[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e})));self.define=(i,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let a={};const l=e=>n(e,t),u={module:{uri:t},exports:a,require:l};s[t]=Promise.all(i.map((e=>u[e]||l(e)))).then((e=>(r(...e),a)))}}define(["./workbox-20f94e4f"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/bg-CjkYdVK5.webp",revision:null},{url:"assets/favicon-aOK6_042.ico",revision:null},{url:"assets/index-BgJwclCu.css",revision:null},{url:"assets/index-vHVaBdQA.js",revision:null},{url:"assets/mdui-round-DrirKXBx.woff2",revision:null},{url:"assets/SamsungSans-Regular-BsRQoNIc.ttf",revision:null},{url:"index.html",revision:"99c81c660639da2d2b74f3a6c0895b79"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"manifest.webmanifest",revision:"8d3f1d971e6e4faf5b33ee454fe1f8ac"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html"))),e.registerRoute(/\.(?:png|jpg|jpeg|svg)$/,new e.CacheFirst({cacheName:"wisbayar-images",plugins:[new e.ExpirationPlugin({maxEntries:30})]}),"GET"),e.registerRoute(/.*\.js.*/,new e.StaleWhileRevalidate({cacheName:"wisbayar-js",plugins:[new e.ExpirationPlugin({maxEntries:30,maxAgeSeconds:2592e3}),new e.CacheableResponsePlugin({statuses:[200]})]}),"GET"),e.registerRoute(/.*\.css.*/,new e.StaleWhileRevalidate({cacheName:"wisbayar-css",plugins:[new e.ExpirationPlugin({maxEntries:20,maxAgeSeconds:2592e3}),new e.CacheableResponsePlugin({statuses:[200]})]}),"GET"),e.registerRoute(/.*\.html.*/,new e.StaleWhileRevalidate({cacheName:"wisbayar-html",plugins:[new e.ExpirationPlugin({maxEntries:20,maxAgeSeconds:2592e3}),new e.CacheableResponsePlugin({statuses:[200]})]}),"GET")})); +if(!self.define){let e,s={};const n=(n,i)=>(n=new URL(n+".js",i).href,s[n]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=s,document.head.appendChild(e)}else e=n,importScripts(n),s()})).then((()=>{let e=s[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e})));self.define=(i,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let a={};const l=e=>n(e,t),u={module:{uri:t},exports:a,require:l};s[t]=Promise.all(i.map((e=>u[e]||l(e)))).then((e=>(r(...e),a)))}}define(["./workbox-20f94e4f"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/bg-CjkYdVK5.webp",revision:null},{url:"assets/favicon-aOK6_042.ico",revision:null},{url:"assets/index-BgJwclCu.css",revision:null},{url:"assets/index-vHVaBdQA.js",revision:null},{url:"assets/mdui-round-DrirKXBx.woff2",revision:null},{url:"assets/SamsungSans-Regular-BsRQoNIc.ttf",revision:null},{url:"index.html",revision:"99c81c660639da2d2b74f3a6c0895b79"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"manifest.webmanifest",revision:"bb69ddda7143ce9786815542f7f773ee"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html"))),e.registerRoute(/\.(?:png|jpg|jpeg|svg)$/,new e.CacheFirst({cacheName:"wisbayar-images",plugins:[new e.ExpirationPlugin({maxEntries:30})]}),"GET"),e.registerRoute(/.*\.js.*/,new e.StaleWhileRevalidate({cacheName:"wisbayar-js",plugins:[new e.ExpirationPlugin({maxEntries:30,maxAgeSeconds:2592e3}),new e.CacheableResponsePlugin({statuses:[200]})]}),"GET"),e.registerRoute(/.*\.css.*/,new e.StaleWhileRevalidate({cacheName:"wisbayar-css",plugins:[new e.ExpirationPlugin({maxEntries:20,maxAgeSeconds:2592e3}),new e.CacheableResponsePlugin({statuses:[200]})]}),"GET"),e.registerRoute(/.*\.html.*/,new e.StaleWhileRevalidate({cacheName:"wisbayar-html",plugins:[new e.ExpirationPlugin({maxEntries:20,maxAgeSeconds:2592e3}),new e.CacheableResponsePlugin({statuses:[200]})]}),"GET")})); diff --git a/src/assets/favicon.png b/src/assets/favicon.png new file mode 100644 index 0000000..da1f2ac Binary files /dev/null and b/src/assets/favicon.png differ diff --git a/vite.config.js b/vite.config.js index c9f1bb5..beba576 100644 --- a/vite.config.js +++ b/vite.config.js @@ -27,7 +27,7 @@ export default defineConfig({ icons: [ //添加图标, 注意路径和图像像素正确 { - src: "/favicon.png", + src: "assets/favicon.png", sizes: "1024x1024", //icon大小要与实际icon大小一致 type: "image/png" // form_factor: "handset",