mirror of
https://github.com/halo-dev/theme-earth.git
synced 2025-12-11 02:00:49 +08:00
简化设置表单的部分选项,并提供旧数据的兼容。 before: <img width="627" alt="image" src="https://github.com/user-attachments/assets/511da020-faed-43bb-95b7-2dcc17dfe90d"> <img width="562" alt="image" src="https://github.com/user-attachments/assets/08f7cd4b-ec85-4157-9c2a-5aa7384aa1ab"> after: <img width="562" alt="image" src="https://github.com/user-attachments/assets/360462e2-35b7-4de6-8435-05a324dbb5d3"> <img width="561" alt="image" src="https://github.com/user-attachments/assets/e4fc8876-9152-424c-b49c-c438f20a0403"> ```release-note 简化设置表单的部分选项 ```
23 lines
947 B
HTML
23 lines
947 B
HTML
<th:block th:with="social_media = ${theme.config.footer.social_media}">
|
|
<div th:unless="${#lists.isEmpty(social_media)}" class="mt-4 flex justify-center space-x-6 sm:mt-0">
|
|
<th:block th:each="item : ${social_media}">
|
|
<a
|
|
th:if="${item.url_type == 'normal'}"
|
|
th:href="${item.url}"
|
|
class="text-gray-500 hover:text-gray-900 dark:hover:text-white"
|
|
th:title="${item.name}"
|
|
>
|
|
<div th:classappend="${item.icon}" class="size-5"></div>
|
|
</a>
|
|
<span
|
|
th:if="${item.url_type == 'image'}"
|
|
th:attr="x-data=|{openImageModal:false,image: '${item.url}', alt: '${item.name}'}|"
|
|
class="cursor-pointer text-gray-500 hover:text-gray-900 dark:hover:text-white"
|
|
>
|
|
<div th:classappend="${item.icon}" class="size-5" @click="openImageModal = true"></div>
|
|
<th:block th:replace="~{modules/image-view-modal}" />
|
|
</span>
|
|
</th:block>
|
|
</div>
|
|
</th:block>
|