Skip to content

Commit eafba07

Browse files
committed
style: blog &announcement detail
1 parent 31bcf74 commit eafba07

File tree

2 files changed

+460
-12
lines changed

2 files changed

+460
-12
lines changed

src/pages/announcement/[id]/index.module.css

Lines changed: 230 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
.metaItem {
140140
display: flex;
141141
align-items: flex-start;
142-
height: 14px;
142+
min-height: 20px;
143143
gap: 1rem;
144144
}
145145

@@ -843,11 +843,28 @@
843843
grid-template-columns: 1fr;
844844
gap: 1.5rem;
845845
}
846+
847+
.coverContainer {
848+
width: 100%;
849+
max-width: 500px;
850+
height: auto;
851+
margin: 0 auto;
852+
}
846853
}
847854

848855
@media (max-width: 768px) {
856+
.header {
857+
padding: 0.75rem 0;
858+
}
859+
849860
.headerContent {
850861
padding: 0 1rem;
862+
flex-wrap: wrap;
863+
gap: 0.75rem;
864+
}
865+
866+
.backLink {
867+
font-size: 14px;
851868
}
852869

853870
.headerActions {
@@ -857,22 +874,36 @@
857874
.actionButton {
858875
padding: 0.5rem 0.75rem;
859876
font-size: 0.875rem;
877+
min-width: auto;
860878
}
861879

862880
.hero {
863-
padding: 2rem 0;
881+
padding: 1.5rem 0;
864882
}
865883

866884
.heroContent {
867885
padding: 0 1rem;
886+
gap: 1.5rem;
868887
}
869888

870889
.title {
871-
font-size: 2rem;
890+
font-size: 1.75rem;
891+
line-height: 1.3;
892+
}
893+
894+
.description {
895+
font-size: 1rem;
896+
line-height: 1.4;
897+
}
898+
899+
.coverContainer {
900+
width: 100%;
901+
max-width: 400px;
902+
height: 250px;
872903
}
873904

874905
.main {
875-
padding: 2rem 1rem;
906+
padding: 1.5rem 1rem;
876907
}
877908

878909
.section {
@@ -896,25 +927,95 @@
896927
.organizerContact {
897928
justify-content: center;
898929
}
930+
931+
.metaInfo {
932+
gap: 0.75rem;
933+
}
934+
935+
.metaItem {
936+
gap: 0.75rem;
937+
height: auto;
938+
min-height: 20px;
939+
}
940+
941+
.metaText {
942+
font-size: 0.9rem;
943+
line-height: 1.5;
944+
word-break: break-word;
945+
margin-top: 0;
946+
}
899947
}
900948

901949
@media (max-width: 480px) {
902950
.headerContent {
903951
flex-direction: column;
904-
gap: 1rem;
952+
gap: 0.75rem;
905953
align-items: stretch;
906954
}
907955

956+
.backLink {
957+
justify-content: center;
958+
}
959+
908960
.headerActions {
909961
justify-content: center;
962+
width: 100%;
963+
}
964+
965+
.actionButton {
966+
flex: 1;
967+
max-width: 120px;
968+
}
969+
970+
.hero {
971+
padding: 1rem 0;
972+
}
973+
974+
.heroContent {
975+
gap: 1rem;
976+
}
977+
978+
.title {
979+
font-size: 1.5rem;
980+
}
981+
982+
.description {
983+
font-size: 0.95rem;
984+
}
985+
986+
.coverContainer {
987+
height: 200px;
988+
max-width: 300px;
910989
}
911990

912991
.metaInfo {
913-
gap: 0.75rem;
992+
gap: 0.5rem;
914993
}
915994

916995
.metaItem {
917996
gap: 0.75rem;
997+
flex-direction: row;
998+
align-items: flex-start;
999+
height: auto;
1000+
}
1001+
1002+
.metaIcon {
1003+
align-self: flex-start;
1004+
margin-top: 0.125rem;
1005+
flex-shrink: 0;
1006+
}
1007+
1008+
.metaText {
1009+
font-size: 0.875rem;
1010+
padding-left: 0;
1011+
margin-top: 0;
1012+
margin-left: 0;
1013+
line-height: 1.4;
1014+
flex: 1;
1015+
}
1016+
1017+
.main {
1018+
padding: 1rem;
9181019
}
9191020

9201021
.section {
@@ -926,4 +1027,127 @@
9261027
.shareCard {
9271028
padding: 1rem;
9281029
}
1030+
1031+
.tags {
1032+
gap: 0.25rem;
1033+
}
1034+
1035+
.tag {
1036+
font-size: 0.75rem !important;
1037+
padding: 0.25rem 0.5rem !important;
1038+
}
9291039
}
1040+
/* 内容区域移动端优化 */
1041+
@media (max-width: 768px) {
1042+
/* 针对 marked-paper 的移动端优化 */
1043+
.main .marked-paper {
1044+
padding: 1rem 0.75rem;
1045+
margin: 0;
1046+
border-radius: 8px;
1047+
}
1048+
1049+
.main .prose {
1050+
font-size: 0.95rem;
1051+
line-height: 1.7;
1052+
}
1053+
1054+
.main .prose h1 {
1055+
font-size: 1.5rem;
1056+
margin: 1.5rem 0 1rem 0;
1057+
}
1058+
1059+
.main .prose h2 {
1060+
font-size: 1.25rem;
1061+
margin: 1.25rem 0 0.75rem 0;
1062+
}
1063+
1064+
.main .prose h3 {
1065+
font-size: 1.125rem;
1066+
margin: 1rem 0 0.5rem 0;
1067+
}
1068+
1069+
.main .prose p {
1070+
margin: 0.75rem 0;
1071+
}
1072+
1073+
.main .prose img {
1074+
max-width: 100%;
1075+
height: auto;
1076+
border-radius: 6px;
1077+
margin: 1rem 0;
1078+
}
1079+
1080+
.main .prose pre {
1081+
padding: 0.75rem;
1082+
font-size: 0.8125rem;
1083+
overflow-x: auto;
1084+
border-radius: 6px;
1085+
}
1086+
1087+
.main .prose code {
1088+
font-size: 0.8125rem;
1089+
padding: 0.125rem 0.25rem;
1090+
}
1091+
1092+
.main .prose blockquote {
1093+
margin: 1rem 0;
1094+
padding: 0.75rem 1rem;
1095+
border-left: 3px solid var(--primary-600);
1096+
}
1097+
1098+
.main .prose ul, .main .prose ol {
1099+
padding-left: 1.5rem;
1100+
margin: 0.75rem 0;
1101+
}
1102+
1103+
.main .prose li {
1104+
margin: 0.25rem 0;
1105+
}
1106+
1107+
.main .prose table {
1108+
width: 100%;
1109+
overflow-x: auto;
1110+
display: block;
1111+
white-space: nowrap;
1112+
}
1113+
1114+
.main .prose table tbody {
1115+
display: table;
1116+
width: 100%;
1117+
}
1118+
}
1119+
1120+
@media (max-width: 480px) {
1121+
.main .marked-paper {
1122+
padding: 0.75rem 0.5rem;
1123+
}
1124+
1125+
.main .prose {
1126+
font-size: 0.9rem;
1127+
}
1128+
1129+
.main .prose h1 {
1130+
font-size: 1.375rem;
1131+
}
1132+
1133+
.main .prose h2 {
1134+
font-size: 1.125rem;
1135+
}
1136+
1137+
.main .prose h3 {
1138+
font-size: 1rem;
1139+
}
1140+
1141+
.main .prose pre {
1142+
padding: 0.5rem;
1143+
font-size: 0.75rem;
1144+
}
1145+
1146+
.main .prose code {
1147+
font-size: 0.75rem;
1148+
}
1149+
1150+
.main .prose table {
1151+
font-size: 0.75rem;
1152+
}
1153+
}

0 commit comments

Comments
 (0)