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

#4 UX/UI of hero section improved align with design best practices #32

Closed
wants to merge 1 commit into from
Closed
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
170 changes: 85 additions & 85 deletions src/assets/styles/HomeSearch.css
Original file line number Diff line number Diff line change
@@ -1,98 +1,98 @@
/* HomeSearch.css */
.home-search {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 3vw;
display: flex;
justify-content: space-evenly;
align-items: center;
margin-top: 3vw;
}

.left-side {
max-width: 700px;
text-align: left;
margin-left: 2vw;
}
.left-side h1 {
font-size: 2.3rem;
text-align: center;
padding-top: 3rem;
margin: 0;
text-shadow: 0.1vw 0.2vw 0.2vw rgba(124, 120, 120, 0.4);
}
.left-side h1 span {
color: #0aa5ff;
}
.left-side p {
color: #777;
font-size: 1.3vw;
padding-left: 2px;
}

.search-div {
margin-top: 5vw;
}

.search-btn {
font-size: 1rem;
font-weight: 800;
padding: 1vw 2.5vw;
/* background-color: hsl(0, 0%, 12%); */
color: #0aa5ff;
border-radius: 10px;
border: 2px solid #0aa5ff;
align-content: center;
text-shadow: 0px 0.1vw 0.1vw rgba(124, 120, 120, 0.4);
}
.search-btn:hover {
background-color: #0aa5ff;
color: whitesmoke;
text-shadow: 0px 0.01vw 0.1vw rgba(124, 120, 120, 0.4);
}

.material-symbols-outlined {
font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.right-side {
text-align: right;
margin-right: 2vw;
display: flex;
justify-content: center;
padding: 2rem 0;
}
.right-side img {
width: 80vw;
}

@media (min-width: 800px) {
.right-side img {
width: 40vw;
}

.left-side {
flex: auto;
text-align: left;
margin-left: 2vw;
/*margin-top: 15vw;*/
margin-top: 10rem;
}
.left-side h1 {
font-size: 4vw;
margin: 0;
text-shadow: 0.1vw 0.2vw 0.2vw rgba(124, 120, 120, 0.4);
}
.left-side p {
color: #777;
font-size: 1.3vw;
padding-left: 2px;
text-align: start;
font-size: 2.8rem !important;
}

.search-div{
margin-top: 5vw;
}


.search-btn{
font-size: 1rem;
font-weight: 800;
padding: 1vw 2.5vw;
/* background-color: hsl(0, 0%, 12%); */
color:#0aa5ff;
border-radius: 10px;
border: 2px solid #0aa5ff;
align-content: center;
text-shadow: 0px 0.1vw 0.1vw rgba(124, 120, 120, 0.4);
}
@media (max-width: 800px) {
.home-search {
flex-direction: column-reverse;
/*margin-top: 17vh;*/
}
.search-btn:hover{
background-color: #0aa5ff;
color: whitesmoke;
text-shadow: 0px 0.01vw 0.1vw rgba(124, 120, 120, 0.4);
.left-side {
margin: 0px;
}

.material-symbols-outlined {


font-variation-settings:
'FILL' 0,
'wght' 400,
'GRAD' 0,
'opsz' 24
.left-side p {
text-align: center;
font-size: 3.2vw;
}


.right-side {
flex: auto;
text-align: right;
margin-right: 2vw;
.search-div {
margin-top: 40px;
text-align: center;
}
.right-side img {
width: 35vw;
.search-btn {
padding: 3vw 5vw;
}






@media (max-width: 700px) {

.home-search {
flex-direction: column-reverse;
/*margin-top: 17vh;*/
}
.left-side {
margin: 0px;
}
.left-side h1 {
font-size: 5vw;
}
.left-side p {
text-align: center;
font-size: 3.2vw;
}
.search-div{
margin-top: 40px;
text-align: center;
} .search-btn{
padding: 3vw 5vw;
}
.right-side img {
width: 40vw;
}
}
}
26 changes: 15 additions & 11 deletions src/components/Hero.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import React from 'react';
import "../assets/styles/Hero.css"
import {useGlobalContext} from "../Context.jsx";
import React from "react";
import "../assets/styles/Hero.css";
import { useGlobalContext } from "../Context.jsx";

const Hero = () => {
const {chapter,slok} = useGlobalContext();
return (
<>
<div className={"shlok-div"} >
<img className={"shlok-img"} src={`https://bhagavadgitaapi.in/slok/${chapter}/${slok}/gita.svg`} alt={"Geeta World"}/>
</div>
</>
);
const { chapter, slok } = useGlobalContext();
return (
<>
<div className={"shlok-div"}>
<img
className={"shlok-img"}
src={`https://bhagavadgitaapi.in/slok/${chapter}/${slok}/gita.svg`}
alt={"Geeta World"}
/>
</div>
</>
);
};

export default Hero;
57 changes: 27 additions & 30 deletions src/components/HomeSearch.jsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,37 @@
import React from 'react';
import '../assets/styles/HomeSearch.css';
import blue from '../assets/svg/blue.svg';
import { NavLink } from 'react-router-dom';



import book from '../assets/svg/reading-books.svg';
import BookLover from '../assets/svg/BookLover.svg';
import Education from '../assets/svg/Education.svg';
import Reading from '../assets/svg/reading.svg';
import Notebook from '../assets/svg/Notebook.svg';
import Book from '../assets/svg/Book.svg';
import skin from '../assets/svg/skin.svg';


import React from "react";
import "../assets/styles/HomeSearch.css";
import blue from "../assets/svg/blue.svg";
import { NavLink } from "react-router-dom";

import book from "../assets/svg/reading-books.svg";
import BookLover from "../assets/svg/BookLover.svg";
import Education from "../assets/svg/Education.svg";
import Reading from "../assets/svg/reading.svg";
import Notebook from "../assets/svg/Notebook.svg";
import Book from "../assets/svg/Book.svg";
import skin from "../assets/svg/skin.svg";

const HomeSearch = () => {
return (
<>
<div className="home-search">

<div className="left-side">
<h1>Your Gateway to a Universe of Books</h1>
<p>Explore a vast collection of books</p>

<div className="search-div" >
<NavLink to={`/books`} className="search-btn">Search Book</NavLink>
<div className="home-search">
<div className="left-side">
<h1>
Your <span>Gateway</span> to a Universe of Books
</h1>
<p>Explore a vast collection of books</p>

<div className="search-div">
<NavLink to={`/books`} className="search-btn">
Search Book
</NavLink>
</div>
</div>

<div className="right-side">
<img src={blue} alt="hero svg" />
</div>
</div>

<div className="right-side">
<img src={blue} alt="" />
</div>

</div>
</>
);
};
Expand Down
Loading