Skip to content
This repository has been archived by the owner on Sep 25, 2021. It is now read-only.

Commit

Permalink
Merge pull request #17 from mianzegregory/enhancements
Browse files Browse the repository at this point in the history
Enhancements
  • Loading branch information
mianzegregory committed Sep 15, 2021
2 parents 5140af9 + 9ba5a68 commit 8d0f7f6
Show file tree
Hide file tree
Showing 20 changed files with 400 additions and 287 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"react": "^17.0.1",
"react-burger-menu": "^3.0.6",
"react-device-detect": "^1.17.0",
"react-dom": "^17.0.1",
"react-images": "^1.2.0-beta.7",
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<!-- End robots-->

<!--Canonical => Tell google to prioritize this link-->
<link rel="canonical" href="http://twende.app/" />
<link rel="canonical" href="https://sjaoko.studio/" />
<!--End canonical-->

<!--Keywords-->
Expand Down
Binary file removed public/logo192.png
Binary file not shown.
Binary file removed public/logo512.png
Binary file not shown.
9 changes: 5 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ import Blog from "./pages/Blog";
import Portfolio from "./pages/Portfolio";
import About from "./pages/About";
import { Switch, Route, BrowserRouter as Router } from "react-router-dom";
import React, { useState, useEffect } from "react";
import { useState, useEffect } from "react";
import { Slide } from "@material-ui/core";
import Appbar from "./components/common/Appbar";
import Footer from "./components/common/Footer";
import LoadingPage from "./pages/Loading";

function App() {
const [loading, setLoading] = useState(true);

useEffect(() => {
setTimeout(() => setLoading(false), 900);
setTimeout(() => setLoading(false), 1500);
// AOS.init({
// duration: 1000,
// });
Expand All @@ -23,7 +24,7 @@ function App() {
return loading === false ? (
<Router>
<Appbar />
<Slide direction="up" in>
<Slide direction="up" in timeout={300}>
<Switch>
<Route path="/" exact component={Landing} />
<Route path="/portfolio" exact component={Portfolio} />
Expand All @@ -35,7 +36,7 @@ function App() {
</Router>
) : (
<div>
<p>Loading</p>
<LoadingPage />
</div>
);
}
Expand Down
16 changes: 12 additions & 4 deletions src/components/common/Appbar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import styled from "styled-components";
import { isMobile } from "react-device-detect";
import MobileAppbar from "../mobile/Appbar";
Expand All @@ -9,12 +8,12 @@ const Appbar = () => {
<MobileAppbar />
) : (
<Wrapper>
<Link to="/">Sharon Jaoko</Link>
<Link to="/" id="logo">SHARONJAOKO</Link>

<div className="nav_links">
<Link to="/">Home</Link>
<Link to="/portfolio">Portfolio</Link>
<Link to="/about">About</Link>
<Link to="/blog">Blog</Link>
</div>
<div></div>
</Wrapper>
Expand All @@ -39,11 +38,20 @@ const Wrapper = styled.nav`
a {
font-size: 0.9rem;
color: #000;
font-weight: 600;
font-size: 0.8rem;
line-height: 1.6;
letter-spacing: 2px;
text-decoration: none;
font-family: "Ubuntu", sans-serif;
font-family: "Open Sans", sans-serif;
margin: 0 1rem;
color: #707070;
}
#logo {
font-weight: 800 !important;
font-family: "Fira Sans", sans-serif !important;
color: #000 !important;
font-size: 1rem !important;
}
.nav_links {
display: flex;
Expand Down
1 change: 1 addition & 0 deletions src/components/common/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ const Wrapper = styled.footer`
}
@media(max-width: 500px){
flex-direction: column;
margin-bottom: 3rem;
}
`;
33 changes: 27 additions & 6 deletions src/components/common/PageWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const PageWrapper = styled.main`
}
}
@media (max-width: 1024px) {
padding: 6rem 1%;
padding: 2rem 1%;
text-align: center;
justify-content: flex-start;
h1 {
Expand All @@ -56,13 +56,34 @@ const PageWrapper = styled.main`
}
@media(max-width: 500px){
.portfolio-routing-buttons {
margin-top: 1rem;
margin-bottom: -2rem;
flex-direction: column;
justify-content: center;
width: 100vw;
position: fixed;
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
background-color: #fff;
left: 0;
bottom: 0;
z-index: 4;
box-shadow: 1px 1px 4px 0 rgba(0, 0, 0, 0.1);
padding: 1rem;
button {
margin: 0.5rem;
margin: 0.3rem;
font-size: 0.8rem;
background-color: transparent;
box-shadow: none;
margin-bottom: 2rem;
margin-top: 0;
color: #000;
padding: 0.3rem;
text-align: center;
border: none;
text-decoration: none;
display: inline-block;
font-size: 0.8rem;
font-family: "Open Sans", sans-serif;
font-weight: bold;
}
}
`;
Expand Down
140 changes: 40 additions & 100 deletions src/components/mobile/Appbar.js
Original file line number Diff line number Diff line change
@@ -1,143 +1,83 @@
import React from "react";
import { slide as Menu } from "react-burger-menu";
import styled from "styled-components";
import { Link } from "react-router-dom";

const MobileAppbar = () => {
const MobileAppbar = (props) => {
return (
<ToolbarWrapper>
<Link to="/">Sharon Jaoko</Link>
<input className="menu-btn" type="checkbox" id="menu-btn" />
<label className="menu-icon" for="menu-btn">
<span className="navicon"></span>
</label>
<ul className="menu">
<Menu {...props}>
<Link to="/">
<li>Home</li>
</Link>
<Link to="/portfolio">
<li>Portfolio</li>
</Link>
<Link to="/about">
<li>About</li>
</Link>
<Link to="/blog">
<li>Blog</li>
</Link>
</ul>
</Menu>
</ToolbarWrapper>
);
};

export default MobileAppbar;

const ToolbarWrapper = styled.header`
background-color: #fff;
box-shadow: 1px 1px 4px 0 rgba(0, 0, 0, 0.1);
const ToolbarWrapper = styled.div`
background-color: transparent;
position: fixed;
top: 0;
width: 100%;
border-radius: 100%;
margin-bottom: 3rem;
z-index: 3;
a {
font-size: 0.9rem;
color: #000;
line-height: 1.6;
letter-spacing: 2px;
text-decoration: none;
font-family: "Ubuntu", sans-serif;
margin: 0 1rem;
}
ul {
margin: 0;
padding: 0;
list-style: none;
overflow: hidden;
background-color: #fff;
}
li {
display: block;
padding: 20px 20px;
border-right: 1px solid #f4f4f4;
font-weight: 600;
font-size: 0.9rem;
font-family: "Ubuntu", sans-serif;
font-family: "Open Sans", sans-serif;
color: #000;
line-height: 1.6;
letter-spacing: 2px;
text-decoration: none;
}
/* menu */
.menu {
clear: both;
max-height: 0;
transition: max-height 0.3s ease-out;
}
/* menu icon */
.menu-icon {
cursor: pointer;
.bm-item {
display: inline-block;
float: right;
padding: 28px 20px;
position: relative;
user-select: none;
}
.menu-icon .navicon {
background: #333;
display: block;
height: 2px;
position: relative;
transition: background 0.3s ease-out;
width: 18px;
}
.menu-icon .navicon:before,
.menu-icon .navicon:after {
background: #333;
content: "";
display: block;
height: 100%;
position: absolute;
transition: all 0.3s ease-out;
width: 100%;
}
.menu-icon .navicon:before {
top: 5px;
text-decoration: none;
margin-bottom: 0.2rem;
color: #000;
transition: color 0.2s;
}
.menu-icon .navicon:after {
top: -5px;
.bm-burger-button {
position: fixed;
background: transparent;
width: 1.5rem;
height: 1.5rem;
right: 1rem;
top: 1rem;
}
/* menu btn */
.menu-btn {
display: none;
.bm-burger-bars {
background: #000;
}
.menu-btn:checked ~ .menu {
max-height: 100%;
.bm-cross-button {
height: 1px;
width: 1px;
}
.menu-btn:checked ~ .menu-icon .navicon {
background: transparent;
.bm-cross {
background: #000;
}
.menu-btn:checked ~ .menu-icon .navicon:before {
transform: rotate(-45deg);
.bm-menu {
background: #fff;
padding: 2.5em 1.5em 0;
font-size: 1.15em;
}
.menu-btn:checked ~ .menu-icon .navicon:after {
transform: rotate(45deg);
.bm-morph-shape {
fill: #000;
}
.menu-btn:checked ~ .menu-icon:not(.steps) .navicon:before,
.menu-btn:checked ~ .menu-icon:not(.steps) .navicon:after {
top: 0;
.bm-item-list {
color: #000;
}
/* 48em = 768px */
@media (min-width: 48em) {
li {
float: left;
padding: 20px 30px;
}
li a {
padding: 20px 30px;
}
.menu {
clear: none;
float: right;
max-height: none;
}
.menu-icon {
display: none;
}
.bm-overlay {
background: #000;
}
`;
49 changes: 0 additions & 49 deletions src/data.json

This file was deleted.

Loading

0 comments on commit 8d0f7f6

Please sign in to comment.