diff --git a/assets/css/donate.css b/assets/css/donate.css
deleted file mode 100644
index 44c8e7a..0000000
--- a/assets/css/donate.css
+++ /dev/null
@@ -1,146 +0,0 @@
-.donate-panel {
- position: relative;
- display: inline-block;
-}
-
-.button--like {
- background: none;
- border: none;
- padding: 0;
- cursor: pointer;
- transition: transform 0.3s ease;
-}
-
-.button--like:hover {
- transform: scale(1.1);
-}
-
-.icon--default {
- fill: #666;
- transition: fill 0.3s ease;
-}
-
-.button--like:hover .icon--default {
- fill: #ff4081;
-}
-
-#qrcode-panel {
- position: absolute;
- bottom: 100%;
- left: 50%;
- transform: translateX(-50%);
- background: white;
- border-radius: 8px;
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
- padding: 15px;
- margin-bottom: 10px;
- display: none;
- animation: fadeIn 0.3s ease;
- min-width: 240px;
-}
-
-@keyframes fadeIn {
- from {
- opacity: 0;
- transform: translate(-50%, 10px);
- }
- to {
- opacity: 1;
- transform: translate(-50%, 0);
- }
-}
-
-.qrcode-body {
- text-align: center;
-}
-
-.donate-memo {
- margin-bottom: 10px;
- position: relative;
-}
-
-#donate-close {
- position: absolute;
- right: -5px;
- top: -5px;
- cursor: pointer;
- font-size: 12px;
- color: #666;
- padding: 2px 5px;
- border-radius: 3px;
-}
-
-#donate-close:hover {
- color: #ff4081;
-}
-
-.donate-qrpay img {
- max-width: 240px;
- height: auto;
- display: block;
- margin: 0 auto;
- transition: opacity 0.3s ease;
-}
-
-/* 支付方式切换按钮样式 */
-.donate-methods {
- display: flex;
- justify-content: center;
- margin-bottom: 15px;
- gap: 10px;
-}
-
-.donate-method-btn {
- padding: 5px 15px;
- border: none;
- border-radius: 15px;
- cursor: pointer;
- background: #f5f5f5;
- color: #666;
- font-size: 14px;
- transition: all 0.3s ease;
-}
-
-.donate-method-btn.active {
- background: #ff4081;
- color: white;
-}
-
-.donate-method-btn:hover {
- background: #ff4081;
- color: white;
-}
-
-/* QR码容器样式 */
-.qr-container {
- position: relative;
- height: 100%;
- width: 100%;
- margin: 0 auto;
-}
-
-.qr-image {
- position: absolute;
- top: 0;
- left: 0;
- opacity: 0;
- visibility: hidden;
- transition: opacity 0.3s ease, visibility 0.3s ease;
-}
-
-.qr-image.active {
- opacity: 1;
- visibility: visible;
-}
-
-/* 小三角形 */
-#qrcode-panel:after {
- content: '';
- position: absolute;
- bottom: -8px;
- left: 50%;
- transform: translateX(-50%);
- border-left: 8px solid transparent;
- border-right: 8px solid transparent;
- border-top: 8px solid white;
-}
\ No newline at end of file
diff --git a/assets/js/donate.js b/assets/js/donate.js
deleted file mode 100644
index 11038fb..0000000
--- a/assets/js/donate.js
+++ /dev/null
@@ -1,57 +0,0 @@
-document.addEventListener('DOMContentLoaded', function() {
- const donateBtn = document.getElementById('donate-btn');
- const qrcodePanel = document.getElementById('qrcode-panel');
- const donateClose = document.getElementById('donate-close');
- const methodBtns = document.querySelectorAll('.donate-method-btn');
- const qrImages = document.querySelectorAll('.qr-image');
- let isVisible = false;
- // 切换支付方式
- function switchPayMethod(method) {
- // 更新按钮状态
- methodBtns.forEach(btn => {
- btn.classList.remove('active');
- if (btn.dataset.method === method) {
- btn.classList.add('active');
- }
- });
- // 更新二维码显示
- qrImages.forEach(img => {
- img.classList.remove('active');
- if (img.dataset.method === method) {
- img.classList.add('active');
- }
- });
- }
- // 点击打赏按钮切换二维码显示状态
- function toggleQRCode(event) {
- event.stopPropagation();
- isVisible = !isVisible;
- qrcodePanel.style.display = isVisible ? 'block' : 'none';
- }
- // 点击关闭按钮隐藏二维码
- function hideQRCode(event) {
- event.stopPropagation();
- isVisible = false;
- qrcodePanel.style.display = 'none';
- }
- // 点击二维码面板之外的地方隐藏二维码
- function handleDocumentClick(event) {
- if (isVisible && !qrcodePanel.contains(event.target) && !donateBtn.contains(event.target)) {
- isVisible = false;
- qrcodePanel.style.display = 'none';
- }
- }
- // 绑定事件监听器
- donateBtn.addEventListener('click', toggleQRCode);
- donateClose.addEventListener('click', hideQRCode);
- document.addEventListener('click', handleDocumentClick);
- // 绑定支付方式切换按钮事件
- methodBtns.forEach(btn => {
- btn.addEventListener('click', (e) => {
- const method = e.target.dataset.method;
- switchPayMethod(method);
- });
- });
- // 初始化显示第一个支付方式
- switchPayMethod('wechat');
-});
\ No newline at end of file
diff --git a/functions.php b/functions.php
index 2016e6d..5b8f365 100644
--- a/functions.php
+++ b/functions.php
@@ -52,8 +52,10 @@ function themeConfig($form) {
$form->addInput($cnavatar);
$midimg = new Typecho_Widget_Helper_Form_Element_Text('midimg', NULL, '/img/', _t('填写分类图片路径,以"/"结尾'), _t('默认使用网站根目录下的img文件夹,也可以填写绝对或者CDN地址,自动匹配目录下以分类ID为文件名的mid.jpg格式的图片'));
$form->addInput($midimg);
- $donate = new Typecho_Widget_Helper_Form_Element_Text('donate', NULL, NULL, _t('赞赏二维码'), _t('不填写则不显示'));
- $form->addInput($donate);
+ $wxpay = new Typecho_Widget_Helper_Form_Element_Text('wxpay', NULL, 'https://blog.loliko.cn/images/wechatpay.png', _t('微信收款码'), _t('赞赏二维码'));
+ $form->addInput($wxpay);
+ $alipay= new Typecho_Widget_Helper_Form_Element_Text('alipay', NULL, 'https://blog.loliko.cn/images/alipay.png', _t('支付宝收款码'), _t('赞赏二维码'));
+ $form->addInput($alipay);
$addhead = new Typecho_Widget_Helper_Form_Element_Textarea('addhead', NULL, NULL, _t('Head内代码用于网站验证等'), _t('支持HTML'));
$form->addInput($addhead);
$tongji = new Typecho_Widget_Helper_Form_Element_Textarea('tongji', NULL, NULL, _t('统计代码'), _t('支持HTML'));
diff --git a/post.php b/post.php
index 607ed35..9dc109c 100644
--- a/post.php
+++ b/post.php
@@ -1,13 +1,6 @@
need('header.php'); ?>
-
+