Extensions.tsx 2.5 KB

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