UNPKG

halo-theme-dream2.0-plus

Version:

梦之城,童话梦境,动漫类型博客主题。

23 lines (22 loc) 1.57 kB
<div xmlns:th="https://www.thymeleaf.org" th:fragment="widget (sidebar, index)" th:data-index="${index}" th:data-position="${sidebar.position}" th:class="'card widget wechat ' + ${sidebar.hide}" style="background: transparent;" 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:aria-label="#{widget.wechat.desc}" th:title="#{widget.wechat.desc}" 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)}" height="auto" width="100%" th:src="${faceImg}" th:alt="#{widget.wechat.desc}"/> </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)}" height="auto" width="100%" th:src="${backImg}" th:alt="#{widget.wechat.desc}"/> </div> </div> </a> </div>