-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
536 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,26 @@ | ||
# Sponsor | ||
Reward page | ||
# Reward function | ||
一个打赏的小功能 | ||
|
||
修改自 [donate-page](https://github.com/ihoey/Playing-reward) | ||
|
||
博客版本请查看 `hexo` 分支 [点击跳转](https://github.com/ihoey/Playing-reward/tree/hexo) | ||
|
||
#### 直接 `Fork` | ||
|
||
#### 修改 html 内链接地址 | ||
|
||
#### 更换图片为你自己的打赏图片 | ||
|
||
#### 使用 iframe 嵌入页面的代码,高度至少 240px,宽度至少 310px! | ||
|
||
```html | ||
<iframe src="https://choya-lee.github.io/Sponsor/" style="overflow-x:hidden;overflow-y:hidden; border:0xp none #fff; min-height:240px; width:100%;" frameborder="0" scrolling="no"></iframe> | ||
``` | ||
|
||
如果觉得还可以的话,请star一下! | ||
|
||
打赏一下的话就更好了~ | ||
|
||
 | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html lang="zh"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<link rel="icon" href="images/favicon.ico"> | ||
<title>Sponsor</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, minimal-ui" /> | ||
<!--禁止缩放--> | ||
<link rel="stylesheet" href="style.css"> | ||
</head> | ||
|
||
<body> | ||
<a id="github" href="https://github.com/choya-lee/Sponsor" target="_blank" class="pos-f tr3" title="Github"></a> | ||
<a href="https://choya-lee.github.io/" target="_blank" style="position: fixed;"> | ||
<div id="DonateText" class="tr3">Sponsor</div> | ||
</a> | ||
<ul id="donateBox" class="list pos-f tr3"> | ||
<li id="QQPay"></li> | ||
<li id="AliPay">AliPay</li> | ||
<li id="WeChat">WeChat</li> | ||
</ul> | ||
<div id="QRBox" class="pos-f left-100"> | ||
<div id="MainBox"></div> | ||
</div> | ||
<script async src="script.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const bd = document.querySelector('body') | ||
const qbox = bd.querySelector('#QRBox') | ||
const mbox = bd.querySelector('#MainBox') | ||
const dbox = bd.querySelector('#donateBox') | ||
|
||
const qqr = 'images/QQPayQR.png' | ||
const aqr = 'images/AliPayQR.png' | ||
const wqr = 'images/WeChatQR.png' | ||
|
||
const showQR = (QR) => { | ||
if (QR) mbox.style.backgroundImage = `url(${ QR })` | ||
bd.classList.add('blur') | ||
qbox.classList.add('fadeIn') | ||
mbox.classList.add('showQR') | ||
} | ||
|
||
dbox.addEventListener('click', (e) => { | ||
let el = e.target | ||
if (el.id === 'QQPay') showQR(qqr) | ||
else if (el.id === 'AliPay') showQR(aqr) | ||
else if (el.id === 'WeChat') showQR(wqr) | ||
}) | ||
|
||
mbox.addEventListener('click', () => { | ||
mbox.classList.remove('showQR') | ||
mbox.classList.add('hideQR') | ||
setTimeout(a => { | ||
qbox.classList.remove('fadeIn') | ||
mbox.classList.remove('hideQR') | ||
bd.classList.remove('blur') | ||
}, 600) | ||
}) |
Oops, something went wrong.