New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reward 增加文章打赏功能 #186

Open
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@zhwhong

zhwhong commented Mar 22, 2017

  • 修改主题配置文件_config.yml中的donate使能控制是否打赏
# 文章末尾是否显示打赏按钮
donate:
  #on: true
  reward_comment: 哎呦,不行了,要睡觉了,赏我 e(=2.72) 元咖啡钱吧,您的支持将鼓励我继续创作!
  wechatpay: /img/wechat-reward-qr.png
  alipay: /img/alipay-reward-qr.png
  • 打赏通过donate->on使能的true和false控制;
  • 打赏配文自定义;
  • 支持微信和支付宝二维码打赏,给出二维码地址即可;
  • 打赏功能代码单独分模块layout/_partial/donate.ejssource/css/_partial/donate.styl控制,不影响原始代码,具体显示样式可以方便修改css和ejs文件,根据自己喜好可以设置按钮为打赏图标;
  • PC,移动端显示均良好。

打赏效果图示例:

  • 默认不显示二维码:

  • 点击打赏按钮后显示二维码:

效果可以看我的博客:https://zhwhong.cn

Show outdated Hide outdated source/css/style.styl Outdated
@zhwhong

已更正,可以了

Show outdated Hide outdated source/css/style.styl Outdated
@tyrionyu

This comment has been minimized.

Show comment
Hide comment
@tyrionyu

tyrionyu Nov 29, 2017

@zhwhong 我按你的方法改了,另外一个主题,怎么就不行呢?

tyrionyu commented Nov 29, 2017

@zhwhong 我按你的方法改了,另外一个主题,怎么就不行呢?

@zhwhong

This comment has been minimized.

Show comment
Hide comment
@zhwhong

zhwhong Nov 29, 2017

@tyrionyu 不同主题其实现方式可能有所不同,你要看具体的layout里的ejs是怎么实现的,然后对应的修改

zhwhong commented Nov 29, 2017

@tyrionyu 不同主题其实现方式可能有所不同,你要看具体的layout里的ejs是怎么实现的,然后对应的修改

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment