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

#272 update main page layout #274

Merged
merged 4 commits into from
Oct 23, 2023
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
8 changes: 6 additions & 2 deletions FrontEnd/src/components/basicPage/BasicPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,19 @@ function BasicPage() {
>
<Header isAuthorized={auth.isAuth} />
<Routes>
<Route path="/" element={<MainPage />} />
<Route path="/" element={<MainPage isAuthorized={auth.isAuth}/>} />
<Route path="/profile/*" element={<ProfilePage />} />
<Route path="/profiles/:filter" element={<ProfileListPage isAuthorized={auth.isAuth} />}/>
{auth.isAuth ? (
<Route path="/login" element={<Navigate to="/profile/user-info" />} />
) : (
<Route path="/login" element={<AuthorizationPage />} />
)}
<Route path="/sign-up" element={<SignUpPage />} />
{auth.isAuth ? (
<Route path="/sign-up" element={<Navigate to="/profile/user-info" />} />
) : (
<Route path="/sign-up" element={<SignUpPage />} />
)}
<Route path="/privacy-policy" element={<PrivacyPolicy />} />
<Route path="/terms-and-conditions" element={<TermsAndConditions />} />
<Route path="/cookies-policy" element={<CookiesPolicyComponent />} />
Expand Down
8 changes: 4 additions & 4 deletions FrontEnd/src/components/landing-page/MainPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ import MainAboutSection from './about-section/About';
import CookieMod from '../cookieacception/CookieMod';
import css from './MainPage.module.css';

const MainPage = () => {
const MainPage = (props) => {
const [modalActive, setModalActive] = useState(true);
return (
<div className="main-app">
<div className="main-app-header">
<MainBanner />
<MainBanner isAuthorized={props.isAuthorized}/>
<div className={css['main-app-body']}>
<MainPartners />
<MainCompanies />
<MainLoginBanner />
<MainPartners />
{!props.isAuthorized ? <MainLoginBanner /> : (null)}
<MainAboutSection />
<div>
<CookieMod
Expand Down
11 changes: 8 additions & 3 deletions FrontEnd/src/components/landing-page/banner/Banner.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import './Banner.css';
import Ellipses from '../ellipses/Ellipses';
import { Link } from 'react-router-dom';
import { PropTypes } from 'prop-types';


const MainBanner = () => {
const MainBanner = (props) => {
Lvyshnevska marked this conversation as resolved.
Show resolved Hide resolved
return (
<div className="main-banner-group">
<div className="main-banner-group__main-rectangle"/>
Expand All @@ -24,14 +25,15 @@ const MainBanner = () => {
<div className="main-banner-group__frame-rectangle13"/>
<div className="main-banner-group__frame-description">
<div className="main-banner-group__banner-text">Це унікальний майданчик <br/>для обміну інформацією і досвідом з тими, хто втілює свої ідеї в життя.</div>
{!props.isAuthorized ?
<div className="main-banner-group__frame-login">
<div className="main-banner-group__login-button">
<Link className="main-banner-group__login-button-text" to="/login">Увійти</Link>
</div>
<div className="main-banner-group__register-button">
<Link className="main-banner-group__register-button-text" to="/sign-up">Зареєстуватися</Link>
</div>
</div>
</div> : (null)}
</div>
<div className="main-banner-group__white-ellipses">
<Ellipses type="white" count={7} />
Expand Down Expand Up @@ -85,4 +87,7 @@ const MainBanner = () => {
);
};

export default MainBanner;
export default MainBanner;

MainBanner.propTypes = {
isAuthorized: PropTypes.bool.isRequired};
2 changes: 2 additions & 0 deletions FrontEnd/src/components/landing-page/partners/Partners.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
display: flex;
align-items: flex-start;
gap: 12px;
z-index: 1;
}
.partners-section__navi-icon {
display: flex;
Expand All @@ -43,6 +44,7 @@
flex-shrink: 0;
}
.partners-section__images {
height: 70px;
display: flex;
justify-content: center;
align-items: center;
Expand Down
Loading