Skip to content

Commit

Permalink
header (#1)
Browse files Browse the repository at this point in the history
* установка зависимостей

* header
  • Loading branch information
viktoriyafv authored Oct 16, 2024
1 parent 8468281 commit de5d674
Show file tree
Hide file tree
Showing 75 changed files with 3,076 additions and 3,384 deletions.
5,939 changes: 2,581 additions & 3,358 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
"devDependencies": {
"@htmlacademy/editorconfig-cli": "3.0.0",
"@linthtml/linthtml": "0.9.6",
"browser-sync": "3.0.2",
"browser-sync": "^3.0.3",
"browserslist-to-esbuild": "2.1.1",
"eslint": "8.57.0",
"eslint-config-htmlacademy": "10.0.1",
"gulp": "4.0.2",
"gulp": "^5.0.0",
"gulp-esbuild": "0.12.0",
"gulp-html-bemlinter": "4.0.0",
"gulp-htmlmin": "5.0.1",
Expand All @@ -60,8 +60,8 @@
"gulp-sharp-responsive": "0.4.1",
"gulp-stacksvg": "4.0.0",
"gulp-svgmin": "4.1.0",
"htmlacademy-backstopjs": "6.6.1",
"html-validate": "^8.5.0",
"htmlacademy-backstopjs": "6.6.1",
"linthtml-config-htmlacademy": "1.0.25",
"npm-run-all": "4.1.5",
"postcss": "8.4.38",
Expand Down
Binary file added source/fonts/montserrat/Montserrat-Bold.woff
Binary file not shown.
Binary file added source/fonts/montserrat/Montserrat-Bold.woff2
Binary file not shown.
Binary file added source/fonts/montserrat/Montserrat-Medium.woff
Binary file not shown.
Binary file not shown.
Binary file added source/fonts/montserrat/Montserrat-Regular.woff
Binary file not shown.
Binary file added source/fonts/montserrat/Montserrat-Regular.woff2
Binary file not shown.
1 change: 1 addition & 0 deletions source/icons/address-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions source/icons/close-button.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions source/icons/eco-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions source/icons/energy-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions source/icons/html-academy-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions source/icons/menu-button.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions source/icons/ok-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions source/icons/phone-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions source/icons/pinterest-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions source/icons/size-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions source/icons/speed-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions source/icons/union-button-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions source/icons/union-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions source/icons/user-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions source/icons/vk-icon.svg
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 source/images/[email protected]
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 source/images/[email protected]
Binary file not shown.
Binary file added source/images/[email protected]
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 source/images/[email protected]
Binary file not shown.
Binary file added source/images/[email protected]
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 source/images/[email protected]
Binary file not shown.
Binary file added source/images/[email protected]
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 source/images/[email protected]
Binary file not shown.
Binary file added source/images/[email protected]
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 source/images/[email protected]
Binary file not shown.
Binary file added source/images/[email protected]
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 source/images/[email protected]
Binary file not shown.
Binary file added source/images/[email protected]
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 source/images/[email protected]
Binary file not shown.
Binary file added source/images/[email protected]
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 source/images/[email protected]
Binary file not shown.
Binary file added source/images/[email protected]
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 source/images/[email protected]
Binary file not shown.
Binary file added source/images/[email protected]
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 source/images/[email protected]
Binary file not shown.
Binary file added source/images/[email protected]
Binary file added source/images/[email protected]
Binary file not shown.
Binary file added source/images/[email protected]
Binary file added source/images/[email protected]
Binary file not shown.
1 change: 1 addition & 0 deletions source/images/logo-desktop.svg
1 change: 1 addition & 0 deletions source/images/logo-mobile.svg
1 change: 1 addition & 0 deletions source/images/logo-tablet.svg
Binary file added source/images/[email protected]
Binary file added source/images/[email protected]
Binary file not shown.
Binary file added source/images/[email protected]
Binary file added source/images/[email protected]
Binary file not shown.
Binary file added source/images/[email protected]
Binary file added source/images/[email protected]
Binary file not shown.
Binary file added source/images/[email protected]
Binary file added source/images/[email protected]
Binary file not shown.
Binary file added source/images/[email protected]
Binary file added source/images/[email protected]
Binary file not shown.
Binary file added source/images/[email protected]
Binary file added source/images/[email protected]
Binary file not shown.
91 changes: 77 additions & 14 deletions source/index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,80 @@
<!DOCTYPE html>
<html class="page" lang="ru">
<head>
<meta charset="UTF-8">
<title>Название проекта</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="preload" href="#" type="font/woff2" as="font">
<link rel="stylesheet" href="styles/styles.css">
<script src="scripts/index.js" defer></script>
</head>
<body class="page__body">
<header class="header">Шапка</header>
<main>
<h1>Страница для старта</h1>
</main>
</body>

<head>
<meta charset="UTF-8">
<title>Drink2Go Фадеева Виктория</title>
<meta name="author" content="Фадеева Виктория">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="preload" href="#" type="font/woff2" as="font">
<link rel="stylesheet" href="styles/styles.css">
<link rel="preload" href="styles/styles.css" as="style">
<script src="scripts/index.js" defer></script>
</head>

<body class="page__body">
<header class="main-header" data-test="header">
<div class="main-header__container">
<a class="main-header__logo" href="index.html">
<picture>
<source media="(min-width: 1440px)" width="170" height="36" type="image/svg+xml"
srcset="images/logo-desktop.svg">
<source media="(min-width: 768px)" width="82" height="36" type="image/svg+xml"
srcset="images/logo-tablet.svg">
<img class="main-header__logo-image" src="images/logo-mobile.svg" width="32" height="36"
alt="Логотип Проекта Drink2Go">
</picture>
<span class="main-header__logo-text">Интернет-магазин кофейных напитков</span>
</a>
<nav class="main-header__nav main-nav main-nav--closed main-nav--nojs">
<button class="main-nav__toggle" type="button">
<span class="visually-hidden">Открыть меню</span>
</button>
<ul class="main-nav__list site-list">
<li class="site-list__item">
<a class="site-list__link site-list__link--active" href="index.html">
главная
</a>
</li>
<li class="site-list__item">
<a class="site-list__link" href="#">
каталог
</a>
</li>
<li class="site-list__item">
<a class="site-list__link" href="#">
доставка
</a>
</li>
<li class="site-list__item">
<a class="site-list__link" href="#">
о нас
</a>
</li>
</ul>
<div class="main-nav__user-list user-list">
<a class="user-list__icon user-list__icon--login" href="#">
<span class="user-list__text">войти</span>
</a>
<a class="user-list__icon user-list__icon--union" href="#">
<span class="user-list__text">корзина</span>
</a>
</div>
</nav>
</div>
</header>
<main>
<section data-test="hero">
</section>
<section data-test="features">
</section>
<section data-test="catalog">
</section>
<section data-test="map">
</section>
</main>
<footer data-test="footer">
</footer>
</body>

</html>
8 changes: 8 additions & 0 deletions source/scripts/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
/* в этот файл добавляет скрипты*/
const navMain = document.querySelector('.main-nav');
const navToggle = document.querySelector('.main-nav__toggle');

navMain.classList.remove('main-nav--nojs');

navToggle.onclick = function () {
navMain.classList.toggle('main-nav--opened');
};
5 changes: 0 additions & 5 deletions source/styles/blocks/header.scss

This file was deleted.

74 changes: 74 additions & 0 deletions source/styles/blocks/main-header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
.main-header__container {
display: flex;
flex-wrap: wrap;
align-items: center;
padding: 12px 20px;
width: 320px;
margin: 0 auto;


@media (min-width: $tablet-width) {
width: 768px;
padding: 0 20px;
}

@media (min-width: $desktop-width) {
width: 1440px;
padding: 0 40px;
}
}

.main-header__logo {
text-decoration: none;
display: block;
width: 32px;
height: 36px;
margin-right: 88px;

@media (min-width: $tablet-width) {
width: 82px;
margin-right: 67px;
}

@media (min-width: $desktop-width) {
width: auto;
display: flex;
margin-right: 162px;
}

&:hover,
&:focus-visible {
opacity: 0.8;
}

&:active {
opacity: 0.6;
}
}

.main-header__logo-text {
display: none;

@media (min-width: $desktop-width) {
display: block;
width: 126px;
font-family: $primary-font;
font-size: 12px;
line-height: 16px;
color: $basic-black;
margin-left: 20px;
}
}

.main-header__logo-image {
width: 32px;
height: 36px;

@media (min-width: $tablet-width) {
width: 82px;
}

@media (min-width: $desktop-width) {
width: 170px;
}
};
Loading

0 comments on commit de5d674

Please sign in to comment.