├── README.md ├── css ├── animation.css ├── font.css ├── loading.css ├── mobile.css └── style.css ├── favicon.webp ├── font ├── MiSans-Regular.subset.ttf ├── MiSans-Regular.subset.woff2 ├── MiSans-Regular.woff2 ├── iconfont.ttf ├── iconfont.woff └── iconfont.woff2 ├── img ├── background1.webp ├── background10.webp ├── background2.webp ├── background3.webp ├── background4.webp ├── background5.webp ├── background6.webp ├── background7.webp ├── background8.webp ├── background9.webp └── icon │ ├── favicon_128.png │ ├── favicon_144.png │ ├── favicon_32.png │ └── favicon_64.png ├── index.php ├── js ├── js.cookie.js ├── xiarou-set1.js └── xr-main.js ├── vercel.json └── 预览图.png /README.md: -------------------------------------------------------------------------------- 1 | # 夏柔导航 2 | 一个简洁的导航页,原创@XINGMOUREN Snavigation 夏柔二次修改图片、天气接口 3 | # 预览 4 | ![预览图](预览图.png) 5 | # DEMO 6 | 夏柔导航 7 | 8 | # 功能 9 | 1. 载入动画 10 | 2. 搜索引擎切换 11 | 3. 时间及天气显示 12 | 4. 快捷方式自定义 13 | 5. 网站背景自定义 14 | 6. 数据备份及恢复 15 | 7. 移动端适配 16 | 17 | # API接口 18 | 22 | 23 | # 插件 24 | 29 | -------------------------------------------------------------------------------- /css/animation.css: -------------------------------------------------------------------------------- 1 | /*渐入动画*/ 2 | @keyframes fade { 3 | 0% { 4 | opacity: 0; 5 | } 6 | 7 | 100% { 8 | opacity: 1; 9 | } 10 | } 11 | 12 | @-webkit-keyframes fade { 13 | 0% { 14 | opacity: 0; 15 | } 16 | 17 | 100% { 18 | opacity: 1; 19 | } 20 | } 21 | 22 | @-moz-keyframes fade { 23 | 0% { 24 | opacity: 0; 25 | } 26 | 27 | 100% { 28 | opacity: 1; 29 | } 30 | } 31 | 32 | @-o-keyframes fade { 33 | 0% { 34 | opacity: 0; 35 | } 36 | 37 | 100% { 38 | opacity: 1; 39 | } 40 | } 41 | 42 | /*文字闪烁*/ 43 | @-webkit-keyframes fadenum { 44 | 45 | 0% { 46 | opacity: 1; 47 | } 48 | 49 | 50% { 50 | opacity: 0; 51 | } 52 | 53 | 100% { 54 | opacity: 1; 55 | } 56 | 57 | } 58 | 59 | @-moz-keyframes fadenum { 60 | 61 | 0% { 62 | opacity: 1; 63 | } 64 | 65 | 50% { 66 | opacity: 0; 67 | } 68 | 69 | 100% { 70 | opacity: 1; 71 | } 72 | 73 | } 74 | 75 | @-o-keyframes fadenum { 76 | 77 | 0% { 78 | opacity: 1; 79 | } 80 | 81 | 50% { 82 | opacity: 0; 83 | } 84 | 85 | 100% { 86 | opacity: 1; 87 | } 88 | 89 | } 90 | 91 | @keyframes fadenum { 92 | 93 | 0% { 94 | opacity: 1; 95 | } 96 | 97 | 50% { 98 | opacity: 0; 99 | } 100 | 101 | 100% { 102 | opacity: 1; 103 | } 104 | 105 | } 106 | 107 | /*下沉动画*/ 108 | @-moz-keyframes down { 109 | 0% { 110 | opacity: 0; 111 | top: 44%; 112 | /* -webkit-transform: translateY(-25%); 113 | -moz-transform: translateY(-25%); 114 | -o-transform: translateY(-25%); 115 | -ms-transform: translateY(-25%); 116 | transform: translateY(-25%) */ 117 | } 118 | 119 | 100% { 120 | opacity: 1; 121 | -ms-filter: none; 122 | filter: none; 123 | top: 46%; 124 | /* -webkit-transform: translateY(-20%); 125 | -moz-transform: translateY(-20%); 126 | -o-transform: translateY(-20%); 127 | -ms-transform: translateY(-20%); 128 | transform: translateY(-20%) */ 129 | } 130 | } 131 | 132 | @-webkit-keyframes down { 133 | 0% { 134 | opacity: 0; 135 | top: 44%; 136 | /* -webkit-transform: translateY(-25%); 137 | -moz-transform: translateY(-25%); 138 | -o-transform: translateY(-25%); 139 | -ms-transform: translateY(-25%); 140 | transform: translateY(-25%) */ 141 | } 142 | 143 | 100% { 144 | opacity: 1; 145 | -ms-filter: none; 146 | filter: none; 147 | top: 46%; 148 | /* -webkit-transform: translateY(-20%); 149 | -moz-transform: translateY(-20%); 150 | -o-transform: translateY(-20%); 151 | -ms-transform: translateY(-20%); 152 | transform: translateY(-20%) */ 153 | } 154 | } 155 | 156 | @-o-keyframes down { 157 | 0% { 158 | opacity: 0; 159 | top: 44%; 160 | /* -webkit-transform: translateY(-25%); 161 | -moz-transform: translateY(-25%); 162 | -o-transform: translateY(-25%); 163 | -ms-transform: translateY(-25%); 164 | transform: translateY(-25%) */ 165 | } 166 | 167 | 100% { 168 | opacity: 1; 169 | -ms-filter: none; 170 | filter: none; 171 | top: 46%; 172 | /* -webkit-transform: translateY(-20%); 173 | -moz-transform: translateY(-20%); 174 | -o-transform: translateY(-20%); 175 | -ms-transform: translateY(-20%); 176 | transform: translateY(-20%) */ 177 | } 178 | } 179 | 180 | @keyframes down { 181 | 0% { 182 | opacity: 0; 183 | top: 44%; 184 | /* -webkit-transform: translateY(-25%); 185 | -moz-transform: translateY(-25%); 186 | -o-transform: translateY(-25%); 187 | -ms-transform: translateY(-25%); 188 | transform: translateY(-25%) */ 189 | } 190 | 191 | 100% { 192 | opacity: 1; 193 | -ms-filter: none; 194 | filter: none; 195 | top: 46%; 196 | /* -webkit-transform: translateY(-20%); 197 | -moz-transform: translateY(-20%); 198 | -o-transform: translateY(-20%); 199 | -ms-transform: translateY(-20%); 200 | transform: translateY(-20%) */ 201 | } 202 | } -------------------------------------------------------------------------------- /css/font.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "MiSans"; 3 | src: url('../font/MiSans-Regular.subset.woff2') format('woff'); 4 | } 5 | 6 | @font-face { 7 | font-family: "iconfont"; 8 | /* Project id 3222465 */ 9 | src: url('../font/iconfont.woff2') format('woff2'), 10 | url('../font/iconfont.woff') format('woff'), 11 | url('../font/iconfont.ttf') format('truetype'); 12 | } 13 | 14 | .iconfont { 15 | font-family: "iconfont" !important; 16 | font-size: 16px; 17 | font-style: normal; 18 | -webkit-font-smoothing: antialiased; 19 | -moz-osx-font-smoothing: grayscale; 20 | } 21 | 22 | .icon-tianjia-:before { 23 | content: "\e643"; 24 | } 25 | 26 | .icon-taobao:before { 27 | content: "\e755"; 28 | } 29 | 30 | .icon-jingdong:before { 31 | content: "\e618"; 32 | } 33 | 34 | .icon-xinlangweibo:before { 35 | content: "\e601"; 36 | } 37 | 38 | .icon-zhihu:before { 39 | content: "\e60a"; 40 | } 41 | 42 | .icon-github:before { 43 | content: "\e691"; 44 | } 45 | 46 | .icon-delete:before { 47 | content: "\e94d"; 48 | } 49 | 50 | .icon-home:before { 51 | content: "\e964"; 52 | } 53 | 54 | .icon-xiugai:before { 55 | content: "\e626"; 56 | } 57 | 58 | .icon-bilibilidonghua:before { 59 | content: "\e8b1"; 60 | } 61 | 62 | .icon-wangluo:before { 63 | content: "\e600"; 64 | } 65 | 66 | .icon-sougousousuo:before { 67 | content: "\e685"; 68 | } 69 | 70 | .icon-360sousuo:before { 71 | content: "\e64d"; 72 | } 73 | 74 | .icon-baidu:before { 75 | content: "\eb49"; 76 | } 77 | 78 | .icon-bing:before { 79 | content: "\eb4c"; 80 | } 81 | 82 | .icon-google:before { 83 | content: "\ebaa"; 84 | } 85 | 86 | .icon-shezhi:before { 87 | content: "\e634"; 88 | } 89 | 90 | .icon-sousuo:before { 91 | content: "\e635"; 92 | } -------------------------------------------------------------------------------- /css/loading.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | #loading-box .loading-left-bg, 4 | #loading-box .loading-right-bg { 5 | position: fixed; 6 | z-index: 999998; 7 | width: 50%; 8 | height: 100%; 9 | background-color: rgb(81 81 81 / 80%); 10 | transition: all 0.7s cubic-bezier(0.42, 0, 0, 1.01); 11 | backdrop-filter: blur(10px); 12 | } 13 | 14 | #loading-box .loading-right-bg { 15 | right: 0; 16 | } 17 | 18 | #loading-box>.spinner-box { 19 | position: fixed; 20 | z-index: 999999; 21 | display: flex; 22 | justify-content: center; 23 | align-items: center; 24 | width: 100%; 25 | height: 100vh; 26 | } 27 | 28 | #loading-box .spinner-box .loading-word { 29 | position: absolute; 30 | color: #ffffff; 31 | font-size: 0.95rem; 32 | transform: translateY(64px); 33 | text-align: center; 34 | } 35 | 36 | p.loading-title { 37 | font-size: 1.25rem; 38 | margin: 20px 10px 4px 10px; 39 | } 40 | 41 | #loading-box .spinner-box .configure-core { 42 | width: 100%; 43 | height: 100%; 44 | background-color: #37474f; 45 | } 46 | 47 | div.loaded div.loading-left-bg { 48 | transform: translate(-100%, 0); 49 | } 50 | 51 | div.loaded div.loading-right-bg { 52 | transform: translate(100%, 0); 53 | } 54 | 55 | div.loaded div.spinner-box { 56 | display: none !important; 57 | } 58 | 59 | .loader { 60 | position: absolute; 61 | top: calc(50% - 32px); 62 | left: calc(50% - 32px); 63 | width: 64px; 64 | height: 64px; 65 | border-radius: 50%; 66 | perspective: 800px; 67 | transition: all 0.7s cubic-bezier(0.42, 0, 0, 1.01); 68 | } 69 | 70 | .inner { 71 | position: absolute; 72 | box-sizing: border-box; 73 | width: 100%; 74 | height: 100%; 75 | border-radius: 50%; 76 | } 77 | 78 | .inner.one { 79 | left: 0%; 80 | top: 0%; 81 | animation: rotate-one 1s linear infinite; 82 | border-bottom: 3px solid #EFEFFA; 83 | } 84 | 85 | .inner.two { 86 | right: 0%; 87 | top: 0%; 88 | animation: rotate-two 1s linear infinite; 89 | border-right: 3px solid #EFEFFA; 90 | } 91 | 92 | .inner.three { 93 | right: 0%; 94 | bottom: 0%; 95 | animation: rotate-three 1s linear infinite; 96 | border-top: 3px solid #EFEFFA; 97 | } 98 | 99 | @keyframes rotate-one { 100 | 0% { 101 | transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg); 102 | } 103 | 104 | 100% { 105 | transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg); 106 | } 107 | } 108 | 109 | @keyframes rotate-two { 110 | 0% { 111 | transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg); 112 | } 113 | 114 | 100% { 115 | transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg); 116 | } 117 | } 118 | 119 | @keyframes rotate-three { 120 | 0% { 121 | transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg); 122 | } 123 | 124 | 100% { 125 | transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg); 126 | } 127 | } -------------------------------------------------------------------------------- /css/mobile.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | /*小于1200px时*/ 4 | @media (max-width: 1200px) { 5 | 6 | /*书签及设置高度*/ 7 | .mark, 8 | .set { 9 | margin-top: 180px; 10 | } 11 | } 12 | 13 | /*小于720px时*/ 14 | @media (max-width: 720px) { 15 | 16 | /*书签*/ 17 | .quick, 18 | .quicks { 19 | width: 23%; 20 | min-width: 23%; 21 | max-width: 23%; 22 | } 23 | } 24 | 25 | /*小于512px时*/ 26 | @media (max-width: 512px) { 27 | 28 | /*文字大小*/ 29 | #time_text { 30 | font-size: 2.75rem; 31 | } 32 | 33 | #day { 34 | font-size: 1.05rem; 35 | } 36 | 37 | .weather { 38 | font-size: 1rem; 39 | } 40 | 41 | .wd::-webkit-input-placeholder { 42 | letter-spacing: 1px; 43 | font-size: 0.95rem; 44 | } 45 | 46 | /*搜索引擎*/ 47 | .se-li { 48 | width: 31.33%; 49 | min-width: 31.33%; 50 | max-width: 31.33%; 51 | } 52 | 53 | /*设置按钮*/ 54 | #menu i { 55 | font-size: 1.45rem; 56 | } 57 | 58 | /*书签*/ 59 | .quick, 60 | .quicks { 61 | width: 31.33%; 62 | min-width: 31.33%; 63 | max-width: 31.33%; 64 | } 65 | 66 | /*壁纸设置*/ 67 | #wallpaper { 68 | flex-wrap: wrap; 69 | } 70 | 71 | #wallpaper_text { 72 | margin-top: 0px; 73 | } 74 | 75 | .form-radio { 76 | margin: 0px 10px 30px 0px; 77 | } 78 | 79 | /*隐藏*/ 80 | .mobile { 81 | display: none; 82 | } 83 | } 84 | 85 | /* 大于568px时 */ 86 | @media (min-width: 568px) { 87 | .iziToast { 88 | border-radius: 30px !important; 89 | } 90 | 91 | .iziToast-wrapper { 92 | padding: 10px 0px !important; 93 | } 94 | } -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | :root { 4 | --body-background-color: #333333; 5 | --main-text-color: #efefef; 6 | --main-text-form-color: #333333; 7 | --main-text-form-hover-color: #efefef; 8 | /* --main-background-color: #ffffff40; 9 | --main-background-hover-color: #ffffff60; 10 | --main-background-active-color: #ffffff80; */ 11 | --main-background-color: #00000040; 12 | --main-background-hover-color: #acacac60; 13 | --main-background-active-color: #8a8a8a80; 14 | --main-button-color: #ffffff40; 15 | --main-button-hover-color: #00000030; 16 | --main-button-active-color: #00000020; 17 | --main-input-color: #ffffff30; 18 | --main-input-text-placeholder-color: #ffffff70; 19 | --main-text-shadow: 0px 0px 8px #00000066; 20 | --main-search-shadow: 0 0 20px #0000000d; 21 | --main-search-hover-shadow: 0 0 20px #00000033; 22 | --border-bottom-color-hover: #efefef80; 23 | --border-bottom-color-active: #efefef; 24 | } 25 | 26 | html, 27 | body { 28 | width: 100%; 29 | height: 100%; 30 | margin: 0; 31 | background-color: var(--body-background-color); 32 | -webkit-tap-highlight-color: transparent; 33 | -webkit-user-select: none; 34 | user-select: none; 35 | font-family: 'MiSans', sans-serif; 36 | } 37 | 38 | *, 39 | a, 40 | p { 41 | text-decoration: none; 42 | transition: 0.3s; 43 | color: var(--main-text-color); 44 | user-select: none; 45 | } 46 | 47 | section { 48 | display: block; 49 | position: fixed; 50 | width: 100%; 51 | height: 100%; 52 | min-height: 600px; 53 | opacity: 0; 54 | transition: ease 1.5s; 55 | } 56 | 57 | .noclickn { 58 | pointer-events: none; 59 | } 60 | 61 | /*背景*/ 62 | .bg-all { 63 | z-index: 0; 64 | position: absolute; 65 | top: calc(0px + 0px); 66 | left: 0; 67 | width: 100%; 68 | height: calc(100% - 0px); 69 | transition: .25s; 70 | } 71 | 72 | #bg { 73 | transform: scale(1.10); 74 | filter: blur(10px); 75 | position: fixed; 76 | left: 0; 77 | top: 0; 78 | width: 100%; 79 | height: 100%; 80 | object-fit: cover; 81 | transition: opacity 1s, transform .25s, filter .25s; 82 | backface-visibility: hidden; 83 | } 84 | 85 | img.error { 86 | display: none; 87 | } 88 | 89 | .cover { 90 | opacity: 0; 91 | position: fixed; 92 | left: 0; 93 | top: 0; 94 | width: 100%; 95 | height: 100%; 96 | background-image: radial-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, .5) 100%), radial-gradient(rgba(0, 0, 0, 0) 33%, rgba(0, 0, 0, .3) 166%); 97 | transition: .25s; 98 | } 99 | 100 | /*总布局*/ 101 | #content { 102 | width: 100%; 103 | height: 100%; 104 | display: flex; 105 | align-items: center; 106 | justify-content: center; 107 | } 108 | 109 | .con { 110 | width: 100%; 111 | display: flex; 112 | justify-content: center; 113 | flex-direction: column; 114 | align-items: center; 115 | } 116 | 117 | .sou { 118 | max-width: 680px; 119 | width: calc(100% - 60px); 120 | animation: fade; 121 | -webkit-animation: fade 0.5s; 122 | -moz-animation: fade 0.5s; 123 | -o-animation: fade 0.5s; 124 | -ms-animation: fade 0.5s; 125 | /* transform: translateY(-150%); */ 126 | } 127 | 128 | /* .box .sou { 129 | display: none; 130 | } */ 131 | 132 | .box .all-search { 133 | opacity: 0; 134 | transition: 0.3s; 135 | } 136 | 137 | /* 138 | 搜索框点击后更改样式 139 | */ 140 | 141 | /*搜索框*/ 142 | .onsearch .all-search { 143 | background-color: var(--main-text-form-hover-color); 144 | transform: translateY(-140%); 145 | transition: ease 0.3s !important; 146 | } 147 | 148 | /*背景模糊*/ 149 | .onsearch #bg { 150 | transform: scale(1.08) !important; 151 | filter: blur(10px) !important; 152 | transition: ease 0.3s !important; 153 | } 154 | 155 | /*搜索引擎按钮*/ 156 | .onsearch #icon-se { 157 | color: var(--main-text-form-color) !important; 158 | transition: ease 0.5s; 159 | } 160 | 161 | /*搜索按钮*/ 162 | .onsearch #icon-sou { 163 | color: var(--main-text-form-color) !important; 164 | transition: ease 0.5s; 165 | } 166 | 167 | /*时间上移*/ 168 | .onsearch .tool-all { 169 | transform: translateY(-140%) !important; 170 | } 171 | 172 | /*搜索引擎选择上移*/ 173 | .onsearch .search-engine { 174 | transform: translateY(-38%) !important; 175 | } 176 | 177 | 178 | /*时间*/ 179 | .tool-all { 180 | position: absolute; 181 | display: flex; 182 | flex-direction: column; 183 | align-items: center; 184 | transform: translateY(-120%); 185 | z-index: 1; 186 | } 187 | 188 | .time { 189 | color: var(--main-text-color); 190 | display: flex; 191 | flex-direction: column; 192 | align-items: center; 193 | } 194 | 195 | #point { 196 | margin: 0px 4px; 197 | animation: fadenum 2s infinite; 198 | -webkit-animation: fadenum 2s infinite; 199 | -moz-animation: fadenum 2s infinite; 200 | -o-animation: fadenum 2s linear infinite; 201 | -ms-animation: fadenum 2s linear infinite; 202 | } 203 | 204 | #time_text { 205 | font-size: 3rem; 206 | margin: 6px 0px; 207 | text-shadow: var(--main-text-shadow); 208 | transition: 0.2s; 209 | } 210 | 211 | #time_text:hover { 212 | cursor: pointer; 213 | transition: 0.2s; 214 | transform: scale(1.08); 215 | } 216 | 217 | #time_text:active { 218 | transition: 0.2s; 219 | opacity: 0.6; 220 | transform: scale(1.02); 221 | } 222 | 223 | #day { 224 | font-size: 1.15rem; 225 | opacity: 0.8; 226 | margin: 4px 0px; 227 | text-shadow: var(--main-text-shadow); 228 | } 229 | 230 | /*天气*/ 231 | .weather { 232 | color: #efefef; 233 | opacity: 0.8; 234 | font-size: 1.10rem; 235 | text-shadow: var(--main-text-shadow); 236 | } 237 | 238 | /*搜索框*/ 239 | .search, 240 | .wd, 241 | .s { 242 | padding: 0; 243 | margin: 0; 244 | border: none; 245 | outline: none; 246 | background: none; 247 | display: flex; 248 | justify-content: center; 249 | animation: fade; 250 | -webkit-animation: fade 0.5s; 251 | -moz-animation: fade 0.5s; 252 | -o-animation: fade 0.5s; 253 | -ms-animation: fade 0.5s; 254 | } 255 | 256 | .wd::-webkit-input-placeholder { 257 | letter-spacing: 2px; 258 | font-size: 1.05rem; 259 | } 260 | 261 | .all-search { 262 | display: flex; 263 | align-items: center; 264 | width: 100%; 265 | height: 43px; 266 | border-radius: 30px; 267 | color: var(--main-text-color); 268 | background-color: var(--main-background-color); 269 | box-shadow: var(--main-search-shadow); 270 | -webkit-backdrop-filter: blur(10px); 271 | backdrop-filter: blur(10px); 272 | overflow: hidden; 273 | transition: 0.5s ease; 274 | } 275 | 276 | .all-search:hover { 277 | box-shadow: var(--main-search-hover-shadow); 278 | } 279 | 280 | .con .sou form .wd { 281 | width: 100%; 282 | height: 100%; 283 | line-height: 100%; 284 | text-indent: 4px; 285 | font-size: 1.25rem; 286 | color: var(--main-text-form-color); 287 | /* background-color: transparent; */ 288 | } 289 | 290 | .sou form .se, 291 | .sou form .s { 292 | width: 40px; 293 | height: 40px; 294 | display: flex; 295 | padding: 10px; 296 | cursor: pointer; 297 | justify-content: center; 298 | align-items: center; 299 | } 300 | 301 | #icon-se, 302 | #icon-sou { 303 | font-size: 1.25rem; 304 | color: #efefef; 305 | } 306 | 307 | .sou form .se { 308 | transition: 0.3s; 309 | border-radius: 0px 30px 30px 0px; 310 | } 311 | 312 | .sou form .se:hover { 313 | transition: 0.3s; 314 | background: var(--main-background-color); 315 | border-radius: 0px 30px 30px 0px; 316 | } 317 | 318 | .sou-button { 319 | transition: 0.3s; 320 | border-radius: 30px 0px 0px 30px; 321 | } 322 | 323 | .sou-button:hover { 324 | transition: 0.3s; 325 | background: var(--main-background-color); 326 | border-radius: 30px 0px 0px 30px; 327 | } 328 | 329 | .all-search input::-webkit-input-placeholder { 330 | color: var(--main-text-color); 331 | text-align: center; 332 | } 333 | 334 | .all-search input::-moz-placeholder { 335 | color: var(--main-text-color); 336 | text-align: center; 337 | } 338 | 339 | .all-search input:-ms-input-placeholder { 340 | color: var(--main-text-color); 341 | text-align: center; 342 | } 343 | 344 | /*切换搜索引擎*/ 345 | .search-engine { 346 | position: absolute; 347 | margin-top: 10px; 348 | margin-left: 5px; 349 | padding: 10px; 350 | color: var(--main-text-color); 351 | background-color: var(--main-background-color); 352 | box-shadow: var(--main-search-shadow); 353 | -webkit-backdrop-filter: blur(10px); 354 | backdrop-filter: blur(10px); 355 | border-radius: 8px; 356 | display: none; 357 | z-index: 999; 358 | animation: fade; 359 | -webkit-animation: fade 0.5s; 360 | -moz-animation: fade 0.5s; 361 | -o-animation: fade 0.5s; 362 | -ms-animation: fade 0.5s; 363 | } 364 | 365 | .search-engine-list { 366 | display: flex; 367 | justify-content: flex-start; 368 | width: 100%; 369 | flex-wrap: wrap; 370 | height: 152px; 371 | overflow-y: auto; 372 | overflow-x: hidden; 373 | } 374 | 375 | .se-li { 376 | flex: 1; 377 | width: 23%; 378 | min-width: 23%; 379 | max-width: 23%; 380 | width: 100%; 381 | padding: 8px 0px; 382 | margin: 1%; 383 | border-radius: 8px; 384 | transition: 0.3s; 385 | background: var(--main-background-color); 386 | } 387 | 388 | .se-li:hover { 389 | cursor: pointer; 390 | transition: 0.3s; 391 | border-radius: 8px; 392 | background-color: var(--main-background-hover-color); 393 | } 394 | 395 | .se-li-text { 396 | display: flex; 397 | width: 100%; 398 | height: 100%; 399 | align-items: center; 400 | justify-content: center; 401 | } 402 | 403 | .se-li-text span { 404 | margin-left: 10px; 405 | overflow: hidden; 406 | text-overflow: ellipsis; 407 | white-space: nowrap; 408 | 409 | } 410 | 411 | /*搜索建议*/ 412 | #keywords { 413 | position: absolute; 414 | width: 100%; 415 | top: 46.5%; 416 | font-size: small; 417 | color: var(--main-text-color); 418 | background-color: var(--main-background-color); 419 | box-shadow: var(--main-search-shadow); 420 | border-radius: 8px; 421 | display: none; 422 | z-index: 999; 423 | -webkit-backdrop-filter: blur(10px); 424 | backdrop-filter: blur(10px); 425 | animation: down; 426 | -webkit-animation: down 0.5s; 427 | -moz-animation: down 0.5s; 428 | -o-animation: down 0.5s; 429 | -ms-animation: down 0.5s; 430 | } 431 | 432 | .keyword { 433 | padding: 6px 12px; 434 | border-radius: 8px; 435 | transition: 0.3s; 436 | animation: fade; 437 | -webkit-animation: fade 0.5s; 438 | -moz-animation: fade 0.5s; 439 | -o-animation: fade 0.5s; 440 | -ms-animation: fade 0.5s; 441 | } 442 | 443 | .keyword i { 444 | margin-right: 6px; 445 | font-size: small; 446 | } 447 | 448 | .keyword:hover, 449 | .keyword.choose { 450 | cursor: pointer; 451 | /* font-weight: bold; */ 452 | transition: 0.3s; 453 | text-indent: 10px; 454 | border-radius: 8px; 455 | background-color: var(--main-background-hover-color); 456 | border-radius: 8px; 457 | } 458 | 459 | /*书签及设置*/ 460 | .mark, 461 | .set { 462 | flex-direction: column; 463 | align-items: center; 464 | background: var(--main-background-color); 465 | border-radius: 8px; 466 | height: 400px; 467 | max-height: 400px; 468 | width: 80%; 469 | max-width: 900px; 470 | max-width: 900px; 471 | position: absolute; 472 | margin-top: 200px; 473 | z-index: 2000; 474 | animation: fade; 475 | -webkit-animation: fade 0.75s; 476 | -moz-animation: fade 0.75s; 477 | -o-animation: fade 0.75s; 478 | -ms-animation: fade 0.75s; 479 | } 480 | 481 | .mark .tab, 482 | .set .tabs { 483 | height: 40px; 484 | min-height: 40px; 485 | width: 100%; 486 | display: flex; 487 | justify-content: space-around; 488 | align-items: center; 489 | margin-bottom: 20px; 490 | } 491 | 492 | .set .tabs { 493 | margin-bottom: 0px !important; 494 | } 495 | 496 | .mark .tab .tab-item, 497 | .set .tabs .tab-items { 498 | width: 100%; 499 | height: 100%; 500 | display: flex; 501 | justify-content: center; 502 | align-items: center; 503 | font-size: 0.95rem; 504 | transition: 0.3s; 505 | border-bottom: 2px solid transparent; 506 | border-top: 2px solid transparent; 507 | } 508 | 509 | .mark .tab .tab-item:hover, 510 | .set .tabs .tab-items:hover { 511 | transition: 0.3s; 512 | cursor: pointer; 513 | border-bottom-color: var(--border-bottom-color-hover); 514 | } 515 | 516 | .mark .tab .tab-item.active, 517 | .set .tabs .tab-items.actives { 518 | border-bottom-color: var(--border-bottom-color-active); 519 | } 520 | 521 | .products, 522 | .productss { 523 | width: 100%; 524 | height: 100%; 525 | } 526 | 527 | .products .mainCont, 528 | .productss .mainConts { 529 | display: none; 530 | width: 100%; 531 | /* overflow: auto; */ 532 | flex-wrap: wrap; 533 | animation: fade; 534 | -webkit-animation: fade 0.5s; 535 | -moz-animation: fade 0.5s; 536 | -o-animation: fade 0.5s; 537 | -ms-animation: fade 0.5s; 538 | } 539 | 540 | .products .mainCont.selected, 541 | .productss .mainConts.selected { 542 | display: flex; 543 | } 544 | 545 | /*快捷方式*/ 546 | .quick-all, 547 | .quick-alls { 548 | display: flex; 549 | flex-wrap: wrap; 550 | justify-content: flex-start; 551 | align-content: flex-start; 552 | width: 100%; 553 | margin: 0px 20px 20px 20px; 554 | height: 316px; 555 | overflow: auto; 556 | } 557 | 558 | .quick, 559 | .quicks { 560 | flex: 1; 561 | height: 48px; 562 | background: var(--main-background-color); 563 | cursor: pointer; 564 | border-radius: 8px; 565 | width: 18%; 566 | min-width: 18%; 567 | max-width: 18%; 568 | margin: 0% 1% 2% 1%; 569 | transition: 0.3s; 570 | } 571 | 572 | .quick:hover, 573 | .quicks:hover { 574 | transition: 0.3s; 575 | background: var(--main-background-hover-color); 576 | } 577 | 578 | .quick:active, 579 | .quicks:active { 580 | transform: scale(0.95); 581 | transition: 0.3s; 582 | background: var(--main-background-active-color); 583 | } 584 | 585 | .quick a, 586 | .quicks a { 587 | width: 100%; 588 | height: 100%; 589 | display: flex; 590 | justify-content: center; 591 | align-items: center; 592 | overflow: hidden; 593 | text-overflow: ellipsis; 594 | white-space: nowrap; 595 | } 596 | 597 | /*设置区域统一样式*/ 598 | #menu { 599 | width: 44px; 600 | height: 44px; 601 | position: absolute; 602 | right: 8px; 603 | top: 8px; 604 | z-index: 2000000; 605 | cursor: pointer; 606 | transition: 0.5s; 607 | border-radius: 8px; 608 | transition: 0.3s; 609 | animation: fade; 610 | -webkit-animation: fade 1s; 611 | -moz-animation: fade 1s; 612 | -o-animation: fade 1s; 613 | -ms-animation: fade 1s; 614 | } 615 | 616 | #menu:hover { 617 | cursor: pointer; 618 | transition: 0.3s; 619 | background: var(--main-background-color); 620 | border-radius: 8px; 621 | } 622 | 623 | #menu:active { 624 | cursor: pointer; 625 | transform: scale(0.90); 626 | } 627 | 628 | #menu i { 629 | display: flex; 630 | justify-content: center; 631 | align-items: center; 632 | height: 100%; 633 | font-size: 1.75rem; 634 | transition: 0.3s; 635 | } 636 | 637 | .set_blocks { 638 | width: 100%; 639 | height: 340px; 640 | display: flex; 641 | flex-direction: column; 642 | justify-content: space-between; 643 | } 644 | 645 | .set_blocks_content { 646 | display: flex; 647 | margin: 20px 20px 0px 20px; 648 | height: 430px; 649 | flex-direction: column; 650 | justify-content: space-between; 651 | } 652 | 653 | .set_blocks_content .se_add_preinstall, 654 | .set_blocks_content .se_add_preinstalls, 655 | .from_items.button { 656 | display: flex; 657 | justify-content: center; 658 | } 659 | 660 | .set_se_list_add, 661 | .set_se_list_preinstall, 662 | .se_add_save, 663 | .se_add_cancel, 664 | .set_quick_list_add, 665 | .set_quick_list_preinstall, 666 | .quick_add_cancel, 667 | .quick_add_save, 668 | .wallpaper_save { 669 | width: 25%; 670 | display: flex; 671 | height: 40px; 672 | border-radius: 8px; 673 | background: var(--main-background-color); 674 | margin: 0 20px; 675 | justify-content: center; 676 | align-items: center; 677 | transition: 0.3s; 678 | } 679 | 680 | .set_se_list_add:hover, 681 | .set_se_list_preinstall:hover, 682 | .se_add_save:hover, 683 | .se_add_cancel:hover, 684 | .set_quick_list_add:hover, 685 | .set_quick_list_preinstall:hover, 686 | .quick_add_cancel:hover, 687 | .quick_add_save:hover, 688 | .wallpaper_save:hover { 689 | cursor: pointer; 690 | background: var(--main-background-hover-color); 691 | transition: 0.3s; 692 | } 693 | 694 | .set_se_list_add:active, 695 | .set_se_list_preinstall:active, 696 | .se_add_save:active, 697 | .se_add_cancel:active, 698 | .set_quick_list_add:active, 699 | .set_quick_list_preinstall:active, 700 | .quick_add_cancel:active, 701 | .quick_add_save:active, 702 | .wallpaper_save:active { 703 | transform: scale(0.90); 704 | background: var(--main-background-active-color); 705 | transition: 0.3s; 706 | } 707 | 708 | .set_blocks_content button { 709 | width: 40px; 710 | height: 100%; 711 | background: var(--main-button-color); 712 | border: 1px solid transparent; 713 | transition: 0.3s; 714 | } 715 | 716 | .set_blocks_content button:hover { 717 | cursor: pointer; 718 | background: var(--main-button-hover-color); 719 | } 720 | 721 | .set_blocks_content button:active { 722 | transform: scale(0.95); 723 | background: var(--main-button-active-color); 724 | } 725 | 726 | .se_list, 727 | .se_add_preinstall, 728 | .se_add_preinstalls, 729 | .quick_list, 730 | .add_content { 731 | animation: fade; 732 | -webkit-animation: fade 0.5s; 733 | -moz-animation: fade 0.5s; 734 | -o-animation: fade 0.5s; 735 | -ms-animation: fade 0.5s; 736 | } 737 | 738 | /*表单内容*/ 739 | .add_content { 740 | display: flex; 741 | flex-direction: column; 742 | height: 320px; 743 | justify-content: space-between; 744 | overflow-y: auto; 745 | overflow-x: hidden; 746 | } 747 | 748 | .froms { 749 | height: 100%; 750 | display: flex; 751 | flex-direction: column; 752 | justify-content: space-evenly; 753 | } 754 | 755 | .froms .from_items { 756 | display: flex; 757 | flex-direction: row; 758 | align-items: center; 759 | width: 100%; 760 | } 761 | 762 | .from_text { 763 | width: 60px; 764 | display: flex; 765 | justify-content: center; 766 | margin-right: 10px; 767 | } 768 | 769 | .add_content input, 770 | #wallpaper_url input { 771 | font-size: 1.05rem; 772 | outline: none; 773 | height: 40px; 774 | width: 100%; 775 | border-radius: 8px; 776 | padding: 0px 10px; 777 | border: none; 778 | background: var(--main-input-color); 779 | } 780 | 781 | .add_content input:hover, 782 | .add_content input:active, 783 | #wallpaper_url input:hover, 784 | #wallpaper_url input:active { 785 | box-shadow: var(--main-search-hover-shadow); 786 | } 787 | 788 | .add_content input::-webkit-input-placeholder, 789 | #wallpaper_url input::-webkit-input-placeholder { 790 | color: var(--main-input-text-placeholder-color); 791 | } 792 | 793 | input::-webkit-outer-spin-button, 794 | input::-webkit-inner-spin-button { 795 | -webkit-appearance: none; 796 | } 797 | 798 | input[type="number"] { 799 | -moz-appearance: textfield; 800 | } 801 | 802 | /*快捷方式和搜索引擎设置*/ 803 | .quick_list, 804 | .se_list { 805 | height: 260px; 806 | overflow-y: auto; 807 | } 808 | 809 | .quick_list_table, 810 | .se_list_table { 811 | display: flex; 812 | flex-direction: column; 813 | margin: 0px 10px; 814 | } 815 | 816 | .quick_list_div, 817 | .se_list_div { 818 | height: 40px; 819 | display: flex; 820 | flex-direction: row; 821 | align-items: center; 822 | justify-content: space-between; 823 | margin-bottom: 14px; 824 | background: var(--main-background-color); 825 | border-radius: 8px; 826 | transition: 0.3s; 827 | } 828 | 829 | .quick_list_div:hover, 830 | .se_list_div:hover { 831 | background: var(--main-background-hover-color); 832 | transition: 0.3s; 833 | } 834 | 835 | .quick_list_div_num, 836 | .se_list_num { 837 | height: 40px; 838 | width: 40px; 839 | min-width: 40px; 840 | display: flex; 841 | justify-content: center; 842 | align-items: center; 843 | background: var(--main-background-color); 844 | border-radius: 8px; 845 | } 846 | 847 | .quick_list_div_name, 848 | .se_list_name { 849 | width: 100%; 850 | margin-left: 10px; 851 | overflow: hidden; 852 | text-overflow: ellipsis; 853 | white-space: nowrap; 854 | } 855 | 856 | .quick_list_div_button, 857 | .se_list_button { 858 | height: 40px; 859 | border-radius: 8px; 860 | display: flex; 861 | align-items: center; 862 | justify-content: center; 863 | } 864 | 865 | /*背景图片*/ 866 | #wallpaper { 867 | display: flex; 868 | flex-direction: row; 869 | } 870 | 871 | #wallpaper_url { 872 | margin: 10px 0px; 873 | animation: fade; 874 | -webkit-animation: fade 0.5s; 875 | -moz-animation: fade 0.5s; 876 | -o-animation: fade 0.5s; 877 | -ms-animation: fade 0.5s; 878 | } 879 | 880 | #wallpaper_text { 881 | font-weight: bold; 882 | margin-top: 6px; 883 | } 884 | 885 | .form-radio { 886 | margin: 0px 10px 10px 0px; 887 | } 888 | 889 | input[type="radio"]+label { 890 | cursor: pointer; 891 | padding: 6px 10px; 892 | background: var(--main-background-color); 893 | border-radius: 8px; 894 | transition: 0.3s; 895 | border: 2px solid transparent; 896 | } 897 | 898 | input[type="radio"]:checked+label { 899 | background: var(--main-background-active-color); 900 | border: 2px solid var(--main-background-active-color); 901 | } 902 | 903 | /*数据备份*/ 904 | .set_tip { 905 | display: flex; 906 | margin: 20px; 907 | background: var(--main-background-color); 908 | padding: 20px; 909 | border-radius: 8px; 910 | flex-direction: column; 911 | } 912 | 913 | .set_button { 914 | margin: 20px; 915 | display: flex; 916 | justify-content: center; 917 | } 918 | 919 | .but-ordinary { 920 | width: 25%; 921 | display: flex; 922 | height: 40px; 923 | border-radius: 8px; 924 | background: var(--main-background-color); 925 | margin: 0 20px; 926 | justify-content: center; 927 | align-items: center; 928 | transition: 0.3s; 929 | } 930 | 931 | .but-ordinary:hover { 932 | cursor: pointer; 933 | background: var(--main-background-hover-color); 934 | transition: 0.3s; 935 | } 936 | 937 | .but-ordinary:active { 938 | transform: scale(0.90); 939 | background: var(--main-background-active-color); 940 | transition: 0.3s; 941 | } 942 | 943 | .set_version { 944 | display: flex; 945 | justify-content: center; 946 | flex-direction: column; 947 | align-items: center; 948 | } 949 | 950 | .set_version-text2 { 951 | font-size: small; 952 | color: var(--main-background-active-color); 953 | } 954 | 955 | /*页脚*/ 956 | .foot { 957 | position: absolute; 958 | bottom: 10px; 959 | z-index: 1000; 960 | text-align: center; 961 | width: 100%; 962 | height: 20px; 963 | line-height: 20px; 964 | } 965 | 966 | .power { 967 | color: var(--main-text-color); 968 | opacity: 0.8; 969 | font-size: small; 970 | text-shadow: var(--main-text-shadow); 971 | } 972 | 973 | /*弹窗样式*/ 974 | .iziToast { 975 | backdrop-filter: blur(10px) !important; 976 | } 977 | 978 | .iziToast:after { 979 | box-shadow: none !important; 980 | } 981 | 982 | .iziToast>.iziToast-body { 983 | display: flex; 984 | align-items: center; 985 | } 986 | 987 | .iziToast>.iziToast-body .iziToast-message { 988 | margin: 0 !important; 989 | } 990 | 991 | .iziToast>.iziToast-body .iziToast-texts { 992 | margin: 0 !important; 993 | } 994 | 995 | .iziToast>.iziToast-body .iziToast-buttons>a, 996 | .iziToast>.iziToast-body .iziToast-buttons>button, 997 | .iziToast>.iziToast-body .iziToast-buttons>input:not([type=checkbox]):not([type=radio]) { 998 | margin: 2px 6px !important; 999 | color: #efefef !important; 1000 | } 1001 | 1002 | .iziToast>.iziToast-body .iziToast-buttons>a:focus, 1003 | .iziToast>.iziToast-body .iziToast-buttons>button:focus, 1004 | .iziToast>.iziToast-body .iziToast-buttons>input:not([type=checkbox]):not([type=radio]):focus { 1005 | box-shadow: none !important; 1006 | } 1007 | 1008 | /*滚动条*/ 1009 | ::-webkit-scrollbar { 1010 | background-color: transparent !important; 1011 | width: 6px; 1012 | } 1013 | 1014 | ::-webkit-scrollbar-track { 1015 | display: none; 1016 | } 1017 | 1018 | ::-webkit-scrollbar-thumb { 1019 | border-radius: 10px; 1020 | box-shadow: inset 0 0 6px rgba(0, 0, 0, .1); 1021 | -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1); 1022 | background-color: var(--main-background-color); 1023 | } 1024 | 1025 | ::-webkit-scrollbar-thumb:hover { 1026 | background-color: var(--main-background-active-color); 1027 | } 1028 | 1029 | /*文字选中*/ 1030 | ::selection { 1031 | background: #00000040; 1032 | color: #000000b3; 1033 | } 1034 | 1035 | ::-moz-selection { 1036 | background: #00000040; 1037 | color: #000000b3; 1038 | } 1039 | 1040 | ::-webkit-selection { 1041 | background: #00000040; 1042 | color: #000000b3; 1043 | } 1044 | 1045 | .from_items input::selection { 1046 | background: #ffffff60; 1047 | color: #ffffffb3; 1048 | } 1049 | 1050 | /*关闭块*/ 1051 | .close_sou { 1052 | width: 100%; 1053 | height: 100%; 1054 | position: absolute; 1055 | } -------------------------------------------------------------------------------- /favicon.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/favicon.webp -------------------------------------------------------------------------------- /font/MiSans-Regular.subset.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/font/MiSans-Regular.subset.ttf -------------------------------------------------------------------------------- /font/MiSans-Regular.subset.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/font/MiSans-Regular.subset.woff2 -------------------------------------------------------------------------------- /font/MiSans-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/font/MiSans-Regular.woff2 -------------------------------------------------------------------------------- /font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/font/iconfont.ttf -------------------------------------------------------------------------------- /font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/font/iconfont.woff -------------------------------------------------------------------------------- /font/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/font/iconfont.woff2 -------------------------------------------------------------------------------- /img/background1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/img/background1.webp -------------------------------------------------------------------------------- /img/background10.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/img/background10.webp -------------------------------------------------------------------------------- /img/background2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/img/background2.webp -------------------------------------------------------------------------------- /img/background3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/img/background3.webp -------------------------------------------------------------------------------- /img/background4.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/img/background4.webp -------------------------------------------------------------------------------- /img/background5.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/img/background5.webp -------------------------------------------------------------------------------- /img/background6.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/img/background6.webp -------------------------------------------------------------------------------- /img/background7.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/img/background7.webp -------------------------------------------------------------------------------- /img/background8.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/img/background8.webp -------------------------------------------------------------------------------- /img/background9.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/img/background9.webp -------------------------------------------------------------------------------- /img/icon/favicon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/img/icon/favicon_128.png -------------------------------------------------------------------------------- /img/icon/favicon_144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/img/icon/favicon_144.png -------------------------------------------------------------------------------- /img/icon/favicon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/img/icon/favicon_32.png -------------------------------------------------------------------------------- /img/icon/favicon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/img/icon/favicon_64.png -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | GetIP(); //获取访客IP地址 23 | // 夏柔API 定制导航接口 无第二家 勿删 24 | $data = file_get_contents('https://v.api.aa1.cn/api/nav-api/?ip='.$user_ip); 25 | // 天气接口 https://api.aa1.cn/doc/api-tianqi-4.html 26 | $arr = json_decode($data, true); 27 | $myip_city = $arr['city']; // 城市 28 | $temp = $arr['temp']; // 实时温度 29 | $city = $arr['city']; // 城市 30 | $wd= $arr['wd']; // 温度 31 | $wdspd = $arr['wdspd']; // 天气 32 | $yiyan= $arr['yiyan']; // 一言 33 | 34 | ?> 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 免费导航 - 夏柔导航 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |

请稍等

75 | 正在玩命加载中 76 |
77 |
78 |
79 | 80 |
81 | 82 |
83 |
84 | 85 |
86 |
87 |
88 | 89 |
90 |
91 | 00:00 92 | 0 月 00 日 周一 93 |
94 |
95 | °C 96 |
97 |
98 | 99 |
100 |
101 | 115 | 116 | 148 |
149 |

150 | 151 | 313 | 314 | 317 | 318 | 570 |
571 |
572 | 573 |
574 |
Copyright © 2005 575 |  夏柔  &由字节跳动提供云计算服务 578 | 579 |
580 |
581 |
582 | 583 | 584 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | -------------------------------------------------------------------------------- /js/js.cookie.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * JavaScript Cookie v2.2.1 3 | * https://github.com/js-cookie/js-cookie 4 | * 5 | * Copyright 2006, 2015 Klaus Hartl & Fagner Brack 6 | * Released under the MIT license 7 | */ 8 | ; 9 | (function (factory) { 10 | var registeredInModuleLoader; 11 | if (typeof define === 'function' && define.amd) { 12 | define(factory); 13 | registeredInModuleLoader = true; 14 | } 15 | if (typeof exports === 'object') { 16 | module.exports = factory(); 17 | registeredInModuleLoader = true; 18 | } 19 | if (!registeredInModuleLoader) { 20 | var OldCookies = window.Cookies; 21 | var api = window.Cookies = factory(); 22 | api.noConflict = function () { 23 | window.Cookies = OldCookies; 24 | return api; 25 | }; 26 | } 27 | }(function () { 28 | function extend() { 29 | var i = 0; 30 | var result = {}; 31 | for (; i < arguments.length; i++) { 32 | var attributes = arguments[i]; 33 | for (var key in attributes) { 34 | result[key] = attributes[key]; 35 | } 36 | } 37 | return result; 38 | } 39 | 40 | function decode(s) { 41 | return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent); 42 | } 43 | 44 | function init(converter) { 45 | function api() {} 46 | 47 | function set(key, value, attributes) { 48 | if (typeof document === 'undefined') { 49 | return; 50 | } 51 | 52 | attributes = extend({ 53 | path: '/' 54 | }, api.defaults, attributes); 55 | 56 | if (typeof attributes.expires === 'number') { 57 | attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5); 58 | } 59 | 60 | // We're using "expires" because "max-age" is not supported by IE 61 | attributes.expires = attributes.expires ? attributes.expires.toUTCString() : ''; 62 | 63 | try { 64 | var result = JSON.stringify(value); 65 | if (/^[\{\[]/.test(result)) { 66 | value = result; 67 | } 68 | } catch (e) {} 69 | 70 | value = converter.write ? 71 | converter.write(value, key) : 72 | encodeURIComponent(String(value)) 73 | .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); 74 | 75 | key = encodeURIComponent(String(key)) 76 | .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent) 77 | .replace(/[\(\)]/g, escape); 78 | 79 | var stringifiedAttributes = ''; 80 | for (var attributeName in attributes) { 81 | if (!attributes[attributeName]) { 82 | continue; 83 | } 84 | stringifiedAttributes += '; ' + attributeName; 85 | if (attributes[attributeName] === true) { 86 | continue; 87 | } 88 | 89 | // Considers RFC 6265 section 5.2: 90 | // ... 91 | // 3. If the remaining unparsed-attributes contains a %x3B (";") 92 | // character: 93 | // Consume the characters of the unparsed-attributes up to, 94 | // not including, the first %x3B (";") character. 95 | // ... 96 | stringifiedAttributes += '=' + attributes[attributeName].split(';')[0]; 97 | } 98 | 99 | return (document.cookie = key + '=' + value + stringifiedAttributes); 100 | } 101 | 102 | function get(key, json) { 103 | if (typeof document === 'undefined') { 104 | return; 105 | } 106 | 107 | var jar = {}; 108 | // To prevent the for loop in the first place assign an empty array 109 | // in case there are no cookies at all. 110 | var cookies = document.cookie ? document.cookie.split('; ') : []; 111 | var i = 0; 112 | 113 | for (; i < cookies.length; i++) { 114 | var parts = cookies[i].split('='); 115 | var cookie = parts.slice(1).join('='); 116 | 117 | if (!json && cookie.charAt(0) === '"') { 118 | cookie = cookie.slice(1, -1); 119 | } 120 | 121 | try { 122 | var name = decode(parts[0]); 123 | cookie = (converter.read || converter)(cookie, name) || 124 | decode(cookie); 125 | 126 | if (json) { 127 | try { 128 | cookie = JSON.parse(cookie); 129 | } catch (e) {} 130 | } 131 | 132 | jar[name] = cookie; 133 | 134 | if (key === name) { 135 | break; 136 | } 137 | } catch (e) {} 138 | } 139 | 140 | return key ? jar[key] : jar; 141 | } 142 | 143 | api.set = set; 144 | api.get = function (key) { 145 | return get(key, false /* read as raw */ ); 146 | }; 147 | api.getJSON = function (key) { 148 | return get(key, true /* read as json */ ); 149 | }; 150 | api.remove = function (key, attributes) { 151 | set(key, '', extend(attributes, { 152 | expires: -1 153 | })); 154 | }; 155 | 156 | api.defaults = {}; 157 | 158 | api.withConverter = init; 159 | 160 | return api; 161 | } 162 | 163 | return init(function () {}); 164 | })); -------------------------------------------------------------------------------- /js/xiarou-set1.js: -------------------------------------------------------------------------------- 1 | /* 2 | 作者:D.Young 3 | 主页:https://yyv.me/ 4 | github:https://github.com/5iux/sou 5 | 日期:2019-07-26 6 | 版权所有,请勿删除 7 | ======================================== 8 | 由 yeetime 修改 9 | github:https://github.com/yeetime/sou2 10 | 日期:2019-12-13 11 | ======================================== 12 | 由 imsyy 二次修改 13 | github:https://github.com/imsyy/sou2 14 | 日期:2022-03-10 15 | ======================================== 16 | 由 夏柔 二次修改 17 | github:https://www.aa1.cn 18 | 日期:2022-12-18 19 | */ 20 | 21 | // 默认搜索引擎列表 22 | var se_list_preinstall = { 23 | '1': { 24 | id: 1, 25 | title: "百度", 26 | url: "https://www.baidu.com/s", 27 | name: "wd", 28 | icon: "iconfont icon-baidu", 29 | }, 30 | '2': { 31 | id: 2, 32 | title: "必应", 33 | url: "https://cn.bing.com/search", 34 | name: "q", 35 | icon: "iconfont icon-bing", 36 | }, 37 | '3': { 38 | id: 3, 39 | title: "谷歌", 40 | url: "https://www.google.com/search", 41 | name: "q", 42 | icon: "iconfont icon-google", 43 | }, 44 | '4': { 45 | id: 4, 46 | title: "搜狗", 47 | url: "https://www.sogou.com/web", 48 | name: "query", 49 | icon: "iconfont icon-sougousousuo", 50 | }, 51 | '5': { 52 | id: 5, 53 | title: "360", 54 | url: "https://www.so.com/s", 55 | name: "q", 56 | icon: "iconfont icon-360sousuo", 57 | }, 58 | '6': { 59 | id: 6, 60 | title: "微博", 61 | url: "https://s.weibo.com/weibo", 62 | name: "q", 63 | icon: "iconfont icon-xinlangweibo", 64 | }, 65 | '7': { 66 | id: 7, 67 | title: "知乎", 68 | url: "https://www.zhihu.com/search", 69 | name: "q", 70 | icon: "iconfont icon-zhihu", 71 | }, 72 | '8': { 73 | id: 8, 74 | title: "Github", 75 | url: "https://github.com/search", 76 | name: "q", 77 | icon: "iconfont icon-github", 78 | }, 79 | '9': { 80 | id: 9, 81 | title: "BiliBili", 82 | url: "https://search.bilibili.com/all", 83 | name: "keyword", 84 | icon: "iconfont icon-bilibilidonghua", 85 | }, 86 | '10': { 87 | id: 10, 88 | title: "淘宝", 89 | url: "https://s.taobao.com/search", 90 | name: "q", 91 | icon: "iconfont icon-taobao", 92 | }, 93 | '11': { 94 | id: 11, 95 | title: "京东", 96 | url: "https://search.jd.com/Search", 97 | name: "keyword", 98 | icon: "iconfont icon-jingdong", 99 | } 100 | }; 101 | 102 | // 默认快捷方式 103 | var quick_list_preinstall = { 104 | '1': { 105 | title: "Vercel", 106 | url: "https://vercel.com/", 107 | }, 108 | '2': { 109 | title: "GitHub", 110 | url: "https://github.com/", 111 | }, 112 | '3': { 113 | title: "Cloudflare", 114 | url: "https://dash.cloudflare.com/", 115 | }, 116 | '4': { 117 | title: "W3school", 118 | url: "https://www.w3school.com.cn/", 119 | }, 120 | '5': { 121 | title: "腾讯云", 122 | url: "https://console.cloud.tencent.com/", 123 | }, 124 | '6': { 125 | title: "阿里云", 126 | url: "https://console.aliyun.com/", 127 | }, 128 | '7': { 129 | title: "百度网盘", 130 | url: "https://pan.baidu.com/", 131 | }, 132 | '8': { 133 | title: "阿里云盘", 134 | url: "https://www.aliyundrive.com/drive/", 135 | }, 136 | '9': { 137 | title: "Office", 138 | url: "https://www.office.com/", 139 | }, 140 | '10': { 141 | title: "又拍云", 142 | url: "https://console.upyun.com/", 143 | }, 144 | '11': { 145 | title: "CSDN", 146 | url: "https://www.csdn.net/", 147 | }, 148 | '12': { 149 | title: "哔哩哔哩", 150 | url: "https://www.bilibili.com/", 151 | } 152 | }; 153 | 154 | // 获取搜索引擎列表 155 | function getSeList() { 156 | var se_list_local = Cookies.get('se_list'); 157 | if (se_list_local !== "{}" && se_list_local) { 158 | return JSON.parse(se_list_local); 159 | } else { 160 | setSeList(se_list_preinstall); 161 | return se_list_preinstall; 162 | } 163 | } 164 | 165 | // 设置搜索引擎列表 166 | function setSeList(se_list) { 167 | if (se_list) { 168 | Cookies.set('se_list', se_list, { 169 | expires: 36500 170 | }); 171 | return true; 172 | } 173 | return false; 174 | } 175 | 176 | // 获得默认搜索引擎 177 | function getSeDefault() { 178 | var se_default = Cookies.get('se_default'); 179 | return se_default ? se_default : "1"; 180 | } 181 | 182 | //背景图片 183 | var bg_img_preinstall = { 184 | "type": "2", // 1:使用主题默认的背景图片 2:关闭背景图片 3:使用自定义的背景图片 185 | "path": "", //自定义图片 186 | }; 187 | 188 | // 获取背景图片 189 | function getBgImg() { 190 | var bg_img_local = Cookies.get('bg_img'); 191 | if (bg_img_local && bg_img_local !== "{}") { 192 | return JSON.parse(bg_img_local); 193 | } else { 194 | setBgImg(bg_img_preinstall); 195 | return bg_img_preinstall; 196 | } 197 | } 198 | 199 | // 设置背景图片 200 | function setBgImg(bg_img) { 201 | if (bg_img) { 202 | Cookies.set('bg_img', bg_img, { 203 | expires: 36500 204 | }); 205 | return true; 206 | } 207 | return false; 208 | } 209 | 210 | // 设置-壁纸 211 | //$('#bg').attr('src','https://api.dujin.org/bing/1920.php') 212 | function setBgImgInit() { 213 | var bg_img = getBgImg(); 214 | $("input[name='wallpaper-type'][value=" + bg_img["type"] + "]").click(); 215 | if (bg_img["type"] === "5") { 216 | $("#wallpaper-url").val(bg_img["path"]); 217 | $("#wallpaper-button").fadeIn(100); 218 | $("#wallpaper_url").fadeIn(100); 219 | } else { 220 | $("#wallpaper_url").fadeOut(300); 221 | $("#wallpaper-button").fadeOut(300); 222 | } 223 | 224 | switch (bg_img["type"]) { 225 | case "1": 226 | var pictures = new Array(); 227 | pictures[0] = './img/background1.webp'; 228 | pictures[1] = './img/background2.webp'; 229 | pictures[2] = './img/background3.webp'; 230 | pictures[3] = './img/background4.webp'; 231 | pictures[4] = './img/background5.webp'; 232 | pictures[5] = './img/background6.webp'; 233 | pictures[6] = './img/background7.webp'; 234 | pictures[7] = './img/background8.webp'; 235 | pictures[8] = './img/background9.webp'; 236 | pictures[9] = './img/background10.webp'; 237 | var rd = Math.floor(Math.random() * 10); 238 | $('#bg').attr('src', pictures[rd]) //随机默认壁纸 239 | break; 240 | case "2": 241 | // $('#bg').attr('src', 'https://api.dujin.org/bing/1920.php') //必应每日 242 | $('#bg').attr('src', 'https://v.api.aa1.cn/api/api-fj-1/index.php?aa1=yuantu') //夏柔API 高清4k 243 | break; 244 | case "3": 245 | $('#bg').attr('src', 'https://v.api.aa1.cn/api/bz-v3/?msg=风景') //夏柔API 随机风景 246 | break; 247 | case "4": 248 | $('#bg').attr('src', 'https://api.ixiaowai.cn/api/api.php') //随机二次元 249 | break; 250 | case "5": 251 | $('#bg').attr('src', bg_img["path"]) //自定义 252 | break; 253 | } 254 | } 255 | 256 | // 搜索框高亮 257 | function focusWd() { 258 | $("body").addClass("onsearch"); 259 | } 260 | 261 | // 搜索框取消高亮 262 | function blurWd() { 263 | $("body").removeClass("onsearch"); 264 | //隐藏输入 265 | $(".wd").val(""); 266 | //隐藏搜索建议 267 | $("#keywords").hide(); 268 | } 269 | 270 | // 搜索建议提示 271 | function keywordReminder() { 272 | var keyword = $(".wd").val(); 273 | if (keyword != "") { 274 | $.ajax({ 275 | url: 'https://suggestion.baidu.com/su?wd=' + keyword, 276 | dataType: 'jsonp', 277 | jsonp: 'cb', //回调函数的参数名(键值)key 278 | success: function(data) { 279 | //获取宽度 280 | $("#keywords").css("width", $('.sou').width()); 281 | $("#keywords").empty().show(); 282 | $.each(data.s, function(i, val) { 283 | $('#keywords').append(`
${val}
`); 284 | }); 285 | $("#keywords").attr("data-length", data.s["length"]); 286 | $(".keyword").click(function() { 287 | $(".wd").val($(this).text()); 288 | $("#search-submit").click(); 289 | }); 290 | }, 291 | error: function() { 292 | $("#keywords").empty().show(); 293 | $("#keywords").hide(); 294 | } 295 | }) 296 | } else { 297 | $("#keywords").empty().show(); 298 | $("#keywords").hide(); 299 | } 300 | } 301 | 302 | // 搜索框数据加载 303 | function searchData() { 304 | var se_default = getSeDefault(); 305 | var se_list = getSeList(); 306 | var defaultSe = se_list[se_default]; 307 | if (defaultSe) { 308 | $(".search").attr("action", defaultSe["url"]); 309 | $("#icon-se").attr("class", defaultSe["icon"]); 310 | $(".wd").attr("name", defaultSe["name"]); 311 | } 312 | 313 | // 判断窗口大小,添加输入框自动完成 314 | // var wid = $("body").width(); 315 | // if (wid < 640) { 316 | // $(".wd").attr('autocomplete', 'off'); 317 | // } else { 318 | // $(".wd").focus(); 319 | // focusWd(); 320 | // } 321 | } 322 | 323 | // 搜索引擎列表加载 324 | function seList() { 325 | var html = ""; 326 | var se_list = getSeList(); 327 | for (var i in se_list) { 328 | html += `
329 | ${se_list[i]["title"]}
`; 330 | } 331 | $(".search-engine-list").html(html); 332 | } 333 | 334 | // 设置-搜索引擎列表加载 335 | function setSeInit() { 336 | var se_default = getSeDefault(); 337 | var se_list = getSeList(); 338 | var html = ""; 339 | for (var i in se_list) { 340 | var tr = `
${i}
`; 341 | if (i === se_default) { 342 | tr = `
343 |
`; 344 | } 345 | tr += `
${se_list[i]["title"]}
346 |
347 | 349 | 351 |
353 |
`; 354 | html += tr; 355 | } 356 | $(".se_list_table").html(html); 357 | } 358 | 359 | // 获取快捷方式列表 360 | function getQuickList() { 361 | var quick_list_local = Cookies.get('quick_list'); 362 | if (quick_list_local !== "{}" && quick_list_local) { 363 | return JSON.parse(quick_list_local); 364 | } else { 365 | setQuickList(quick_list_preinstall); 366 | return quick_list_preinstall; 367 | } 368 | } 369 | 370 | // 设置快捷方式列表 371 | function setQuickList(quick_list) { 372 | if (quick_list) { 373 | Cookies.set('quick_list', quick_list, { 374 | expires: 36500 375 | }); 376 | return true; 377 | } 378 | return false; 379 | } 380 | 381 | // 快捷方式数据加载 382 | function quickData() { 383 | var html = ""; 384 | var quick_list = getQuickList(); 385 | for (var i in quick_list) { 386 | html += `
387 | ${quick_list[i]['title']} 388 |
`; 389 | } 390 | $(".quick-all").html(html + `
`); 391 | } 392 | 393 | // 设置-快捷方式加载 394 | function setQuickInit() { 395 | var quick_list = getQuickList(); 396 | var html = ""; 397 | for (var i in quick_list) { 398 | tr = ` 399 |
400 |
${i}
401 |
${quick_list[i]['title']}
402 |
403 | 405 | 407 |
408 |
`; 409 | html += tr; 410 | } 411 | $(".quick_list_table").html(html); 412 | } 413 | 414 | /** 415 | * 下载文本为文件 416 | * @param filename 文件名 417 | * @param text 内容 418 | */ 419 | function download(filename, text) { 420 | var element = document.createElement('a'); 421 | element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); 422 | element.setAttribute('download', filename); 423 | 424 | element.style.display = 'none'; 425 | document.body.appendChild(element); 426 | 427 | element.click(); 428 | 429 | document.body.removeChild(element); 430 | } 431 | 432 | // 打开设置 433 | function openSet() { 434 | $("#menu").addClass('on'); 435 | 436 | openBox(); 437 | 438 | //更改设置图标 439 | $("#icon-menu").attr("class", "iconfont icon-home"); 440 | 441 | //隐藏书签打开设置 442 | $(".mark").css({ 443 | "display": "none", 444 | }); 445 | $(".set").css({ 446 | "display": "flex", 447 | }); 448 | } 449 | 450 | // 关闭设置 451 | function closeSet() { 452 | $("#menu").removeClass('on'); 453 | 454 | closeBox(); 455 | 456 | //更改设置图标 457 | $("#icon-menu").attr("class", "iconfont icon-shezhi"); 458 | 459 | //隐藏设置 460 | $(".set").css({ 461 | "display": "none", 462 | }); 463 | 464 | // 刷新主页数据 465 | seList(); 466 | quickData(); 467 | } 468 | 469 | // 书签显示 470 | function openBox() { 471 | $("#content").addClass('box'); 472 | $(".mark").css({ 473 | "display": "flex", 474 | }); 475 | //时间上移 476 | $(".tool-all").css({ 477 | "transform": 'translateY(-160%)' 478 | }); 479 | //背景模糊 480 | $('#bg').css({ 481 | "transform": 'scale(1.08)', 482 | "filter": "blur(10px)", 483 | "transition": "ease 0.3s", 484 | }); 485 | } 486 | 487 | // 书签关闭 488 | function closeBox() { 489 | $("#content").removeClass('box'); 490 | $(".mark").css({ 491 | "display": "none", 492 | }); 493 | //时间下移 494 | $(".tool-all").css({ 495 | "transform": 'translateY(-120%)' 496 | }); 497 | //背景模糊 498 | $('#bg').css({ 499 | "transform": 'scale(1)', 500 | "filter": "blur(0px)", 501 | "transition": "ease 0.3s", 502 | }); 503 | } 504 | 505 | //显示设置搜索引擎列表 506 | function showSe() { 507 | $(".se_list").show(); 508 | $(".se_add_preinstall").show(); 509 | } 510 | 511 | //隐藏设置搜索引擎列表 512 | function hideSe() { 513 | $(".se_list").hide(); 514 | $(".se_add_preinstall").hide(); 515 | } 516 | 517 | //显示设置快捷方式列表 518 | function showQuick() { 519 | $(".quick_list").show(); 520 | $(".se_add_preinstalls").show(); 521 | } 522 | 523 | //隐藏设置快捷方式列表 524 | function hideQuick() { 525 | $(".quick_list").hide(); 526 | $(".se_add_preinstalls").hide(); 527 | } 528 | 529 | 530 | $(document).ready(function() { 531 | 532 | // 搜索框数据加载 533 | searchData(); 534 | 535 | // 搜索引擎列表加载 536 | seList(); 537 | 538 | // 快捷方式数据加载 539 | quickData(); 540 | 541 | // 壁纸数据加载 542 | setBgImgInit(); 543 | 544 | // 点击事件 545 | $(document).on('click', function(e) { 546 | // 选择搜索引擎点击 547 | if ($(".search-engine").is(":hidden") && $(".se").is(e.target) || $(".search-engine").is(":hidden") && $("#icon-se").is(e.target)) { 548 | if ($(".se").is(e.target) || $("#icon-se").is(e.target)) { 549 | //获取宽度 550 | $(".search-engine").css("width", $('.sou').width() - 30); 551 | //出现动画 552 | $(".search-engine").slideDown(160); 553 | } 554 | } else { 555 | if (!$(".search-engine").is(e.target) && $(".search-engine").has(e.target).length === 0) { 556 | $(".search-engine").slideUp(160); 557 | } 558 | } 559 | 560 | // 自动提示隐藏 561 | if (!$(".sou").is(e.target) && $(".sou").has(e.target).length === 0) { 562 | $("#keywords").hide(); 563 | } 564 | }); 565 | 566 | // 时间点击 567 | $("#time_text").click(function() { 568 | if ($("#content").attr("class") === "box") { 569 | closeBox(); 570 | closeSet(); 571 | blurWd(); 572 | } else { 573 | openBox(); 574 | } 575 | }); 576 | 577 | // 搜索引擎列表点击 578 | $(".search-engine-list").on("click", ".se-li", function() { 579 | var url = $(this).attr('data-url'); 580 | var name = $(this).attr('data-name'); 581 | var icon = $(this).attr('data-icon'); 582 | $(".search").attr("action", url); 583 | $(".wd").attr("name", name); 584 | $("#icon-se").attr("class", icon); 585 | $(".search-engine").slideUp(160); 586 | }); 587 | 588 | // 搜索引擎列表点击 589 | $(".search-engine-list").on("click", ".se-li", function() { 590 | var url = $(this).attr('data-url'); 591 | var name = $(this).attr('data-name'); 592 | var icon = $(this).attr('data-icon'); 593 | $(".search").attr("action", url); 594 | $(".wd").attr("name", name); 595 | $("#icon-se").attr("class", icon); 596 | $(".search-engine").slideUp(160); 597 | }); 598 | 599 | // 搜索框点击事件 600 | $(document).on('click', '.sou', function() { 601 | focusWd(); 602 | $(".search-engine").slideUp(160); 603 | }); 604 | 605 | $(document).on('click', '.wd', function() { 606 | focusWd(); 607 | keywordReminder(); 608 | $(".search-engine").slideUp(160); 609 | }); 610 | 611 | // 点击其他区域关闭事件 612 | $(document).on('click', '.close_sou', function() { 613 | blurWd(); 614 | closeSet(); 615 | }); 616 | 617 | // 点击搜索引擎时隐藏自动提示 618 | $(document).on('click', '.se', function() { 619 | $('#keywords').toggle(); 620 | }); 621 | 622 | // 恢复自动提示 623 | $(document).on('click', '.se-li', function() { 624 | $('#keywords').show(); 625 | }); 626 | 627 | // 自动提示 (调用百度 api) 628 | $('.wd').keyup(function(event) { 629 | var key = event.keyCode; 630 | // 屏蔽上下键 631 | var shieldKey = [38, 40]; 632 | if (shieldKey.includes(key)) return; 633 | keywordReminder(); 634 | }); 635 | 636 | // 点击自动提示的搜索建议 637 | $("#keywords").on("click", ".wd", function() { 638 | var wd = $(this).text(); 639 | $(".wd").val(wd); 640 | $(".search").submit(); 641 | //隐藏输入 642 | $(".wd").val(""); 643 | $("#keywords").hide(); 644 | }); 645 | 646 | // 自动提示键盘方向键选择操作 647 | $(".wd").keydown(function(event) { //上下键获取焦点 648 | var key = event.keyCode; 649 | if ($.trim($(this).val()).length === 0) return; 650 | 651 | var id = $(".choose").attr("data-id"); 652 | if (id === undefined) id = 0; 653 | 654 | if (key === 38) { 655 | /*向上按钮*/ 656 | id--; 657 | } else if (key === 40) { 658 | /*向下按钮*/ 659 | id++; 660 | } else { 661 | return; 662 | } 663 | var length = $("#keywords").attr("data-length"); 664 | if (id > length) id = 1; 665 | if (id < 1) id = length; 666 | 667 | $(".keyword[data-id=" + id + "]").addClass("choose").siblings().removeClass("choose"); 668 | $(".wd").val($(".keyword[data-id=" + id + "]").text()); 669 | }); 670 | 671 | // 菜单点击 672 | $("#menu").click(function() { 673 | if ($(this).attr("class") === "on") { 674 | closeSet(); 675 | } else { 676 | openSet(); 677 | 678 | // 设置内容加载 679 | setSeInit(); //搜索引擎设置 680 | setQuickInit(); //快捷方式设置 681 | } 682 | }); 683 | 684 | // 快捷方式添加按钮点击 685 | $("#set-quick").click(function() { 686 | openSet(); 687 | 688 | // 设置内容加载 689 | setSeInit(); //搜索引擎设置 690 | setQuickInit(); //快捷方式设置 691 | 692 | //添加快捷方式 693 | $("#set-quick-menu").trigger('click'); 694 | $(".set_quick_list_add").trigger('click'); 695 | }); 696 | 697 | // 修改默认搜索引擎 698 | $(".se_list_table").on("click", ".set_se_default", function() { 699 | var name = $(this).val(); 700 | Cookies.set('se_default', name, { 701 | expires: 36500 702 | }); 703 | iziToast.show({ 704 | timeout: 8000, 705 | message: '是否设置为默认搜索引擎?', 706 | buttons: [ 707 | ['', function(instance, toast) { 708 | setSeInit(); 709 | instance.hide({ 710 | transitionOut: 'flipOutX', 711 | }, toast, 'buttonName'); 712 | iziToast.show({ 713 | message: '设置成功' 714 | }); 715 | setTimeout(function() { 716 | window.location.reload() 717 | }, 1000); 718 | }, true], 719 | ['', function(instance, toast) { 720 | instance.hide({ 721 | transitionOut: 'flipOutX', 722 | }, toast, 'buttonName'); 723 | }] 724 | ] 725 | }); 726 | }); 727 | 728 | // 搜索引擎添加 729 | $(".set_se_list_add").click(function() { 730 | $(".se_add_content input").val(""); 731 | 732 | hideSe(); 733 | $(".se_add_content").show(); 734 | }); 735 | 736 | // 搜索引擎保存 737 | $(".se_add_save").click(function() { 738 | var key_inhere = $(".se_add_content input[name='key_inhere']").val(); 739 | var key = $(".se_add_content input[name='key']").val(); 740 | var title = $(".se_add_content input[name='title']").val(); 741 | var url = $(".se_add_content input[name='url']").val(); 742 | var name = $(".se_add_content input[name='name']").val(); 743 | //var icon = $(".se_add_content input[name='icon']").val(); 744 | var icon = "iconfont icon-wangluo"; 745 | 746 | var num = /^\+?[1-9][0-9]*$/; 747 | if (!num.test(key)) { 748 | iziToast.show({ 749 | timeout: 2000, 750 | message: '序号 ' + key + ' 不是正整数' 751 | }); 752 | return; 753 | } 754 | 755 | var se_list = getSeList(); 756 | 757 | if (se_list[key]) { 758 | iziToast.show({ 759 | timeout: 8000, 760 | message: '搜索引擎 ' + key + ' 已有数据,是否覆盖?', 761 | buttons: [ 762 | ['', function(instance, toast) { 763 | se_list[key] = { 764 | title: title, 765 | url: url, 766 | name: name, 767 | icon: icon, 768 | }; 769 | setSeList(se_list); 770 | setSeInit(); 771 | $(".se_add_content").hide(); 772 | //显示列表 773 | showSe(); 774 | 775 | instance.hide({ 776 | transitionOut: 'flipOutX', 777 | }, toast, 'buttonName'); 778 | iziToast.show({ 779 | message: '覆盖成功' 780 | }); 781 | }, true], 782 | ['', function(instance, toast) { 783 | instance.hide({ 784 | transitionOut: 'flipOutX', 785 | }, toast, 'buttonName'); 786 | }] 787 | ] 788 | }); 789 | return; 790 | } 791 | 792 | if (key_inhere && key !== key_inhere) { 793 | delete se_list[key_inhere]; 794 | } 795 | 796 | se_list[key] = { 797 | title: title, 798 | url: url, 799 | name: name, 800 | icon: icon, 801 | }; 802 | setSeList(se_list); 803 | setSeInit(); 804 | iziToast.show({ 805 | timeout: 2000, 806 | message: '添加成功' 807 | }); 808 | $(".se_add_content").hide(); 809 | showSe(); 810 | }); 811 | 812 | // 关闭表单 813 | $(".se_add_cancel").click(function() { 814 | $(".se_add_content").hide(); 815 | 816 | //显示列表 817 | showSe(); 818 | }); 819 | 820 | // 搜索引擎修改 821 | $(".se_list").on("click", ".edit_se", function() { 822 | 823 | var se_list = getSeList(); 824 | var key = $(this).val(); 825 | $(".se_add_content input[name='key_inhere']").val(key); 826 | $(".se_add_content input[name='key']").val(key); 827 | $(".se_add_content input[name='title']").val(se_list[key]["title"]); 828 | $(".se_add_content input[name='url']").val(se_list[key]["url"]); 829 | $(".se_add_content input[name='name']").val(se_list[key]["name"]); 830 | // $(".se_add_content input[name='icon']").val("iconfont icon-Earth"); 831 | 832 | //隐藏列表 833 | hideSe(); 834 | 835 | $(".se_add_content").show(); 836 | }); 837 | 838 | // 搜索引擎删除 839 | $(".se_list").on("click", ".delete_se", function() { 840 | var se_default = getSeDefault(); 841 | var key = $(this).val(); 842 | if (key == se_default) { 843 | iziToast.show({ 844 | message: '默认搜索引擎不可删除' 845 | }); 846 | } else { 847 | iziToast.show({ 848 | timeout: 8000, 849 | message: '搜索引擎 ' + key + ' 是否删除?', 850 | buttons: [ 851 | ['', function(instance, toast) { 852 | var se_list = getSeList(); 853 | delete se_list[key]; 854 | setSeList(se_list); 855 | setSeInit(); 856 | instance.hide({ 857 | transitionOut: 'flipOutX', 858 | }, toast, 'buttonName'); 859 | iziToast.show({ 860 | message: '删除成功' 861 | }); 862 | }, true], 863 | ['', function(instance, toast) { 864 | instance.hide({ 865 | transitionOut: 'flipOutX', 866 | }, toast, 'buttonName'); 867 | }] 868 | ] 869 | }); 870 | } 871 | }); 872 | 873 | // 恢复预设搜索引擎 874 | $(".set_se_list_preinstall").click(function() { 875 | iziToast.show({ 876 | timeout: 8000, 877 | message: '现有搜索引擎数据将被清空', 878 | buttons: [ 879 | ['', function(instance, toast) { 880 | setSeList(se_list_preinstall); 881 | Cookies.set('se_default', 1, { 882 | expires: 36500 883 | }); 884 | setSeInit(); 885 | instance.hide({ 886 | transitionOut: 'flipOutX', 887 | }, toast, 'buttonName'); 888 | iziToast.show({ 889 | message: '重置成功' 890 | }); 891 | setTimeout(function() { 892 | window.location.reload() 893 | }, 1000); 894 | }, true], 895 | ['', function(instance, toast) { 896 | instance.hide({ 897 | transitionOut: 'flipOutX', 898 | }, toast, 'buttonName'); 899 | }] 900 | ] 901 | }); 902 | }); 903 | 904 | // 设置-快捷方式添加 905 | $(".set_quick_list_add").click(function() { 906 | $(".quick_add_content input").val(""); 907 | $(".quick_add_content").show(); 908 | 909 | //隐藏列表 910 | hideQuick(); 911 | }); 912 | 913 | // 设置-快捷方式保存 914 | $(".quick_add_save").click(function() { 915 | var key_inhere = $(".quick_add_content input[name='key_inhere']").val(); 916 | var key = $(".quick_add_content input[name='key']").val(); 917 | var title = $(".quick_add_content input[name='title']").val(); 918 | var url = $(".quick_add_content input[name='url']").val(); 919 | var img = $(".quick_add_content input[name='img']").val(); 920 | 921 | var num = /^\+?[1-9][0-9]*$/; 922 | if (!num.test(key)) { 923 | iziToast.show({ 924 | timeout: 2000, 925 | message: '快捷方式 ' + key + ' 不是正整数' 926 | }); 927 | return; 928 | } 929 | 930 | var quick_list = getQuickList(); 931 | 932 | if (quick_list[key]) { 933 | iziToast.show({ 934 | timeout: 8000, 935 | message: '快捷方式 " + key + " 已有数据,是否覆盖?', 936 | buttons: [ 937 | ['', function(instance, toast) { 938 | quick_list[key] = { 939 | title: title, 940 | url: url, 941 | img: img, 942 | }; 943 | setQuickList(quick_list); 944 | setQuickInit(); 945 | $(".quick_add_content").hide(); 946 | //显示列表 947 | showQuick(); 948 | 949 | instance.hide({ 950 | transitionOut: 'flipOutX', 951 | }, toast, 'buttonName'); 952 | iziToast.show({ 953 | message: '覆盖成功' 954 | }); 955 | }, true], 956 | ['', function(instance, toast) { 957 | instance.hide({ 958 | transitionOut: 'flipOutX', 959 | }, toast, 'buttonName'); 960 | }] 961 | ] 962 | }); 963 | return; 964 | } 965 | 966 | if (key_inhere && key != key_inhere) { 967 | delete quick_list[key_inhere]; 968 | } 969 | 970 | quick_list[key] = { 971 | title: title, 972 | url: url, 973 | img: img, 974 | }; 975 | setQuickList(quick_list); 976 | setQuickInit(); 977 | $(".quick_add_content").hide(); 978 | iziToast.show({ 979 | timeout: 2000, 980 | message: '添加成功' 981 | }); 982 | 983 | //显示列表 984 | showQuick(); 985 | }); 986 | 987 | // 设置-快捷方式关闭添加表单 988 | $(".quick_add_cancel").click(function() { 989 | $(".quick_add_content").hide(); 990 | 991 | //显示列表 992 | showQuick(); 993 | }); 994 | 995 | //恢复预设快捷方式 996 | $(".set_quick_list_preinstall").click(function() { 997 | iziToast.show({ 998 | timeout: 8000, 999 | message: '快捷方式数据将被清空', 1000 | buttons: [ 1001 | ['', function(instance, toast) { 1002 | setQuickList(quick_list_preinstall); 1003 | setQuickInit(); 1004 | instance.hide({ 1005 | transitionOut: 'flipOutX', 1006 | }, toast, 'buttonName'); 1007 | iziToast.show({ 1008 | timeout: 2000, 1009 | message: '重置成功' 1010 | }); 1011 | // setTimeout(function () { 1012 | // window.location.reload() 1013 | // }, 1000); 1014 | }, true], 1015 | ['', function(instance, toast) { 1016 | instance.hide({ 1017 | transitionOut: 'flipOutX', 1018 | }, toast, 'buttonName'); 1019 | }] 1020 | ] 1021 | }); 1022 | }); 1023 | 1024 | // 快捷方式修改 1025 | $(".quick_list").on("click", ".edit_quick", function() { 1026 | 1027 | var quick_list = getQuickList(); 1028 | var key = $(this).val(); 1029 | $(".quick_add_content input[name='key_inhere']").val(key); 1030 | $(".quick_add_content input[name='key']").val(key); 1031 | $(".quick_add_content input[name='title']").val(quick_list[key]["title"]); 1032 | $(".quick_add_content input[name='url']").val(quick_list[key]["url"]); 1033 | $(".quick_add_content input[name='img']").val(quick_list[key]["img"]); 1034 | 1035 | //隐藏列表 1036 | hideQuick(); 1037 | 1038 | $(".quick_add_content").show(); 1039 | }); 1040 | 1041 | // 快捷方式删除 1042 | $(".quick_list").on("click", ".delete_quick", function() { 1043 | 1044 | var key = $(this).val(); 1045 | 1046 | iziToast.show({ 1047 | timeout: 8000, 1048 | message: '快捷方式 ' + key + ' 是否删除?', 1049 | buttons: [ 1050 | ['', function(instance, toast) { 1051 | var quick_list = getQuickList(); 1052 | delete quick_list[key]; 1053 | setQuickList(quick_list); 1054 | setQuickInit(); 1055 | instance.hide({ 1056 | transitionOut: 'flipOutX', 1057 | }, toast, 'buttonName'); 1058 | iziToast.show({ 1059 | timeout: 2000, 1060 | message: '删除成功' 1061 | }); 1062 | }, true], 1063 | ['', function(instance, toast) { 1064 | instance.hide({ 1065 | transitionOut: 'flipOutX', 1066 | }, toast, 'buttonName'); 1067 | }] 1068 | ] 1069 | }); 1070 | }); 1071 | 1072 | // 壁纸设置 1073 | $("#wallpaper").on("click", ".set-wallpaper", function() { 1074 | var type = $(this).val(); 1075 | var bg_img = getBgImg(); 1076 | bg_img["type"] = type; 1077 | 1078 | if (type === "1") { 1079 | $('#wallpaper_text').html("显示默认壁纸,刷新页面以生效"); 1080 | setBgImg(bg_img); 1081 | iziToast.show({ 1082 | message: '壁纸设置成功,刷新生效', 1083 | }); 1084 | } 1085 | 1086 | if (type === "2") { 1087 | $('#wallpaper_text').html("显示必应每日一图,每天更新,刷新页面以生效 | API @ 缙哥哥"); 1088 | setBgImg(bg_img); 1089 | iziToast.show({ 1090 | message: '壁纸设置成功,刷新生效', 1091 | }); 1092 | } 1093 | 1094 | if (type === "3") { 1095 | $('#wallpaper_text').html("显示随机风景图,每次刷新后更换,刷新页面以生效 | API @ 小歪"); 1096 | setBgImg(bg_img); 1097 | iziToast.show({ 1098 | message: '壁纸设置成功,刷新生效', 1099 | }); 1100 | } 1101 | 1102 | if (type === "4") { 1103 | $('#wallpaper_text').html("显示随机二次元图,每次刷新后更换,刷新页面以生效 | API @ 小歪"); 1104 | setBgImg(bg_img); 1105 | iziToast.show({ 1106 | message: '壁纸设置成功,刷新生效', 1107 | }); 1108 | } 1109 | 1110 | if (type === "5") { 1111 | $('#wallpaper_text').html("自定义壁纸地址,请输入正确地址,点击保存且刷新页面以生效"); 1112 | $("#wallpaper_url").fadeIn(100); 1113 | $("#wallpaper-button").fadeIn(100); 1114 | $("#wallpaper-url").val(bg_img["path"]); 1115 | } else { 1116 | $("#wallpaper_url").fadeOut(300); 1117 | $("#wallpaper-button").fadeOut(300); 1118 | } 1119 | }); 1120 | 1121 | // 自定义壁纸设置保存 1122 | $(".wallpaper_save").click(function() { 1123 | var url = $("#wallpaper-url").val(); 1124 | var reg = /^http(s)?:\/\/(([\w-]+\.)+[\w-]|localhost)+(:[0-9]{1,5})?(\/[\w- ./?%&=]*)?$/g; 1125 | if (!reg.test(url)) { 1126 | iziToast.show({ 1127 | message: '请输入正确的链接', 1128 | }); 1129 | } else { 1130 | var bg_img = getBgImg(); 1131 | bg_img["type"] = "5"; 1132 | bg_img["path"] = url; 1133 | setBgImg(bg_img); 1134 | iziToast.show({ 1135 | message: '自定义壁纸设置成功,刷新生效', 1136 | }); 1137 | } 1138 | }); 1139 | 1140 | // 我的数据导出 1141 | $("#my_data_out").click(function() { 1142 | var cookies = Cookies.get(); 1143 | var json = JSON.stringify(cookies); 1144 | download("Snavigation-back-up-" + $.now() + ".json", json); 1145 | iziToast.show({ 1146 | timeout: 2000, 1147 | message: '已导出备份文件至下载目录' 1148 | }); 1149 | }); 1150 | 1151 | // 我的数据导入 点击触发文件选择 1152 | $("#my_data_in").click(function() { 1153 | $("#my_data_file").click(); 1154 | }); 1155 | 1156 | // 选择文件后读取文件内容 1157 | $("#my_data_file").change(function() { 1158 | var selectedFile = document.getElementById('my_data_file').files[0]; 1159 | //var name = selectedFile.name;//读取选中文件的文件名 1160 | //var size = selectedFile.size;//读取选中文件的大小 1161 | //console.log("文件名:"+name+" 大小:"+size); 1162 | 1163 | var reader = new FileReader(); //这是核心,读取操作就是由它完成. 1164 | reader.readAsText(selectedFile); //读取文件的内容,也可以读取文件的URL 1165 | reader.onload = function() { 1166 | //当读取完成后回调这个函数,然后此时文件的内容存储到了result中,直接操作即可 1167 | //console.log(this.result); 1168 | 1169 | // json 格式校验 1170 | var mydata; 1171 | try { 1172 | mydata = JSON.parse(this.result); 1173 | } catch (e) { 1174 | iziToast.show({ 1175 | timeout: 2000, 1176 | message: '数据解析异常' 1177 | }); 1178 | return; 1179 | } 1180 | if (typeof mydata != 'object') { 1181 | iziToast.show({ 1182 | timeout: 2000, 1183 | message: '数据格式错误' 1184 | }); 1185 | return; 1186 | } 1187 | 1188 | iziToast.show({ 1189 | timeout: 8000, 1190 | message: '当前数据将会被覆盖!是否继续导入?', 1191 | buttons: [ 1192 | ['', function(instance, toast) { 1193 | for (var key in mydata) { 1194 | Cookies.set(key, mydata[key], { 1195 | expires: 36500 1196 | }); 1197 | } 1198 | instance.hide({ 1199 | transitionOut: 'flipOutX', 1200 | }, toast, 'buttonName'); 1201 | iziToast.show({ 1202 | timeout: 2000, 1203 | message: '导入成功' 1204 | }); 1205 | setTimeout(function() { 1206 | window.location.reload() 1207 | }, 1000); 1208 | }, true], 1209 | ['', function(instance, toast) { 1210 | instance.hide({ 1211 | transitionOut: 'flipOutX', 1212 | }, toast, 'buttonName'); 1213 | setTimeout(function() { 1214 | window.location.reload() 1215 | }, 1000); 1216 | }] 1217 | ] 1218 | }); 1219 | } 1220 | }); 1221 | }); -------------------------------------------------------------------------------- /js/xr-main.js: -------------------------------------------------------------------------------- 1 | //加载完成后执行 2 | window.addEventListener('load', function() { 3 | //载入动画 4 | $('#loading-box').attr('class', 'loaded'); 5 | $('#bg').css("cssText", "transform: scale(1);filter: blur(0px);transition: ease 1.5s;"); 6 | $('#section').css("cssText", "opacity: 1;transition: ease 1.5s;"); 7 | $('.cover').css("cssText", "opacity: 1;transition: ease 1.5s;"); 8 | 9 | //用户欢迎 10 | iziToast.settings({ 11 | timeout: 3000, 12 | backgroundColor: '#ffffff40', 13 | titleColor: '#efefef', 14 | messageColor: '#efefef', 15 | progressBar: false, 16 | close: false, 17 | closeOnEscape: true, 18 | position: 'topCenter', 19 | transitionIn: 'bounceInDown', 20 | transitionOut: 'flipOutX', 21 | displayMode: 'replace', 22 | layout: '1' 23 | }); 24 | setTimeout(function() { 25 | iziToast.show({ 26 | title: hello, 27 | message: '欢迎回来' 28 | }); 29 | }, 800); 30 | 31 | //中文字体缓加载-此处写入字体源文件 32 | //先行加载简体中文子集,后续补全字集 33 | //由于压缩过后的中文字体仍旧过大,可转移至对象存储或 CDN 加载 34 | const font = new FontFace( 35 | "MiSans", 36 | "url(" + "./font/MiSans-Regular.woff2" + ")" 37 | ); 38 | document.fonts.add(font); 39 | 40 | }, false) 41 | 42 | //进入问候 43 | now = new Date(), hour = now.getHours() 44 | if (hour < 6) { 45 | var hello = "凌晨好"; 46 | } else if (hour < 9) { 47 | var hello = "早上好"; 48 | } else if (hour < 12) { 49 | var hello = "上午好"; 50 | } else if (hour < 14) { 51 | var hello = "中午好"; 52 | } else if (hour < 17) { 53 | var hello = "下午好"; 54 | } else if (hour < 19) { 55 | var hello = "傍晚好"; 56 | } else if (hour < 22) { 57 | var hello = "晚上好"; 58 | } else { 59 | var hello = "夜深了"; 60 | } 61 | 62 | //获取时间 63 | var t = null; 64 | t = setTimeout(time, 1000); 65 | 66 | function time() { 67 | clearTimeout(t); 68 | dt = new Date(); 69 | var mm = dt.getMonth() + 1; 70 | var d = dt.getDate(); 71 | var weekday = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"]; 72 | var day = dt.getDay(); 73 | var h = dt.getHours(); 74 | var m = dt.getMinutes(); 75 | if (h < 10) { 76 | h = "0" + h; 77 | } 78 | if (m < 10) { 79 | m = "0" + m; 80 | } 81 | $("#time_text").html(h + ':' + m); 82 | $("#day").html(mm + " 月 " + d + " 日 " + weekday[day]); 83 | t = setTimeout(time, 1000); 84 | } 85 | 86 | // //获取天气 87 | // //每日限量 100 次 88 | // //请前往 https://www.tianqiapi.com/index/doc?version=v6 申请(免费) 89 | // fetch('https://yiketianqi.com/api?unescape=1&version=v6&appid=43986679&appsecret=TksqGZT7') 90 | // .then(response => response.json()) 91 | // .then(data => { 92 | // //$('#wea_text').html(data.wea + ' ' + data.tem_night + '℃' + ' ~ ' + data.tem_day + '℃') 93 | // $('#wea_text').text(data.wea) 94 | // $('#tem1').text(data.tem1) 95 | // $('#tem2').text(data.tem2) 96 | // }) 97 | // .catch(console.error) 98 | 99 | //获取天气 100 | //每日限量 100 次 101 | // 夏柔免费天气 api.aa1.cn 102 | fetch('https://v.api.aa1.cn/api/api-tianqi-4/?id=101070101') 103 | .then(response => response.json()) 104 | .then(data => { 105 | $('#wea_text').text(data.temp) 106 | $('#tem1').text(data.tem1) 107 | $('#tem2').text(data.tem2) 108 | }) 109 | .catch(console.error) 110 | 111 | //Tab书签页 112 | $(function() { 113 | $(".mark .tab .tab-item").click(function() { 114 | $(this).addClass("active").siblings().removeClass("active"); 115 | $(".products .mainCont").eq($(this).index()).css("display", "flex").siblings().css("display", "none"); 116 | }) 117 | }) 118 | 119 | //设置 120 | $(function() { 121 | $(".set .tabs .tab-items").click(function() { 122 | $(this).addClass("actives").siblings().removeClass("actives"); 123 | $(".productss .mainConts").eq($(this).index()).css("display", "flex").siblings().css("display", "none"); 124 | }) 125 | }) 126 | 127 | //输入框为空时阻止跳转 128 | $(window).keydown(function(e) { 129 | var key = window.event ? e.keyCode : e.which; 130 | if (key.toString() == "13") { 131 | if ($(".wd").val() == "") { 132 | return false; 133 | } 134 | } 135 | }); 136 | 137 | //点击搜索按钮 138 | $(".sou-button").click(function() { 139 | if ($("body").attr("class") === "onsearch") { 140 | if ($(".wd").val() != "") { 141 | $("#search-submit").click(); 142 | } 143 | } 144 | }); 145 | 146 | //鼠标中键点击事件 147 | $(window).mousedown(function(event) { 148 | if (event.button == 1) { 149 | $("#time_text").click(); 150 | } 151 | }); 152 | 153 | //控制台输出 154 | var styleTitle1 = ` 155 | font-size: 20px; 156 | font-weight: 600; 157 | color: rgb(244,167,89); 158 | ` 159 | var styleTitle2 = ` 160 | font-size:12px; 161 | color: rgb(244,167,89); 162 | ` 163 | var styleContent = ` 164 | color: rgb(30,152,255); 165 | ` 166 | // ` 167 | console.log(`%c${title1} %c${title2} 168 | %c${content}`, styleTitle1, styleTitle2, styleContent) -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "routes": [{ 4 | "handle": "filesystem" 5 | }, 6 | { 7 | "src": "/(.*)", 8 | "status": 404, 9 | "dest": "/" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /预览图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaroustar/nav/93f6fd70c1ad7100cc37dcba339eb611d53efa95/预览图.png --------------------------------------------------------------------------------