Extensions.tsx 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. import React from 'react';
  2. import styled from 'styled-components';
  3. import { Flex } from 'reflexbox/styled-components';
  4. import SVG from 'react-inlinesvg'; // TODO: another solution
  5. const Section = styled(Flex).attrs({
  6. width: 1,
  7. flex: '0 0 auto',
  8. flexWrap: ['wrap', 'wrap', 'nowrap'],
  9. flexDirection: 'column',
  10. alignItems: 'center',
  11. m: 0,
  12. p: ['48px 0 16px', '48px 0 16px', '90px 0 100px'],
  13. })`
  14. background-color: #282828;
  15. `;
  16. const Title = styled.h3`
  17. font-size: 28px;
  18. font-weight: 300;
  19. margin: 0 0 60px;
  20. color: #f5f5f5;
  21. @media only screen and (max-width: 768px) {
  22. font-size: 24px;
  23. margin-bottom: 56px;
  24. }
  25. @media only screen and (max-width: 448px) {
  26. font-size: 20px;
  27. margin-bottom: 40px;
  28. }
  29. `;
  30. const Button = styled.button`
  31. display: flex;
  32. align-items: center;
  33. justify-content: center;
  34. margin: 0 16px;
  35. padding: 12px 28px;
  36. font-family: 'Nunito', sans-serif;
  37. background-color: #eee;
  38. border: 1px solid #aaa;
  39. font-size: 14px;
  40. font-weight: bold;
  41. text-decoration: none;
  42. border-radius: 4px;
  43. outline: none;
  44. box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  45. transition: transform 0.3s ease-out;
  46. cursor: pointer;
  47. @media only screen and (max-width: 768px) {
  48. margin-bottom: 16px;
  49. padding: 8px 16px;
  50. font-size: 12px;
  51. }
  52. > * {
  53. text-decoration: none;
  54. }
  55. :hover {
  56. transform: translateY(-2px);
  57. }
  58. `;
  59. const FirefoxButton = styled(Button)`
  60. color: #e0890f;
  61. `;
  62. const ChromeButton = styled(Button)`
  63. color: #4285f4;
  64. `;
  65. const Link = styled.a`
  66. text-decoration: none;
  67. :visited,
  68. :hover,
  69. :active,
  70. :focus {
  71. text-decoration: none;
  72. }
  73. `;
  74. const Icon = styled(SVG)`
  75. svg {
  76. width: 18px;
  77. height: 18px;
  78. margin-right: 16px;
  79. fill: ${props => props.color || '#333'};
  80. @media only screen and (max-width: 768px) {
  81. width: 13px;
  82. height: 13px;
  83. margin-right: 10px;
  84. }
  85. }
  86. `;
  87. const Extensions = () => (
  88. <Section>
  89. <Title>Browser extensions.</Title>
  90. <Flex
  91. width={1200}
  92. maxWidth="100%"
  93. flex="1 1 auto"
  94. justifyContent="center"
  95. flexWrap={['wrap', 'wrap', 'nowrap']}
  96. >
  97. <Link
  98. href="https://chrome.google.com/webstore/detail/kutt/pklakpjfiegjacoppcodencchehlfnpd"
  99. target="_blank"
  100. rel="noopener noreferrer"
  101. >
  102. <ChromeButton>
  103. <Icon src="/images/googlechrome.svg" color="#4285f4" />
  104. <span>Download for Chrome</span>
  105. </ChromeButton>
  106. </Link>
  107. <Link
  108. href="https://addons.mozilla.org/en-US/firefox/addon/kutt/"
  109. target="_blank"
  110. rel="noopener noreferrer"
  111. >
  112. <FirefoxButton>
  113. <Icon src="/images/mozillafirefox.svg" color="#e0890f" />
  114. <span>Download for Firefox</span>
  115. </FirefoxButton>
  116. </Link>
  117. </Flex>
  118. </Section>
  119. );
  120. export default Extensions;