Skip to content

Commit 541dc89

Browse files
Merge pull request #230 from sudo-mode/feature/marshak-new-links
feat: new marshak links in header & footer
2 parents 5005933 + 0ed25dd commit 541dc89

File tree

6 files changed

+43
-12
lines changed

6 files changed

+43
-12
lines changed

src/components/Footer/Footer.css

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
display: grid;
1616
grid-template-columns: 1fr min-content 1fr;
1717
grid-template-areas: "marshak social yandex";
18-
grid-column-gap: 20px;
18+
grid-column-gap: 18px;
1919
}
2020

2121
.footer__marshak {
@@ -69,6 +69,10 @@
6969
font-size: 15px;
7070
}
7171

72+
.footer__links {
73+
grid-column-gap: 12px;
74+
}
75+
7276
.footer__owner-info {
7377
font-size: 11px;
7478
line-height: 18px;

src/components/Footer/MarshakNavigation.css

+5-5
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@
4040
opacity: .5;
4141
}
4242

43-
@media screen and (max-width: 1024px) {
43+
@media screen and (max-width: 1140px) {
4444
.marshak-navigation__links {
45-
margin-left: 30px;
45+
margin-left: 20px;
4646
}
4747

4848
.marshak-navigation__link-container {
49-
margin-left: 12px;
49+
margin-left: 8px;
5050
}
5151
}
5252

53-
@media screen and (max-width: 640px) {
53+
@media screen and (max-width: 1024px) {
5454
.marshak-navigation {
5555
flex-direction: column;
5656
}
@@ -60,7 +60,7 @@
6060
}
6161
}
6262

63-
@media screen and (max-width: 480px) {
63+
@media screen and (max-width: 660px) {
6464
.marshak-navigation__links {
6565
flex-direction: column;
6666
margin-top: 16px;

src/components/Footer/MarshakNavigation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function MarshakNavigation ({ className, links }) {
1111
<a
1212
className="marshak-navigation__link"
1313
href={item.link}
14-
target="_blank"
14+
target={item.target}
1515
rel="noreferrer"
1616
>
1717
{item.title}

src/components/Header/Marshak.js

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ function Marshak({ className, isMobile, isLandscape, isPlayerExtend }) {
118118
key={i}
119119
marshakLabel={item.marshakLabel}
120120
marshakLink={item.marshakLink}
121+
marshakLinkTarget={item.target}
121122
style={{
122123
...item,
123124
}}

src/components/Header/MarshakLink.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import './MarshakLink.css';
22
import '../../style-mixes/main-link/main-link.css';
33

4-
function MarshakLink({ marshakLabel, marshakLink, style }) {
4+
function MarshakLink({ marshakLabel, marshakLink, marshakLinkTarget, style }) {
55
return (
66
<li className="marshak-link-container" style={style}>
77
<a
88
className="main-link main-link_type_common"
99
href={marshakLink}
10-
target="_blank"
10+
target={marshakLinkTarget}
1111
rel="noreferrer"
1212
>
1313
{marshakLabel}

src/configs/links.js

+29-3
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,28 @@ const yandexPraktikumLink = {
2626
const marshakLinks = [
2727
{
2828
marshakLabel: 'Книги',
29-
marshakLink: 'https://marshakbooks.ru/'
29+
marshakLink: 'https://marshakbooks.ru/',
30+
target: '_blank',
31+
},
32+
{
33+
marshakLabel: 'Одежда',
34+
marshakLink: 'https://marshakbooks.ru/wear/',
35+
target: '_blank',
36+
},
37+
{
38+
marshakLabel: 'Музыка',
39+
marshakLink: 'https://marshakbooks.ru/turbina/',
40+
target: '_self',
3041
},
3142
{
3243
marshakLabel: 'Школа',
33-
marshakLink: 'https://marshakbooks.ru/school/'
44+
marshakLink: 'https://marshakbooks.ru/school/',
45+
target: '_blank',
3446
},
3547
{
3648
marshakLabel: 'О нас',
37-
marshakLink: 'https://marshakbooks.ru/о-нас/'
49+
marshakLink: 'https://marshakbooks.ru/о-нас/',
50+
target: '_blank',
3851
},
3952
];
4053

@@ -43,14 +56,27 @@ const marshakNavLinks = [
4356
{
4457
title: 'Книги',
4558
link: 'https://marshakbooks.ru/',
59+
target: '_blank',
60+
},
61+
{
62+
title: 'Одежда',
63+
link: 'https://marshakbooks.ru/wear/',
64+
target: '_blank',
65+
},
66+
{
67+
title: 'Музыка',
68+
link: 'https://marshakbooks.ru/turbina/',
69+
target: '_self',
4670
},
4771
{
4872
title: 'Школа',
4973
link: 'https://marshakbooks.ru/school/',
74+
target: '_blank',
5075
},
5176
{
5277
title: 'О нас',
5378
link: 'https://marshakbooks.ru/о-нас/',
79+
target: '_blank',
5480
},
5581
];
5682

0 commit comments

Comments
 (0)