-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complete homepage layout & copywriting
- Loading branch information
1 parent
0c9a53b
commit f1b9261
Showing
24 changed files
with
391 additions
and
51 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1, user-scalable=0" | ||
/> | ||
<title>404 Not Found</title> | ||
<style> | ||
body { | ||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, | ||
Consolas, "Liberation Mono", "Courier New", monospace; | ||
color: #ea580c; | ||
} | ||
|
||
main { | ||
display: table; | ||
width: 100%; | ||
height: 100vh; | ||
text-align: center; | ||
} | ||
|
||
.text { | ||
display: table-cell; | ||
vertical-align: middle; | ||
} | ||
|
||
.text h1 { | ||
font-size: 40px; | ||
display: inline-block; | ||
padding-right: 12px; | ||
animation: type 0.5s alternate infinite; | ||
} | ||
|
||
@keyframes type { | ||
from { | ||
box-shadow: inset -3px 0px 0px #888; | ||
} | ||
to { | ||
box-shadow: inset -3px 0px 0px transparent; | ||
} | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<main> | ||
<div class="text"> | ||
<h1>404 Not Found</h1> | ||
</div> | ||
</main> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { Link } from "react-router-dom"; | ||
|
||
interface HeroSectionProps { | ||
secondary: string; | ||
preview: string; | ||
primary: string; | ||
actions: { | ||
uri: string; | ||
label: string; | ||
button: boolean; | ||
}[]; | ||
} | ||
|
||
export const HeroSection = (props: HeroSectionProps) => { | ||
const { primary, secondary, preview, actions } = props; | ||
return ( | ||
<div className="justify-center w-full min-h-screen flex px-8 py-10 text-center md:px-12 lg:text-left"> | ||
<div className="w-100 m-auto sm:max-w-2xl md:max-w-3xl lg:max-w-5xl xl:max-w-7xl"> | ||
<div className="grid items-center lg:grid-cols-2"> | ||
<div className="mb-12 lg:mt-0 lg:mb-0 animate-fade-left animate-duration-[2000ms]"> | ||
<div className="block rounded-lg px-8 md:px-10 lg:px-12 py-14 bg-slate-200 text-gray-800 shadow-2xl"> | ||
<h1 className="mt-2 mb-16 text-4xl font-bold tracking-tight md:text-5xl xl:text-6xl"> | ||
{primary} | ||
</h1> | ||
<h2 className="mt-2 mb-16 text-lg md:text-2xl xl:text-3xl"> | ||
{secondary} | ||
</h2> | ||
<div className="flex flex-col items-center justify-center space-y-4 md:space-y-0 md:flex-row md:space-x-4"> | ||
{actions.map(({ uri, label, button }, index) => | ||
button ? ( | ||
<Link | ||
to={uri} | ||
key={`/components/HeroSection/0/${index}`} | ||
className="m-2 border p-4 rounded-lg shadow-2xl font-semibold bg-indigo-500 text-white duration-200 hover:bg-indigo-600 hover:scale-110" | ||
> | ||
{label} | ||
</Link> | ||
) : ( | ||
<Link | ||
to={uri} | ||
key={`/components/HeroSection/0/${index}`} | ||
className="m-2 hover:underline font-semibold" | ||
> | ||
{label} | ||
</Link> | ||
) | ||
)} | ||
</div> | ||
</div> | ||
</div> | ||
<div className="animate-wiggle animate-infinite animate-duration-[5000ms] animate-ease-in-out"> | ||
<img | ||
alt="" | ||
src={preview} | ||
className="w-full rounded-lg shadow-2xl hover:scale-110 duration-500" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export const getBaseUri = (uri: string): string => { | ||
const filteredPaths = uri.split("/").filter((path) => { | ||
return path.length > 0 && path[0] !== ":" && path[0] !== "*"; | ||
}); | ||
return `/${filteredPaths.join("/")}`; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { IRouter } from "../config/router"; | ||
|
||
export const getRouteByTag = (router: IRouter[], tag: string): IRouter => { | ||
const route = router.find((route) => route.tag === tag); | ||
if (route) { | ||
return route; | ||
} | ||
return router.find((route) => route.tag === "error") as IRouter; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { siteConfig } from "../config/site"; | ||
|
||
export const setPageTitle = (paging?: string): void => { | ||
const { title, slogan } = siteConfig; | ||
document.title = paging ? `${paging} - ${title}` : `${title} - ${slogan}`; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { useEffect } from "react"; | ||
import { menuConfig } from "../config/menu"; | ||
import { siteConfig } from "../config/site"; | ||
import { setPageTitle } from "../helpers/setPageTitle"; | ||
import { Navigation } from "../components/Navigation"; | ||
import { Footer } from "../components/Footer"; | ||
import { useMatch } from "react-router-dom"; | ||
import { getRouteByTag } from "../helpers/getRouteByTag"; | ||
import { routerConfig } from "../config/router"; | ||
|
||
const Contribution = () => { | ||
const { router } = routerConfig; | ||
const { slogan, copyright } = siteConfig; | ||
const { title, base, icon, menu } = menuConfig; | ||
useEffect(() => setPageTitle("Contribution"), []); | ||
|
||
const currentRoute = getRouteByTag(router, "contribution").uri; | ||
const { query } = useMatch(currentRoute)?.params || {}; | ||
console.log(query); | ||
|
||
return ( | ||
<> | ||
<Navigation title={title} base={base} icon={icon} menu={menu} /> | ||
<div className="flex min-h-screen justify-center"> | ||
<h1 className="m-auto">Contribution</h1> | ||
</div> | ||
<Footer text={slogan} copyright={copyright} /> | ||
</> | ||
); | ||
}; | ||
|
||
export default Contribution; |
Oops, something went wrong.