Skip to content

Commit

Permalink
melhorias de layout
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfariasdev committed May 11, 2022
1 parent 52993a3 commit 6b1c8a3
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 32 deletions.
12 changes: 9 additions & 3 deletions src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ function Header(){
return(
<header className={styles.headerContainer}>
<div className={styles.headerContent}>
<Link href={"/"}><a><Image src="/images/logo.svg" alt= "Logo IG.News" width='150px' height='300px' layout="raw"/></a></Link>
<Link href={"/"}><a><Image src="/images/logo.svg" alt= "Logo IG.News" width='150px' height='50px' layout="raw"/></a></Link>
<nav>
<ActiveLink activeClassName={styles.active} href={"/"} prefetch={true}><a>Home</a></ActiveLink>
<ActiveLink activeClassName={styles.active} href={"/posts"} prefetch={true}><a>Posts</a></ActiveLink>
<ul className={styles.nav_menu}>
<li>
<ActiveLink activeClassName={styles.active} href={"/"} prefetch={true}><a>Home</a></ActiveLink>
</li>
<li>
<ActiveLink activeClassName={styles.active} href={"/posts"} prefetch={true}><a>Posts</a></ActiveLink>
</li>
</ul>
</nav>

<SignInButton />
Expand Down
75 changes: 46 additions & 29 deletions src/components/Header/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,59 @@
margin-left: 5rem;
height: 5rem;

a{
display: inline-block;
position: relative;
padding: 0 0.5rem;
height: 5rem;
line-height: 5rem;
color: var(--gray-300);

transition: color 0.2s;

& + a {
margin-left: 2rem;
}

&:hover {
color: var(--white);
}
ul{
list-style: none;

&.active {
color: var(--white);
font-weight: bold;
height: auto;
}

&.active::after {
content: '';
height: 3px;
border-radius: 3px 3px 0 0;
width: 100%;
position: absolute;
bottom: 1px;
left: 0;
background-color: var(--yellow-500);
}
li{
float: left;
@media(max-width: 767px){
width: 100%;
}

a{
display: inline-block;
position: relative;
padding: 0 0.5rem;
height: 5rem;
line-height: 5rem;
color: var(--gray-300);

transition: color 0.2s;

& + a {
margin-left: 2rem;
}

&:hover {
color: var(--white);
}

&.active {
color: var(--white);
font-weight: bold;
}

&.active::after {
content: '';
height: 3px;
border-radius: 3px 3px 0 0;
width: 100%;
position: absolute;
bottom: 1px;
left: 0;
background-color: var(--yellow-500);
}
}
}
}


}

button {
margin-left: auto;
}
Expand Down
1 change: 1 addition & 0 deletions src/pages/home.module.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.contentContainer {
height: calc(100vh - 5rem);
min-height: 600px;
margin: 0 auto;

display: flex;
align-items: center;
Expand Down

1 comment on commit 6b1c8a3

@vercel
Copy link

@vercel vercel bot commented on 6b1c8a3 May 11, 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.