Earth主题在页脚的设置里并没有提供自定义的内容,下面是自定义的方法之一。(Halo Pro控制台内可以直接自定义修改)
1.文件位置
在后台主题设置页我们可以看到Earth的路径是/root/.halo2/themes/theme-sakura
打开1P面板或其它管理面板,找到Halo容器的安装目录(这里以1P为例)
路径每个人可能不太一样,可以去应用商店/已安装/找到Halo并点击进入安装目录
接下来我们要进入Earth主题的文件目录/data/themes/theme-sakura
然后找到这个文件/data/themes/theme-sakura/templates/modules/footer.html
2.页脚自定义
页脚段如下位置,接下来你可以通过手搓或者AI生成的方式自定义页脚了。
代码如下,不同主题不同的资源类型不一样,需要修改,不然用不了。
<!--/* 页脚设置 */-->
<th:block th:fragment="footer">
<div class="footer-logo">
<p
th:style="'background-image: url(' + ${theme.config.others.footer_logo ?: #theme.assets('/images/footer/sakura.svg')} + ');'"
></p>
</div>
<div class="footer-halo">
<halo:footer />
</div>
<div class="footer-copyright">
<!--/* 请尊重作者,务必保留版权声明! */-->
<p>
<span>
Powered
<span class="iconify animated" data-icon="fa:vimeo"></span>
by
<a
rel="me"
target="_blank"
href="https://onenewzg.cn"
title="网站建设与内容管理系统"
aria-label="网站技术平台"
>onenewzg.cn</a
>
</span>
•
<span
>Crafted with
<span class="iconify" data-icon="fa-heart"></span>
by
<a
rel="me"
target="_blank"
href="https://github.com/LIlGG/halo-theme-sakura"
aria-label="the theme used by this website"
>LIlGG</a
>
</span>
</p>
</div>
<div class="footer-device">
<p class="footer-site-time">
©
<th:block th:text="${#dates.format(new java.util.Date().getTime(), 'yyyy')}" />
<th:block th:text="${site.title}"></th:block>
</p>
<p class="footer-beian">
<th:block th:if="${not #strings.isEmpty(theme.config.others.footer_case_number)}">
<a
href="https://beian.miit.gov.cn/"
target="_blank"
th:text="${theme.config.others.footer_case_number}"
aria-label="gongan filing address"
></a>
</th:block>
<th:block th:if="${not #strings.isEmpty(theme.config.others.footer_ga_case_number)}">
<a
th:href="@{|https://beian.mps.gov.cn/#/query/webSearch?code=${theme.config.others.footer_ga_select_number}|}"
style="margin-left: 8px"
target="_blank"
aria-label="gongan filing address"
>
<img
th:src="${#theme.assets('/images/footer/gongan.png')}"
alt="badge for gongan"
width="16"
height="16"
style="margin-right: 4px"
/>
<span th:text="${theme.config.others.footer_ga_case_number}"></span>
</a>
</th:block>
</p>
</div>
</th:block>
修改完成后我们需要通过重启容器生效。