Browse Source

feat: wechat share img

master
欧醚 3 years ago
parent
commit
6669612b85
4 changed files with 29 additions and 4 deletions
  1. +4
    -0
      app.py
  2. BIN
     
  3. +4
    -0
      static/login/index.html
  4. +21
    -4
      templates/list.html

+ 4
- 0
app.py View File

@ -66,6 +66,10 @@ class LikeRelation(db.Model):
if __name__ == "__main__":
db.create_all()
@app.route('/pastExam/img/<path:path>')
def send_img(path):
return send_from_directory('static/img', path)
def login_required(allow_guest=True):
def login_required_instance(f):
@wraps(f)

BIN
View File


+ 4
- 0
static/login/index.html View File

@ -91,6 +91,10 @@
<div class="text-center">
<iframe class="guest-login-form" style="display: none;border:none"></iframe>
</div>
<div class="text-center pt-4 mb-2" style="border-top: 1px white solid">
<a href="../" class="btn btn-link btn-lg"><i>(已登陆?)</i></a>
</div>
</div>
<div class="text-center">
<p>消除信息不对等,追求更有意义的评价体系</p>

+ 21
- 4
templates/list.html View File

@ -122,10 +122,6 @@
border-color: #495057;
}
.like {
fill: #fff;
}
.liked {
fill: #000;
}
@ -207,6 +203,22 @@
left: -5px;
border-radius: 0;
}
.wechat-share div {
position: absolute;
right: 50%;
top: 100%;
background-color: #fffd;
}
.wechat-share:not(:hover) div {
display: none;
}
.wechat-share img {
margin: 32px;
width: 128px;
}
</style>
</head>
@ -230,6 +242,11 @@
<a class="dropdown-item" href="?my_fav=1#part2">我的点赞</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="login">切换帐号</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item wechat-share" href="##">
微信传播
<div><img src="img/wechat-share.png"></div>
</a>
</div>
</div>
</div>

Loading…
Cancel
Save