20 lines
1.3 KiB
HTML
Raw Normal View History

<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">
<img th:if="${!#strings.isEmpty(faceImg)}" th:src="${faceImg}" alt="微信公众号"/>
</div>
<div th:class="${!#strings.isEmpty(faceImg) && !#strings.isEmpty(backImg) ? 'wechatBack animation' : 'wechatBack'}" th:classappend="${#strings.isEmpty(faceImg)}? 'show'">
<img th:if="${!#strings.isEmpty(backImg)}" th:src="${backImg}" alt="微信公众号"/>
</div>
</div>
</a>
</div>