Skip to content

Commit ac83603

Browse files
committed
Mobile view enhanced
1 parent 72e8143 commit ac83603

File tree

3 files changed

+48
-2
lines changed

3 files changed

+48
-2
lines changed

Agency Page/Styles/style.css

+31
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,17 @@ main {
250250
#burger {
251251
display: flex;
252252
}
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+
}
253264
}
254265
/* Hero Section */
255266
#hero {
@@ -312,12 +323,32 @@ main {
312323
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
313324
gap: 4em;
314325
place-items: center;
326+
transition: all 300ms ease-in;
315327
}
316328
#team .team-member {
317329
display: flex;
318330
align-items: center;
319331
gap: 2em;
320332
}
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+
321352
.team-member img {
322353
border-radius: 50%;
323354
height: 5em;

Agency Page/app.js

+15
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ for (let i = 1; i <= 12; i++) {
2222
client.alt = `Client ${i}`
2323
clients.appendChild(client)
2424
}
25+
// Populating the Team Section
2526
let i = 1
27+
2628
for (const key in teamNames) {
2729
if (Object.hasOwnProperty.call(teamNames, key)) {
2830
const el = teamNames[key]
@@ -42,3 +44,16 @@ const navMenu = (e) => {
4244
e.classList.toggle('fix')
4345
})
4446
}
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+
})

Agency Page/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/brands.min.css"
1515
integrity="sha512-OivR4OdSsE1onDm/i3J3Hpsm5GmOVvr9r49K3jJ0dnsxVzZgaOJ5MfxEAxCyGrzWozL9uJGKz6un3A7L+redIQ=="
1616
crossorigin="anonymous" referrerpolicy="no-referrer" />
17-
1817
<!-- Custom Sytle Sheet -->
1918
<link rel="stylesheet" href="./Styles/style.css">
2019
<title>Agency Page</title>
@@ -121,7 +120,8 @@ <h3>Quality Assurance</h3>
121120
<div class="container"><span>Our Team</span></div>
122121
</header>
123122
<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>
125125
</div>
126126
</main>
127127
<footer class="primary-footer">

0 commit comments

Comments
 (0)