|
1 | 1 | import { ManageCookiesLink as RawCookiesLink } from '@openstax/ui-components'; |
2 | | -import React from 'react'; |
3 | 2 | import styled, { css } from 'styled-components/macro'; |
4 | 3 | import { textRegularSize, textRegularStyle } from '../../components/Typography'; |
5 | 4 | import { |
@@ -31,118 +30,6 @@ export const iconStyles = css` |
31 | 30 | height: 1em; |
32 | 31 | `; |
33 | 32 |
|
34 | | -interface IconProps extends React.SVGAttributes<SVGSVGElement> { |
35 | | - className?: string; |
36 | | -} |
37 | | - |
38 | | -/** |
39 | | - * Facebook icon for social media links. |
40 | | - * SVG path from Font Awesome Free (https://fontawesome.com - MIT License) |
41 | | - * |
42 | | - * Note: Wrapped with styled() to enable styled-components styling |
43 | | - */ |
44 | | -function FacebookIconBase({ className, ...props }: IconProps) { |
45 | | - return ( |
46 | | - <svg |
47 | | - className={className} |
48 | | - viewBox="0 0 320 512" |
49 | | - aria-hidden="true" |
50 | | - {...props} |
51 | | - > |
52 | | - <path |
53 | | - fill="currentColor" |
54 | | - d="M279.14 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.43 0 225.36 0c-73.22 0-121.08 44.38-121.08 124.72v70.62H22.89V288h81.39v224h100.17V288z" |
55 | | - /> |
56 | | - </svg> |
57 | | - ); |
58 | | -} |
59 | | - |
60 | | -export const FBIcon = styled(FacebookIconBase)` |
61 | | - ${iconStyles} |
62 | | -`; |
63 | | - |
64 | | -/** |
65 | | - * X (Twitter) icon for social media links. |
66 | | - * SVG path from Font Awesome Free (https://fontawesome.com - MIT License) |
67 | | - */ |
68 | | -function XTwitter() { |
69 | | - return ( |
70 | | - <svg |
71 | | - aria-hidden='true' |
72 | | - focusable='false' |
73 | | - data-prefix='fab' |
74 | | - data-icon='x-twitter' |
75 | | - role='img' |
76 | | - xmlns='http://www.w3.org/2000/svg' |
77 | | - viewBox='0 0 512 512' |
78 | | - className='svg-inline--fa fa-x-twitter' |
79 | | - height='1em' |
80 | | - > |
81 | | - <path |
82 | | - fill='currentColor' |
83 | | - d={ |
84 | | - 'M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5' + |
85 | | - ' 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z' |
86 | | - } |
87 | | - ></path> |
88 | | - </svg> |
89 | | - ); |
90 | | -} |
91 | | - |
92 | | -export const TwitterIcon = XTwitter; |
93 | | - |
94 | | -/** |
95 | | - * Instagram icon for social media links. |
96 | | - * SVG path from Font Awesome Free (https://fontawesome.com - MIT License) |
97 | | - * |
98 | | - * Note: Wrapped with styled() to enable styled-components styling |
99 | | - */ |
100 | | -function InstagramIconBase({ className, ...props }: IconProps) { |
101 | | - return ( |
102 | | - <svg |
103 | | - className={className} |
104 | | - viewBox="0 0 448 512" |
105 | | - aria-hidden="true" |
106 | | - {...props} |
107 | | - > |
108 | | - <path |
109 | | - fill="currentColor" |
110 | | - d="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" |
111 | | - /> |
112 | | - </svg> |
113 | | - ); |
114 | | -} |
115 | | - |
116 | | -export const IGIcon = styled(InstagramIconBase)` |
117 | | - ${iconStyles} |
118 | | -`; |
119 | | - |
120 | | -/** |
121 | | - * LinkedIn icon for social media links. |
122 | | - * SVG path from Font Awesome Free (https://fontawesome.com - MIT License) |
123 | | - * |
124 | | - * Note: Wrapped with styled() to enable styled-components styling |
125 | | - */ |
126 | | -function LinkedInIconBase({ className, ...props }: IconProps) { |
127 | | - return ( |
128 | | - <svg |
129 | | - className={className} |
130 | | - viewBox="0 0 448 512" |
131 | | - aria-hidden="true" |
132 | | - {...props} |
133 | | - > |
134 | | - <path |
135 | | - fill="currentColor" |
136 | | - d="M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z" |
137 | | - /> |
138 | | - </svg> |
139 | | - ); |
140 | | -} |
141 | | - |
142 | | -export const LinkedInIcon = styled(LinkedInIconBase)` |
143 | | - ${iconStyles} |
144 | | -`; |
145 | | - |
146 | 33 | const boxedMargin = 1.5; |
147 | 34 | export const boxed = css` |
148 | 35 | max-width: ${contentWrapperMaxWidth + boxedMargin * 2}rem; |
@@ -323,22 +210,6 @@ export const ContactDialog = styled(Modal)` |
323 | 210 | } |
324 | 211 | `; |
325 | 212 |
|
326 | | -const InnerBottomLink = styled.a` |
327 | | - ${columnLink} |
328 | | - display: inline-grid; |
329 | | - grid-auto-flow: column; |
330 | | - grid-column-gap: 0.7rem; |
331 | | - overflow: hidden; |
332 | | -`; |
333 | | - |
334 | | -export function BottomLink(props: React.AnchorHTMLAttributes<unknown>) { |
335 | | - return ( |
336 | | - <li> |
337 | | - <InnerBottomLink {...props} /> |
338 | | - </li> |
339 | | - ); |
340 | | -} |
341 | | - |
342 | 213 | export const column = css` |
343 | 214 | display: grid; |
344 | 215 | grid-gap: 0.5rem; |
@@ -465,27 +336,6 @@ export const LinkListWrapper = styled.menu` |
465 | 336 | list-style: none; |
466 | 337 | `; |
467 | 338 |
|
468 | | -const InnerSocialIcon = styled.a` |
469 | | - ${textRegularSize} |
470 | | - background-color: ${theme.color.primary.gray.light}; |
471 | | - color: #fff; |
472 | | - align-content: center; |
473 | | - border-radius: 50%; |
474 | | - display: grid; |
475 | | - height: 3rem; |
476 | | - justify-content: center; |
477 | | - overflow: hidden; |
478 | | - width: 3rem; |
479 | | -`; |
480 | | - |
481 | | -export function SocialIcon(props: React.AnchorHTMLAttributes<unknown>) { |
482 | | - return ( |
483 | | - <li> |
484 | | - <InnerSocialIcon {...props} /> |
485 | | - </li> |
486 | | - ); |
487 | | -} |
488 | | - |
489 | 339 | export const FooterLogo = styled.img` |
490 | 340 | height: 4.7rem; |
491 | 341 | transform: translateY(0.2rem); |
|
0 commit comments