Skip to content

Commit c618f52

Browse files
committed
donation
1 parent 2795e4a commit c618f52

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

app/OctBlog/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
},
4040
'donation': {
4141
'allow_donate': os.environ.get('allow_donate', 'true').lower() == 'true',
42-
'donation_msg': os.environ.get('donation_msg', 'You can donate to me if the article makes sense to you')
42+
'donation_msg': os.environ.get('donation_msg', 'You can donate to me if the article makes sense to you'),
43+
'donation_img_url': os.environ.get('donation_img_url') or 'http://img-own.igevin.info/weixin-pay.jpg?imageView/2/w/300'
4344
},
4445
'wechat': {
4546
'display_wechat': os.environ.get('display_wechat', 'true').lower() == 'true',

app/main/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ def post_detail(slug, post_type='post', fix=False, is_preview=False):
169169

170170
data['allow_donate'] = OctBlogSettings['donation']['allow_donate']
171171
data['donation_msg'] = OctBlogSettings['donation']['donation_msg']
172+
data['donation_img_url'] = OctBlogSettings['donation']['donation_img_url']
172173

173174
data['display_wechat'] = OctBlogSettings['wechat']['display_wechat']
174175
data['wechat_msg'] = OctBlogSettings['wechat']['wechat_msg']

app/templates/main/post.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ <h1>{{ post.title }}</h1>
6969
<br>
7070
<!-- weixin -->
7171
<div id="donate_guide" class="donate_bar center hidden ">
72-
<img src="http://7tsygu.com1.z0.glb.clouddn.com/mayblog-weixin-pay.jpg?imageView/2/w/300" title="Donate">
72+
<img src="{{ donation_img_url }}" title="Donate">
7373
</div>
7474
</div>
7575
<!-- donate -->

app/templates/main/wechat_detail.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
{% endblock %}
77

88
{% block header %}
9-
<header class="intro-header" style="background-image: url('http://7d9q7a.com1.z0.glb.clouddn.com/mayblog-home-bg.jpg')">
9+
<!-- <header class="intro-header" style="background-image: url('http://7d9q7a.com1.z0.glb.clouddn.com/mayblog-home-bg.jpg')"> -->
10+
<header class="intro-header" style="background-image: url({{ bg_post }})">
1011
<div class="container">
1112
<div class="row">
1213
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
@@ -65,7 +66,7 @@ <h1>{{ post.title }}</h1>
6566
<br>
6667
<!-- weixin -->
6768
<div id="donate_guide" class="donate_bar center hidden ">
68-
<img src="http://7tsygu.com1.z0.glb.clouddn.com/mayblog-weixin-pay.jpg?imageView/2/w/300" title="Donate">
69+
<img src="{{ donation_img_url }}" title="Donate">
6970
</div>
7071
</div>
7172
<!-- donate -->
@@ -79,7 +80,7 @@ <h1>{{ post.title }}</h1>
7980
<!-- donate -->
8081
<div class ="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
8182
<p>{{ wechat_msg }} <i class="fa fa-weixin" aria-hidden="true"></i></p>
82-
<img src="http://7tsygu.com1.z0.glb.clouddn.com/gevin-view.jpg?imageView/2/w/150" title="GevinView">
83+
<img src="{{ wechat_image_url }}" title="{{ wechat_title }}">
8384
</div>
8485

8586
</div>

0 commit comments

Comments
 (0)