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
This commit is contained in:
P小二
2025-07-09 17:00:08 +08:00
parent 48fcaec97d
commit ace3b9d470
2 changed files with 55 additions and 16 deletions

View File

@@ -27,13 +27,16 @@
<a href="{{ '/README_cn.html' | relative_url }}" class="btn-lang {% if page.url contains 'README_cn' %}active{% endif %}">🇨🇳 中文</a> <a href="{{ '/README_cn.html' | relative_url }}" class="btn-lang {% if page.url contains 'README_cn' %}active{% endif %}">🇨🇳 中文</a>
</div> </div>
{% if site.github.is_project_page %} <!-- Header Stats -->
<a href="{{ site.github.repository_url }}" class="btn">View on GitHub</a> <div class="header-stats">
{% endif %} <p>📊 Last updated: {{ site.time | date: "%Y-%m-%d" }} |
{% if site.show_downloads %} 🔗 Total Resources: 100+ |
<a href="{{ site.github.zip_url }}" class="btn">Download .zip</a> ⭐ GitHub Stars:
<a href="{{ site.github.tar_url }}" class="btn">Download .tar.gz</a> <a href="{{ site.github.repository_url }}/stargazers">
{% endif %} <img src="https://img.shields.io/github/stars/{{ site.github.repository_nwo }}?style=social" alt="GitHub stars">
</a>
</p>
</div>
</header> </header>
<main id="content" class="main-content" role="main"> <main id="content" class="main-content" role="main">
@@ -58,15 +61,7 @@
Powered by <a href="https://pages.github.com">GitHub Pages</a> and Powered by <a href="https://pages.github.com">GitHub Pages</a> and
<a href="https://jekyllrb.com">Jekyll</a> with ❤️ <a href="https://jekyllrb.com">Jekyll</a> with ❤️
</span> </span>
<div class="footer-stats">
<p>📊 Last updated: {{ site.time | date: "%Y-%m-%d" }} |
🔗 Total Resources: 100+ |
⭐ GitHub Stars:
<a href="{{ site.github.repository_url }}/stargazers">
<img src="https://img.shields.io/github/stars/{{ site.github.repository_nwo }}?style=social" alt="GitHub stars">
</a>
</p>
</div>
</footer> </footer>
</main> </main>

View File

@@ -44,6 +44,40 @@ body {
transform: none !important; transform: none !important;
} }
/* Header Stats */
.header-stats {
margin-top: 1rem;
padding: 0.75rem 1rem;
background: rgba(255, 255, 255, 0.1);
border-radius: 0.5rem;
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.header-stats p {
margin: 0;
color: rgba(255, 255, 255, 0.9);
font-size: 0.9rem;
text-align: center;
font-weight: 300;
}
.header-stats a {
color: rgba(255, 255, 255, 0.95);
text-decoration: none;
transition: all 0.2s ease;
}
.header-stats a:hover {
color: white;
text-decoration: none;
}
.header-stats img {
vertical-align: middle;
margin-left: 0.25rem;
}
/* Enhanced Header */ /* Enhanced Header */
.page-header { .page-header {
background: linear-gradient(135deg, #157878 0%, #2c3e50 100%); background: linear-gradient(135deg, #157878 0%, #2c3e50 100%);
@@ -326,6 +360,16 @@ body {
max-width: 200px; max-width: 200px;
} }
.header-stats {
margin: 1rem 0;
padding: 0.5rem;
}
.header-stats p {
font-size: 0.8rem;
line-height: 1.4;
}
.toc { .toc {
margin: 1rem 0; margin: 1rem 0;
padding: 1rem; padding: 1rem;