Skip to content

Commit e5b373f

Browse files
authored
Merge pull request #1 from TypeTech/footer-refactor
Refactor to accessibility and SEO
2 parents 14fb454 + c7814ca commit e5b373f

40 files changed

+954
-384
lines changed

gatsby-config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module.exports = {
44
description: `We are TypeTech, a group of devs dedicated to Open Sourcing and freelancing software with cutting edge technologies`,
55
author: `@typetech`,
66
location: `Currently outsourcing only in the Americas 🌎`,
7+
siteUrl: "https://typetech.vercel.app",
78
},
89
plugins: [
910
`gatsby-plugin-react-helmet`,
@@ -19,8 +20,8 @@ module.exports = {
1920
{
2021
resolve: `gatsby-plugin-manifest`,
2122
options: {
22-
name: `gatsby-starter-default`,
23-
short_name: `starter`,
23+
name: `typetech-website`,
24+
short_name: `typetech`,
2425
start_url: `/`,
2526
background_color: `#039be5`,
2627
theme_color: `#039be5`,
@@ -39,6 +40,7 @@ module.exports = {
3940
],
4041
},
4142
},
43+
`gatsby-plugin-robots-txt`,
4244
// this (optional) plugin enables Progressive Web App + Offline functionality
4345
// To learn more, visit: https://gatsby.dev/offline
4446
// `gatsby-plugin-offline`,

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"gatsby-plugin-offline": "^3.2.7",
1818
"gatsby-plugin-prefetch-google-fonts": "^1.4.3",
1919
"gatsby-plugin-react-helmet": "^3.3.2",
20+
"gatsby-plugin-robots-txt": "^1.5.3",
2021
"gatsby-plugin-sharp": "^2.6.9",
2122
"gatsby-source-filesystem": "^2.3.8",
2223
"gatsby-transformer-sharp": "^2.5.3",

src/components/Layout/footer.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
import React from "react"
22
import PropTypes from "prop-types"
33
import Logomain from "../logomain"
4+
import "../../styles/footer.css"
45

56

67
const Footer = ({ siteTitle }) => {
78
return (
89
<>
9-
<footer>
10-
<div className="container-footer-all">
11-
<div className="container-body">
12-
<div className="column1">
13-
<Logomain />
14-
{siteTitle}
15-
</div>
16-
</div>
17-
</div>
10+
<footer className="Footer-Container">
11+
1812
<div className="container-footer">
1913
<div className="footer">
2014
<div className="copyright">2020 TypeTech | All rights reserved</div>

src/components/Layout/header.js

Lines changed: 48 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import React, { useContext, Fragment } from "react"
33
import Logomain from "../logomain"
44
import styled from "@emotion/styled"
55
import { ModeContext } from "../../context/ModeContext"
6+
import "../../styles/header.css"
67

78
const WrapperDiv = styled.div`
89
position: sticky;
@@ -12,14 +13,6 @@ const WrapperDiv = styled.div`
1213
z-index: 10;
1314
`
1415

15-
const Head = styled.header`
16-
background-color: var(--xstyled-colors-bg, #292929);
17-
border-bottom-width: 1px;
18-
border-bottom-style: solid;
19-
border-color: var(--xstyled-colors-border, #1976d2);
20-
padding: 16px 0px;
21-
`
22-
2316
const InsideDiv = styled.div`
2417
max-width: 1200px;
2518
padding-left: 20px;
@@ -43,26 +36,14 @@ const LogoContainer = styled.div`
4336
margin-right: 16px;
4437
`
4538

46-
const SVG = styled.svg`
47-
fill: #ffffff;
48-
transition:fill 0.15s ease;
49-
&:hover {
50-
fill:#039be5;
51-
cursor: pointer;
52-
}
53-
@media screen and (max-width: 600px) {
54-
margin-right: 40px;
55-
width: 30px;
56-
}
57-
`
5839
const Title = styled.h2`
5940
display: block;
6041
font-weight: 900;
6142
font-size: 20px;
6243
line-height: 0.9;
6344
margin: 0px 0px 0px 10px;
64-
color: #1476a2;
65-
animation: logotextanimation 2s alternate infinite;
45+
color: #007bb7;
46+
6647
`
6748

6849
const MainLink = styled.a`
@@ -75,36 +56,6 @@ const MainLink = styled.a`
7556
text-decoration: none;
7657
`
7758

78-
const ComboLanguage = styled.select`
79-
font-size: 17px;
80-
font: inherit;
81-
outline: none;
82-
-webkit-appearance: none;
83-
-moz-appearance: none;
84-
appearance: none;
85-
line-height: -4vh;
86-
text-rendering: auto;
87-
width: 100%;
88-
border-radius: 0.5rem;
89-
border: 2px solid #5a5a5a;
90-
background: #333;
91-
color: white;
92-
padding-left: 40px;
93-
padding-right: 20px;
94-
padding-bottom:8px;
95-
padding-top:8px;
96-
transition: border-color 0.15s ease;
97-
cursor: pointer;
98-
99-
&:focus {
100-
border: 2px solid #039be5;
101-
}
102-
103-
@media (max-width: 700px) {
104-
display: none;
105-
}
106-
`
107-
10859
const NavList = styled.nav`
10960
height: 40px;
11061
margin-left: 10px;
@@ -133,41 +84,10 @@ const NavItems = styled.li`
13384
line-height: 1.2;
13485
`
13586

136-
const NavLinks = styled.a`
137-
appearance: none;
138-
color: #fff;
139-
display: flex;
140-
padding: 0px 10px;
141-
background-color: transparent;
142-
border: 0px;
143-
transition: color 300ms ease 0s;
144-
cursor: pointer;
145-
text-decoration: none;
146-
147-
&:hover {
148-
color: #039be5;
149-
text-decoration: none;
150-
}
151-
`
152-
15387
const SmallContainer = styled.div`
15488
overflow: auto;
15589
`
15690

157-
const SvG = styled.svg`
158-
position: absolute;
159-
left: 8px;
160-
top: 8px;
161-
z-index: 1;
162-
user-select: none;
163-
pointer-events: none;
164-
fill: white;
165-
166-
@media (max-width: 700px) {
167-
display: none;
168-
}
169-
`
170-
17191
const ButtonSwitch = styled.button`
17292
appearance: none;
17393
display: flex;
@@ -180,13 +100,12 @@ const ButtonSwitch = styled.button`
180100
`
181101

182102
const Header = ({ siteTitle }) => {
183-
184-
const { mode, setMode } = useContext(ModeContext);
185-
103+
const { mode, setMode } = useContext(ModeContext)
104+
186105
return (
187106
<Fragment>
188107
<WrapperDiv>
189-
<Head>
108+
<header className={mode ? "Main-Header-Dark" : "Main-Header"}>
190109
<InsideDiv>
191110
<InsideInsideDiv>
192111
<LogoContainer>
@@ -216,49 +135,79 @@ const Header = ({ siteTitle }) => {
216135
position: "relative",
217136
}}
218137
>
219-
<SvG
138+
<svg
220139
xmlns="http://www.w3.org/2000/svg"
221140
width="24"
222141
height="24"
223142
viewBox="0 0 24 24"
143+
className={mode ? "svg-icon-dark" : "svg-icon-light"}
224144
>
225145
<path d="M21 21h-1.713l-.658-1.846h-3l-.663 1.846h-1.659l3.04-8h1.603l3.05 8zm-2.814-3.12l-1.049-3.018-1.054 3.018h2.103zm2.814-5.88c.552 0 1 .449 1 1v8c0 .551-.448 1-1 1h-8c-.552 0-1-.449-1-1v-8c0-.551.448-1 1-1h8zm0-2h-8c-1.656 0-3 1.343-3 3v8c0 1.657 1.344 3 3 3h8c1.657 0 3-1.343 3-3v-8c0-1.657-1.343-3-3-3zm-15.855-2.114c.039.58.103 1.115.195 1.593-1.225.224-1.275-.984-.195-1.593zm8.855-4.886v5h-1c-.742 0-1.441.173-2.076.465-.195-.806-.783-1.53-1.68-1.964.078-.298.123-.522.167-.744l-1.35-.261c-.022.112-.063.327-.135.613-.455-.067-.94-.075-1.431-.026.011-.329.032-.653.06-.963h1.508v-1.278h-1.327c.065-.326.121-.521.176-.705l-1.316-.396c-.098.323-.178.64-.26 1.101h-1.504v1.278h1.341c-.036.414-.058.842-.064 1.275-1.48.544-2.109 1.581-2.109 2.521 0 1.11.876 2.086 2.261 1.96 1.72-.156 2.868-1.456 3.542-3.053.885.536.838 1.161.772 1.552-.965.913-1.575 2.196-1.575 3.625v1h-5c-1.656 0-3-1.343-3-3v-8c0-1.657 1.344-3 3-3h8c1.657 0 3 1.343 3 3zm-7.5 4.467c.328-.042.658-.05.97-.026-.214.476-.497.948-.857 1.319-.054-.396-.092-.83-.113-1.293z" />
226-
</SvG>
227-
<ComboLanguage>
146+
</svg>
147+
<label htmlFor="Language" hidden={true}>
148+
Change your language
149+
</label>
150+
<select name="Language" className={mode ? "Combo-Dark" : "Combo-light"}>
228151
<option>English</option>
229152
<option>Spanish</option>
230-
</ComboLanguage>
153+
</select>
231154
</div>
232155
</div>
233156
<SmallContainer>
234157
<NavList>
235158
<NavInnerList>
236159
<NavItems>
237-
<NavLinks href="/#!">Pricing</NavLinks>
160+
<a
161+
className={
162+
mode ? "NavLink-Element-Dark" : "NavLink-Element"
163+
}
164+
href="/#!"
165+
>
166+
Pricing
167+
</a>
168+
</NavItems>
169+
<NavItems>
170+
<a
171+
className={
172+
mode ? "NavLink-Element-Dark" : "NavLink-Element"
173+
}
174+
href="/#contact_section"
175+
>
176+
Contact us
177+
</a>
238178
</NavItems>
239179
<NavItems>
240-
<NavLinks href="/#contact_section">Contact us</NavLinks>
180+
<a
181+
className={
182+
mode ? "NavLink-Element-Dark" : "NavLink-Element"
183+
}
184+
href="/#!"
185+
>
186+
Blog
187+
</a>
241188
</NavItems>
242189
<NavItems>
243-
<ButtonSwitch onClick={() => setMode(!mode)}>
190+
<ButtonSwitch onClick={() => setMode(!mode)} name="Switch mode" aria-hidden="true">
244191
{!mode ? (
245-
<SVG
192+
<svg
246193
xmlns="http://www.w3.org/2000/svg"
247194
width="24"
248195
height="24"
249196
viewBox="0 0 24 24"
197+
className="svg-moon"
250198
>
251199
<path d="M22 12c0 5.514-4.486 10-10 10-4.826 0-8.864-3.436-9.797-7.99 3.573.142 6.903-1.818 8.644-5.013 1.202-2.206 1.473-4.679.83-6.992 5.608-.194 10.323 4.338 10.323 9.995zm-10-12c-1.109 0-2.178.162-3.197.444 3.826 5.933-2.026 13.496-8.781 11.128l-.022.428c0 6.627 5.373 12 12 12s12-5.373 12-12-5.373-12-12-12z" />
252-
</SVG>
200+
</svg>
253201
) : (
254-
<SVG
202+
<svg
255203
xmlns="http://www.w3.org/2000/svg"
256204
width="24"
257205
height="24"
258206
viewBox="0 0 24 24"
207+
className="svg-sun"
259208
>
260209
<path d="M4.069 13h-4.069v-2h4.069c-.041.328-.069.661-.069 1s.028.672.069 1zm3.034-7.312l-2.881-2.881-1.414 1.414 2.881 2.881c.411-.529.885-1.003 1.414-1.414zm11.209 1.414l2.881-2.881-1.414-1.414-2.881 2.881c.528.411 1.002.886 1.414 1.414zm-6.312-3.102c.339 0 .672.028 1 .069v-4.069h-2v4.069c.328-.041.661-.069 1-.069zm0 16c-.339 0-.672-.028-1-.069v4.069h2v-4.069c-.328.041-.661.069-1 .069zm7.931-9c.041.328.069.661.069 1s-.028.672-.069 1h4.069v-2h-4.069zm-3.033 7.312l2.88 2.88 1.415-1.414-2.88-2.88c-.412.528-.886 1.002-1.415 1.414zm-11.21-1.415l-2.88 2.88 1.414 1.414 2.88-2.88c-.528-.411-1.003-.885-1.414-1.414zm2.312-4.897c0 2.206 1.794 4 4 4s4-1.794 4-4-1.794-4-4-4-4 1.794-4 4zm10 0c0 3.314-2.686 6-6 6s-6-2.686-6-6 2.686-6 6-6 6 2.686 6 6z" />
261-
</SVG>
210+
</svg>
262211
)}
263212
</ButtonSwitch>
264213
</NavItems>
@@ -267,7 +216,7 @@ const Header = ({ siteTitle }) => {
267216
</SmallContainer>
268217
</InsideInsideDiv>
269218
</InsideDiv>
270-
</Head>
219+
</header>
271220
</WrapperDiv>
272221
</Fragment>
273222
)

src/components/Reusable/SpanP.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import styled from '@emotion/styled'
22

33
const SpanP=styled.span`
4-
color: #039BE5;
4+
color: #007bb7;
55
`;
66

77
export default SpanP;

src/components/Stack/CardComponent.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ const Card = ({ image, title, description }) => {
77
return (
88
<div>
99
<div className="courses-container">
10-
<div className={mode ? "stacklogo-dark" : "stacklogo"}>
11-
<div className={mode ? "course-preview-dark" : "course-preview"}>
10+
<div className={mode ? "stacklogo-dark" : "stacklogo-light"}>
11+
<div className={mode ? "card-preview-dark" : "card-preview"}>
1212
<img
1313
src={image}
1414
alt={title}
15-
className={mode ? "logo-dark" : "logo"}
15+
className="logo-dark"
1616
/>
1717
</div>
18-
<div className="course-info">
18+
<div className="card-info">
1919
<h2>{title}</h2>
2020
<p>{description}</p>
2121
</div>
2222
</div>
2323
</div>
24-
<div className="courses-separate">
25-
<div className={mode ? "course-preview-dark" : "course-preview-dark"}>
24+
<div className="cards-separate">
25+
<div className={mode ? "card-preview-dark" : "card-preview-dark"}>
2626
<img
2727
src={image}
2828
alt={title}

0 commit comments

Comments
 (0)