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

Ready header for mobiles & tablets #974

Open
wants to merge 1 commit 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Adapt the page to the following screens:
11. `git push origin develop` - to send you code for PR.
12. Create a Pull Request (PR) from your branch `develop` to branch `master` of original repo.
13. Replace `<your_account>` with your Github username in the
[DEMO LINK](https://<your_account>.github.io/layout_dia/).
[DEMO LINK](https://sborichevskyi.github.io/layout_dia/).
14. Copy `DEMO LINK` to the PR description.

> To update you PR repeat steps 7-11.
Binary file added src/images/icons/menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/slider/arrow-left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions src/images/slider/arrow-left.svg

This file was deleted.

Binary file added src/images/slider/arrow-right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions src/images/slider/arrow-right.svg

This file was deleted.

Binary file added src/images/slider/header-main-photo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
113 changes: 109 additions & 4 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!doctype html>
<html lang="en">
<head>
<head class="page">
<meta charset="UTF-8" />
<meta
name="viewport"
Expand All @@ -11,9 +11,114 @@
rel="stylesheet"
href="./styles/main.scss"
/>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin="anonymous"
/>
<link
href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;900&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300..800&display=swap"
rel="stylesheet"
/>
<script
src="scripts/main.js"
defer
></script>
</head>
<body>
<h1>Dia</h1>
<script src="scripts/main.js"></script>
<body class="page__body">
<header class="header">
<div class="container">
<div class="header__content">
<div class="top-bar">
<div class="top-bar__icons">
<a
href="#"
class="top-bar__logo-link"
>
<img
src="./images/logo/dia-logo.svg"
alt="logo"
class="top-bar__logo"
/>
</a>
<a
href="#"
class="icon icon--menu"
></a>
</div>
<nav class="top-bar__nav">
<a
href="#"
class="top-bar__nav--link"
>
About us
</a>
<a
href="#"
class="top-bar__nav--link"
>
Services
</a>
<a
href="#"
class="top-bar__nav--link"
>
Testimonials
</a>
<a
href="#"
class="top-bar__nav--link"
>
Contact Us
</a>
</nav>
<a
href="#"
class="top-bar__hire-us"
>
Hire us
</a>
</div>
<div class="header__main">
<h1 class="header__main--title">Strategic Agency</h1>
<p class="header__main--text">
We believe in the power of bold ideas that can solve business
challenges.
</p>
<input
type="submit"
class="header__main--button"
value="Learn more"
/>
</div>
</div>
</div>
<div class="header__footer">
<div class="header__footer--content container">
<div class="header__footer--arrows">
<a
href="#"
class="header__footer--left"
></a>
<a
href="#"
class="header__footer--right"
></a>
</div>
<p class="header__footer--title">intro</p>
<p class="header__footer--text">
By the same illusion which lifts the horizon.
</p>
</div>
</div>
</header>
</body>
</html>
112 changes: 112 additions & 0 deletions src/styles/header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
.header {
margin: 0;
background-color: $c-dark;
box-sizing: border-box;
border: solid 0 $c-dark;
border-radius: 0 0 30px 30px;
width: 100%;

&__main {
padding: 48px 0;

@include on-tablet {
padding: 56px 0 147;
}
&--title {
margin: 0;
margin-bottom: 32px;
color: white;
font-weight: 600;
font-size: 52px;
line-height: 62px;
letter-spacing: -2px;

@include on-tablet {
font-size: 64px;
line-height: 68px;
}
}

&--text {
margin: 0;
color: white;
font-family: 'Open Sans', sans-serif;
font-size: 18px;
font-weight: 400;
line-height: 27px;
padding-bottom: 72px;
}

&--button {
width: 280px;
height: 50px;
color: white;
background-color: $c-blue;
border-radius: 8px;
border: solid 2px $c-blue;
display: block;
margin: 0 auto;
transition-duration: 0.3s;

@include on-tablet {
margin: 0;
}

&:hover {
color: $c-blue;
background-color: white;
border: solid 2px white;
}
}
}

&__footer {
background-image: url(../images/slider/header-main-photo.png);
width: 100%;
height: 390px;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
overflow: hidden;
border-radius: 30px;
display: flex;
align-items: flex-end;

&--arrows {
display: flex;
gap: 16px;
margin-bottom: 16px;
}

&--left {
width: 32px;
height: 32px;
background-image: url(../images/slider/arrow-left.png);
}

&--right {
width: 32px;
height: 32px;
background-image: url(../images/slider/arrow-right.png);
}

&--title {
text-transform: uppercase;
font-weight: 700;
font-size: 13px;
line-height: 19px;
letter-spacing: 3px;
margin: 0;
padding-bottom: 8px;
}

&--text {
font-family: 'Open Sans', sans-serif;
font-weight: 400;
font-size: 14px;
line-height: 19px;
margin: 0;
padding-bottom: 24px;
}
}
}
14 changes: 14 additions & 0 deletions src/styles/icon.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.icon {
display: block;
background-size: cover;
width: 24px;
height: 24px;

&--menu {
background-image: url(../images/icons/menu.png);

@include on-desktop-s {
display: none;
}
}
}
4 changes: 4 additions & 0 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
@import 'utils';
@import 'fonts';
@import 'typography';
@import 'header';
@import 'page';
@import 'top-bar';
@import 'icon';

body {
background: $c-gray;
Expand Down
9 changes: 9 additions & 0 deletions src/styles/page.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.page {
&__body {
font-family: Poppins, sans-serif;
color: white;

margin: 0;
min-width: 320px;
}
}
83 changes: 83 additions & 0 deletions src/styles/top-bar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
.top-bar {
margin: 0;
height: 48px;

display: flex;
align-items: flex-end;
justify-content: space-between;

&__logo {
display: block;
width: 46px;
height: 28px;

&-link {
text-decoration: none;
}
}

&__icons {
display: flex;
gap: 32px;
align-items: center;
}

&__hire-us {
margin: 0;
padding: 0;
display: inline-block;
text-transform: uppercase;
font-weight: 700;
font-size: 13px;
line-height: 19px;
letter-spacing: 3px;
position: relative;
text-decoration: none;
color: white;
bottom: 8px;
text-indent: 3px;

&::after {
content: '';
display: block;
width: 100%;
position: absolute;
bottom: -8px;
height: 2px;
background-color: $c-blue;
transition: transform 0.3s;
transform: scaleX(0);
transform-origin: left;
border-radius: 4px;
}

&:hover::after {
transform: scaleX(1);
}
}

&__nav {
display: none;

@include on-desktop-s {
& {
display: flex;
}
}

&--link {
font-weight: 700;
font-size: 13px;
line-height: 19px;
letter-spacing: 3px;
text-decoration: none;
color: white;
margin-right: 48px;
text-transform: uppercase;

&:last-child {
margin-right: 0;
}
}
}
}
Loading
Loading