-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathdefault.html
More file actions
93 lines (83 loc) · 3.75 KB
/
default.html
File metadata and controls
93 lines (83 loc) · 3.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en-US" }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% seo %}
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preload" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap" as="style" type="text/css" crossorigin>
<meta name="theme-color" content="#157878">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
{% include head-custom.html %}
</head>
<body>
<a id="skip-to-content" href="#content">Skip to the content.</a>
<header class="page-header" role="banner">
<h1 class="project-name">{{ page.title | default: site.title | default: site.github.repository_name }}</h1>
<h2 class="project-tagline">{{ page.description | default: site.description | default: site.github.project_tagline }}</h2>
<!-- Language Toggle -->
<div class="language-toggle">
<a href="{{ '/' | relative_url }}" class="btn-lang {% if page.lang != 'zh-CN' %}active{% endif %}">🇺🇸 English</a>
<a href="{{ '/README_cn.html' | relative_url }}" class="btn-lang {% if page.lang == 'zh-CN' %}active{% endif %}">🇨🇳 中文</a>
</div>
<!-- Header Stats -->
<div class="header-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>
</header>
<main id="content" class="main-content" role="main">
<!-- Table of Contents for long pages -->
{% if content contains '##' %}
<nav class="toc">
<h3>📚 Table of Contents</h3>
<div id="toc-content"></div>
</nav>
{% endif %}
{{ content }}
<footer class="site-footer">
{% if site.github.is_project_page %}
<span class="site-footer-owner">
<a href="{{ site.github.repository_url }}">{{ site.github.repository_name }}</a>
is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a>.
</span>
{% endif %}
<span class="site-footer-credits">
Powered by <a href="https://pages.github.com">GitHub Pages</a> and
<a href="https://jekyllrb.com">Jekyll</a> with ❤️
</span>
</footer>
</main>
<!-- Table of Contents Generator -->
<script>
document.addEventListener('DOMContentLoaded', function() {
const tocContainer = document.getElementById('toc-content');
if (tocContainer) {
const headings = document.querySelectorAll('h2, h3, h4');
if (headings.length > 0) {
let tocHTML = '<ul>';
headings.forEach(function(heading, index) {
const id = heading.id || 'heading-' + index;
if (!heading.id) {
heading.id = id;
}
const level = heading.tagName.toLowerCase();
const indent = level === 'h3' ? 'toc-level-2' : level === 'h4' ? 'toc-level-3' : '';
tocHTML += `<li class="${indent}"><a href="#${id}">${heading.textContent}</a></li>`;
});
tocHTML += '</ul>';
tocContainer.innerHTML = tocHTML;
} else {
document.querySelector('.toc').style.display = 'none';
}
}
});
</script>
</body>
</html>