mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-16 00:49:40 +08:00
21 lines
1.5 KiB
HTML
21 lines
1.5 KiB
HTML
<div xmlns:th="https://www.thymeleaf.org"
|
|
th:fragment="widget (hide)"
|
|
th:class="'card widget wechat ' + ${hide}"
|
|
th:with="faceImg = ${theme.config.sidebar.wechat.wechat_img_face},
|
|
backImg = ${theme.config.sidebar.wechat.wechat_img_back},
|
|
wechatUrl = ${theme.config.sidebar.wechat.wechat_url}">
|
|
<a class="flip-wrapper" th:classappend="${!#strings.isEmpty(wechatUrl)}? 'pointer'"
|
|
th:href="${!#strings.isEmpty(wechatUrl) ? wechatUrl : (!#strings.isEmpty(faceImg) ? faceImg : (!#strings.isEmpty(backImg) ? backImg : '#'))}"
|
|
th:onclick="${#strings.isEmpty(wechatUrl)} ? 'event.preventDefault();'" target="_blank">
|
|
<div th:class="${!#strings.isEmpty(faceImg) && !#strings.isEmpty(backImg) ? 'flip-content animation' : 'flip-content'}">
|
|
<div class="wechatFace" th:style="|background-color: ${theme.config.sidebar.wechat.wechat_img_face_color};|">
|
|
<img th:if="${!#strings.isEmpty(faceImg)}" height="auto" width="auto" th:src="${faceImg}" alt="微信公众号"/>
|
|
</div>
|
|
<div th:class="${!#strings.isEmpty(faceImg) && !#strings.isEmpty(backImg) ? 'wechatBack animation' : 'wechatBack'}" th:classappend="${#strings.isEmpty(faceImg)}? 'show'"
|
|
th:style="|background-color: ${theme.config.sidebar.wechat.wechat_img_back_color};|">
|
|
<img th:if="${!#strings.isEmpty(backImg)}" height="auto" width="auto" th:src="${backImg}" alt="微信公众号"/>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</div>
|