Skip to content

Commit ace3b9d

Browse files
committed
feat: move stats to header and remove download buttons
- Move statistics section from footer to header area - Position stats below language toggle buttons - Remove View on GitHub and download buttons from header - Add elegant glass-morphism styling for header stats - Improve mobile responsiveness for header stats - Clean up footer layout
1 parent 48fcaec commit ace3b9d

File tree

2 files changed

+55
-16
lines changed

2 files changed

+55
-16
lines changed

_layouts/default.html

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,16 @@ <h2 class="project-tagline">{{ page.description | default: site.description | de
2727
<a href="{{ '/README_cn.html' | relative_url }}" class="btn-lang {% if page.url contains 'README_cn' %}active{% endif %}">🇨🇳 中文</a>
2828
</div>
2929

30-
{% if site.github.is_project_page %}
31-
<a href="{{ site.github.repository_url }}" class="btn">View on GitHub</a>
32-
{% endif %}
33-
{% if site.show_downloads %}
34-
<a href="{{ site.github.zip_url }}" class="btn">Download .zip</a>
35-
<a href="{{ site.github.tar_url }}" class="btn">Download .tar.gz</a>
36-
{% endif %}
30+
<!-- Header Stats -->
31+
<div class="header-stats">
32+
<p>📊 Last updated: {{ site.time | date: "%Y-%m-%d" }} |
33+
🔗 Total Resources: 100+ |
34+
⭐ GitHub Stars:
35+
<a href="{{ site.github.repository_url }}/stargazers">
36+
<img src="https://img.shields.io/github/stars/{{ site.github.repository_nwo }}?style=social" alt="GitHub stars">
37+
</a>
38+
</p>
39+
</div>
3740
</header>
3841

3942
<main id="content" class="main-content" role="main">
@@ -58,15 +61,7 @@ <h3>📚 目录 / Table of Contents</h3>
5861
Powered by <a href="https://pages.github.com">GitHub Pages</a> and
5962
<a href="https://jekyllrb.com">Jekyll</a> with ❤️
6063
</span>
61-
<div class="footer-stats">
62-
<p>📊 Last updated: {{ site.time | date: "%Y-%m-%d" }} |
63-
🔗 Total Resources: 100+ |
64-
⭐ GitHub Stars:
65-
<a href="{{ site.github.repository_url }}/stargazers">
66-
<img src="https://img.shields.io/github/stars/{{ site.github.repository_nwo }}?style=social" alt="GitHub stars">
67-
</a>
68-
</p>
69-
</div>
64+
7065
</footer>
7166
</main>
7267

assets/css/custom.css

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,40 @@ body {
4444
transform: none !important;
4545
}
4646

47+
/* Header Stats */
48+
.header-stats {
49+
margin-top: 1rem;
50+
padding: 0.75rem 1rem;
51+
background: rgba(255, 255, 255, 0.1);
52+
border-radius: 0.5rem;
53+
backdrop-filter: blur(10px);
54+
border: 1px solid rgba(255, 255, 255, 0.2);
55+
}
56+
57+
.header-stats p {
58+
margin: 0;
59+
color: rgba(255, 255, 255, 0.9);
60+
font-size: 0.9rem;
61+
text-align: center;
62+
font-weight: 300;
63+
}
64+
65+
.header-stats a {
66+
color: rgba(255, 255, 255, 0.95);
67+
text-decoration: none;
68+
transition: all 0.2s ease;
69+
}
70+
71+
.header-stats a:hover {
72+
color: white;
73+
text-decoration: none;
74+
}
75+
76+
.header-stats img {
77+
vertical-align: middle;
78+
margin-left: 0.25rem;
79+
}
80+
4781
/* Enhanced Header */
4882
.page-header {
4983
background: linear-gradient(135deg, #157878 0%, #2c3e50 100%);
@@ -326,6 +360,16 @@ body {
326360
max-width: 200px;
327361
}
328362

363+
.header-stats {
364+
margin: 1rem 0;
365+
padding: 0.5rem;
366+
}
367+
368+
.header-stats p {
369+
font-size: 0.8rem;
370+
line-height: 1.4;
371+
}
372+
329373
.toc {
330374
margin: 1rem 0;
331375
padding: 1rem;

0 commit comments

Comments
 (0)