feat: add image support for social media (#96)

页脚社交媒体支持图片类型。

/kind feature

<img width="592" alt="image" src="https://github.com/halo-dev/theme-earth/assets/21301288/7bf77f2c-125d-4243-b38c-0e340b82df64">
<img width="1403" alt="image" src="https://github.com/halo-dev/theme-earth/assets/21301288/67c2c232-1130-4d4f-ae13-7b3f39af8c79">

Fixes #92 

```release-note
页脚社交媒体支持图片类型。
```
This commit is contained in:
Ryan Wang
2023-07-24 16:28:19 +08:00
committed by GitHub
parent 2c51b701ae
commit bc9dd092a6
3 changed files with 64 additions and 26 deletions

View File

@@ -28,18 +28,7 @@
</ul>
</th:block>
<th:block th:with="social_medias = ${theme.config.footer.social_media}">
<div th:unless="${#lists.isEmpty(social_medias)}" class="mt-4 flex space-x-6 sm:mt-0 sm:justify-center">
<a
th:each="social_media : ${social_medias}"
th:href="${social_media.url}"
class="text-gray-500 hover:text-gray-900 dark:hover:text-white"
th:title="${social_media.name}"
>
<div th:classappend="${social_media.icon}" class="h-5 w-5"></div>
</a>
</div>
</th:block>
<th:block th:replace="~{modules/footer-social}" />
</div>
<hr class="my-6 border-gray-100 dark:border-slate-700 sm:mx-auto lg:my-8" />
<div class="space-y-1">
@@ -163,18 +152,7 @@
<halo:footer />
</p>
</div>
<div
th:with="social_medias = ${theme.config.footer.social_media}"
class="mt-4 flex justify-center space-x-6 sm:mt-0"
>
<a
th:each="social_media : ${social_medias}"
th:href="${social_media.url}"
class="text-gray-500 hover:text-gray-900 dark:hover:text-white"
th:title="${social_media.name}"
>
<div th:classappend="${social_media.icon}" class="h-5 w-5"></div>
</a>
</div>
<th:block th:replace="~{modules/footer-social}" />
</div>
</footer>