添加微信图片 widget

This commit is contained in:
liuzhihang 2022-10-23 17:20:16 +08:00
parent cf22d664d9
commit 33c6a20d26
6 changed files with 37 additions and 16 deletions

View File

@ -136,6 +136,15 @@ spec:
name: profile_desc
placeholder: 请填写个人卡片描述信息
help: "支持使用 HTML 标签"
- $formkit: url
name: wechat_img_face
placeholder: 微信正面图
validation: "url"
- $formkit: url
name: wechat_img_back
placeholder: 微信背面图
validation: "url"
help: 图片可以从公众号后台下载物料或者自制
- group: footer
label: 页脚
formSchema:
@ -456,7 +465,7 @@ spec:
formSchema:
- $formkit: radio
name: loading_box
label: 开关
label: 加载页
value: true
options:
- label: 打开

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

View File

@ -6808,7 +6808,7 @@ span.fund_name {
}
#aside-content .card-widget#card-wechat {
background: rgb(87, 189, 106);
background: rgb(7, 193, 96);
display: flex;
place-content: center;
padding: 0px;
@ -6850,20 +6850,18 @@ span.fund_name {
}
/* 公众号推广部分 */
/*.face {*/
/* position: absolute;*/
/* width: 100%;*/
/* height: 100%;*/
/* backface-visibility: hidden;*/
/* background: url(../images/404.gif) center center / 100% no-repeat;*/
/*}*/
.face {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
}
/*.back.face {*/
/* display: block;*/
/* transform: rotateY(180deg);*/
/* box-sizing: border-box;*/
/* background: url(../images/404.gif) center center / 100% no-repeat;*/
/*}*/
.back.face {
display: block;
transform: rotateY(180deg);
box-sizing: border-box;
}
#card-vip-designweekly.card-widget {
padding: 0px;

View File

@ -24,7 +24,7 @@
<th:block th:replace="modules/post-list :: post-list"></th:block>
</div>
<div th:replace="modules/aside :: aside('profile,recent-posts,tags-stat')"></div>
<div th:replace="modules/aside :: aside('profile,wechat,recent-posts,tags-stat')"></div>
</main>
<!-- 底部 -->
<footer th:replace="modules/footer :: footer"></footer>

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<div class="card-widget heo-right-widget" id="card-wechat" th:fragment="wechat"
th:with="faceImg = ${theme.config.sidebar.wechat_img_back}, backImg=${theme.config.sidebar.wechat_img_back}">
<div id="flip-wrapper">
<div id="flip-content">
<div class="face"
th:style="'background: url('+ @{${#strings.isEmpty(faceImg) ? '/assets/images/wechat/wechat1.png' : faceImg }} +') center center / 100% no-repeat;'"></div>
<div class="back face"
th:style="'background: url('+ @{${#strings.isEmpty(faceImg) ? '/assets/images/wechat/wechat2.png' : faceImg }} +') center center / 100% no-repeat;'"></div>
</div>
</div>
</div>
</html>