Skip to content

Commit

Permalink
添加并完成页脚配置
Browse files Browse the repository at this point in the history
  • Loading branch information
Anyexyz committed Jul 14, 2024
1 parent ec96b06 commit 92f4d9b
Show file tree
Hide file tree
Showing 12 changed files with 124 additions and 8 deletions.
19 changes: 19 additions & 0 deletions settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,22 @@ spec:
- $formkit: attachment
name: images
label: Logo

- group: beian
label: 备案设置
formSchema:
- $formkit: text
name: icp_text
label: ICP备案号
- $formkit: text
name: icp_link
label: ICP备案跳转链接
value: https://beian.miit.gov.cn/

- $formkit: text
name: gongan_text
label: 公安联网备案号
- $formkit: text
name: gongan_link
label: 公安联网备案跳转链接
value: https://beian.mps.gov.cn/#/query/webSearch
4 changes: 1 addition & 3 deletions templates/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ <h3 class="h3 clients-title" th:text="${theme.config.about.about_clients.title}"
<script nomodule src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/ionicons/5.5.2/ioniconshttps://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/ionicons/5.5.2/ionicons/ionicons.js"></script>
</body>

<!-- <footer>
<halo:footer />
</footer> -->
<footer th:replace="modules/footer.html"></footer>

</html>
58 changes: 58 additions & 0 deletions templates/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@

a {
text-decoration: none;
color: var(--orange-yellow-crayola);
}

li {
Expand Down Expand Up @@ -2238,4 +2239,61 @@ textarea.form-input::-webkit-resizer {
code,
hr {
margin-bottom: 10px;
}

footer {
background-color: #1a1a1a;
color: #D6D6D6;
padding: 20px 0;
text-align: center;
}

footer a {
color: #D6D6D6;
}

footer .footer-container {
max-width: 1200px;
margin: 0 auto;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

footer .footer-row {
width: 100%;
margin: 5px 0;
display: flex;
justify-content: center;
align-items: center;
}

footer .beian,
footer .gongan,
footer .copyright,
footer .halo-powered {
display: inline-flex;
align-items: center;
}

footer .beian a,
footer .gongan a,
footer .copyright a {
text-decoration: none;
}

footer .beian a:hover,
footer .gongan a:hover,
footer .copyright a:hover {
text-decoration: underline;
}

footer .gongan img {
height: 16px;
margin-right: 5px;
}

footer .copyright a {
margin-left: 0.25em; /* 可以根据需要调整这个值 */
}
Binary file added templates/assets/images/gongan_beian.webp
Binary file not shown.
8 changes: 6 additions & 2 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,13 @@ <h3 class="h3 blog-item-title" th:text="${post.spec.title}"></h3>
</main>

<script th:src="@{/assets/js/script.js?v={version}(version=${theme.spec.version})}"></script>
<script type="module" src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/ionicons/5.5.2/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/ionicons/5.5.2/ioniconshttps://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/ionicons/5.5.2/ionicons/ionicons.js"></script>
<script type="module"
src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/ionicons/5.5.2/ionicons/ionicons.esm.js"></script>
<script nomodule
src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/ionicons/5.5.2/ioniconshttps://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/ionicons/5.5.2/ionicons/ionicons.js"></script>

</body>

<footer th:replace="modules/footer.html"></footer>

</html>
2 changes: 2 additions & 0 deletions templates/links.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@ <h4 class="h4 service-item-title" th:text="${link.spec.displayName}"></h4>

</body>

<footer th:replace="modules/footer.html"></footer>

</html>
29 changes: 29 additions & 0 deletions templates/modules/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<footer>
<div class="footer-container">
<div class="footer-row">
<span class="beian" th:if="${not #strings.isEmpty(theme.config.beian.icp_text)}">
<a href="https://beian.miit.gov.cn/" target="_blank" th:href="${theme.config.beian.icp_link}"
th:text="${theme.config.beian.icp_text}"></a>
</span>
</div>
<div class="footer-row">
<span class="gongan" th:if="${not #strings.isEmpty(theme.config.beian.gongan_text)}">
<img th:src="@{/assets/images/gongan_beian.webp}" alt="gongan_beian" />
<a href="https://beian.mps.gov.cn/#/query/webSearch" target="_blank"
th:href="${theme.config.beian.gongan_link}" th:text="${theme.config.beian.gongan_text}"></a>
</span>
</div>
<div class="footer-row">
<span class="copyright">©
<th:block th:text="${#dates.format(new java.util.Date().getTime(), 'yyyy')}" />
<a href="/" th:text="${site.title}"></a>. All Rights Reserved. Powered by
<a href="https://halo.run" target="_blank">Halo</a>.
</span>
</div>
<div class="footer-row">
<span class="halo-powered">
<halo:footer />
</span>
</div>
</div>
</footer>
2 changes: 2 additions & 0 deletions templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ <h2 class="h2 article-title" th:text="${singlePage.spec.title}"></h2>

</body>

<footer th:replace="modules/footer.html"></footer>

</html>
2 changes: 2 additions & 0 deletions templates/photos.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,6 @@ <h2 class="h2 article-title" th:text="${title}"></h2>

</body>

<footer th:replace="modules/footer.html"></footer>

</html>
4 changes: 1 addition & 3 deletions templates/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ <h2 class="h3 article-title">评论</h2>
<script nomodule src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/ionicons/5.5.2/ioniconshttps://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/ionicons/5.5.2/ionicons/ionicons.js"></script>
</body>

<!-- <footer>
<halo:footer />
</footer> -->
<footer th:replace="modules/footer.html"></footer>

</html>
3 changes: 3 additions & 0 deletions templates/tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ <h1 th:text="${tag.spec.displayName}"></h1>
<a th:if="${posts.hasPrevious()}" th:href="@{${posts.prevUrl}}">上一页</a>
<a th:if="${posts.hasNext()}" th:href="@{${posts.nextUrl}}">下一页</a>
</th:block>

<footer th:replace="modules/footer.html"></footer>

</html>
1 change: 1 addition & 0 deletions templates/tags.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ <h1>标签</h1>
</li>
</ul>
</th:block>
<footer th:replace="modules/footer.html"></footer>
</html>

0 comments on commit 92f4d9b

Please sign in to comment.