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>
|
||||||
@ -20,9 +21,10 @@
|
|||||||
<!-- <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.8/styles/github.min.css">
|
<!-- <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.8/styles/github.min.css">
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.8/highlight.min.js"></script> -->
|
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.8/highlight.min.js"></script> -->
|
||||||
<style>
|
<style>
|
||||||
:root{
|
:root {
|
||||||
--primary: #42b983;
|
--primary: #42b983;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -47,26 +49,30 @@
|
|||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes rotate{
|
@keyframes rotate {
|
||||||
from{
|
from {
|
||||||
transform: rotate(0);
|
transform: rotate(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
to{
|
to {
|
||||||
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;
|
||||||
margin:auto;
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
margin: auto;
|
||||||
display: block;
|
display: block;
|
||||||
width:100px;
|
width: 100px;
|
||||||
height:100px;
|
height: 100px;
|
||||||
border:0 solid #42b983;
|
border: 0 solid #42b983;
|
||||||
border-right-width: 4px;
|
border-right-width: 4px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
@ -77,7 +83,7 @@
|
|||||||
<noscript>
|
<noscript>
|
||||||
<strong>We're sorry but any-rule doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
<strong>We're sorry but any-rule doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||||
</noscript>
|
</noscript>
|
||||||
|
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<i class="loading"></i>
|
<i class="loading"></i>
|
||||||
</div>
|
</div>
|
||||||
|
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