Skip to content

Commit

Permalink
fix button sobre mim height
Browse files Browse the repository at this point in the history
  • Loading branch information
senaarth committed Apr 21, 2022
1 parent f54def6 commit 699a3b0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 10 deletions.
12 changes: 10 additions & 2 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import Head from "next/head";
import { useRouter } from "next/router";
import { PrismicRichText } from "@prismicio/react";
import { Tooltip } from "@mui/material";

Expand Down Expand Up @@ -43,6 +44,8 @@ interface HomeProps {
*/

export default function Home({ content, projects }: HomeProps): JSX.Element {
const router = useRouter();

return (
<Page>
<Head>
Expand Down Expand Up @@ -78,9 +81,14 @@ export default function Home({ content, projects }: HomeProps): JSX.Element {
Meus Projetos
<span className="background" />
</button>
<a href="/sobre" className="link">
<button
type="button"
onClick={() => router.push("/sobre")}
className="link"
>
Sobre mim
</a>
<span className="background" />
</button>
</div>
</div>
<div className="avatar">
Expand Down
26 changes: 18 additions & 8 deletions src/styles/Home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const Hero = styled.div`
* {
width: 100%;
height: 50px;
min-height: 50px;
border-radius: 6px;
background-color: white;
line-height: 50px;
Expand All @@ -75,12 +75,14 @@ export const Hero = styled.div`
text-transform: lowercase;
font-weight: 500;
font-size: 1rem;
line-height: 1.125rem;
.background {
width: 0;
height: 100%;
position: absolute !important;
top: 0;
left: 50%;
transform: translateX(-50%);
background-color: rgba(255, 255, 255, 0.05);
Expand Down Expand Up @@ -119,18 +121,26 @@ export const Hero = styled.div`
&.link {
border: 0;
width: 100%;
background-color: transparent;
width: 5.15rem;
margin: auto;
border: 1px solid transparent;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.4s;
.background {
width: 0;
height: 50px;
background: #b1b1b1;
opacity: 0.1;
}
&:hover {
background-color: #242424;
border: 1px solid #242424;
width: 100%;
filter: brightness(1);
.background {
width: 100%;
z-index: 0;
}
}
}
}
Expand Down

1 comment on commit 699a3b0

@vercel
Copy link

@vercel vercel bot commented on 699a3b0 Apr 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.