Skip to content

Commit

Permalink
Merge pull request Anjaliavv51#34 from gauravsingh1281/Mobile-respons…
Browse files Browse the repository at this point in the history
…iveness

Issue No . Anjaliavv51#32 [Fixed] Make Rentalog homepage responsive for Mobile view.
  • Loading branch information
gauravsingh1281 authored Aug 24, 2023
2 parents 23be3ec + c8eb807 commit 38d160a
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 21 deletions.
Binary file added src/assets/Icons/menu-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 12 additions & 4 deletions src/components/AboutUs-section/AboutUs-section.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
}

.aboutUs-section .row {
display: flex;
align-items: center;
justify-content: center;

gap: 68px;
margin-top: 16px;
}
Expand All @@ -25,6 +23,16 @@

.aboutUs-section .row .paragraph {
max-width: 550px;
text-align: start;
text-align: justify;
padding: 8px;
line-height: 28.38px;
}

@media (max-width:768px) {
.aboutUs-section .row .paragraph {
max-width: 550px;
text-align: justify;
padding: 12px;
line-height: 28.38px;
}
}
4 changes: 2 additions & 2 deletions src/components/AboutUs-section/AboutUs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import "./AboutUs-section.css";
const AboutUs = () => {
return (
<div className="aboutUs-section">
<span className="primary-heading">About Us</span>
<div className="row">
<span className="text-3xl md:text-4xl font-semibold text-[#312F2F] text-center pt-10">About Us</span>
<div className=" row flex flex-col justify-center items-center md:flex-row">
<img
className="rent-board-img"
src={rentBoardImg}
Expand Down
6 changes: 3 additions & 3 deletions src/components/Footer-section/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { FaTwitter, FaGithub, FaInstagram } from "react-icons/fa";
const Footer = () => {
return (
<footer>
<div className="flex justify-center justufy-between bg-primaryGreen text-textWhite px-[75px] py-[60px] ">
<div className="flex justify-center justufy-between bg-primaryGreen text-textWhite md:px-[75px] px-[25px] py-[60px] md:flex-row flex-col">
<div className="w-[300px] flex-1">
<img
className="bg-[white] px-1 rounded-xl mb-2"
className="bg-[white] px-1 rounded-xl mb-2 w-64"
src={logo}
alt="logo"
/>
Expand All @@ -19,7 +19,7 @@ const Footer = () => {
<h3 className="text-xl font-semibold">Contact Us</h3>
<div className="flex space-x-3 pt-2">
<a href="https://twitter.com/gauravsingh1281">
<FaTwitter className="w-8 h-8" />
<FaTwitter className="w-8 h-8 " />
</a>
<a href="https://github.com/gauravsingh1281">
<FaGithub className="w-8 h-8" />
Expand Down
76 changes: 76 additions & 0 deletions src/components/Header-section/Header-section.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,80 @@
width: 22%;
height: 52px;
background: #1abc9c;
}

@media (max-width:768px) {
.header-section {
width: 100%;
height: 1024px;
background: url(/src/assets/Images/header-bg.png);
background-position: center center;
background-color: #262626;
background-size: cover;
position: relative;
}

.header-text {
position: relative;
top: 23%;
left: 4%;
width: 74%;
}

.header-text h1 {
font-size: 46px;
font-weight: 600;
}

.btn {
margin-top: 55px;
border-radius: 8px;
color: white;
font-size: 1.2rem;
font-weight: 700;
width: 31%;
height: 47px;
background: #1abc9c;
}
}

@media (max-width:580px) {
.navbar .logo {
width: 170px;
}

.navbar .menu-icon {
width: 40px;
}

.header-section li {
list-style: none;
font-weight: 600;
font-size: 15.5px;
color: #262626;
}

.btn {
margin-top: 55px;
border-radius: 8px;
color: white;
font-size: 1.2rem;
font-weight: 700;
width: 36%;
height: 47px;
background: #1abc9c;
}
}

@media (max-width:468px) {
.btn {
margin-top: 55px;
border-radius: 8px;
color: white;
font-size: 1rem;
font-weight: 700;
width: 42%;
height: 44px;
background: #1abc9c;
}
}
16 changes: 9 additions & 7 deletions src/components/Header-section/Navbar.jsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
import logo from "../../assets/Images/logo.png"
import logo from "../../assets/Images/logo.png";
import MenuIcon from "../../assets/Icons/menu-icon.png";
import { FiUser } from 'react-icons/fi';

const Navbar = () => {
return (
<>
<nav className="navbar flex justify-between items-center py-4 px-12">
<img src={logo} alt="Rentalog-logo" />
<ul className='flex'>
<nav className="navbar flex justify-between items-center py-4 px-4 md:py-4 md:px-12">
<img className="logo" src={logo} alt="Rentalog-logo" />
<ul className='hidden md:flex'>
<li className='nav-links mr-5 p-3 '>HOME</li>
<li className='nav-links mr-5 p-3'>ABOUT</li>
<li className='nav-links mr-5 p-3'>CONTACT</li>
<li className='nav-links p-3'>RENTALS</li>
</ul>
<ul className='user-cta flex'>
<li className='mr-5 p-3'>Login</li>
<li className=' p-3'><FiUser className="mr-1" />Register</li>
<ul className='user-cta hidden md:flex'>
<li className='mr-5 p-2 md:p-3'>Login</li>
<li className=' p-2 md:p-3'><FiUser className="mr-1" />Register</li>
</ul>
<img className="menu-icon md:hidden" src={MenuIcon} alt="Menu-icon" />
</nav>
</>
)
Expand Down
8 changes: 4 additions & 4 deletions src/components/Services-section/Services-section.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ import placeName from "./placeName";
const Services = () => {
return (
<>
<h1 className="text-5xl font-semibold text-[#312F2F] text-center pt-10">
<h1 className=" text-4xl md:text-5xl font-semibold text-[#312F2F] text-center pt-10">
Our Services Includes
</h1>
<div className="grid grid-cols-1 md:grid-cols-2 gap-10 my-10 mx-36">
<div className="grid grid-cols-1 md:grid-cols-2 gap-10 my-10 md:mx-36 sm:mx-24 mx-16">
{
ourServices.map(({ id, bgColor, title, description, icon, alt }) => {
return <ServicesCard title={title} key={id} bgColor={bgColor} icon={icon} alt={alt} description={description} />
})
}
</div>
<div className="bg-[#D1F2EB] my-20 ">
<h1 className="text-4xl font-semibold text-[#312F2F] text-center py-10">
<h1 className="text-3xl md:text-4xl font-semibold text-[#312F2F] text-center py-10">
Our Services are available in
</h1>
<div className="flex justify-center items-center flex-row pb-14 gap-16 px-10">
<div className="flex justify-center items-center flex-col pb-14 gap-16 px-10 md:flex-row">
{
placeName.map(({ id, name, image }) => {
return <ServicesAvailableIn placeName={name} key={id} placeImage={image} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/Services-section/ServicesCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const ServicesCard = (props) => {
src={props.icon}
alt={props.alt}
></img>
<h1 className="text-[#312F2F] font-bold text-2xl">
<h1 className="text-[#312F2F] font-bold md:text-2xl text-xl">
{props.title}
</h1>
</div>
Expand Down

0 comments on commit 38d160a

Please sign in to comment.