mirror of
https://github.com/any86/any-rule.git
synced 2025-07-14 15:38:58 +08:00
wip: 建设pwa
This commit is contained in:
parent
f3e782d4ae
commit
6674643359
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 7.2 KiB |
BIN
packages/www/public/icon.png
Normal file
BIN
packages/www/public/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
@ -6,6 +6,7 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
|
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
|
<link rel="manifest" href="<%= BASE_URL %>manifest.json">
|
||||||
<title>正则大全</title>
|
<title>正则大全</title>
|
||||||
<!-- 百度统计 -->
|
<!-- 百度统计 -->
|
||||||
<script>
|
<script>
|
||||||
@ -23,6 +24,7 @@
|
|||||||
:root {
|
:root {
|
||||||
--primary: #42b983;
|
--primary: #42b983;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -56,12 +58,16 @@
|
|||||||
transform: rotate(360deg);
|
transform: rotate(360deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading {
|
.loading {
|
||||||
animation: rotate 1s infinite linear;
|
animation: rotate 1s infinite linear;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top:0;left:0;right: 0;bottom:0;
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
display: block;
|
display: block;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
15
packages/www/public/manifest.json
Normal file
15
packages/www/public/manifest.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"short_name": "any-rule",
|
||||||
|
"name": "正则大全",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/any-rule/icon.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "192x192"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"background_color": "#2196F3",
|
||||||
|
"theme_color": "#2196F3",
|
||||||
|
"display": "standalone",
|
||||||
|
"start_url": "/any-rule"
|
||||||
|
}
|
0
packages/www/public/sw.js
Normal file
0
packages/www/public/sw.js
Normal file
@ -3,6 +3,12 @@ import App from './App.vue'
|
|||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
|
if ('serviceWorker' in navigator) {
|
||||||
|
window.addEventListener('load', function() {
|
||||||
|
navigator.serviceWorker.register('./sw.js');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
render: h => h(App),
|
render: h => h(App),
|
||||||
}).$mount('#app')
|
}).$mount('#app')
|
Loading…
x
Reference in New Issue
Block a user