Skip to content

Commit

Permalink
Merge pull request #32 from Albert-mah/main
Browse files Browse the repository at this point in the history
Revert "feat: rebuild tutorials page"
  • Loading branch information
Albert-mah authored Jan 13, 2025
2 parents a48e9a9 + ef92ab6 commit 6b35ce9
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 1,167 deletions.
207 changes: 0 additions & 207 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7258,210 +7258,3 @@ ul.articles a:hover img {
letter-spacing: 0.06rem;
font-feature-settings: "palt";
}


/*********************************/
/* tutorials */
/*===============================*/

.tutorials-container {
display: flex;
flex-direction: column;
gap: 1.5rem;
padding: 2rem;
background-color: #fff;
color: #000;
}

.tutorials-search-and-toggle {
display: flex;
flex-direction: row; /* 行方向 */
gap: 1rem;
align-items: center; /* 垂直居中对齐 */
}

.tutorials-toggle-button {
padding: 0.5rem 1rem;
font-size: 1rem;
cursor: pointer;
background-color: #4CAF50; /* 修改按钮背景颜色 */
border: none;
color: white; /* 按钮文字颜色 */
border-radius: 4px;
transition: background-color 0.3s, transform 0.2s;
}

.tutorials-toggle-button:hover {
background-color: #45a049;
transform: scale(1.05);
}

.tutorials-toggle-button.active {
background-color: #2f55d4;
color: #fff;
font-weight: bold;
}

.tutorials-search-bar {
flex: 1; /* 搜索框占据剩余空间 */
padding: 0.75rem 1rem;
font-size: 1rem;
border: 2px solid #ccc;
border-radius: 8px;
outline: none;
transition: border-color 0.3s;
}

.tutorials-search-bar:focus {
border-color: #2f55d4;
}

.tutorials-content {
display: flex;
flex-direction: row;
gap: 2rem;
margin: 20px 10px 0;
}

.tutorials-left-panel, .tutorials-right-panel {
flex: 1;
}

.tutorials-separator {
border-left: 1px solid #000;
height: auto;
}

.tutorials-series-list, .tutorials-knowledge-list, .tutorials-scenario-list {
list-style: none;
padding: 0;
margin: 0;
}

.tutorials-series-item, .tutorials-knowledge-item, .tutorials-scenario-item {
margin-bottom: 0.75rem;
}

.tutorials-series-link, .tutorials-knowledge-link, .tutorials-scenario-link {
text-decoration: none;
color: #000;
font-size: 1.3rem;
transition: color 0.3s, background-color 0.3s;
padding: 0.2rem 0.4rem;
border-radius: 4px;
display: inline-block;
}

.tutorials-series-link.active, .tutorials-knowledge-link.active, .tutorials-scenario-link.active { /* 激活状态样式 */
background-color: #2f55d4;
color: #fff;
font-weight: bold;
}

.tutorials-series-link:hover, .tutorials-knowledge-link:hover, .tutorials-scenario-link:hover {
color: #555;
}

.tutorials-series-description {
font-size: 0.9rem;
color: #666;
margin-left: 1rem;
}

.tutorials-scenario-keywords {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 0.5rem;
}

.tutorials-scenario-tag, .tutorials-tag { /* 添加 .tag 类样式 */
padding: 0.3rem 0.6rem;
background-color: #f0f0f0;
border-radius: 4px;
text-decoration: none;
color: #000;
font-size: 0.9rem;
transition: background-color 0.3s, transform 0.2s;
}

.tutorials-scenario-tag.active, .tutorials-tag.active { /* 激活状态样式 */
background-color: #28a745;
color: #fff;
font-weight: bold;
}

.tutorials-scenario-tag:hover, .tutorials-tag:hover {
background-color: #e0e0e0;
transform: scale(1.05);
}

.tutorials-article {
margin-bottom: 1.5rem;
}

.tutorials-article-title {
font-size: 1.25rem;
font-weight: bold;
color: #2f55d4; /* 蓝色 */
text-decoration: none;
transition: color 0.3s;
}

.tutorials-article-title:hover {
color: #0056b3;
}

.tutorials-article-description {
font-size: 1rem;
margin-bottom: 0.5rem;
color: #333;
}

.tutorials-tags {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
font-size: 0.9rem;
}

.tutorials-tag {
padding: 0.3rem 0.6rem;
background-color: #f0f0f0;
border-radius: 4px;
text-decoration: none;
color: #000;
transition: background-color 0.3s, transform 0.2s;
}

.tutorials-tag.active {
background-color: #28a745;
color: #fff;
font-weight: bold;
}

.tutorials-tag:hover {
background-color: #e0e0e0;
transform: scale(1.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
.tutorials-content {
flex-direction: column;
}

.tutorials-separator {
display: none;
}

.tutorials-toggle-button {
align-self: center;
}

.tutorials-search-and-toggle {
flex-direction: column; /* 小屏幕上为列方向 */
align-items: stretch;
}
}

Loading

0 comments on commit 6b35ce9

Please sign in to comment.