refactor(component): 重构组件模板与样式结构

将公共样式提取至public.css,优化组件模板结构
添加图片资源与组件模板同步脚本
调整组件样式与布局,统一风格
This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-10-22 18:31:16 +08:00
parent 5b4040ec05
commit 6bb48ff86d
31 changed files with 3067 additions and 613 deletions

419
css/public.css Normal file
View File

@@ -0,0 +1,419 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
font-weight: 400;
font-style: normal;
}
body {
background-color: #eef2f5;
}
/* 公共的 css 样式 */
.flexflex {
display: flex;
}
.flexcenter {
display: flex;
justify-content: center;
align-items: center;
}
.flexjcenter {
display: flex;
justify-content: center;
}
.flexacenter {
display: flex;
align-items: center;
}
.flex1 {
flex: 1;
}
.flexcolumn {
display: flex;
flex-direction: column;
}
.one-line-display {
word-break: keep-all;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.item-box {
max-width: 897px;
width: 100%;
background-color: #ffffff;
border: 1px solid #e9eef2;
border-radius: 10px;
padding: 18px 20px 0;
}
.item-box .item-head {
margin-bottom: 14px;
}
.item-box .item-head .avatar {
width: 28px;
height: 28px;
border-radius: 50%;
margin-right: 8px;
}
.item-box .item-head .name {
font-style: normal;
color: #555555;
font-size: 14px;
margin-right: 8px;
}
.item-box .item-head .group {
height: 15px;
margin-right: 8px;
}
.item-box .item-head .time {
font-size: 13px;
color: #aaaaaa;
}
.item-box .item-head .view {
font-size: 12px;
color: #aaaaaa;
margin-right: 15px;
}
.item-box .item-head .view .icon {
width: 13px;
height: 8px;
margin-right: 5px;
}
.item-box .item-head .btn {
width: 24px;
height: 16px;
background-color: #f2f2f2;
border-radius: 150px;
}
.item-box .item-head .btn .icon {
width: 18px;
height: 18px;
}
.item-box .label {
margin-bottom: 10px;
}
.item-box .label .item {
font-size: 14px;
color: #555555;
padding: 0 9px;
height: 24px;
line-height: 24px;
background-color: #f2f2f2;
border-radius: 6px;
}
.item-box .label .item.icon {
padding: 0;
}
.item-box .label .item:not(:last-child) {
margin-right: 10px;
}
.item-box .label .item.blue {
color: #ffffff;
background-color: #04b0d5;
}
.item-box.item-forum .title {
font-weight: 650;
font-size: 20px;
color: #000000;
line-height: 36px;
margin-bottom: 7px;
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
}
.item-box.item-forum .message {
font-size: 14px;
color: #555555;
white-space: pre-wrap;
margin-bottom: 15px;
}
.item-box.item-offer {
font-size: 14px;
color: #333333;
}
.item-box.item-offer .school {
height: 45px;
border-bottom: 1px dotted #d7d7d7;
}
.item-box.item-offer .school .icon {
height: 20px;
margin-right: 10px;
}
.item-box.item-offer .school .text {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
font-size: 20px;
color: #000000;
line-height: 36px;
}
.item-box.item-offer .major {
height: 45px;
border-bottom: 1px dotted #d7d7d7;
}
.item-box.item-offer .major .key {
font-size: 14px;
color: #7f7f7f;
margin-right: 20px;
}
.item-box.item-offer .info {
height: 45px;
border-bottom: 1px dotted #d7d7d7;
margin-bottom: 12px;
}
.item-box.item-offer .info .line {
width: 1px;
height: 14px;
background: #aaaaaa;
margin: 0 10px;
}
.item-box.item-offer .info .results {
font-size: 13px;
color: #ffffff;
height: 20px;
padding: 0 9px;
border-radius: 37px;
}
.item-box.item-offer .message {
color: #555555;
margin-bottom: 15px;
}
.item-box.item-summary .title {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
font-size: 20px;
color: #000000;
line-height: 36px;
margin-bottom: 7px;
}
.item-box.item-summary .message {
font-size: 14px;
color: #555555;
margin-bottom: 20px;
}
.item-box.item-summary .total {
font-size: 14px;
color: #555555;
margin-bottom: 12px;
}
.item-box.item-summary .total .num {
font-family: "Arial-BoldMT", "Arial Bold", "Arial", sans-serif;
font-weight: 700;
color: #000000;
margin: 0 5px;
}
.item-box.item-summary .list {
overflow: auto;
margin-bottom: 16px;
}
.item-box.item-summary .list .item-content {
width: 280px;
flex-direction: column;
justify-content: space-between;
padding: 10px;
}
.item-box.item-summary .list .item {
width: 280px;
height: 110px;
background-color: rgba(242, 242, 242, 0);
border: 1px solid #ebebeb;
border-radius: 10px;
color: #333333;
font-size: 14px;
cursor: pointer;
margin-right: 10px;
}
.item-box.item-summary .list .item .school .icon {
height: 24px;
}
.item-box.item-summary .list .item .school .name {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
font-size: 16px;
color: #000000;
line-height: 24px;
}
.item-box.item-summary .list .item .info .results {
font-size: 13px;
color: #ffffff;
height: 20px;
padding: 0 9px;
border-radius: 37px;
}
.item-box.item-summary .list .item .info .line {
width: 1px;
height: 14px;
background: #aaaaaa;
margin: 0 10px;
}
.item-box.item-summary .list .item.more {
color: #026277;
}
.item-box.item-summary .list .item.more .item-content {
vertical-align: top;
flex-direction: row;
justify-content: center;
}
.item-box.item-summary .list .item.more .icon {
width: 15px;
height: 15px;
margin-left: 5px;
}
.item-box.item-vote .title {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
font-size: 20px;
color: #000000;
line-height: 36px;
margin-bottom: 7px;
}
.item-box.item-vote .message {
font-size: 14px;
color: #555555;
margin-bottom: 15px;
}
.item-box.item-vote .info {
font-size: 14px;
color: #7f7f7f;
}
.item-box.item-vote .info .status {
height: 22px;
line-height: 22px;
background-color: rgba(211, 81, 16, 0.09803922);
border-radius: 24px;
font-size: 13px;
color: #d35110;
padding: 0 7px;
}
.item-box.item-vote .info .line {
width: 1px;
height: 14px;
background-color: #aaaaaa;
margin: 0 10px;
}
.item-box.item-vote .info .num {
font-weight: 650;
color: #000000;
}
.item-box.item-vote .list {
margin: 4px 20px 0;
overflow: hidden;
max-height: 138px;
}
.item-box.item-vote .list.voted {
max-height: 178px;
}
.item-box.item-vote .list.voted .list-item {
height: 75px;
}
.item-box.item-vote .list.voted .list-item .list-bottom {
display: flex;
}
.item-box.item-vote .list .list-item {
height: 55px;
flex-direction: column;
}
.item-box.item-vote .list .list-item:not(:last-of-type) {
border-bottom: 1px dotted #d7d7d7;
}
.item-box.item-vote .list .list-item .list-top {
margin-bottom: 1px;
width: 100%;
}
.item-box.item-vote .list .list-item .list-top .list-serial {
width: 18px;
height: 18px;
line-height: 18px;
background-color: #333333;
border-radius: 50%;
color: #ffffff;
font-size: 13px;
margin-right: 12px;
}
.item-box.item-vote .list .list-item .list-top .list-tick {
width: 18px;
height: 18px;
margin-right: 12px;
}
.item-box.item-vote .list .list-item .list-top .list-text {
font-size: 18px;
line-height: 24px;
color: #333333;
width: 400px;
}
.item-box.item-vote .list .list-item .list-bottom {
color: #026277;
font-size: 13px;
padding: 2px;
justify-content: flex-end;
width: 100%;
display: none;
}
.item-box.item-vote .list .list-item .list-bottom .list-length {
width: 100%;
height: 4px;
background-color: #cff7ff;
border-radius: 66px;
margin-right: 6px;
}
.item-box .comment {
height: 40px;
background-color: #f6f6f6;
border-radius: 10px;
padding: 0 10px;
}
.item-box .comment .icon {
width: 20px;
height: 20px;
border-radius: 50%;
margin-right: 10px;
}
.item-box .comment .text {
font-size: 14px;
color: #7f7f7f;
}
.item-box .bottom {
margin-top: 15px;
height: 55px;
justify-content: flex-end;
}
.item-box .bottom .bottom-item {
cursor: pointer;
}
.item-box .bottom .bottom-item:not(:last-child) {
margin-right: 60px;
}
.item-box .bottom .bottom-item .icon {
width: 20px;
height: 20px;
margin-right: 8px;
}
.item-box .bottom .bottom-item .text {
color: #aaaaaa;
font-size: 13px;
}
.item-box .bottom .bottom-item.like .icon {
width: 18px;
height: 18px;
}
/* offer 录取结果 */
.results.r1 {
background-color: #76c45e;
}
.results.r2 {
background-color: #50e3c2;
}
.results.r3 {
background-color: #81d3f8;
}
.results.r4 {
background-color: #d35110;
}
.results.r5 {
background-color: #f59a23;
}
.results.r6 {
background-color: #8080ff;
}