Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring the code #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions css/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* RESET */
*{
margin: 0;
padding: 0;
border: none;
outline: none;
font-size: 100%;
font-weight: 700;
box-sizing: border-box;
font-family: sans-serif;
}

ul,li{
list-style: none;
}

a{
text-decoration: none;
}

.container {
display: flex;
margin: 0 auto;
max-width: 960px;
align-items: center;
justify-content: space-between;
}


/****** VARIABLES ******************/
:root {
--header-color: #333;
--font-color: #fff;
--banner-color: #3479ba;
--button-color: #ffc001;
}
123 changes: 123 additions & 0 deletions css/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
/****** HEADER ******************/
.header {
width: 100%;
background-color: var(--header-color);
}

.header .container {
align-items: center;
}

.header .container .logo {
color: var(--font-color);
font-size: 2em;
}

.header .menu {
display: flex;
}

.header .menu a {
color: var(--font-color);
font: 1.5em;
padding: 20px 10px;
display: inline-block;
text-transform: uppercase;
transition: .1s transform;
}

.header .menu a:hover {
background-color: var(--banner-color);
transform: scale(1.1);
}


/****** BANNER ******************/
.banner {
width: 100%;
padding: 0 10px;
background-color: var(--banner-color);
}

.banner .title {
color: var(--font-color);
}

.banner .title h2 {
font-size: 3em;
}

.banner .title p {
margin: 10px 0;
font-size: 1.5em;
}

.banner .title button {
cursor: pointer;
padding: 15px 30px;
border-radius: 4px;
background-color: var(--button-color);
transition: .2s transform;
}

.banner .title button:hover {
filter: brightness(120%);
transform: scale(1.1);
}


/****** MAIN ******************/
#products.container {
padding: 30px 0;
width: 1000px;
align-content: center;
flex-direction: column;
}

#products.container h3 {
margin: 40px 0;
font-size: 1.5em;
}

#products.container .img {
display: flex;
margin: 0 auto;
flex-wrap: wrap;
align-content: center;
justify-content: center;
}

#products.container img {
padding: 5px;
}


/****** FOOTER ******************/
.footer{
color: var(--font-color);
padding: 10px;
text-align: center;
background-color: var(--banner-color);
}


/****** Media Queries ******************/
@media (max-width: 720px){
.banner .container {
padding: 0 20px;
}

.logo {
padding: 10px;
}

.container,
.menu {
flex-wrap: wrap;
}

.banner img{
width: 100%;
}

}
123 changes: 0 additions & 123 deletions css/style.css

This file was deleted.

11 changes: 4 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<html lang="pt-pt">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Visual Studio Code">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" href="css/index.css">
<link rel="stylesheet" href="./css/global.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Projeto simples para praticar trabalho em grupo no Github">
<title>Praticando</title>
</head>
<body>

<!-- =====================| HEADER |===================== -->

<header class="header">
<div class="container">
<a href="index.html"><h1 class="logo">Logomarca</h1></a>
Expand All @@ -26,7 +26,6 @@
</header>

<!-- =====================| DIV - BANNER |===================== -->

<div class="banner">
<div class="container">
<div class="title">
Expand All @@ -39,9 +38,8 @@ <h2>Frase de EFEITO</h2>
</div>

<!-- =====================| MAIN |===================== -->

<main class="main">
<div class="container2">
<div id="products" class="container">
<h3>Outros produtos</h3>
<div class="img">
<img src="img/banner1.jpg">
Expand All @@ -53,7 +51,6 @@ <h3>Outros produtos</h3>
</main>

<!-- =====================| FOOTER |===================== -->

<footer class="footer">
<p>Empresa 123</p>
</footer>
Expand Down