-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
376 lines (322 loc) · 10.5 KB
/
Copy pathstyle.css
File metadata and controls
376 lines (322 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
body {
font-family: Arial, sans-serif;
color: #333;
background-color: #fff;
margin: 0;
padding: 0;
display: flex;
}
h1 {
position: fixed;
width: 20%;
top: 0; /* Adjust as needed */
left: 0; /* Adjust as needed */
z-index: 1; /* Ensure the name appears above other content */
padding: 1em;
margin-bottom: 1em; /* Adjust space below the name */
background: #fff; /* Or any background to make the text visible */
}
.sidebar {
position: fixed;
top: 0; /* Ensure this is below the h1 */
width: 20%; /* Adjust the width as needed */
padding: 2em;
box-sizing: border-box;
margin-top: 8em; /* This should be at least the height of the h1 to prevent overlap */
}
.main-content {
width: 80%; /* Adjust the width as needed */
margin-top: 5em; /*调整project离上页面的位置,尽量使他们与about对齐*/
margin-left: 20%;
padding: 5em;
box-sizing: border-box;
display: flex;
flex: 1;
transition: margin-left 0.5s; /* Smooth transition for sidebar toggle */
flex-wrap: wrap;
gap: 20px;
justify-content: space-around; /* 确保项目均匀分布 */
align-items: flex-start;
}
.main-nav a,
.secondary-nav a {
display: inline-block; /* 设置为内联块元素 */
margin-bottom: 0.7em; /* Space between links */
text-decoration: none;
color: #333;
border: 2px solid #333;
padding: 0.5em 1em;
box-sizing: border-box;
text-align: center; /* 文本居中 */
border-radius: 5px; /* 边框圆角 */
position: relative; /* 设置为相对定位 */
z-index: 3; /* z-index确保发光效果在边框之下 */
}
.main-nav a {
display: inline-block;
margin-bottom: 1em; /* 设置链接之间的间距 */
text-decoration: none;
color: #333; /* 文本颜色 */
background-color: #fff; /* 背景颜色为白色 */
padding: 0.5em 1em; /* 内边距 */
box-sizing: border-box;
text-align: center; /* 文本居中 */
border-radius: 5px; /* 边框圆角 */
border: 1px solid #ddd; /* 更细更浅的边框 */
}
/* 为每个链接添加特定的发光颜色 */
.main-nav a:nth-of-type(1) { box-shadow: 0 0 15px 5px #FF8C00; } /* About - 橙色发光 */
.main-nav a:nth-of-type(2) { box-shadow: 0 0 15px 5px #1E90FF; } /* Computational Design Practice - 蓝色发光 */
.main-nav a:nth-of-type(3) { box-shadow: 0 0 15px 5px #32CD32; } /* Architecture - 绿色发光 */
.main-nav,
.secondary-nav {
padding: 0; /* 移除默认的内边距 */
list-style: none; /* 移除列表前的项目符号 */
text-align: left; /* 确保链接文本靠左对齐 */
}
.link-section span {
display: block; /* 使“Links”文本成为一个块元素,单独占一行 */
font-weight: bold;
margin: 16px 0 8px; /* 在“Links”上方和下方增加空间 */
}
.link-section {
margin-top: 3em; /* 或者您需要的任何距离 */
}
.project-item {
position: relative; /* Make sure the position is set to relative */
background-color: #fff;
border-radius: 5px;
margin-bottom: 16px;
flex: 1; /* Allows items to grow */
flex-direction: column;
overflow: hidden; /* ensures content fits within the dimensions */
padding: 10px; /* This adds space between the content and the edges of the block */
color: inherit; /* This ensures the text color is inherited from the block */
/* ... other styles ... */
transition: max-height 1.5s ease, width 1.5s ease; /* Smooth transition for size changes */
flex: 0 0 calc(33.333% - 16px); /* Adjusts the width for 3 columns layout */
height: auto;
}
.bio-container {
display: flex;
align-items: center; /* Adjust as needed */
/* flex-wrap: wrap; */
}
.bio-image {
flex: 0 0 auto; /* Adjust as needed */
width: 50%;
max-width: 150px; /* Your preferred width */
margin-right: 20px; /* Space between image and text */
margin-bottom: 10px; /* Add space below the image when it wraps */
height: auto;
}
.bio-content h2, .bio-content p {
color: inherit; /* Inherits color from the parent .project-item */
/* Add other styling for your text here */
flex: 1; /* Allows this item to take up the remaining space */
}
.about {
flex: 0 0 calc(55% - 16px);
height: auto;
}
.architecture {
flex: 0 0 calc(20% - 16px);
height: auto;
}
.cdp {
flex: 0 0 calc(30% - 16px);
height: auto;
}
/* .about { flex-basis: 20%; }
.architecture { flex-basis: 30%; }
.cdp { flex-basis: 40%; } */
.project-cover {
width: 100%;
/* 根据需要调整尺寸 */
/* display: block; */
margin-bottom: 10px; /* This will push everything else below the image */
object-fit: cover; /* This will ensure that the image covers the area without stretching */
height: auto; /* This will maintain the aspect ratio of the image */
}
.project-title {
color: inherit; /* 根据block的外边缘颜色调整 */
margin: 10px 0;
}
.project-info {
margin-bottom: 15px;
color: black;
}
.project-info strong {
font-weight: bold; /* Make the labels bold */
}
.project-description {
color: black; /* 详细文字的颜色 */
margin-bottom: 15px;
font-size: 16px;
}
.project-image {
width: 100%; /* Make the image full-width */
height: auto; /* Height adjusts to keep aspect ratio */
}
.image-caption {
text-align: center; /* Center the caption text */
color: grey; /* Grey text color */
font-size: smaller; /* Smaller text size */
}
.link-container {
text-align: center; /* Center-align the container for the links */
margin-top: 20px; /* Space above the links */
}
.project-link, .video-link {
display: inline-block; /* Allows for padding and margin */
background-color: transparent; /* Example background color */
color: black; /* Text color */
padding: 10px 20px; /* Padding around the text */
border-radius: 10px; /* Rounded corners */
border: 1px solid black; /* Add a black border */
text-decoration: none; /* Remove underline from links */
margin: 5px 0; /* Margin for spacing between links */
}
.project-link:hover, .video-link:hover {
background-color: #27292b; /* Darker shade for hover effect */
color: white;
}
.project-detail {
display: none; /* hidden by default */
position: relative; /* position relatively within the project-item */
right: 0;
bottom: 0;
top: 0;
left: 0;
overflow: hidden;
transition: max-height 1.5s ease; /* Smooth transition for content appearance */
}
/* Only change size when the .expand class is added via JavaScript */
.project-item.expanded {
width: 60%; /* Set the expanded width to 60% of .main-content's width */
height: auto;
flex: none; /* Remove flex to stop it from growing with content */
overflow: auto;
transition: all 1.3s ease; /* Smooth transition for expansion */
/* You may need to adjust positioning here, depending on your layout */
}
.project-item.expanded .project-detail {
display: block; /* Show details */
}
/* 光晕效果 */
.project-item[data-category="computational-design"] { box-shadow: 0 0 15px #1E90FF; color: #1E90FF; /* Text color for computational design */}
.project-item[data-category="architecture"] { box-shadow: 0 0 15px #32CD32; color: #32CD32; /* Text color for architecture */ }
.project-item[data-category="about"] { box-shadow: 0 0 15px #FF8C00; color: #FF8C00; /* Text color for about */ }
/* 更多分类... */
.project-item:hover {
background-color: #f0f0f0; /* 鼠标悬停时的背景色 */
cursor: pointer; /* 显示为可点击的指针形状 */
transition: background-color 0.3s; /* 平滑的背景色过渡效果 */
}
/* When the project detail is active */
/* .active-detail {
display: block;
position: relative;
width: 100%;
height: auto;
z-index: 2;
background-color: #FFF;
padding: 20px;
box-sizing: border-box;
overflow-y: auto;
} */
/* .project-item.active {
z-index: 10;
} */
/* This CSS rule will only apply when project-detail is visible */
/* .project-item:hover .project-detail,
.project-item:active .project-detail {
display: block;
position: relative;
z-index: 1;
top: -10px;
background: #FFF;
padding: 10px;
} */
footer {
width: 100%;
text-align: center;
color: gray;
position: relative;
bottom: 0;
left: 0;
}
/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
display: none;
}
/* Styles for smaller screens */
@media (max-width: 768px) {
.project-item {
/* Adjusts the width for a single column layout */
flex: 0 0 calc(100% - 16px); /* Makes each block take full width */
margin-bottom: 16px;
/* Keep the rest of your styles as is */
}
/* You may adjust other elements within .project-item here if necessary */
}
@media (max-width: 1024px) {
.project-item {
/* Adjusts the width for a single column layout */
flex: 0 0 calc(50% - 16px); /* Makes each block take full width */
margin-bottom: 16px;
/* Keep the rest of your styles as is */
}
/* You may adjust other elements within .project-item here if necessary */
}
@media (min-width: 768px) {
.bio-image {
/* Restrict the image width to 50% only on larger screens */
width: 50%;
}
}
/* Base styles */
.hamburger-menu {
display: none;
position: fixed;
top: 15px;
right: 15px;
z-index: 2; /* Ensure it's above other content */
}
/* Hide the sidebar by default on small screens */
@media (max-width: 768px) {
.sidebar {
position: fixed;
top: -100%; /* Start off-screen */
left: 0; /* Hide the sidebar */
width: 100%; /* Full width */
height: 15%; /* Full screen height */
transition: top 0.5s; /* Animated effect for sliding in */
}
.hamburger-menu {
display: block;
}
.main-content {
margin-left: 0; /* Main content uses full width when sidebar is hidden */
width: 100%; /* Main content should take full width */
padding: 1em; /* Adjust padding as needed */
/* Other styles as needed */
}
/* Expand sidebar when active */
.sidebar.active {
top: 0; /* Bring sidebar into view from the top */
height: 15%; /* Full screen height */
width: 100%; /* Full screen width */
transition: top 0.5s; /* Smooth transition for top property */
}
}
/* Show the sidebar when the screen is larger than 768px */
/* @media (min-width: 769px) {
.sidebar {
position: fixed;
left: 0;
}
.hamburger-menu {
display: none;
}
} */