mirror of
https://github.com/halo-dev/theme-earth.git
synced 2025-10-14 14:30:50 +00:00
feat: add setup footer menu support
This commit is contained in:
@@ -22,7 +22,7 @@ spec:
|
||||
- $formkit: select
|
||||
name: header_widget
|
||||
label: 首页顶部模块
|
||||
value: none
|
||||
value: latest_post
|
||||
options:
|
||||
- label: 无
|
||||
value: none
|
||||
@@ -36,6 +36,8 @@ spec:
|
||||
value: site_title
|
||||
- $formkit: select
|
||||
name: header_background_type
|
||||
id: header_background_type
|
||||
key: header_background_type
|
||||
label: 首页顶部背景
|
||||
value: manual
|
||||
options:
|
||||
@@ -44,10 +46,16 @@ spec:
|
||||
- label: 图片
|
||||
value: image
|
||||
- $formkit: text
|
||||
if: "$get(header_background_type).value === manual"
|
||||
name: header_background
|
||||
id: header_background
|
||||
key: header_background
|
||||
label: 首页顶部背景
|
||||
- $formkit: text
|
||||
if: "$get(header_background_type).value === image"
|
||||
name: header_background_image
|
||||
id: header_background_image
|
||||
key: header_background_image
|
||||
label: 首页顶部背景图片
|
||||
- $formkit: radio
|
||||
name: content_header
|
||||
@@ -67,7 +75,14 @@ spec:
|
||||
label: 小部件
|
||||
value: "profile,popular-posts,latest-comments,categories,tags"
|
||||
help: "目前提供的小部件有:profile(站点资料), popular-posts(热门文章), latest-comments(最新评论), categories(文章分类), tags(文章标签)。你可以随意组合或排序,以逗号隔开。"
|
||||
|
||||
|
||||
- group: footer
|
||||
label: 页脚
|
||||
formSchema:
|
||||
- $formkit: menuRadio
|
||||
name: menu
|
||||
label: 页脚菜单
|
||||
|
||||
- group: beian
|
||||
label: 备案设置
|
||||
formSchema:
|
||||
@@ -78,4 +93,3 @@ spec:
|
||||
name: icp_link
|
||||
label: ICP备案跳转链接
|
||||
value: https://beian.miit.gov.cn/
|
||||
|
||||
|
@@ -4,24 +4,31 @@
|
||||
<img th:src="${site.logo}" class="mr-3 h-8 w-8" th:alt="${site.title}" />
|
||||
<span class="self-center whitespace-nowrap text-2xl font-semibold" th:text="${site.title}"> </span>
|
||||
</a>
|
||||
<ul class="mb-6 flex flex-wrap items-center justify-center text-sm text-gray-500 sm:mb-0 sm:justify-start">
|
||||
<li>
|
||||
<a href="#" class="mr-4 hover:underline md:mr-6">首页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="mr-4 hover:underline md:mr-6">关于</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="mr-4 hover:underline md:mr-6">订阅</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="hover:underline">联系</a>
|
||||
</li>
|
||||
</ul>
|
||||
<th:block th:if="${not #strings.isEmpty(theme.config.footer.menu)}">
|
||||
<ul
|
||||
th:with="menu = ${menuFinder.getByName(theme.config.footer.menu)}"
|
||||
class="mb-6 flex flex-wrap items-center justify-center text-sm text-gray-500 sm:mb-0 sm:justify-start"
|
||||
>
|
||||
<li th:each="menuItem : ${menu.menuItems}">
|
||||
<a
|
||||
th:href="@{${menuItem.status.href}}"
|
||||
class="mr-4 hover:underline md:mr-6"
|
||||
th:text="${menuItem.status.displayName}"
|
||||
>首页</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</th:block>
|
||||
</div>
|
||||
<hr class="my-6 border-gray-100 sm:mx-auto lg:my-8" />
|
||||
<span class="container mx-auto block text-center text-sm text-gray-500">
|
||||
<a href="https://beian.miit.gov.cn/" class="hover:underline" target="_blank" th:href="${theme.config.beian.icp_link}" th:text="${theme.config.beian.icp_text}"></a>
|
||||
<a
|
||||
href="https://beian.miit.gov.cn/"
|
||||
class="hover:underline"
|
||||
target="_blank"
|
||||
th:href="${theme.config.beian.icp_link}"
|
||||
th:text="${theme.config.beian.icp_text}"
|
||||
></a>
|
||||
</span>
|
||||
<span class="container mx-auto block text-center text-sm text-gray-500">
|
||||
© 2022
|
||||
|
Reference in New Issue
Block a user