Extensions.tsx 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. import { Colors } from "../consts";
  6. import { ColCenterH } from "./Layout";
  7. import Text, { H3 } from "./Text";
  8. const Title = styled.h3`
  9. font-size: 28px;
  10. font-weight: 300;
  11. margin: 0 0 60px;
  12. color: #f5f5f5;
  13. @media only screen and (max-width: 768px) {
  14. font-size: 24px;
  15. margin-bottom: 56px;
  16. }
  17. @media only screen and (max-width: 448px) {
  18. font-size: 20px;
  19. margin-bottom: 40px;
  20. }
  21. `;
  22. const Button = styled.button`
  23. display: flex;
  24. align-items: center;
  25. justify-content: center;
  26. margin: 0 16px;
  27. padding: 12px 28px;
  28. font-family: "Nunito", sans-serif;
  29. background-color: #eee;
  30. border: 1px solid #aaa;
  31. font-size: 14px;
  32. font-weight: bold;
  33. text-decoration: none;
  34. border-radius: 4px;
  35. outline: none;
  36. box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  37. transition: transform 0.3s ease-out;
  38. cursor: pointer;
  39. @media only screen and (max-width: 768px) {
  40. margin-bottom: 16px;
  41. padding: 8px 16px;
  42. font-size: 12px;
  43. }
  44. > * {
  45. text-decoration: none;
  46. }
  47. :hover {
  48. transform: translateY(-2px);
  49. }
  50. `;
  51. const FirefoxButton = styled(Button)`
  52. color: #e0890f;
  53. `;
  54. const ChromeButton = styled(Button)`
  55. color: #4285f4;
  56. `;
  57. const Link = styled.a`
  58. text-decoration: none;
  59. :visited,
  60. :hover,
  61. :active,
  62. :focus {
  63. text-decoration: none;
  64. }
  65. `;
  66. const Icon = styled(SVG)`
  67. svg {
  68. width: 18px;
  69. height: 18px;
  70. margin-right: 16px;
  71. fill: ${props => props.color || "#333"};
  72. @media only screen and (max-width: 768px) {
  73. width: 13px;
  74. height: 13px;
  75. margin-right: 10px;
  76. }
  77. }
  78. `;
  79. const Extensions = () => (
  80. <ColCenterH
  81. width={1}
  82. flex="0 0 auto"
  83. flexWrap={["wrap", "wrap", "nowrap"]}
  84. py={[64, 96]}
  85. backgroundColor={Colors.ExtensionsBg}
  86. >
  87. <H3 fontSize={[26, 28]} mb={5} color="white" light>
  88. Browser extensions.
  89. </H3>
  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. </ColCenterH>
  119. );
  120. export default Extensions;