/**
* GitHub 统计区域样式
*/
.github-section {
padding: 60px 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.section-header {
text-align: center;
margin-bottom: 40px;
}
.section-title {
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 10px;
color: white;
}
.section-subtitle {
font-size: 1.1rem;
color: rgba(255, 255, 255, 0.8);
margin-bottom: 30px;
}
/* GitHub 统计容器 */
.github-stats-container {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border-radius: 20px;
padding: 30px;
border: 1px solid rgba(255, 255, 255, 0.2);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.github-stats-title {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
font-size: 1.8rem;
font-weight: 600;
margin-bottom: 25px;
color: white;
}
.github-stats-title i {
color: rgba(255, 255, 255, 0.8);
}
/* 统计卡片网格 */
.github-stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
.stat-item {
background: rgba(255, 255, 255, 0.1);
border-radius: 12px;
padding: 20px;
display: flex;
align-items: center;
gap: 15px;
transition: all 0.3s ease;
border: 1px solid rgba(255, 255, 255, 0.1);
}
.stat-item:hover {
transform: translateY(-5px);
background: rgba(255, 255, 255, 0.2);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.stat-item i {
font-size: 2rem;
color: rgba(255, 255, 255, 0.8);
}
.stat-content {
flex: 1;
}
.stat-number {
font-size: 2rem;
font-weight: 700;
color: white;
line-height: 1;
margin-bottom: 5px;
}
.stat-label {
font-size: 0.9rem;
color: rgba(255, 255, 255, 0.7);
}
/* 仓库信息 */
.github-repo-info {
text-align: center;
padding-top: 20px;
border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.repo-description {
font-size: 1.1rem;
color: rgba(255, 255, 255, 0.9);
margin-bottom: 15px;
line-height: 1.6;
}
.repo-meta {
display: flex;
justify-content: center;
gap: 30px;
margin-bottom: 20px;
font-size: 0.9rem;
color: rgba(255, 255, 255, 0.7);
}
.repo-meta span {
display: flex;
align-items: center;
gap: 5px;
}
.repo-meta i {
color: rgba(255, 255, 255, 0.6);
}
.btn-github {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 12px 30px;
background: white;
color: #667eea;
text-decoration: none;
border-radius: 8px;
font-weight: 600;
transition: all 0.3s ease;
border: none;
cursor: pointer;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.btn-github:hover {
transform: translateY(-2px);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
background: #f8f9fa;
}
/* 加载状态 */
.github-loading,
.github-error {
text-align: center;
padding: 40px;
color: white;
}
.github-loading i,
.github-error i {
font-size: 3rem;
margin-bottom: 15px;
animation: spin 1s linear infinite;
}
.github-loading span,
.github-error span {
display: block;
font-size: 1.2rem;
margin-bottom: 15px;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.retry-btn {
padding: 10px 25px;
background: white;
color: #667eea;
border: none;
border-radius: 8px;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s ease;
display: inline-flex;
align-items: center;
gap: 8px;
}
.retry-btn:hover {
background: #f8f9fa;
transform: translateY(-2px);
}
/* 提交记录 */
.github-commits-container {
margin-top: 30px;
}
.github-commits-title {
display: flex;
align-items: center;
gap: 10px;
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 20px;
color: white;
}
.commits-list {
display: flex;
flex-direction: column;
gap: 15px;
}
.commit-item {
background: rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 15px;
transition: all 0.3s ease;
}
.commit-item:hover {
background: rgba(255, 255, 255, 0.2);
}
.commit-sha {
font-family: 'Courier New', monospace;
font-size: 0.9rem;
color: rgba(255, 255, 255, 0.6);
margin-bottom: 5px;
}
.commit-sha a {
color: rgba(255, 255, 255, 0.6);
text-decoration: none;
}
.commit-sha a:hover {
color: white;
text-decoration: underline;
}
.commit-message {
font-size: 1rem;
color: white;
margin-bottom: 8px;
line-height: 1.4;
}
.commit-meta {
display: flex;
gap: 20px;
font-size: 0.85rem;
color: rgba(255, 255, 255, 0.7);
}
.commit-meta span {
display: flex;
align-items: center;
gap: 5px;
}
/* 贡献者 */
.github-contributors-container {
margin-top: 30px;
}
.github-contributors-title {
display: flex;
align-items: center;
gap: 10px;
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 20px;
color: white;
}
.contributors-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 15px;
}
.contributor-item {
background: rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 15px;
transition: all 0.3s ease;
}
.contributor-item:hover {
background: rgba(255, 255, 255, 0.2);
transform: translateY(-3px);
}
.contributor-item a {
display: flex;
align-items: center;
gap: 12px;
text-decoration: none;
}
.contributor-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
border: 2px solid rgba(255, 255, 255, 0.3);
}
.contributor-info {
flex: 1;
}
.contributor-name {
font-size: 0.95rem;
font-weight: 600;
color: white;
margin-bottom: 3px;
}
.contributor-count {
font-size: 0.8rem;
color: rgba(255, 255, 255, 0.7);
}
/* 编程语言 */
.github-languages-container {
margin-top: 30px;
}
.github-languages-title {
display: flex;
align-items: center;
gap: 10px;
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 20px;
color: white;
}
.languages-bar {
height: 20px;
border-radius: 10px;
overflow: hidden;
background: rgba(255, 255, 255, 0.1);
margin-bottom: 20px;
display: flex;
}
.language-segment {
height: 100%;
transition: all 0.3s ease;
position: relative;
}
.language-segment:hover {
opacity: 0.9;
}
.languages-legend {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 10px;
}
.language-item {
display: flex;
align-items: center;
gap: 10px;
padding: 8px;
background: rgba(255, 255, 255, 0.1);
border-radius: 6px;
}
.language-color {
width: 12px;
height: 12px;
border-radius: 50%;
}
.language-name {
flex: 1;
font-size: 0.9rem;
color: white;
}
.language-percentage {
font-size: 0.85rem;
color: rgba(255, 255, 255, 0.7);
font-weight: 600;
}
/* 响应式设计 */
@media (max-width: 768px) {
.section-title {
font-size: 2rem;
}
.section-subtitle {
font-size: 1rem;
}
.github-stats-grid {
grid-template-columns: repeat(2, 1fr);
gap: 15px;
}
.stat-number {
font-size: 1.5rem;
}
.repo-meta {
flex-direction: column;
gap: 10px;
}
.contributors-list {
grid-template-columns: repeat(2, 1fr);
}
.languages-legend {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 480px) {
.github-section {
padding: 40px 15px;
}
.github-stats-grid {
grid-template-columns: 1fr;
}
.stat-item {
padding: 15px;
}
.stat-number {
font-size: 1.8rem;
}
.contributors-list {
grid-template-columns: 1fr;
}
.languages-legend {
grid-template-columns: 1fr;
}
}
/* 暗色模式适配 */
.dark-mode .github-section {
background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}
.dark-mode .github-stats-container {
background: rgba(255, 255, 255, 0.05);
border-color: rgba(255, 255, 255, 0.1);
}
.dark-mode .stat-item {
background: rgba(255, 255, 255, 0.05);
border-color: rgba(255, 255, 255, 0.05);
}
.dark-mode .stat-item:hover {
background: rgba(255, 255, 255, 0.1);
}
/* 动画效果 */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.github-stats-container {
animation: fadeInUp 0.6s ease-out;
}
.stat-item,
.commit-item,
.contributor-item {
animation: fadeInUp 0.6s ease-out;
}
.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }