diff --git a/README.md b/README.md index 7df8434..f18edee 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,14 @@ 一个简约的起始页

-![Snavigation](https://img.imsyy.top/other/Snavigation.png) +![Snavigation.png](https://s2.loli.net/2022/07/15/FE6U2BJCynHDep8.jpg) >尚未完成 ### Demo >由于 CDN 缓存原因,查看最新效果可能需要 `Ctrl` + `F5` 强制刷新浏览器缓存 -- [Snavigation](https://nav.imsyy.top) +- [Snavigation](https://snavigation.vercel.app/) ### 功能 diff --git a/css/font.css b/css/font.css index 9566397..4a23c99 100644 --- a/css/font.css +++ b/css/font.css @@ -1,14 +1,14 @@ @font-face { font-family: "MiSans"; - src: url('../font/MiSans-Regular.woff') format('woff'); + src: url('../font/MiSans-Regular.subset.woff2') format('woff'); } @font-face { font-family: "iconfont"; /* Project id 3222465 */ - src: url('//at.alicdn.com/t/font_3222465_kuwc8yy7j9g.woff2?t=1647790391080') format('woff2'), - url('//at.alicdn.com/t/font_3222465_kuwc8yy7j9g.woff?t=1647790391080') format('woff'), - url('//at.alicdn.com/t/font_3222465_kuwc8yy7j9g.ttf?t=1647790391080') format('truetype'); + src: url('../font/iconfont.woff2') format('woff2'), + url('../font/iconfont.woff') format('woff'), + url('../font/iconfont.ttf') format('truetype'); } .iconfont { diff --git a/font/MiSans-Regular.subset.ttf b/font/MiSans-Regular.subset.ttf new file mode 100644 index 0000000..f4f8196 Binary files /dev/null and b/font/MiSans-Regular.subset.ttf differ diff --git a/font/MiSans-Regular.subset.woff2 b/font/MiSans-Regular.subset.woff2 new file mode 100644 index 0000000..fa9e078 Binary files /dev/null and b/font/MiSans-Regular.subset.woff2 differ diff --git a/font/MiSans-Regular.woff b/font/MiSans-Regular.woff deleted file mode 100644 index c1a95a7..0000000 Binary files a/font/MiSans-Regular.woff and /dev/null differ diff --git a/font/MiSans-Regular.woff2 b/font/MiSans-Regular.woff2 new file mode 100644 index 0000000..66eb805 Binary files /dev/null and b/font/MiSans-Regular.woff2 differ diff --git a/font/iconfont.ttf b/font/iconfont.ttf new file mode 100644 index 0000000..19da85f Binary files /dev/null and b/font/iconfont.ttf differ diff --git a/font/iconfont.woff b/font/iconfont.woff new file mode 100644 index 0000000..790049b Binary files /dev/null and b/font/iconfont.woff differ diff --git a/font/iconfont.woff2 b/font/iconfont.woff2 new file mode 100644 index 0000000..b3f24fc Binary files /dev/null and b/font/iconfont.woff2 differ diff --git a/index.html b/index.html index 81c24de..85c41e9 100644 --- a/index.html +++ b/index.html @@ -130,29 +130,79 @@
- - + + - -
@@ -434,7 +469,7 @@
diff --git a/js/main.js b/js/main.js index df1d332..3c85d6d 100644 --- a/js/main.js +++ b/js/main.js @@ -28,6 +28,15 @@ window.addEventListener('load', function () { }); }, 800); + //中文字体缓加载-此处写入字体源文件 + //先行加载简体中文子集,后续补全字集 + //由于压缩过后的中文字体仍旧过大,可转移至对象存储或 CDN 加载 + const font = new FontFace( + "MiSans", + "url(" + "./font/MiSans-Regular.woff2" + ")" + ); + document.fonts.add(font); + }, false) //进入问候 @@ -152,8 +161,8 @@ var title2 = ` |_____|_| |_|_____/ |_| |_| ` var content = ` -版 本 号:1.0 -更新日期:2022-03-22 +版 本 号:1.1 +更新日期:2022-07-12 Github: https://github.com/imsyy/Snavigation ` diff --git a/js/set.js b/js/set.js index d24b787..96c1963 100644 --- a/js/set.js +++ b/js/set.js @@ -98,28 +98,52 @@ var se_list_preinstall = { // 默认快捷方式 var quick_list_preinstall = { '1': { - title: "哔哩哔哩", - url: "https://www.bilibili.com/", + title: "Vercel", + url: "https://vercel.com/", }, '2': { title: "GitHub", url: "https://github.com/", }, '3': { - title: "V2EX", - url: "https://www.v2ex.com/", + title: "Cloudflare", + url: "https://dash.cloudflare.com/", }, '4': { - title: "Steam", - url: "https://store.steampowered.com/", + title: "W3school", + url: "https://www.w3school.com.cn/", }, '5': { - title: "Github", - url: "https://github.com/", + title: "腾讯云", + url: "https://console.cloud.tencent.com/", }, '6': { - title: "Github", - url: "https://github.com/", + title: "阿里云", + url: "https://console.aliyun.com/", + }, + '7': { + title: "百度网盘", + url: "https://pan.baidu.com/", + }, + '8': { + title: "阿里云盘", + url: "https://www.aliyundrive.com/drive/", + }, + '9': { + title: "Office", + url: "https://www.office.com/", + }, + '10': { + title: "又拍云", + url: "https://console.upyun.com/", + }, + '11': { + title: "CSDN", + url: "https://www.csdn.net/", + }, + '12': { + title: "哔哩哔哩", + url: "https://www.bilibili.com/", } }; @@ -284,9 +308,11 @@ function blurWd() { $(".tool-all").css({ "transform": "translateY(-120%)" }); + //隐藏搜索建议 + $("#keywords").hide(); } -// 关键字提示 +// 搜索建议提示 function keywordReminder() { var keyword = $(".wd").val(); if (keyword != "") { @@ -622,7 +648,7 @@ $(document).ready(function () { keywordReminder(); }); - // 点击自动提示的关键字 + // 点击自动提示的搜索建议 $("#keywords").on("click", "div", function () { var wd = $(this).text(); $(".wd").val(wd); @@ -997,9 +1023,9 @@ $(document).ready(function () { timeout: 2000, message: '重置成功' }); - setTimeout(function () { - window.location.reload() - }, 1000); + // setTimeout(function () { + // window.location.reload() + // }, 1000); }, true], ['', function (instance, toast) { instance.hide({