Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve navbar and button responsiveness for mobile view #1294

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16,187 changes: 16,187 additions & 0 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/private/landing/Landing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Landing = () => {
<>
<Navbar />
<div className="container landing_parent">
<img src={Vector} alt="" className="Landing_bg" />
<img src={Vector} alt="not loading" className="Landing_bg" />

<div className="landing_body">
{windowWidth > 430 ? (
Expand Down
38 changes: 38 additions & 0 deletions src/components/shared/cards/event/Slider.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,42 @@
gap: 1.2rem;
padding: 2rem 8rem;
margin: 0 3rem;

/* Adjust padding for smaller screens */
@media screen and (max-width: 1024px) {
padding: 1.5rem 4rem;
margin: 0 2rem;
}

@media screen and (max-width: 768px) {
padding: 1rem 2rem;
margin: 0 1rem;
}

@media screen and (max-width: 480px) {
padding: 1rem;
margin: 0;
}
}

.slide {
@media screen and (max-width: 768px) {
flex-direction: column; /* Stack content vertically on smaller screens */
gap: 1rem; /* Reduce the gap between elements */
}
}

.slide > * {
width: 100%; /* Full width for each child in smaller screens */
}

/* Add custom styles for the slider container and slide for very small screens */
@media screen and (max-width: 480px) {
.slide {
gap: 0.5rem;
}

.slider-container {
padding: 0 1rem; /* Add some padding for the slider container */
}
}
59 changes: 57 additions & 2 deletions src/components/shared/comingSoon/ComingSoon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,38 @@
align-items: center;
justify-content: center;
height: 100vh;
padding: 2rem; /* Padding for small screens */
font-family: var(--outfit);

img {
width: 300px;
max-width: 80%; /* Ensure the logo adjusts on smaller screens */

@media screen and (max-width: 768px) {
width: 250px;
}

@media screen and (max-width: 480px) {
width: 200px;
}
}

h1 {
font-size: 60px;
color: #28183b;
line-height: 80px;
line-height: 1.2;
font-weight: 900;

margin-top: 2rem;
text-align: center;

@media screen and (max-width: 768px) {
font-size: 48px;
}

@media screen and (max-width: 480px) {
font-size: 36px;
margin-top: 1.5rem;
}
}

p {
Expand All @@ -29,5 +47,42 @@
letter-spacing: 1px;
text-align: center;
margin-bottom: 50px;

@media screen and (max-width: 768px) {
font-size: 16px;
margin-bottom: 40px;
}

@media screen and (max-width: 480px) {
font-size: 14px;
margin-bottom: 30px;
}
}

/* Button styles (assumed to be inside the global button component) */
button {
padding: 1rem 2rem;
font-size: 1rem;
font-weight: 600;
background-color: #28183b;
color: #fff;
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;

&:hover {
background-color: #452b61;
}

@media screen and (max-width: 768px) {
padding: 0.8rem 1.5rem;
font-size: 0.9rem;
}

@media screen and (max-width: 480px) {
padding: 0.6rem 1.2rem;
font-size: 0.8rem;
}
}
}
2 changes: 1 addition & 1 deletion src/components/shared/navbar/Navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
z-index: 99;

@media screen and (max-width: 430px) {
padding: 0.8rem 1.5rem;
padding: 0.8rem 0.1rem;
}

.navbar_brand > img {
Expand Down
55 changes: 45 additions & 10 deletions src/pages/clubs/Clubs.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
.clubs_header {
display: flex;
flex-wrap: wrap;
width: auto;
align-items: center;
gap: 1.2rem;
padding: 2rem 8rem;
margin: 0 3rem;
font-family: var(--outfit);

@media screen and (max-width: 768px) {
padding: 1.5rem 1rem;
margin: 0 1rem;
}
@media screen and (max-width: 430px) {
background-color: #fff;
display: flex;
align-items: center;
gap: 1rem;
padding: 10px;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.04);
width: auto;
}

.clubs_search_parent {
background-color: #fff;
display: flex;
Expand Down Expand Up @@ -37,7 +53,8 @@
font-size: 15px;
font-family: var(--outfit);
outline: none;
width: 15%;
width: auto; /* Adjusts width for flexibility */
min-width: 120px;
text-align: center;
display: flex;
align-items: center;
Expand All @@ -64,9 +81,16 @@
background-color: #fba18b55;
color: #ff5a31f0;
font-weight: 600;
width: 20%;
width: auto;
min-width: 160px;
display: flex;
align-items: center;
gap: 10px;

@media screen and (max-width: 768px) {
width: 100%;
justify-content: center;
}

svg {
rotate: 180deg;
Expand All @@ -81,20 +105,31 @@
min-height: 100vh;
margin: 0 3rem;
display: grid;
grid-template-columns: 1fr 1fr 1fr; /* Three equal columns */
grid-template-rows: 1fr 1fr 1fr; /* Three equal rows */
gap: 2rem; /* Optional: Add space between grid items */
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;

@media screen and (max-width: 1200px) {
grid-template-columns: 1fr 1fr; /* Two equal columns */
grid-template-rows: 1fr 1fr 1fr; /* Three equal rows */
padding: 2rem 3rem;
}

@media screen and (max-width: 800px) {
grid-template-columns: 1fr; /* One column */
grid-template-rows: 1fr 1fr 1fr 1fr; /* Four equal rows */
padding: 3rem 2rem;
padding: 1.5rem 2rem;
margin: 0;
}
}

input,
button {
transition: all 0.3s ease;
}

input:focus,
button:focus {
outline: 2px solid #ff5a31;
outline-offset: 2px;
}

button:hover {
background-color: #ffe2da;
cursor: pointer;
}
65 changes: 63 additions & 2 deletions src/pages/events/all/Events.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
.events_header {
display: flex;
flex-wrap: wrap; /* Allows wrapping on smaller screens */
align-items: center;
gap: 1.2rem;
padding: 2rem 8rem;
margin: 0 3rem;
font-family: var(--outfit);

@media screen and (max-width: 1024px) {
padding: 1.5rem 5rem;
margin: 0 2rem;
}

@media screen and (max-width: 768px) {
flex-direction: column; /* Stacks items vertically on smaller screens */
padding: 1rem 2rem;
gap: 1rem;
}

@media screen and (max-width: 430px) {
padding: 1rem;
margin: 0;
}

.events_search_parent {
background-color: #fff;
display: flex;
Expand All @@ -18,6 +35,11 @@
width: 100%;
height: 62px;

@media screen and (max-width: 768px) {
height: auto; /* Adjusts height for smaller screens */
padding: 8px;
}

input {
padding: 0.5rem 1rem;
border: 1px solid #00000041;
Expand All @@ -27,6 +49,11 @@
outline: none;
flex-grow: 1;
background-color: #f5f7f7;

@media screen and (max-width: 430px) {
font-size: 14px;
padding: 0.4rem 0.8rem;
}
}

button {
Expand All @@ -37,7 +64,7 @@
font-size: 15px;
font-family: var(--outfit);
outline: none;
width: 15%;
width: auto; /* Adjusts width for dynamic text */
text-align: center;
display: flex;
align-items: center;
Expand All @@ -47,6 +74,16 @@
svg {
min-width: 20px;
min-height: 20px;

@media screen and (max-width: 430px) {
min-width: 16px;
min-height: 16px;
}
}

@media screen and (max-width: 430px) {
font-size: 14px;
padding: 0.4rem 0.6rem;
}
}
}
Expand All @@ -64,10 +101,21 @@
background-color: #fba18b55;
color: #ff5a31f0;
font-weight: 600;
width: 20%;
width: auto;
display: flex;
align-items: center;
gap: 10px;

@media screen and (max-width: 768px) {
font-size: 14px;
height: 50px;
padding: 0.5rem 1rem;
}

@media screen and (max-width: 430px) {
font-size: 13px;
height: 45px;
}
}
}

Expand All @@ -92,11 +140,24 @@
padding: 3rem 2rem;
margin: 0;
}

@media screen and (max-width: 430px) {
padding: 1rem;
gap: 1.5rem;
}
}

.events_separator {
justify-content: center;
height: 1px;
background-color: #00000041;
margin: 1rem 11rem;

@media screen and (max-width: 768px) {
margin: 1rem 5rem;
}

@media screen and (max-width: 430px) {
margin: 1rem;
}
}
Loading
Loading