فهرست منبع

Add browser extionsions section

poeti8 7 سال پیش
والد
کامیت
b04366ee7c

+ 147 - 0
client/components/Extensions/Extensions.js

@@ -0,0 +1,147 @@
+import React from 'react';
+import styled from 'styled-components';
+import SVG from 'react-inlinesvg';
+
+const Section = styled.div`
+  position: relative;
+  width: 100%;
+  flex: 0 0 auto;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  margin: 0;
+  padding: 90px 0 100px;
+  background-color: #282828;
+
+  @media only screen and (max-width: 768px) {
+    margin: 0;
+    padding: 48px 0 16px;
+    flex-wrap: wrap;
+  }
+`;
+
+const Wrapper = styled.div`
+  width: 1200px;
+  max-width: 100%;
+  flex: 1 1 auto;
+  display: flex;
+  justify-content: center;
+
+  @media only screen and (max-width: 1200px) {
+    flex-wrap: wrap;
+  }
+`;
+
+const Title = styled.h3`
+  font-size: 28px;
+  font-weight: 300;
+  margin: 0 0 60px;
+  color: #f5f5f5;
+
+  @media only screen and (max-width: 768px) {
+    font-size: 24px;
+    margin-bottom: 56px;
+  }
+
+  @media only screen and (max-width: 448px) {
+    font-size: 20px;
+    margin-bottom: 40px;
+  }
+`;
+
+const Button = styled.button`
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: 0 16px;
+  padding: 12px 28px;
+  font-family: 'Nunito', sans-serif;
+  background-color: #eee;
+  border: 1px solid #aaa;
+  font-size: 14px;
+  font-weight: bold;
+  text-decoration: none;
+  border-radius: 4px;
+  outline: none;
+  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
+  transition: transform 0.3s ease-out;
+  cursor: pointer;
+
+  @media only screen and (max-width: 768px) {
+    margin-bottom: 16px;
+    padding: 8px 16px;
+    font-size: 12px;
+  }
+
+  > * {
+    text-decoration: none;
+  }
+
+  :hover {
+    transform: translateY(-2px);
+  }
+`;
+
+const FirefoxButton = styled(Button)`
+  color: #e0890f;
+`;
+
+const ChromeButton = styled(Button)`
+  color: #4285f4;
+`;
+
+const Link = styled.a`
+  text-decoration: none;
+
+  :visited,
+  :hover,
+  :active,
+  :focus {
+    text-decoration: none;
+  }
+`;
+
+const Icon = styled(SVG)`
+  svg {
+    width: 18px;
+    height: 18px;
+    margin-right: 16px;
+    fill: ${props => props.color || '#333'};
+
+    @media only screen and (max-width: 768px) {
+      width: 13px;
+      height: 13px;
+      margin-right: 10px;
+    }
+  }
+`;
+
+const Extensions = () => (
+  <Section>
+    <Title>Browser extensions.</Title>
+    <Wrapper>
+      <Link
+        href="https://chrome.google.com/webstore/detail/kutt/pklakpjfiegjacoppcodencchehlfnpd"
+        target="_blank"
+        rel="noopener noreferrer"
+      >
+        <ChromeButton>
+          <Icon src="/images/googlechrome.svg" color="#4285f4" />
+          <span>Download for Chrome</span>
+        </ChromeButton>
+      </Link>
+      <Link
+        href="https://addons.mozilla.org/en-US/firefox/addon/kutt/"
+        target="_blank"
+        rel="noopener noreferrer"
+      >
+        <FirefoxButton>
+          <Icon src="/images/mozillafirefox.svg" color="#e0890f" />
+          <span>Download for Firefox</span>
+        </FirefoxButton>
+      </Link>
+    </Wrapper>
+  </Section>
+);
+
+export default Extensions;

+ 1 - 0
client/components/Extensions/index.js

@@ -0,0 +1 @@
+export { default } from './Extensions';

+ 2 - 0
client/pages/index.js

@@ -5,6 +5,7 @@ import { bindActionCreators } from 'redux';
 import BodyWrapper from '../components/BodyWrapper';
 import Shortener from '../components/Shortener';
 import Features from '../components/Features';
+import Extensions from '../components/Extensions';
 import Table from '../components/Table';
 import NeedToLogin from '../components/NeedToLogin';
 import Footer from '../components/Footer/Footer';
@@ -35,6 +36,7 @@ class Homepage extends Component {
         {needToLogin}
         {table}
         <Features />
+        <Extensions />
         <Footer />
       </BodyWrapper>
     );

+ 1 - 0
static/images/googlechrome.svg

@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Google Chrome icon</title><path d="M16.214 8.69l6.715-1.679A12.027 12.027 0 0 1 24 11.972C24 18.57 18.569 24 11.968 24c-.302 0-.605-.011-.907-.034l4.905-8.347c.356-.376.655-.803.881-1.271a5.451 5.451 0 0 0-.043-4.748 5.156 5.156 0 0 0-.59-.91zm-3.24 8.575l-2.121 6.682C4.738 23.345 0 18.14 0 11.977 0 9.592.709 7.26 2.038 5.279l4.834 8.377c.18.539 1.119 2.581 3.067 3.327.998.382 2.041.481 3.035.282zM11.973 7.62c-2.006.019-3.878 1.544-4.281 3.512a4.478 4.478 0 0 0 1.237 4.032c1.214 1.186 3.14 1.578 4.734.927 1.408-.576 2.47-1.927 2.691-3.431.272-1.856-.788-3.832-2.495-4.629a4.413 4.413 0 0 0-1.886-.411zM7.046 9.962L2.259 4.963A12.043 12.043 0 0 1 11.997 0c4.56 0 8.744 2.592 10.774 6.675H12.558c-1.811-.125-3.288.52-4.265 1.453a5.345 5.345 0 0 0-1.247 1.834z"/></svg>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
static/images/mozillafirefox.svg


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است