Skip to content

Commit 2f15de2

Browse files
Merge pull request linode#226 from hzoppetti/foot-icon-update
[Update] Header/Footer
2 parents 5599593 + 61ec3ae commit 2f15de2

File tree

2 files changed

+168
-21
lines changed

2 files changed

+168
-21
lines changed

src/components/3_organisms/footer-nav.js

Lines changed: 124 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,125 @@
11
import React from "react";
22

3+
const styles = {
4+
display: "none"
5+
};
6+
7+
const getViewBox = id => {
8+
switch(id) {
9+
case 'icon--github':
10+
return '0 0 496 512'
11+
case 'icon--instagram':
12+
return '0 0 448 512'
13+
case 'icon--linkedin':
14+
return '0 0 448 512'
15+
case 'icon--youtube':
16+
return '0 0 576 512'
17+
case 'icon--twitter':
18+
return '0 0 512 512'
19+
default:
20+
return '';
21+
}
22+
}
23+
24+
const getD = id => {
25+
switch(id) {
26+
case 'icon--github':
27+
return 'M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z'
28+
case 'icon--instagram':
29+
return 'M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z'
30+
case 'icon--linkedin':
31+
return 'M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z'
32+
case 'icon--youtube':
33+
return 'M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z'
34+
case 'icon--twitter':
35+
return 'M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z'
36+
default:
37+
return '';
38+
}
39+
}
40+
341
const FooterNav = () => (
442
<footer className="c-site-footer" itemScope="itemscope" itemType="http://schema.org/WPFooter">
43+
<svg xmlns="http://www.w3.org/2000/svg" style={styles}>
44+
<symbol id="icon--github" viewBox={getViewBox("icon--github")}>
45+
<path fill="currentColor" d={getD("icon--github")}></path>
46+
</symbol>
47+
<symbol id="icon--instagram" viewBox={getViewBox("icon--instagram")}>
48+
<path fill="currentColor" d={getD("icon--instagram")}></path>
49+
</symbol>
50+
<symbol id="icon--linkedin" viewBox={getViewBox("icon--linkedin")}>
51+
<path fill="currentColor" d={getD("icon--linkedin")}></path>
52+
</symbol>
53+
<symbol id="icon--youtube" viewBox={getViewBox("icon--youtube")}>
54+
<path fill="currentColor" d={getD("icon--youtube")}></path>
55+
</symbol>
56+
<symbol id="icon--twitter" viewBox={getViewBox("icon--twitter")}>
57+
<path fill="currentColor" d={getD("icon--twitter")}></path>
58+
</symbol>
59+
</svg>
60+
561
<div className="o-layout__row c-site-footer__primary">
662
<div className="o-layout__colset">
763
<div className="o-layout__col">
864
<div className="o-layout__module c-identity">
9-
<a className="c-identity__link" href="https://www.linode.com/" itemProp="url">
10-
<img alt="Linode Logo" className="c-identity__image" src="https://www.linode.com/wp-content/uploads/2018/10/linode-logo-blk-rgb-minified.svg" itemProp="image" data-no-lazy="1"></img>
65+
<a className="c-identity__link" target="_self" href="https://www.linode.com/" itemProp="url">
66+
<img alt="Linode Logo" className="c-identity__image" src="https://www.linode.com/wp-content/uploads/2018/10/linode-logo-blk-rgb-minified.svg" alt="linode-logo-blk-rgb-minified" itemProp="image" data-no-lazy="1"></img>
1167
</a>
1268
</div>
1369
<div className="o-layout__module c-copyright">
1470
&copy; {new Date().getFullYear()} All rights reserved.
1571
</div>
72+
<div className="o-layout__module c-social">
73+
<nav className="o-menu">
74+
<h4 className="o-menu__heading">Follow Us</h4>
75+
<ul className="o-menu__list">
76+
<li className="o-menu__item">
77+
<a href="https://twitter.com/linode/" className="o-menu__link">
78+
<svg className="o-menu__icon">
79+
<use xlinkHref="#icon--twitter"></use>
80+
</svg>
81+
<span className="o-menu__title">Twitter</span>
82+
</a>
83+
</li>
84+
<li className="o-menu__item">
85+
<a href="https://www.instagram.com/linode/" className="o-menu__link">
86+
<svg className="o-menu__icon">
87+
<use xlinkHref="#icon--instagram"></use>
88+
</svg>
89+
<span className="o-menu__title">Instagram</span>
90+
</a>
91+
</li>
92+
<li className="o-menu__item">
93+
<a href="https://www.youtube.com/linode/" className="o-menu__link">
94+
<svg className="o-menu__icon">
95+
<use xlinkHref="#icon--youtube"></use>
96+
</svg>
97+
<span className="o-menu__title">YouTube</span>
98+
</a>
99+
</li>
100+
<li className="o-menu__item">
101+
<a href="https://www.linkedin.com/company/linode/" className="o-menu__link">
102+
<svg className="o-menu__icon">
103+
<use xlinkHref="#icon--linkedin"></use>
104+
</svg>
105+
<span className="o-menu__title">LinkedIn</span>
106+
</a>
107+
</li>
108+
<li className="o-menu__item">
109+
<a href="https://github.com/linode/" className="o-menu__link">
110+
<svg className="o-menu__icon">
111+
<use xlinkHref="#icon--github"></use>
112+
</svg>
113+
<span className="o-menu__title">GitHub</span>
114+
</a>
115+
</li>
116+
</ul>
117+
</nav>
118+
</div>
16119
</div>
120+
121+
122+
17123
<div className="o-layout__col">
18124
<div className="o-layout__module">
19125
<nav className="o-menu">
@@ -455,34 +561,45 @@ const FooterNav = () => (
455561
</div>
456562
<div className="o-layout__module c-social">
457563
<nav className="o-menu">
564+
<h4 className="o-menu__heading">Follow Us</h4>
458565
<ul className="o-menu__list">
459566
<li className="o-menu__item">
460567
<a href="https://twitter.com/linode/" className="o-menu__link">
461-
<i className="fab fa-twitter"></i>
568+
<svg className="o-menu__icon">
569+
<use xlinkHref="#icon--twitter"></use>
570+
</svg>
462571
<span className="o-menu__title">Twitter</span>
463572
</a>
464573
</li>
465574
<li className="o-menu__item">
466575
<a href="https://www.instagram.com/linode/" className="o-menu__link">
467-
<i className="fab fa-instagram"></i>
576+
<svg className="o-menu__icon">
577+
<use xlinkHref="#icon--instagram"></use>
578+
</svg>
468579
<span className="o-menu__title">Instagram</span>
469580
</a>
470581
</li>
471582
<li className="o-menu__item">
472583
<a href="https://www.youtube.com/linode/" className="o-menu__link">
473-
<i className="fab fa-youtube"></i>
584+
<svg className="o-menu__icon">
585+
<use xlinkHref="#icon--youtube"></use>
586+
</svg>
474587
<span className="o-menu__title">YouTube</span>
475588
</a>
476589
</li>
477590
<li className="o-menu__item">
478591
<a href="https://www.linkedin.com/company/linode/" className="o-menu__link">
479-
<i className="fab fa-linkedin"></i>
592+
<svg className="o-menu__icon">
593+
<use xlinkHref="#icon--linkedin"></use>
594+
</svg>
480595
<span className="o-menu__title">LinkedIn</span>
481596
</a>
482597
</li>
483598
<li className="o-menu__item">
484599
<a href="https://github.com/linode/" className="o-menu__link">
485-
<i className="fab fa-github"></i>
600+
<svg className="o-menu__icon">
601+
<use xlinkHref="#icon--github"></use>
602+
</svg>
486603
<span className="o-menu__title">GitHub</span>
487604
</a>
488605
</li>

src/css/components/3_organisms/header-footer.css

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
text-decoration: none;
3434
}
3535

36+
.o-menu__icon {
37+
height: 1em;
38+
margin-right: .5em;
39+
width: 1em;
40+
}
41+
3642
.o-menu__title {
3743
display: inline-block;
3844
white-space: nowrap;
@@ -355,7 +361,7 @@
355361
position: -webkit-sticky;
356362
position: sticky;
357363
top: -37px;
358-
z-index: 10;
364+
z-index: 1000;
359365
transform: none;
360366
}
361367

@@ -369,15 +375,11 @@
369375
max-width: none;
370376
}
371377

372-
.c-site-header a {
378+
.c-site-header a, .c-site-header a:hover, .c-site-header a:focus {
373379
color: inherit;
374380
text-decoration: none;
375381
}
376382

377-
.c-site-header a:hover, .c-site-header a:focus {
378-
text-decoration: none;
379-
}
380-
381383
.c-site-header__topbar {
382384
z-index: 1000;
383385
}
@@ -398,7 +400,6 @@
398400
letter-spacing: 0;
399401
background-color: white;
400402
border-bottom: 1px solid #ededf4;
401-
font-weight: 600;
402403
overflow: visible;
403404
padding-bottom: 0;
404405
padding-top: 0;
@@ -473,6 +474,7 @@
473474
.c-site-header__primary .o-menu__title {
474475
border: 0 solid transparent;
475476
border-width: 2px 0;
477+
font-weight: 600;
476478
padding: 10px 0;
477479
}
478480

@@ -687,6 +689,20 @@
687689
margin-top: 24px;
688690
}
689691

692+
.c-sub-menu .o-link--arrow {
693+
align-items: center;
694+
display: flex;
695+
font-weight: 600;
696+
}
697+
698+
.c-sub-menu .o-link--arrow:after {
699+
content: url("data:image/svg+xml;utf8,<svg viewBox='0 0 7 12' version='1.1' xmlns='http://www.w3.org/2000/svg'><path d='M6.87 6.319l-5.39 5.549a.435.435 0 0 1-.624 0l-.727-.743a.457.457 0 0 1 0-.637L4.48 6 .13 1.512a.457.457 0 0 1 0-.637L.855.132a.435.435 0 0 1 .625 0l5.39 5.55a.457.457 0 0 1 0 .637z' fill='%2302b159' fill-rule='nonzero'/></svg>");
700+
display: inline-block;
701+
height: auto;
702+
margin-left: .5em;
703+
width: 7px;
704+
}
705+
690706
.c-sub-menu .c-post-preview .c-post-preview__permalink {
691707
display: block;
692708
}
@@ -907,6 +923,7 @@
907923
.c-site-header__topbar .c-notification__link {
908924
align-items: center;
909925
display: flex;
926+
font-weight: 600;
910927
}
911928

912929
.c-site-header__topbar .c-notification__tag, .c-site-header__topbar .c-notification__message {
@@ -941,7 +958,6 @@
941958
.c-site-header__topbar .o-menu__link {
942959
border: 0 solid transparent;
943960
border-width: 2px 0;
944-
font-weight: 600;
945961
margin: 0 12px;
946962
}
947963

@@ -950,6 +966,7 @@
950966
}
951967

952968
.c-site-header__topbar .o-menu__title {
969+
font-weight: 600;
953970
padding: 8px 0;
954971
}
955972

@@ -1105,12 +1122,6 @@
11051122
padding-left: 0;
11061123
}
11071124

1108-
.c-site-footer__primary .c-social i, .c-site-footer__primary .c-social svg {
1109-
color: #32363b;
1110-
margin-right: .666em;
1111-
width: 1em;
1112-
}
1113-
11141125
.c-site-footer__primary .c-social a {
11151126
align-items: center;
11161127
display: flex;
@@ -1124,10 +1135,29 @@
11241135
text-decoration: underline;
11251136
}
11261137

1138+
.c-site-footer__primary .c-social svg {
1139+
color: #32363b;
1140+
flex: none;
1141+
}
1142+
11271143
.c-site-footer__primary .o-layout__col:first-child .c-social {
11281144
display: none;
11291145
}
11301146

1147+
.c-site-footer__primary .o-layout__col:first-child .o-menu__heading {
1148+
border: 0 !important;
1149+
clip: rect(0 0 0 0) !important;
1150+
-webkit-clip-path: inset(50%) !important;
1151+
clip-path: inset(50%) !important;
1152+
height: 1px !important;
1153+
margin: -1px !important;
1154+
overflow: hidden !important;
1155+
padding: 0 !important;
1156+
position: absolute !important;
1157+
white-space: nowrap !important;
1158+
width: 1px !important;
1159+
}
1160+
11311161
@media (max-width: 47.99em) {
11321162
.c-site-footer__primary .o-layout__col:first-child .c-social {
11331163
display: block;

0 commit comments

Comments
 (0)