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

feature(add-title-image): Add mobile and desktop title images #93

Merged
merged 1 commit into from
Apr 6, 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
Binary file added public/images/r7-mobile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/r7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/navigation/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Navbar = () => {

return (
<>
<div className="fixed top-0 w-full bg-dark-1 h-16">
<div className="fixed top-0 w-full bg-dark-1 h-16 z-50">
<div className="w-[50%] ml-[25%] h-full flex gap-6 items-center justify-center">
{routerData.map(route => (
<Link key={route.name}
Expand Down
20 changes: 9 additions & 11 deletions src/components/router/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ import {Route, Routes} from "react-router-dom";

export const Router = () => {
return (
<div className="w-full md:w-[80%]">
<Routes>
{routerData.map(({path, element, name}) => (
<Route
key={name}
path={path}
element={element}
/>
))}
</Routes>
</div>
<Routes>
{routerData.map(({path, element, name}) => (
<Route
key={name}
path={path}
element={element}
/>
))}
</Routes>
);
}
19 changes: 14 additions & 5 deletions src/pages/home/HomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
import React, {JSX} from 'react'
import {AboutMeContainer, AboutWebsiteContainer, IntroContainer, SkillsContainer} from "./components";
import {AboutMeContainer, AboutWebsiteContainer, SkillsContainer} from "./components";
import {mapContentContainers} from "../../domain";

export const HomePage = () => {

const containers: JSX.Element[] = [
<IntroContainer/>,
<AboutWebsiteContainer/>,
<AboutMeContainer/>,
<AboutWebsiteContainer/>,
<SkillsContainer/>,
];

return (
<div>
{mapContentContainers(containers)}
<div className="w-full">
<div className="relative">
<img className="w-full h-auto block md:hidden" src="/images/r7-mobile.jpg" alt="R7"/>
<img className="w-full h-auto hidden md:block" src="/images/r7.jpg" alt="R7 Mobile"/>
<span className="absolute top-1/2 md:top-1/3 left-1/2 transform -translate-x-1/2 -translate-y-1/2">
<h1 className="text-7xl md:text-9xl font-bold">Z-100</h1>
<h2 className="text-4xl md:text-5xl mt-5">Swiss Backend Dev</h2>
</span>
</div>
<div className="w-full md:w-[80%] mx-auto">
{mapContentContainers(containers)}
</div>
</div>
);
}
Loading