blob: 33776453f6fb2a6a6ac5181ff8442382e3d12463 [file] [log] [blame]
蒋大力498c1562025-06-08 13:01:39 +08001.app {
2 display: flex;
3 flex-direction: column;
4 min-height: 100vh;
5 background-color: #f5f5f5;
6}
7
8/* Header Styles */
9.header {
10 background: white;
11 border-bottom: 1px solid #e0e0e0;
12 position: fixed;
13 top: 0;
14 left: 0;
15 right: 0;
16 z-index: 100;
17}
18
19.header-content {
20 display: flex;
21 align-items: center;
22 justify-content: space-between;
23 padding: 1rem 2rem;
24 max-width: 1200px;
25 margin: 0 auto;
26}
27
28.logo {
29 font-size: 1.5rem;
30 font-weight: bold;
31 color: #ff2442;
32 margin: 0;
33}
34
35.search-bar {
36 display: flex;
37 align-items: center;
38 background: #f8f8f8;
39 border-radius: 20px;
40 padding: 0.5rem 1rem;
41 flex: 1;
42 max-width: 400px;
43 margin: 0 2rem;
44}
45
46.search-bar input {
47 border: none;
48 background: none;
49 outline: none;
50 margin-left: 0.5rem;
51 width: 100%;
52}
53
54.header-actions {
55 display: flex;
56 gap: 1rem;
57 align-items: center;
58}
59
60.header-actions svg {
61 cursor: pointer;
62 color: #666;
63}
64
65/* Main Content */
66.main-content {
67 flex: 1;
68 padding-top: 80px;
69 padding-bottom: 80px;
70}
71
72.posts-container {
73 display: grid;
74 grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
75 gap: 1rem;
76 padding: 1rem;
77 max-width: 1200px;
78 margin: 0 auto;
79}
80
81/* Post Card Styles */
82.post-card {
83 background: white;
84 border-radius: 12px;
85 overflow: hidden;
86 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
87 transition: transform 0.2s ease;
88 cursor: pointer;
89}
90
91.post-card:hover {
92 transform: translateY(-2px);
93}
94
95.post-image {
96 width: 100%;
97 height: 200px;
98 overflow: hidden;
99}
100
101.post-image img {
102 width: 100%;
103 height: 100%;
104 object-fit: cover;
105}
106
107.post-content {
108 padding: 1rem;
109}
110
111.post-title {
112 font-size: 1rem;
113 font-weight: 600;
114 margin: 0 0 0.5rem 0;
115 color: #333;
116 line-height: 1.3;
117}
118
119.post-description {
120 font-size: 0.9rem;
121 color: #666;
122 margin: 0 0 1rem 0;
123 line-height: 1.4;
124}
125
126.post-author {
127 display: flex;
128 align-items: center;
129 margin-bottom: 1rem;
130}
131
132.author-avatar {
133 width: 24px;
134 height: 24px;
135 border-radius: 50%;
136 margin-right: 0.5rem;
137}
138
139.author-name {
140 font-size: 0.8rem;
141 color: #666;
142}
143
144/* Post Actions */
145.post-actions {
146 display: flex;
147 align-items: center;
148 gap: 1rem;
149}
150
151.action-btn {
152 display: flex;
153 align-items: center;
154 gap: 0.3rem;
155 background: none;
156 border: none;
157 color: #666;
158 cursor: pointer;
159 font-size: 0.8rem;
160 padding: 0.3rem;
161 border-radius: 4px;
162 transition: all 0.2s ease;
163}
164
165.action-btn:hover {
166 background: #f0f0f0;
167}
168
169.action-btn.liked {
170 color: #ff4757;
171}
172
173.action-btn.saved {
174 color: #ffa502;
175}
176
177/* Bottom Navigation */
178.bottom-nav {
179 position: fixed;
180 bottom: 0;
181 left: 0;
182 right: 0;
183 background: white;
184 border-top: 1px solid #e0e0e0;
185 display: flex;
186 justify-content: space-around;
187 padding: 0.5rem 0;
188 z-index: 100;
189}
190
191.nav-btn {
192 display: flex;
193 flex-direction: column;
194 align-items: center;
195 background: none;
196 border: none;
197 color: #999;
198 cursor: pointer;
199 padding: 0.5rem;
200 transition: color 0.2s ease;
201}
202
203.nav-btn.active {
204 color: #ff2442;
205}
206
207.nav-btn span {
208 font-size: 0.7rem;
209 margin-top: 0.2rem;
210}
211
212/* Responsive Design */
213@media (max-width: 768px) {
214 .header-content {
215 padding: 1rem;
216 }
217
218 .search-bar {
219 margin: 0 1rem;
220 }
221
222 .posts-container {
223 grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
224 padding: 0.5rem;
225 gap: 0.5rem;
226 }
227}
228
229@media (max-width: 480px) {
230 .posts-container {
231 grid-template-columns: repeat(2, 1fr);
232 }
233}