Skip to content

Commit 1498a98

Browse files
feat: 迁移至MDUI(Homework Card)
1 parent 2a3a4a3 commit 1498a98

5 files changed

Lines changed: 52 additions & 10 deletions

File tree

.hintrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": [
3+
"development"
4+
],
5+
"hints": {
6+
"meta-viewport": "off",
7+
"axe/language": "off"
8+
}
9+
}

assets/css/card/homework.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,4 @@
112112
.delete-btn:hover {
113113
background: rgba(255, 107, 107, 0.5);
114114
border-color: rgba(255, 107, 107, 0.7);
115-
}
116-
117-
fluent-button {
118-
height: 20px;
119115
}

assets/css/main-dark.css

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,22 @@
99
@import "./card/launchpad-dark.css";
1010

1111
/* Loading animation */
12-
@import "./loading-dark.css";
12+
@import "./loading-dark.css";
13+
14+
:root,
15+
.mdui-theme-light {
16+
color: #000;
17+
background-color: transparent;
18+
}
19+
20+
.mdui-theme-dark {
21+
color: #fff;
22+
background-color: transparent;
23+
}
24+
25+
@media (prefers-color-scheme: dark) {
26+
.mdui-theme-auto {
27+
color: transparent;
28+
background-color: transparent;
29+
}
30+
}

assets/css/main.css

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,22 @@
99
@import "./card/launchpad.css";
1010

1111
/* Loading animation */
12-
@import "./loading.css";
12+
@import "./loading.css";
13+
14+
:root,
15+
.mdui-theme-light {
16+
color: #000;
17+
background-color: transparent;
18+
}
19+
20+
.mdui-theme-dark {
21+
color: #fff;
22+
background-color: transparent;
23+
}
24+
25+
@media (prefers-color-scheme: dark) {
26+
.mdui-theme-auto {
27+
color: transparent;
28+
background-color: transparent;
29+
}
30+
}

pages/cards/homework.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
<head>
55
<meta charset="UTF-8">
66
<title>作业</title>
7-
<script type="module" src="https://unpkg.com/@fluentui/web-components"></script>
8-
<link rel="stylesheet" href="../../assets/css/main.css">
7+
<link rel="stylesheet" href="https://unpkg.com/mdui@2/mdui.css" />
8+
<script src="https://unpkg.com/mdui@2/mdui.global.js"></script>
99
<link rel="stylesheet" href="../../assets/css/hide-scrollbar.css">
10+
<link rel="stylesheet" href="../../assets/css/main.css">
1011
</link>
1112
</head>
1213

@@ -25,8 +26,8 @@ <h3>作业</h3>
2526
<!-- 作业将在这里显示 -->
2627
</div>
2728
<div class="homework-btn-container">
28-
<fluent-button appearance="accent" id="addHomeworkBtn">添加作业</fluent-button>
29-
<fluent-button appearance="primary" id="viewAllHomeworkBtn">查看全部</fluent-button>
29+
<mdui-button id="addHomeworkBtn">添加作业</mdui-button>
30+
<mdui-button id="viewAllHomeworkBtn">查看全部</mdui-button>
3031
</div>
3132
</div>
3233
</div>

0 commit comments

Comments
 (0)