Skip to content

Commit

Permalink
feat: update HeaderHome component,
Browse files Browse the repository at this point in the history
enhance the quality of code used in the scss files,
see also: #12
  • Loading branch information
64J0 committed May 8, 2021
1 parent 790b8a9 commit 0e97cb1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
10 changes: 3 additions & 7 deletions components/HeaderHome/index.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
import React from "react";
import Link from "next/link";

import styles from "../Layout/styles.module.scss";
import utilStyles from "../../styles/utils.module.css";

import headerStyles from "./styles.module.scss";

const Header: React.FC = () => {
return (
<div className={headerStyles.backgroundHeader}>
<div className={headerStyles['header-home']}>
<Link href="/contato">
<img
src="/images/profile.jpg"
className={`${styles.headerHomeImage} ${utilStyles.borderCircle}
${utilStyles.shadow}`}
className={headerStyles['header-home__image']}
alt="Vinícius Gajo"
/>
</Link>
<h1>
<h1 className={headerStyles['header-home__title']}>
Vinícius Gajo's Blog
</h1>
</div >
Expand Down
32 changes: 25 additions & 7 deletions components/HeaderHome/styles.module.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,38 @@
.backgroundHeader {
.header-home {
background: url("../../public/gifs/matrix-animation-background.gif");
background-repeat: no-repeat;
background-size: 100% 12rem;

width: 100%;
max-width: var(--maxWidth);
min-width: 30rem;
padding-top: 6rem;

h1 {
margin-bottom: 0;
font-size: 3rem;
color: var(--white);
}

@media (max-width: 34rem) {
margin: 0;
border-radius: 0;
}
}

.header-home__image {
width: 11rem;
height: 11rem;
margin: 0 auto;
border: 4px solid rgba(255, 255, 255, 0.5);
border-radius: 9999px;
cursor: pointer;

box-shadow: 0px 0px 2px 1px rgba(0, 0, 0, 0.2);
transition: box-shadow 0.4s;

&:hover {
box-shadow: 4px 4px 2px 1px rgba(0, 0, 0, 0.2);
transition: box-shadow 0.4s;
}
}

.header-home__title {
margin-bottom: 0;
font-size: 3rem;
color: var(--white);
}

0 comments on commit 0e97cb1

Please sign in to comment.