From 6469d1bcfadfcac54ff1806c75ae8dc6e65f535d Mon Sep 17 00:00:00 2001 From: Moris Zen Date: Fri, 6 Jul 2018 17:33:36 +0200 Subject: [PATCH] Restructuring components and styling --- src/components/Button.js | 2 +- src/components/Header.css | 15 ++++++++ src/components/PageIntro.js | 41 +++++++++++++++++++++ src/components/SideMenu.css | 15 -------- src/components/SideMenu.js | 8 ++--- src/layouts/index.js | 2 +- src/pages/index.js | 50 +++++--------------------- src/styles/{custom.css => general.css} | 0 8 files changed, 71 insertions(+), 62 deletions(-) create mode 100644 src/components/PageIntro.js rename src/styles/{custom.css => general.css} (100%) diff --git a/src/components/Button.js b/src/components/Button.js index bb0b9bd..3ea783d 100644 --- a/src/components/Button.js +++ b/src/components/Button.js @@ -2,7 +2,7 @@ import React from 'react' import Link from 'gatsby-link' let defaultClasses = - 'px-6 py-2 leading-none inline-block text-sm no-underline uppercase' + 'px-8 py-3 leading-none inline-block text-sm no-underline uppercase' let standardBtn = 'border hover:bg-teal hover:text-white hover:border-teal' diff --git a/src/components/Header.css b/src/components/Header.css index 72eefb2..5b1b41a 100644 --- a/src/components/Header.css +++ b/src/components/Header.css @@ -46,3 +46,18 @@ -webkit-transform-origin: 15% 95%; transform-origin: 15% 95%; } + +.panel:before { + content: ''; + background-color: rgba(0, 0, 0, 0); + transition: background-color 0.5s ease-in-out; +} + +.panel-open:before { + position: absolute; + top: 0; + bottom: 0; + width: 100%; + background-color: rgba(0, 0, 0, 0.5); + z-index: 99; +} diff --git a/src/components/PageIntro.js b/src/components/PageIntro.js new file mode 100644 index 0000000..aac3197 --- /dev/null +++ b/src/components/PageIntro.js @@ -0,0 +1,41 @@ +import React from 'react' + +import SectionIntro from './SectionIntro' +import Button from './Button' + +const PageIntro = ({ ...props }) => ( +
+
+
+ +
+ Software Development Agency +
+ + bg-saburly-white + + +
+) + +export default PageIntro diff --git a/src/components/SideMenu.css b/src/components/SideMenu.css index 6b7f4b7..94e087c 100644 --- a/src/components/SideMenu.css +++ b/src/components/SideMenu.css @@ -36,18 +36,3 @@ .slideout-open .slideout-menu { display: block; } - -.panel:before { - content: ''; - background-color: rgba(0, 0, 0, 0); - transition: background-color 0.5s ease-in-out; -} - -.panel-open:before { - position: absolute; - top: 0; - bottom: 0; - width: 100%; - background-color: rgba(0, 0, 0, 0.5); - z-index: 99; -} diff --git a/src/components/SideMenu.js b/src/components/SideMenu.js index fb1206a..8f2ec8f 100644 --- a/src/components/SideMenu.js +++ b/src/components/SideMenu.js @@ -50,22 +50,22 @@ class SideMenu extends Component { > X - +
  • Home
  • - +
  • What We Do
  • - +
  • Team
  • - +
  • Blog
  • diff --git a/src/layouts/index.js b/src/layouts/index.js index 1a98bc0..4249d98 100644 --- a/src/layouts/index.js +++ b/src/layouts/index.js @@ -6,7 +6,7 @@ import Header from '../components/Header' import Footer from '../components/Footer' import SideMenu from '../components/SideMenu' import '../styles/index.css' -import '../styles/custom.css' +import '../styles/general.css' const Layout = ({ children, data }) => (
    diff --git a/src/pages/index.js b/src/pages/index.js index 49829f4..f58a784 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -5,6 +5,7 @@ import InfoBox from '../components/InfoBox' import Button from '../components/Button' import Card from '../components/Card' import Service from '../components/Service' +import PageIntro from '../components/PageIntro' import ImgIntro from '../images/software-consulting.svg' import ImgDesign from '../images/ux-ui-design-agency.svg' @@ -17,42 +18,10 @@ import LogoCoor from '../images/logo-coor-color.svg' const IndexPage = ({ ...props }) => (
    -
    -
    -
    - -
    - Software Development Agency -
    - - bg-saburly-white - - -
    + -
    +
    ( text="We develop for both iOS and Android. For iOS we use Swift and Objective-C. Android applications are built in Java and Kotlin. We also enjoy working with React Native technology because it allows writing native apps for both platform at once" /> -
    +
    -
    +
    -
    +
    ( filled text="Get a free proposal" url="/proposal" - classes="shadow-md hover:shadow-lg rounded-full mt-4 font-light btn-saburly-green mb-20" + classes="shadow-md hover:shadow-lg rounded-full mt-4 font-light btn-saburly-green" />
    -
    +
    -
    +
    {props.data.allWordpressPost.edges.map(({ node }) => (