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

Add Logo Section #4

Open
wants to merge 1 commit 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
24 changes: 14 additions & 10 deletions src/components/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@ import bg from "./bg.jpeg";
import logo from "./r2r-logo.svg";
import styled from "styled-components";
import { HomeSearchBox } from "../HomeSearchBox/HomeSearchBox";
import { LogoSection } from "../LogoSection/LogoSection";

export function App() {
return (
<BackgroundContainer>
<BackgroundCover />
<Banner>
<CompanyLogo />
<Headline>
Discover how to get anywhere by plane, train, bus, ferry & car
</Headline>
<HomeSearchBox />
</Banner>
</BackgroundContainer>
<>
<BackgroundContainer>
<BackgroundCover />
<Banner>
<CompanyLogo />
<Headline>
Discover how to get anywhere by plane, train, bus, ferry & car
</Headline>
<HomeSearchBox />
</Banner>
</BackgroundContainer>
<LogoSection />
</>
);
}

Expand Down
66 changes: 66 additions & 0 deletions src/components/LogoSection/LogoSection.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import styled from "styled-components";

const LOGOS = [
"//static.r2r.io/images/logos/amtrak.png",
"//static.r2r.io/images/logos/nationalexpress-bus.png",
"//static.r2r.io/images/logos/trenitalia.png",
"//static.r2r.io/images/logos/skyscanner.png",
"//static.r2r.io/images/logos/bookingcom.png",
"//static.r2r.io/images/logos/rentalcars.png",
];

export function LogoSection() {
return (
<Container>
<Centered>
<LogoContainer>
<Title>Our partners include:</Title>
</LogoContainer>
{LOGOS.map((it) => (
<LogoContainer>
<Logo src={it} />
</LogoContainer>
))}
</Centered>
</Container>
);
}

const LogoContainer = styled.div`
display: inline-block;
width: 14%;
`;

const Logo = styled.img`
display: inline-block;
height: 36px;
width: auto;
`;

const Container = styled.section`
padding: 16px 24px;
`;

const Centered = styled.div`
margin-left: auto;
margin-right: auto;
max-width: 1100px;
position: relative;
`;

const Title = styled.div`
display: inline-block;
font-size: 13px;
line-height: 26px;
background-color: #ebeef3;
color: #5d6981;
text-decoration: none;
font-weight: 400;
padding: 0 8px;
border-radius: 6px;

// center
position: relative;
top: 50%;
transform: translateY(-50%);
`;
2 changes: 1 addition & 1 deletion src/components/SearchTransport/SearchTransport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function SearchTransport() {

const openExplore = () => {
const url = `http://www.rome2rio.com/map/${origin}/${destination}`;
var win = window.open(url, "_blank")!;
const win = window.open(url, "_blank")!;
win.focus();
};

Expand Down