样式优化

This commit is contained in:
禺狨 2023-07-03 11:29:14 +08:00
parent fca99f3ad6
commit 42fc798fc6
6 changed files with 97 additions and 55 deletions

View File

@ -3,8 +3,14 @@
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
height: 55px; min-height: 55px;
box-shadow: 0px -1px 4px 0px rgba(0, 0, 0, 0.04); box-shadow: 0px -1px 4px 0px rgba(0, 0, 0, 0.04);
background: #ffffff; background: #ffffff;
z-index: 100; z-index: 100;
box-sizing: border-box;
}
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
.footer {
padding-bottom: 34px !important;
}
} }

View File

@ -137,3 +137,17 @@ code {
.adm-tab-bar-item-icon { .adm-tab-bar-item-icon {
height: 28px !important; height: 28px !important;
} }
.sp-line {
width: 200%;
height: 1px;
height: 1px;
background: rgba(0, 0, 0, 0.05);
transform: scale(0.5);
-ms-transform: scale(0.5);
-o-transform: scale(0.5);
-webkit-transform: scale(0.5);
-moz-transform: scale(0.5);
transform-origin: top left;
margin-top: 30px;
}

View File

@ -21,29 +21,45 @@ export const CoursesModel: React.FC<PropInterface> = ({
}) => { }) => {
const navigate = useNavigate(); const navigate = useNavigate();
return ( return (
<div <>
className={styles["item"]} <div
onClick={() => { className={styles["item"]}
navigate(`/course/${id}`); onClick={() => {
}} navigate(`/course/${id}`);
> }}
<Image >
width={100} <Image
height={75} width={100}
style={{ borderRadius: 8, marginRight: 15 }} height={75}
src={thumb} style={{ borderRadius: 8, marginRight: 15 }}
/> src={thumb}
<div className={styles["info"]}> />
<div className={styles["title"]}>{title}</div> <div className={styles["info"]}>
<div className={styles["status-content"]}> <div className={styles["title"]}>{title}</div>
{isRequired === 1 && <div className={styles["type"]}></div>} <div className={styles["status-content"]}>
{isRequired === 0 && ( {isRequired === 1 && <div className={styles["type"]}></div>}
<div className={styles["active-type"]}></div> {isRequired === 0 && (
)} <div className={styles["active-type"]}></div>
{progress == 0 && ( )}
<> {progress == 0 && (
<>
<ProgressBar
percent={0}
style={{
flex: 1,
"--fill-color": "#FF4D4F",
"--track-color": "#F6F6F6",
"--track-width": "8px",
"--text-width": "27px",
}}
/>
<span className={styles["no-pro"]}></span>
</>
)}
{progress > 0 && progress < 100 && (
<ProgressBar <ProgressBar
percent={0} percent={progress}
text
style={{ style={{
flex: 1, flex: 1,
"--fill-color": "#FF4D4F", "--fill-color": "#FF4D4F",
@ -52,35 +68,22 @@ export const CoursesModel: React.FC<PropInterface> = ({
"--text-width": "27px", "--text-width": "27px",
}} }}
/> />
<span className={styles["no-pro"]}></span> )}
</> {progress >= 100 && (
)} <div className={styles["success"]}>
{progress > 0 && progress < 100 && ( <Image
<ProgressBar width={20}
percent={progress} height={20}
text src={mediaIcon}
style={{ style={{ marginRight: 5 }}
flex: 1, />
"--fill-color": "#FF4D4F", <span>!</span>
"--track-color": "#F6F6F6", </div>
"--track-width": "8px", )}
"--text-width": "27px", </div>
}}
/>
)}
{progress >= 100 && (
<div className={styles["success"]}>
<Image
width={20}
height={20}
src={mediaIcon}
style={{ marginRight: 5 }}
/>
<span>!</span>
</div>
)}
</div> </div>
</div> </div>
</div> <div className="sp-line"></div>
</>
); );
}; };

View File

@ -121,13 +121,20 @@
overflow-y: auto; overflow-y: auto;
.item { .item {
width: 100%; width: 100%;
float: left;
height: auto; height: auto;
box-sizing: border-box; box-sizing: border-box;
padding-top: 30px; padding-top: 30px;
padding-bottom: 30px; display: flex;
border-bottom: 1px solid rgba(0, 0, 0, 0.05); flex-direction: column;
&:first-child { &:first-child {
padding-top: 20px; padding-top: 20px;
} }
} }
} }
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
.list-box {
padding-bottom: 89px !important;
}
}

View File

@ -22,7 +22,7 @@
float: left; float: left;
height: auto; height: auto;
box-sizing: border-box; box-sizing: border-box;
padding: 20px 20px; padding: 20px 20px 75px 20px;
.top-content { .top-content {
width: 100%; width: 100%;
display: flex; display: flex;
@ -189,3 +189,9 @@
margin-top: 10px; margin-top: 10px;
} }
} }
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
.content-box {
padding-bottom: 109px !important;
}
}

View File

@ -13,7 +13,7 @@
float: left; float: left;
height: auto; height: auto;
box-sizing: border-box; box-sizing: border-box;
padding: 0px 20px; padding: 0px 20px 55px 20px;
text-align: left; text-align: left;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
@ -93,3 +93,9 @@
} }
} }
} }
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
.list-box {
padding-bottom: 89px !important;
}
}