Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions .vitepress/theme/components/CategoryCards.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ import { data as categories } from "../category.data";
background-color: transparent;
}

@media (min-width: 640px) {
.home-categories {
padding-right: 48px;
padding-left: 48px;
}
}

@media (min-width: 960px) {
.home-categories {
padding-right: 64px;
padding-left: 64px;
}
}

.category-container {
max-width: 1152px;
margin: 0 auto;
Expand Down Expand Up @@ -95,19 +109,19 @@ import { data as categories } from "../category.data";

.category-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 16px;
}

.category-card {
position: relative;
display: flex;
min-height: 176px;
flex-direction: column;
overflow: hidden;
padding: 20px;
padding: 24px;
height: 100%;
border: 1px solid var(--y-border);
border-radius: 8px;
border-radius: 12px;
background: var(--y-bg);
backdrop-filter: blur(12px);
transition:
Expand Down Expand Up @@ -171,7 +185,7 @@ import { data as categories } from "../category.data";
position: absolute;
z-index: 1;
inset: 0;
border-radius: 8px;
border-radius: 12px;
content: "";
}

Expand Down Expand Up @@ -219,9 +233,9 @@ import { data as categories } from "../category.data";
transform: translateX(4px);
}

@media (max-width: 640px) {
@media (max-width: 639px) {
.home-categories {
padding: 36px 20px 0;
padding: 36px 24px 0;
}

.category-title {
Expand All @@ -234,9 +248,11 @@ import { data as categories } from "../category.data";
.category-grid {
grid-template-columns: 1fr;
}
}

.category-card {
min-height: 158px;
@media (min-width: 640px) and (max-width: 959px) {
.category-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}

Expand Down
37 changes: 32 additions & 5 deletions .vitepress/theme/components/RecentPosts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,20 @@ html.dark {
background-color: transparent;
}

@media (min-width: 640px) {
.home-posts {
padding-right: 48px;
padding-left: 48px;
}
}

@media (min-width: 960px) {
.home-posts {
padding-right: 64px;
padding-left: 64px;
}
}

.container {
max-width: 1152px;
margin: 0 auto;
Expand Down Expand Up @@ -124,16 +138,17 @@ html.dark {

.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 28px;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 16px;
}

.card {
position: relative;
display: flex;
flex-direction: column;
padding: 32px 28px;
border-radius: 8px;
padding: 24px;
height: 100%;
border-radius: 12px;
background: var(--y-bg);
border: 1px solid var(--y-border);
backdrop-filter: blur(12px);
Expand All @@ -152,7 +167,7 @@ html.dark {
position: absolute;
z-index: 1;
inset: 0;
border-radius: 8px;
border-radius: 12px;
content: '';
}

Expand Down Expand Up @@ -295,4 +310,16 @@ html.dark {
.card:hover .icon-arrow::after {
border-color: var(--y-yellow);
}

@media (min-width: 640px) and (max-width: 959px) {
.grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}

@media (max-width: 639px) {
.grid {
grid-template-columns: 1fr;
}
}
</style>
13 changes: 0 additions & 13 deletions .vitepress/theme/styles/hidden.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
:root {

/* 文档页Logo出文字下横条 */
@media (min-width: 960px) {
.VPNavBarTitle.has-sidebar .title {
border-bottom-color: transparent;
}
}

/* 页脚横条隐藏 */
.VPFooter {
border-top: none;
Expand All @@ -33,9 +26,3 @@
}

}


/* 导航栏下划线隐藏 */
.divider {
display: none;
}
Loading