+
-
+
-
{info.schale && info.schale.Name}
-
{info.json && info.json.info}
+
{info.schale?.Name}
+
{info.file?.info}
);
}
+function Content({ id, allInfo }: ContentProps) {
+ const info = getStudentInfo(allInfo, id);
+ return (
+
+
+
+
+
+
{info.schale?.Name}
+
{info.file?.info}
+
+
+
+
{info.schale?.Birthday}
+
+
+ );
+}
+
export default function Info() {
const [state, setState] = useState<{
student: number,
- MainInfo: {
- data: Main,
+ studentsJson: {
+ data: studentsJson,
fetch: boolean,
}
}>({
student: 0,
- MainInfo: { data: {}, fetch: false }
+ studentsJson: { data: {}, fetch: false }
});
- if (!state.MainInfo.fetch) getStudentJson().then(r => setState({
+ if (!state.studentsJson.fetch) getStudentsJson().then(r => setState({
student: state.student,
- MainInfo: { data: r, fetch: true }
+ studentsJson: { data: r, fetch: true }
}));
return (
- <>
+
@@ -69,26 +115,50 @@ export default function Info() {
所有学生
- {state.MainInfo.fetch &&
+ {state.studentsJson.fetch &&
v + 1}
- components={v => }
+ components={v => {
+ const { num, i } = [
+ { num: 10000, i: 63 },
+ { num: 13000, i: 13 },
+ { num: 16000, i: 13 },
+ { num: 20000, i: 25 },
+ { num: 26000, i: 9 },
+ ][v];
+ return (
+ v + 1}
+ components={v => (
+ setState({
+ student: v,
+ studentsJson: state.studentsJson,
+ })}
+ select={state.student === v}
+ />
+ )}
+ />
+ );
+ }}
/>
}
{state.student !== 0 ?
- (
-
-
-
- )
- : (
请选择学生。
)
+
+ :
+
请选择学生。
}
- >
+
);
}
diff --git a/styles/Chat.module.scss b/styles/Chat.module.scss
new file mode 100644
index 0000000..e3fc6be
--- /dev/null
+++ b/styles/Chat.module.scss
@@ -0,0 +1,31 @@
+@media screen and (min-width: 580px) {
+ #title {
+ width: calc((100% - 70px) / 2);
+ }
+}
+@media screen and (max-width: 580px) {
+ #title {
+ width: calc(100% - 70px);
+ }
+}
+
+#title {
+ position: fixed;
+ height: 70px;
+ display: flex;
+ align-items: center;
+ background-color: #f3f7f8;
+ border-bottom: #e8e8e8 1px solid;
+ user-select: none;
+ justify-content: space-between;
+
+ p#left {
+ font-size: 20px;
+ margin-left: 10px;
+ }
+
+ p#right {
+ font-size: 20px;
+ margin-right: 10px;
+ }
+}
diff --git a/styles/Item.module.scss b/styles/Item.module.scss
index d4cac52..82a8ed8 100644
--- a/styles/Item.module.scss
+++ b/styles/Item.module.scss
@@ -1,8 +1,26 @@
-#infoBar {
- height: 100%;
- width: 50%;
- background-color: #e3e3e5;
- overflow: auto;
+@media screen and (min-width: 580px) {
+ #infoBar {
+ width: 50%;
+ #title {
+ width: calc((100% - 70px) / 2);
+ }
+ }
+ #contentBar {
+ width: 50%;
+ display: flex;
+ }
+}
+@media screen and (max-width: 580px) {
+ #infoBar {
+ width: 100%;
+ #title {
+ width: calc(100% - 70px);
+ }
+ }
+ #contentBar {
+ width: 100%;
+ display: none;
+ }
}
#infoBar::-webkit-scrollbar {
@@ -10,35 +28,41 @@
}
#infoBar {
+ height: 100%;
+ background-color: #f3f7f8;
+ overflow: auto;
+ border-right: #dce5ec 2px solid;
+
#title {
position: fixed;
- width: calc((100% - 70px) / 2);
height: 70px;
display: flex;
align-items: center;
- background-color: #e3e3e5;
- border-bottom: #d2d3d7 2px solid;
- }
+ background-color: #f3f7f8;
+ border-bottom: #e8e8e8 1px solid;
+ user-select: none;
- #title > p {
- font-size: 20px;
- margin-left: 10px;
+ p {
+ font-size: 20px;
+ margin-left: 10px;
+ }
}
#all {
- background-color: #cfdae5;
+ background-color: #e3f0f8;
height: 30px;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
- border-bottom: #c8cfd7 2px solid;
- }
+ border-bottom: #e8e8e8 1px solid;
+ user-select: none;
- #all > img {
- height: 15px;
- margin-left: 15px;
- margin-right: 6px;
+ img {
+ height: 15px;
+ margin-left: 15px;
+ margin-right: 6px;
+ }
}
#students {
@@ -60,35 +84,35 @@
display: grid;
justify-content: center;
align-content: center;
- }
+ user-select: none;
+ background-color: #00000038;
- > div.img > img.col {
- width: 65px;
+ img.col {
+ width: 65px;
+ }
}
> div.p {
display: flex;
flex-direction: column;
justify-content: center;
- }
- > div.p > {
- p {
+ > p {
margin: 0;
font-size: 18px;
}
- p.name {
+ > p.name {
color: #000;
}
- p.info {
- color: #484848;
+ > p.info {
+ color: #707070;
}
}
> div.line {
- background-color: #dbdbdd;
+ background-color: #e8e8e8;
width: calc(100% - 30px);
height: 2px;
margin: auto;
@@ -99,9 +123,78 @@
#contentBar {
height: 100%;
- width: 50%;
- background-color: #efefef;
- display: flex;
+ background-color: #fff;
justify-content: center;
align-items: center;
+ text-align: center;
+
+ #content {
+ width: 100%;
+ height: 100%;
+
+ > div.img {
+ margin: auto;
+ margin-top: 20px;
+ margin-bottom: 5px;
+ overflow: hidden;
+ width: 120px;
+ height: 120px;
+ border-radius: 50%;
+ display: grid;
+ justify-content: center;
+ align-content: center;
+ user-select: none;
+
+ img.col {
+ width: 100%;
+ }
+ }
+
+ > div.p {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+
+ > p {
+ margin: 0;
+ font-size: 18px;
+ }
+
+ > p.name {
+ color: #000;
+ }
+
+ > p.info {
+ color: #707070;
+ }
+ }
+
+ > div.birthday {
+ width: fit-content;
+ height: 15px;
+ color: #5f7c8c;
+ border: #c2d0d9 2px solid;
+ border-radius: 20px;
+ margin: auto;
+ margin-top: 5px;
+ padding: 4px;
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ align-content: center;
+ align-items: center;
+
+ > img {
+ margin-left: 2px;
+ margin-right: 2px;
+ height: 17px;
+ }
+
+ > p {
+
+ margin-left: 2px;
+ margin-right: 2px;
+ }
+ }
+ }
}
diff --git a/styles/MainNode.module.scss b/styles/MainNode.module.scss
index 2d7967a..cfa0554 100644
--- a/styles/MainNode.module.scss
+++ b/styles/MainNode.module.scss
@@ -27,26 +27,8 @@ div #main {
animation-name: start;
animation-timing-function: cubic-bezier(1, 0, 0, 1);
z-index: 1000;
-}
-
-@keyframes iconstart {
- 0% {
- width: 100px;
- opacity: 0;
- }
-
- 50% {
- width: 100px;
- opacity: 1;
- }
-
- 100% {
- width: 100px;
- opacity: 0;
- }
-}
+ user-select: none;
-#MTStart {
> div {
width: 0;
height: auto;
@@ -60,10 +42,27 @@ div #main {
flex-direction: column;
align-items: center;
opacity: 0;
+
+ > svg {
+ width: 50px;
+ }
+ }
+}
+
+@keyframes iconstart {
+ 0% {
+ width: 100px;
+ opacity: 0;
}
- > div > svg {
- width: 50px;
+ 50% {
+ width: 100px;
+ opacity: 1;
+ }
+
+ 100% {
+ width: 100px;
+ opacity: 0;
}
}
@@ -88,9 +87,8 @@ p.MTText {
flex-direction: row;
align-items: center;
justify-content: flex-start;
-}
+ user-select: none;
-#MTBar {
> a > div#icon {
width: 20px;
height: 100%;
@@ -118,9 +116,8 @@ p.MTText {
#MTLeftBar {
width: 70px;
background-color: #525e6e;
-}
+ user-select: none;
-#MTLeftBar {
> a > div > img {
margin: 20px;
width: 25px;
diff --git a/styles/globals.scss b/styles/globals.scss
index cdb3dc7..ef2e15f 100644
--- a/styles/globals.scss
+++ b/styles/globals.scss
@@ -1,7 +1,13 @@
+@import url(https://cdn.jsdelivr.net/npm/misans/lib/misans-300-light.min.css);
body {
- margin: 0;
+ margin: 0;
}
* {
- font-family: MiSans;
-}
\ No newline at end of file
+ font-family: MiSans;
+}
+
+::selection {
+ background-color: #ff8ca1;
+ color: #fff;
+}