Skip to content

Commit

Permalink
update navbar to show links
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier-Charles committed Mar 13, 2024
1 parent bed9d0a commit c233ae0
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 41 deletions.
5 changes: 4 additions & 1 deletion src/components/home/LaunchAppButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ const LaunchAppButton = () => {

return (
<>
<Button link={alphadayApp} className={`bg-lightblue`}>
<Button
link={alphadayApp}
className={`bg-lightblue whitespace-nowrap !text-black pt-2.5`}
>
Launch app
</Button>
</>
Expand Down
33 changes: 33 additions & 0 deletions src/components/mobile/AppleStoreButton.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from "react";
import AppleSVG from "../../assets/svg/apple.svg";
import CONFIG from "../../config";
import { twMerge } from "tailwind-merge";

const AppleStoreButton = ({ type }) => {
return (
<a href={CONFIG.appStore.apple}>
<button
type="button"
class={twMerge(
"flex items-center shadow-xl font-montserrat justify-center px-1 min-w-[150px] mt-3 text-black bg-transparent border-2 border-black pt-1 rounded-lg",
type === "sm" &&
"min-w-[40px] py-1.5 border-0 mt-0 bg-lightblue drop-shadow-eclipse hover:opacity-80 transition-all duration-300"
)}
>
<div class={twMerge("mr-2", type === "sm" && "mr-0")}>
<img src={AppleSVG} className="w-7 h-7 self-center" />
</div>
{type !== "sm" && (
<div>
<div class="text-xs text-left tracking-tighter">
Download on the
</div>
<div class="-mt-1 text-base text-left font-semibold">App Store</div>
</div>
)}
</button>
</a>
);
};

export default AppleStoreButton;
34 changes: 34 additions & 0 deletions src/components/mobile/GooglePlayButton.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from "react";
import GooglePlaySVG from "../../assets/svg/google-play.svg";
import CONFIG from "../../config";
import { twMerge } from "tailwind-merge";

// type: "sm" | "base"
const GooglePlayButton = ({ type }) => {
return (
<a className="ml-2" href={CONFIG.appStore.google}>
<button
type="button"
class={twMerge(
"flex items-center shadow-xl font-montserrat justify-center px-1 min-w-[150px] mt-3 text-black bg-transparent border-2 border-black pt-1 rounded-lg",
type === "sm" &&
"min-w-[40px] py-1.5 border-0 mt-0 bg-lightblue drop-shadow-eclipse hover:opacity-80 transition-all duration-300"
)}
>
<div class={twMerge("mr-2", type === "sm" && "mr-0")}>
<img src={GooglePlaySVG} className="w-7 h-7 self-baseline" />
</div>
{type !== "sm" && (
<div>
<div class="text-xs text-left tracking-tighter">Android app on</div>
<div class="-mt-1 text-base text-left font-semibold">
Google Play
</div>
</div>
)}
</button>
</a>
);
};

export default GooglePlayButton;
43 changes: 4 additions & 39 deletions src/components/mobile/Hero.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React from "react";
import { Section } from "../../shared";
import AppleSVG from "../../assets/svg/apple.svg";
import GooglePlaySVG from "../../assets/svg/google-play.svg";
import ArrowDownSVG from "../../assets/svg/arrow-down.svg";
import CONFIG from "../../config";
import GooglePlayButton from "./GooglePlayButton";
import AppleStoreButton from "./AppleStoreButton";

export default function () {
return (
Expand All @@ -22,42 +21,8 @@ export default function () {
effortlessly.
</div>
<div className="text-lg text-black mt-5 flex">
<a href={CONFIG.appStore.apple}>
<button
type="button"
class="flex items-center shadow-xl font-montserrat justify-center px-1 min-w-[150px] mt-3 text-black bg-transparent border-2 border-black pt-1 rounded-lg"
>
<div class="mr-2">
<img src={AppleSVG} className="w-7 h-7 self-center" />
</div>
<div>
<div class="text-xs text-left tracking-tighter">
Download on the
</div>
<div class="-mt-1 text-base text-left font-semibold">
App Store
</div>
</div>
</button>
</a>
<a className="ml-2" href={CONFIG.appStore.google}>
<button
type="button"
class="flex items-center shadow-xl font-montserrat justify-center px-1 min-w-[150px] mt-3 text-black bg-transparent border-2 border-black pt-1 rounded-lg"
>
<div class="mr-2">
<img src={GooglePlaySVG} className="w-7 h-7 self-baseline" />
</div>
<div>
<div class="text-xs text-left tracking-tighter">
Android app on
</div>
<div class="-mt-1 text-base text-left font-semibold">
Google Play
</div>
</div>
</button>
</a>
<AppleStoreButton />
<GooglePlayButton />
</div>
<div className="flex justify-center mt-20 mb-10">
<img src={ArrowDownSVG} className="w-8 h-8 animate-bounce" />
Expand Down
8 changes: 7 additions & 1 deletion src/components/navbar/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import LaunchAppButton from "../home/LaunchAppButton";
import discordLogo from "../../images/socials/discord.svg";
import twitterLogo from "../../images/socials/twitter.svg";
import config from "../../config";
import AppleStoreButton from "../mobile/AppleStoreButton";
import GooglePlayButton from "../mobile/GooglePlayButton";

function Navbar({ isPrivacyPolicy }) {
const { twitter, discord } = config;
Expand Down Expand Up @@ -76,8 +78,12 @@ function Navbar({ isPrivacyPolicy }) {
<img src={twitterLogo} alt="twitter" />
</a>
</div>
<div ref={element} className="scroll-hide absolute mb-1">
<div ref={element} className="scroll-hide absolute mb-1 flex">
<LaunchAppButton />
<div className="flex ml-2">
<AppleStoreButton type="sm" />
<GooglePlayButton type="sm" />
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit c233ae0

Please sign in to comment.