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

fixed mobile css #16

Merged
merged 2 commits into from
Jun 24, 2024
Merged
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
12 changes: 11 additions & 1 deletion src/components/header/Header.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
cursor: pointer;
}

.MechHub_Logo_Mobile {
height: 32px;
cursor: pointer;
}

.hamburger {
display: none;
font-size: 30px;
Expand Down Expand Up @@ -111,6 +116,12 @@
display: block;
}

.banner {
h1 {
font-size: 20px;
}
}

ul {
display: none;
flex-direction: column;
Expand All @@ -132,7 +143,6 @@
flex-direction: row;
flex-wrap: wrap;
justify-content: center;

margin: 8px;
cursor: pointer;
}
Expand Down
20 changes: 15 additions & 5 deletions src/components/header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { db } from '../../lib/firebaseConfig';

import SearchBar from '../searchbar/Searchbar';
import MechHub_Logo from "../../assets/Logo/MechHub_logo.png";
import Mechhub_Logo_Mobile from "../../assets/Logo/MH_logo.png";
import "./Header.css";

function Header() {
Expand Down Expand Up @@ -71,11 +72,20 @@ function Header() {

return (
<nav className='navbar'>
<img
src={MechHub_Logo}
className="MechHub_Logo"
onClick={handleLogoClick}
/>
{!isMobile ? (
<img
src={MechHub_Logo}
className="MechHub_Logo"
onClick={handleLogoClick}
/>
) : (
<img
src={Mechhub_Logo_Mobile}
className="MechHub_Logo_Mobile"
onClick={handleLogoClick}
/>
)
}
<div className='header-searchbar'>
<SearchBar onSearch={setSearchQuery} />
</div>
Expand Down
7 changes: 7 additions & 0 deletions src/pages/landing/banner/LandingBanner.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@
.banner img {
display: none;
}

.banner h1 {
font-size: 32px;
}
.banner p {
font-size: 16px;
}
.faq {
display: none;
}
Expand Down
8 changes: 8 additions & 0 deletions src/pages/search/SearchPage.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,12 @@
padding: 12px;
top: 100px;
}

.product-filter {
font-size: 16px;
}
.product-filter select {
padding: 5px;
font-size: 12px;
}
}
9 changes: 9 additions & 0 deletions src/pages/search/filter/productFilter.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,13 @@
width: 100%;
top: 24px;
}

.filter-group label {
font-size: 12px;
}
.display {
position: relative;
font-size: 12px;
top: -6px;
}
}
2 changes: 1 addition & 1 deletion src/pages/search/filter/productFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function ProductFilter({ minPrice, maxPrice, onFilterChange, onSortChange }) {
onChange={handleMaxPriceChange}
/>
</div>
<div>
<div className='display'>
<span>{priceRange[0]}</span> - <span>{priceRange[1]}</span>
</div>
</div>
Expand Down
8 changes: 6 additions & 2 deletions src/pages/userprofile/UserProfile.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
display: flex;
flex-direction: row;
gap: 10px;
right: 20px;

> button {
border-radius: 20px;
Expand All @@ -104,7 +103,7 @@
color: #FFFFFF;
font-size: 10px;
font-weight: bold;
padding: 12px 45px;
padding: 12px;
letter-spacing: 1px;
text-transform: uppercase;
transition: transform 80ms ease-in;
Expand Down Expand Up @@ -204,4 +203,9 @@
}
}
}
.profile-buttons {
justify-content: center;
align-items: center;
width: 100px;
}
}