Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: small text modifications on customer page #190

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9d37122
updated dependencies
klaradj Nov 17, 2023
d492402
fixed warning [WIP]
klaradj Nov 17, 2023
9b5de5b
fixed warnings
klaradj Nov 17, 2023
13907a0
fixed logo placeholder background
klaradj Nov 17, 2023
552edb6
specified node version
klaradj Nov 17, 2023
22824f1
fix: image width
klaradj Jan 4, 2024
292c3cc
Merge branch 'master' of github.com:Etimo/homepage into kd/update-nod…
klaradj Jan 5, 2024
610f1d7
removed unused code and use gatsbyImage
klaradj Jan 5, 2024
1e2d838
fix: span text color
klaradj Jan 5, 2024
bc31a38
removed primary and secondary props for span and caption
klaradj Jan 5, 2024
74e7436
cleanup
klaradj Jan 5, 2024
b8b8555
updated docker to node 20
klaradj Jan 5, 2024
4083539
Merge branch 'master' of github.com:Etimo/homepage into kd/update-nod…
klaradj Jan 5, 2024
c029529
added node version file
klaradj Jan 5, 2024
0d6f8d7
fixed caption text color
klaradj Jan 5, 2024
15b7c4c
fix: side navigation animation
klaradj Jan 9, 2024
71ba655
cleanup
klaradj Jan 9, 2024
1715716
use dashedP component and animations only once
klaradj Jan 12, 2024
1545af0
setting default screen breakpoints
klaradj Jan 15, 2024
435fa83
fixed transient prop
klaradj Jan 15, 2024
6d59f94
moved dash outside of p to make multilined dashed p look better
klaradj Jan 15, 2024
c63df08
fixed warnings
klaradj Jan 15, 2024
b6460cd
fixed undefined in className
klaradj Jan 15, 2024
91bf9e5
use gatsby head instead of deprecated gatsby-plugin-react-helmet
klaradj Jan 15, 2024
00fe315
fixed space above h2
klaradj Jan 15, 2024
5491125
added linkedin icon and made icons to a component
klaradj Jan 16, 2024
fcb5b5e
small text modifications on customer page
klaradj Jan 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12 AS build
FROM node:20 AS build
WORKDIR /app
COPY package*.json ./
RUN yarn
Expand Down
8 changes: 0 additions & 8 deletions gatsby-browser.js

This file was deleted.

16 changes: 3 additions & 13 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ module.exports = {
path: `${__dirname}/src/images`,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
// TODO: Figure out exactly what this does
resolve: `gatsby-plugin-manifest`,
options: {
name: `gatsby-starter-default`,
Expand All @@ -41,7 +38,6 @@ module.exports = {
icon: `src/images/etimofavicon.png`, // This path is relative to the root of the site.
},
},
`gatsby-plugin-react-helmet`,
`gatsby-plugin-remove-serviceworker`,
`gatsby-plugin-styled-components`,
`gatsby-plugin-sitemap`,
Expand All @@ -61,16 +57,10 @@ module.exports = {
},
},
},
{
resolve: 'gatsby-plugin-google-analytics',
options: {
trackingId: 'UA-47276360-1',
head: true,
},
},
`gatsby-plugin-netlify-cms`,
'gatsby-plugin-ts-checker',
// ! Add gatsby-plugin-google-analytics
// TODO: Maybe add gatsby-plugin-sitemap for better search-engine results
`gatsby-plugin-image`,
`gatsby-plugin-sharp`,
`gatsby-transformer-sharp`,
],
};
89 changes: 46 additions & 43 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,63 +1,66 @@
{
"name": "@etimo/homepage",
"private": true,
"description": "Etimos homapage, a Gatsby site.",
"description": "Etimos homepage, a Gatsby site.",
"version": "0.1.0",
"author": "Lukas Lindqvist <[email protected]>",
"engines": {
"node": ">=20.0.0"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.28",
"@fortawesome/free-brands-svg-icons": "^5.13.0",
"@fortawesome/free-solid-svg-icons": "^5.13.0",
"@fortawesome/react-fontawesome": "^0.1.9",
"@material-ui/core": "^4.9.11",
"@material-ui/icons": "^4.9.1",
"@n8tb1t/use-scroll-position": "^1.0.43",
"babel-plugin-styled-components": "^1.10.2",
"framer-motion": "^1.10.3",
"gatsby": "^2.25.0",
"gatsby-cli": "^2.11.8",
"gatsby-image": "^2.3.2",
"@fortawesome/fontawesome-svg-core": "^6.4.2",
"@fortawesome/free-brands-svg-icons": "^6.4.2",
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@fortawesome/react-fontawesome": "^0.2.0",
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@n8tb1t/use-scroll-position": "^2.0.3",
"babel-plugin-styled-components": "^2.1.4",
"framer-motion": "^10.16.5",
"gatsby": "^5.12.9",
"gatsby-cli": "^5.12.4",
"gatsby-plugin-google-analytics": "^2.4.0",
"gatsby-plugin-manifest": "^2.3.3",
"gatsby-plugin-netlify-cms": "^4.9.0",
"gatsby-plugin-postcss": "^2.2.3",
"gatsby-plugin-react-helmet": "^3.2.2",
"gatsby-plugin-react-svg": "^3.0.0",
"gatsby-plugin-image": "^3.12.3",
"gatsby-plugin-manifest": "^5.12.3",
"gatsby-plugin-netlify-cms": "^7.12.0",
"gatsby-plugin-postcss": "^6.12.0",
"gatsby-plugin-react-svg": "^3.3.0",
"gatsby-plugin-remove-serviceworker": "^1.0.0",
"gatsby-plugin-sharp": "^2.5.4",
"gatsby-plugin-sitemap": "^2.5.0",
"gatsby-plugin-styled-components": "^3.3.4",
"gatsby-plugin-ts-checker": "^1.1.0",
"gatsby-plugin-typescript": "^2.3.1",
"gatsby-plugin-sharp": "^5.12.3",
"gatsby-plugin-sitemap": "^6.12.3",
"gatsby-plugin-styled-components": "^6.12.0",
"gatsby-plugin-web-font-loader": "^1.0.4",
"gatsby-source-filesystem": "^2.2.2",
"gatsby-transformer-sharp": "^2.4.4",
"gatsby-source-filesystem": "^5.12.1",
"gatsby-transformer-sharp": "^5.12.3",
"global": "^4.4.0",
"netlify-cms-app": "^2.14.14",
"prop-types": "^15.7.2",
"react": "^16.13.1",
"netlify-cms-app": "^2.15.72",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-animations": "^1.0.0",
"react-dom": "^16.13.1",
"react-helmet": "^6.0.0",
"react-intersection-observer": "^8.26.1",
"react-pose": "^4.0.8",
"react-dom": "^18.2.0",
"react-intersection-observer": "^9.5.3",
"react-pose": "^4.0.10",
"react-pose-text": "^3.1.0",
"react-reveal": "^1.2.2",
"react-scroll": "^1.7.14",
"react-use": "^14.1.1",
"styled-components": "^5.1.1",
"twin.macro": "^1.4.1"
"react-scroll": "^1.9.0",
"react-use": "^17.4.0",
"sharp": "^0.32.6",
"styled-components": "^6.1.1",
"twin.macro": "^3.4.0"
},
"devDependencies": {
"@types/node": "^13.11.1",
"@types/react": "^16.9.34",
"@types/react-dom": "^16.9.6",
"@types/react-helmet": "^5.0.15",
"@types/node": "^20.9.0",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@types/react-scroll": "^1.8.10",
"@types/styled-components": "^5.1.0",
"@types/styled-components": "^5.1.30",
"autoprefixer": "^10.4.16",
"gatsby-plugin-ts-checker": "^1.1.0",
"gatsby-plugin-typescript": "^5.12.1",
"postcss": "^8.4.31",
"prettier": "^2.0.4",
"tailwindcss": "^1.3.4",
"typescript": "^3.8.3"
"tailwindcss": "^3.3.5",
"typescript": "^5.2.2"
},
"keywords": [
"gatsby"
Expand Down
24 changes: 7 additions & 17 deletions src/animations/FadeIn.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
import { motion } from 'framer-motion';
import React, { useEffect, useState } from 'react';
import { useInView } from 'react-intersection-observer';
import styled from 'styled-components';
import Box, { BoxProps } from '../elements/Box';

type FadeInDirection = 'left' | 'right';

type StyleProps = {
full?: boolean;
};

type Props = {
children: React.ReactNode;
direction: FadeInDirection;
} & StyleProps;

const MotionBox = motion.custom(styled(Box)<StyleProps>`
height: ${({ full }) => full && '100%'};
width: ${({ full }) => full && '100%'};
`);
className?: string;
};

export default ({ full, children, direction, ...props }: Props & BoxProps) => {
export default ({ children, direction, ...props }: Props) => {
const [entered, setEntered] = useState(false);
const [ref, inView] = useInView();
const [ref, inView] = useInView({ triggerOnce: true });
const xDir = direction === 'left' ? '-20%' : '20%';

useEffect(() => {
Expand All @@ -32,8 +22,8 @@ export default ({ full, children, direction, ...props }: Props & BoxProps) => {
}, [inView, entered]);

return (
<MotionBox
full={full}
<motion.div
className="h-full w-full"
{...props}
ref={ref}
animate={entered ? 'enter' : 'exit'}
Expand All @@ -47,6 +37,6 @@ export default ({ full, children, direction, ...props }: Props & BoxProps) => {
}}
>
{children}
</MotionBox>
</motion.div>
);
};
12 changes: 6 additions & 6 deletions src/animations/FadeInOld.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import posed from 'react-pose';
const FadeInAnimation = ({ children, delay, duration, ...props }) => {
const FadeIn = posed.div({
hidden: {
opacity: 0
opacity: 0,
},
visible: {
opacity: 1,
delay,
transition: {
duration
}
}
duration,
},
},
});

return (
Expand All @@ -25,13 +25,13 @@ const FadeInAnimation = ({ children, delay, duration, ...props }) => {

FadeInAnimation.defaultProps = {
delay: 0,
duration: 1000
duration: 1000,
};

FadeInAnimation.propTypes = {
children: propTypes.element.isRequired,
delay: propTypes.number,
duration: propTypes.number
duration: propTypes.number,
};

export default FadeInAnimation;
2 changes: 1 addition & 1 deletion src/animations/FloatInDir.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Props = {
};

export default ({ children, direction, delay, ...props }: Props) => {
const [ref, inView] = useInView();
const [ref, inView] = useInView({ triggerOnce: true });

let xDir = '0',
yDir = '0';
Expand Down
4 changes: 2 additions & 2 deletions src/animations/FloatUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ type Props = {
};

export default ({ children, className, ...props }: Props) => {
const [ref, inView] = useInView();
const [ref, inView] = useInView({ triggerOnce: true });
const [_, width] = useViewportSize();

return (
<motion.div
className={className + ' overflow-hidden'}
className={className ?? '' + ' overflow-hidden'}
{...props}
ref={ref}
initial={{
Expand Down
5 changes: 2 additions & 3 deletions src/components/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import styled from 'styled-components';
import tw from 'twin.macro';
import FadeIn from '../animations/FadeIn';
import Caption from '../elements/Caption';
import H2 from '../elements/H2';
import P from '../elements/P';
import Span from '../elements/Span';
import { sizes } from '../helpers';
Expand Down Expand Up @@ -33,12 +32,12 @@ const About = () => {
<Section style={{ backgroundColor: '#FFFFFF' }}>
<div className="flex container flex-col md:flex-row px-8 lg:px-32">
<div className="md:w-1/2">
<FadeIn direction="left" flex flexDirection="column">
<FadeIn direction="left" className="flex flex-col">
<Caption className="text-center lg:text-left">
Välkommen till Etimo!
</Caption>
<EmphasizedH2>
<Span secondary>Passion</Span> för teknik, <br />
<Span>Passion</Span> för teknik, <br />
kundvärde och <br />
samhällsnytta
</EmphasizedH2>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Career/Apply.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const Apply = (props: Props) => {
<P>{variant.text}</P>
<P>
{variant.emailText}{' '}
<Span secondary>
<Span>
<a href={`mailto:${variant.email}`} target="_blank">
{variant.email}
</a>
Expand Down
5 changes: 3 additions & 2 deletions src/components/Career/WhoAreYou.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import { FadeIn, FloatUp } from '../../animations';
import { AnimatedH2, Caption, DashedP, H3, P, Span } from '../../elements';
import { AnimatedH2, Caption, H3, P, Span } from '../../elements';
import Section from '../Section';
import DashedP from '../DashedP';

const thriveTexts = [
'Du har en stark vilja att ständigt lära mer och utvecklas i din yrkesroll',
Expand All @@ -25,7 +26,7 @@ const WhoAreYou = () => {
</FloatUp>
<div className="flex flex-col md:flex-row justify-center">
<AnimatedH2 direction="left">
Är <Span secondary>du</Span> vår&nbsp;
Är <Span>du</Span> vår&nbsp;
</AnimatedH2>
<AnimatedH2 direction="right">nästa kollega?</AnimatedH2>
</div>
Expand Down
11 changes: 5 additions & 6 deletions src/components/Career/WorkingHere.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import { FloatUp } from '../../animations';
import { Caption, DashedP, H2, Span } from '../../elements';
import { Caption, H2, Span } from '../../elements';
import Section from '../Section';
import DashedP from '../DashedP';

const bulletPoints = [
'Du är vår viktigaste resurs och du väljer själv dina uppdrag, har möjlighet att påverka vilka kunder du vill jobba med och har ansvar och förtroende för hur din vardag ser ut',
Expand All @@ -24,17 +25,15 @@ const WorkingHere = () => {
<Caption>Jobbet</Caption>
<H2 className="mb-4 md:mb-6 mt-2 md:mt-4">
Att jobba på <br />
<Span secondary>Etimo</Span>
<Span>Etimo</Span>
</H2>
</FloatUp>
</div>
<div className="w-11/12 md:w-2/3 mx-auto overflow-hidden">
{bulletPoints.map((bulletText) => {
return (
<FloatUp>
<DashedP className="mt-2" key={bulletText}>
{bulletText}
</DashedP>
<FloatUp key={bulletText}>
<DashedP className="mt-2">{bulletText}</DashedP>
</FloatUp>
);
})}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const Carousel = ({ items }: Props) => {
useInterval(() => setPage((page + 1) % items.length), 12000);

return (
<AnimatePresence exitBeforeEnter initial={false}>
<AnimatePresence mode="wait" initial={false}>
<Item
key={page}
variants={variants}
Expand Down
Loading