Extensions.tsx 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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 { 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. svg {
  54. width: 18px;
  55. height: 18px;
  56. margin-right: 16px;
  57. fill: ${props => props.color || "#333"};
  58. @media only screen and (max-width: 768px) {
  59. width: 13px;
  60. height: 13px;
  61. margin-right: 10px;
  62. }
  63. }
  64. `;
  65. const Extensions = () => (
  66. <ColCenterH
  67. width={1}
  68. flex="0 0 auto"
  69. flexWrap={["wrap", "wrap", "nowrap"]}
  70. py={[64, 96]}
  71. backgroundColor={Colors.ExtensionsBg}
  72. >
  73. <H3 fontSize={[26, 28]} mb={5} color="white" light>
  74. Browser extensions.
  75. </H3>
  76. <Flex
  77. width={1200}
  78. maxWidth="100%"
  79. flex="1 1 auto"
  80. justifyContent="center"
  81. flexWrap={["wrap", "wrap", "nowrap"]}
  82. >
  83. <Link
  84. href="https://chrome.google.com/webstore/detail/kutt/pklakpjfiegjacoppcodencchehlfnpd"
  85. target="_blank"
  86. rel="noopener noreferrer"
  87. >
  88. <ChromeButton>
  89. <Icon src="/images/googlechrome.svg" color="#4285f4" />
  90. <span>Download for Chrome</span>
  91. </ChromeButton>
  92. </Link>
  93. <Link
  94. href="https://addons.mozilla.org/en-US/firefox/addon/kutt/"
  95. target="_blank"
  96. rel="noopener noreferrer"
  97. >
  98. <FirefoxButton>
  99. <Icon src="/images/mozillafirefox.svg" color="#e0890f" />
  100. <span>Download for Firefox</span>
  101. </FirefoxButton>
  102. </Link>
  103. </Flex>
  104. </ColCenterH>
  105. );
  106. export default Extensions;