增加打赏
This commit is contained in:
Vendored
+66
@@ -0,0 +1,66 @@
|
||||
.donate-panel{
|
||||
text-align: center;
|
||||
position: relative;
|
||||
}
|
||||
#donate-btn{
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
/* #background: #e26d6d;*/
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
/* box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)*/
|
||||
}
|
||||
#donate-btn:hover{
|
||||
/* #background: #bd4b4b;*/
|
||||
}
|
||||
#qrcode-panel{
|
||||
position: absolute;
|
||||
width: 300px;
|
||||
height: 320px;
|
||||
background:#fff;
|
||||
top: 0;
|
||||
left: 0;
|
||||
border-radius: 5px;
|
||||
/* padding: 5px; */
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
|
||||
}
|
||||
.qrcode-body{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background:#fff;
|
||||
position: relative;
|
||||
border-radius: 5px;
|
||||
|
||||
}
|
||||
.donate-memo{
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
#donate-close{
|
||||
float: right;
|
||||
padding: 0 5px;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
#donate-close:hover{
|
||||
color: #bd4b4b;
|
||||
}
|
||||
.donate-qrpay{
|
||||
|
||||
}
|
||||
.donate-qrpay img{
|
||||
width: 280px;
|
||||
height: 280px;
|
||||
}
|
||||
input[name='pay']{
|
||||
cursor: pointer;
|
||||
}
|
||||
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
setTimeout(function(){
|
||||
initDonate()
|
||||
}, 1000);
|
||||
function initDonate(){
|
||||
var donateBtn = document.getElementById('donate-btn');
|
||||
var donatePopup = document.getElementById('qrcode-panel');
|
||||
if(!donateBtn && !donatePopup){
|
||||
return
|
||||
}
|
||||
var l = donateBtn.offsetLeft-125;
|
||||
var t = donateBtn.offsetTop-330;
|
||||
donatePopup.style.left=l+'px'
|
||||
donatePopup.style.top=t+'px'
|
||||
|
||||
donateBtn.addEventListener('click',function(){
|
||||
donatePopup.style.display='';
|
||||
event.stopPropagation()
|
||||
})
|
||||
document.getElementById('donate-close').addEventListener('click',function(){
|
||||
donatePopup.style.display='none';
|
||||
event.stopPropagation()
|
||||
})
|
||||
document.querySelector('body').addEventListener('click',function() {
|
||||
donatePopup.style.display='none';
|
||||
event.stopPropagation()
|
||||
});
|
||||
donatePopup.addEventListener('click',function() {
|
||||
event.stopPropagation()
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user