File tree 3 files changed +48
-2
lines changed
3 files changed +48
-2
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,17 @@ main {
250
250
# burger {
251
251
display : flex;
252
252
}
253
+ # team .show-more {
254
+ max-height : 40em ;
255
+ overflow : hidden;
256
+ mask-image : linear-gradient (180deg , white, white, transparent);
257
+ -webkit-mask-image : linear-gradient (180deg , white, white, transparent);
258
+ }
259
+ .container [data-section = 'team' ] {
260
+ display : flex;
261
+ flex-direction : column;
262
+ align-items : center;
263
+ }
253
264
}
254
265
/* Hero Section */
255
266
# hero {
@@ -312,12 +323,32 @@ main {
312
323
grid-template-columns : repeat (auto-fit, minmax (300px , 1fr ));
313
324
gap : 4em ;
314
325
place-items : center;
326
+ transition : all 300ms ease-in;
315
327
}
316
328
# team .team-member {
317
329
display : flex;
318
330
align-items : center;
319
331
gap : 2em ;
320
332
}
333
+
334
+ # show-more {
335
+ display : block;
336
+ background-color : white;
337
+ color : var (--clr-accent );
338
+ border : 2px solid var (--clr-accent );
339
+ margin-block : -1.25em 1.5em ;
340
+ }
341
+ # show-more : hover {
342
+ background-color : var (--clr-accent );
343
+ color : white;
344
+ }
345
+
346
+ @media screen and (min-width : 768px ) {
347
+ # show-more {
348
+ display : none;
349
+ }
350
+ }
351
+
321
352
.team-member img {
322
353
border-radius : 50% ;
323
354
height : 5em ;
Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ for (let i = 1; i <= 12; i++) {
22
22
client . alt = `Client ${ i } `
23
23
clients . appendChild ( client )
24
24
}
25
+ // Populating the Team Section
25
26
let i = 1
27
+
26
28
for ( const key in teamNames ) {
27
29
if ( Object . hasOwnProperty . call ( teamNames , key ) ) {
28
30
const el = teamNames [ key ]
@@ -42,3 +44,16 @@ const navMenu = (e) => {
42
44
e . classList . toggle ( 'fix' )
43
45
} )
44
46
}
47
+
48
+ // Show more in the team section
49
+
50
+ const showMore = document . getElementById ( 'show-more' )
51
+
52
+ showMore . addEventListener ( 'click' , ( ) => {
53
+ team . classList . toggle ( 'show-more' )
54
+ if ( showMore . textContent == 'Show More' ) {
55
+ showMore . innerText = 'Show Less'
56
+ } else {
57
+ showMore . innerText = 'Show More'
58
+ }
59
+ } )
Original file line number Diff line number Diff line change 14
14
< link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/brands.min.css "
15
15
integrity ="sha512-OivR4OdSsE1onDm/i3J3Hpsm5GmOVvr9r49K3jJ0dnsxVzZgaOJ5MfxEAxCyGrzWozL9uJGKz6un3A7L+redIQ== "
16
16
crossorigin ="anonymous " referrerpolicy ="no-referrer " />
17
-
18
17
<!-- Custom Sytle Sheet -->
19
18
< link rel ="stylesheet " href ="./Styles/style.css ">
20
19
< title > Agency Page</ title >
@@ -121,7 +120,8 @@ <h3>Quality Assurance</h3>
121
120
< div class ="container "> < span > Our Team</ span > </ div >
122
121
</ header >
123
122
< div class ="container " data-section ="team ">
124
- < section id ="team "> </ section >
123
+ < section class ="show-more " id ="team "> </ section >
124
+ < button class ="button " id ="show-more "> Show More</ button >
125
125
</ div >
126
126
</ main >
127
127
< footer class ="primary-footer ">
You can’t perform that action at this time.
0 commit comments