Skip to content

Commit e100809

Browse files
authored
feat: add footer
1 parent e9979cf commit e100809

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

overrides/partials/footer.html

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<!-- Footer -->
2+
<footer class="md-footer">
3+
4+
<!-- Link to previous and/or next page -->
5+
{% if "navigation.footer" in features %}
6+
{% if page.previous_page or page.next_page %}
7+
{% if page.meta and page.meta.hide %}
8+
{% set hidden = "hidden" if "footer" in page.meta.hide %}
9+
{% endif %}
10+
<nav class="md-footer__inner md-grid" aria-label="{{ lang.t('footer') }}" {{ hidden }}>
11+
12+
<!-- Link to previous page -->
13+
{% if page.previous_page %}
14+
{% set direction = lang.t("footer.previous") %}
15+
<a href="{{ page.previous_page.url | url }}" class="md-footer__link md-footer__link--prev"
16+
aria-label="{{ direction }}: {{ page.previous_page.title | e }}">
17+
<div class="md-footer__button md-icon">
18+
{% set icon = config.theme.icon.previous or "material/arrow-left" %}
19+
{% include ".icons/" ~ icon ~ ".svg" %}
20+
</div>
21+
<div class="md-footer__title">
22+
<span class="md-footer__direction">
23+
{{ direction }}
24+
</span>
25+
<div class="md-ellipsis">
26+
{{ page.previous_page.title }}
27+
</div>
28+
</div>
29+
30+
</a>
31+
{% endif %}
32+
33+
<!-- Link to next page -->
34+
{% if page.next_page %}
35+
{% set direction = lang.t("footer.next") %}
36+
<a href="{{ page.next_page.url | url }}" class="md-footer__link md-footer__link--next"
37+
aria-label="{{ direction }}: {{ page.next_page.title | e }}">
38+
<div class="md-footer__title">
39+
<span class="md-footer__direction">
40+
{{ direction }}
41+
</span>
42+
<div class="md-ellipsis">
43+
{{ page.next_page.title }}
44+
</div>
45+
</div>
46+
<div class="md-footer__button md-icon">
47+
{% set icon = config.theme.icon.next or "material/arrow-right" %}
48+
{% include ".icons/" ~ icon ~ ".svg" %}
49+
</div>
50+
</a>
51+
{% endif %}
52+
</nav>
53+
{% endif %}
54+
{% endif %}
55+
56+
<!-- Further information -->
57+
<div class="md-footer-meta md-typeset">
58+
<div class="md-footer-meta__inner md-grid">
59+
{% include "partials/copyright.html" %}
60+
61+
<font color="#B9B9B9">
62+
<div class="footer-visit-count" style="display: flex; justify-content: center; align-items: center;">
63+
本站访问量:
64+
<script async src="//finicounter.eu.org/finicounter.js"></script>
65+
<span id="finicount_views"></span> &nbsp;|&nbsp;
66+
</div>
67+
</font>
68+
69+
<style>
70+
.footer-visit-count {
71+
height: fit-content;
72+
min-height: 55px;
73+
/* 根据实际情况调整此高度 */
74+
}
75+
</style>
76+
{% if config.extra.social %}
77+
{% include "partials/social.html" %}
78+
{% endif %}
79+
</div>
80+
</div>
81+
</footer>

0 commit comments

Comments
 (0)