Skip to content

Commit

Permalink
feat(theme): 增加汉字卡片打印样式
Browse files Browse the repository at this point in the history
  • Loading branch information
FuckDoctors committed May 16, 2024
1 parent e37e244 commit d3af2f6
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/.vuepress/styles/zhaobc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,12 @@
#vp-comment {
max-width: 1080px;
}

page: wide;
}
}

/* 针对所有设置了 `page: wide;` 选择器的页面 */
@page wide {
size: landscape;
}
16 changes: 16 additions & 0 deletions docs/.vuepress/theme/components/flippy-card/styles/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,19 @@
transform-style: preserve-3d;
z-index: 1;
}

@media print {
.flippy-card—wrapper {
// transform-style: flat !important;

.flippy-card {
transform: rotateX(0deg) rotateY(0deg) scale(1) !important;
filter: none !important;
}

.flip-button,
.glare {
display: none !important;
}
}
}
25 changes: 24 additions & 1 deletion docs/.vuepress/theme/components/hanzi/hanzi-card.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.hanzi-card {
width: 320px;
height: 420px;
page-break-inside: avoid;

.hanzi-card__front {
display: flex;
Expand Down Expand Up @@ -68,7 +69,8 @@
transition: all 0.3s ease-out;
}
.btn:hover {
scale: 1.2;
// scale: 1.2;
transform: scale(1.2);
}

.btn.btn-voice {
Expand Down Expand Up @@ -99,3 +101,24 @@
}
}
}

@media print {
.flippy-card—wrapper {
&.hanzi-card {
// transform: rotateY(180deg) !important;
// transform: scale(0.9);

.flippy-card__front {
display: none !important;
}

.flippy-card__back {
transform: rotateY(0deg) !important;
}

&.flipped {
transform: rotateY(0deg) !important;
}
}
}
}
10 changes: 10 additions & 0 deletions docs/.vuepress/theme/components/hanzi/hanzi2.scss
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,13 @@
}
}
}

@media print {
.hanzi2 {
.bishun {
.hanzi-detail__strokes {
display: block !important;
}
}
}
}

0 comments on commit d3af2f6

Please sign in to comment.