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

Contact us new #565

Merged
merged 6 commits into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
33 changes: 33 additions & 0 deletions src/components/Container.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from 'react'
import PropTypes from 'prop-types'

// TODO: replace all flex-box css classes with this component
const Container = ({ children, justifyContent, mobileFlexDirection }) => (
<div className="container">
{children}

<style jsx>{`
.container {
${justifyContent ? `justify-content: ${justifyContent};` : ''}

display: flex;
}

@media (max-width: 860px) {
.container {
${mobileFlexDirection
? `flex-direction: ${mobileFlexDirection};`
: ''}
}
}
`}</style>
</div>
)

Container.propTypes = {
children: PropTypes.node,
justifyContent: PropTypes.string,
mobileFlexDirection: PropTypes.string,
}

export default Container
62 changes: 62 additions & 0 deletions src/components/EmailLink.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import React from 'react'
import PropTypes from 'prop-types'
import Text from './Text'
import { c_NEON_TEAL, c_TEXT_DARK } from '../theme'

const EmailLink = ({
children,
border_color,
background,
margin_left,
mobileSize,
link,
}) => (
<div>
<a href={link}>{children}</a>

<style jsx>{`
div {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting this styling on the <div> rather than the <a> will mean there's an area inside the div that looks clickable, but isn't.

vertical-align: middle;
padding: 0.5rem 2rem;
${background ? `background-color: ${background};` : ''}
border-radius: 350px;
cursor: pointer;
width: 31vh;
max-height: 100%;
text-align: center;
border-style: solid;
color: white;
${border_color ? `border-color: ${border_color};` : ''}
font-weight:700;
${margin_left ? `margin-left: ${margin_left};` : ''}
font-size:0.9rem;
font-family: KeepCalm;
font-weight: bold;
}

div:hover {
background-color: ${c_NEON_TEAL};
border-color: ${c_NEON_TEAL};
color: ${c_TEXT_DARK};
}
@media (max-width: 860px) {
div {
width: 100%;
margin-bottom: 2rem;
${mobileSize ? `font-size: ${mobileSize};` : ''}
}
}
`}</style>
</div>
)
Text.propTypes = {
connect: PropTypes.string,
link: PropTypes.string.isRequired,
children: PropTypes.node,
border_color: PropTypes.string,
background: PropTypes.string,
margin_left: PropTypes.string,
mobileSize: PropTypes.string,
Comment on lines +53 to +59
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all of these in use?

}

export default EmailLink
2 changes: 0 additions & 2 deletions src/components/Layout/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ const Page = ({ title, children }) => (

<main role="main">{children}</main>

<VerticalSpacing size={8} />

<Footer />

<style jsx>{`
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const Layout = ({ children }) => (

p {
margin: 0;
line-height: 1.8;
line-height: 1.5;
}

p + p {
Expand Down
7 changes: 7 additions & 0 deletions src/components/contactArcs.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/components/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
229 changes: 229 additions & 0 deletions src/pages/contact-us.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
import React from 'react'

import Layout from '../components/Layout'
import ConstrainedWidth from '../components/Layout/ConstrainedWidth'

import Text from '../components/Text'

import VerticalSpacing from '../components/VerticalSpacing'
import PageMeta from '../components/PageMeta'

import Container from '../components/Container'
import Twitter from '../components/twitter.svg'
import PageTop from '../components/PageTop'
import contactArcs from '../components/contactArcs.svg'
import EmailLink from '../components/EmailLink'
const ContactUs = () => (
<Layout>
<PageMeta title="Contact us" description="Enter in suitable description" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you need to enter in a suitable description here? 😄

<PageTop>
<ConstrainedWidth>
<Text size="xlarge" color="#48e9ce">
<h1>Get in touch</h1>
</Text>

<div className="contact-header">
<Text size="normal">
<div className="subtitle">
Drop us an email. We’d love to have a conversation about how we
could work with you.
</div>
</Text>
<div className="main-arc-container">
<img src={contactArcs} height={136} width={191} />
</div>
</div>

<EmailLink
link="/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a mailto:hello?

background="#5600ee"
border_color="#5600ee"
mobileSize="0.9rem"
>
Email: [email protected]
</EmailLink>
</ConstrainedWidth>
</PageTop>
<VerticalSpacing size={5} />

<ConstrainedWidth>
<Text size="normal" color="black" maxCharacter="49ch">
Follow us on Twitter
</Text>

<div className="social-media-container">
<div className="social-media-labels">
<img src={Twitter} height={42} width={42}></img>

<Text color="#561dee" size="normal">
<h4>@neontribe</h4>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a heading? There is some good guidance on how and where to use headings in Mozilla docs - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements#usage_notes

</Text>
</div>
</div>

<Text size="normal" color="black" maxCharacter="55ch">
We share our clients work and best practice in the tech for good sector.
</Text>
</ConstrainedWidth>

<VerticalSpacing size={3} />
<div className="white-background">
<ConstrainedWidth paddingTop="3em">
<Container mobileFlexDirection="column">
<div>
<Text color="black" size="normal" maxCharacter="53ch">
We work from home as well as in the office. Please check before
you plan a visit.
</Text>
<VerticalSpacing size={3}></VerticalSpacing>
<Container justifyContent="flex-start">
<Text color="#561dee">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I am a nerd and love using all the html elements, here would be a nice place to use the <address> element, which is specifically for the purpose of indicating the address details of an person or organisation. Totally optional fun added extra, you can checkout the docs here - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address

<p>21 Colegate </p>
<p> Norwich</p>
<p>NR3 1BN </p>
</Text>

<Text paddingLeft="4rem" color="#561dee">
<p>Kaleider Studios </p>
<p> 45 Preston Street</p>
<p>Exeter</p>
<p>EX1 1DF </p>
</Text>
</Container>
</div>

<div className="answerphone-text">
<Text color="black" size="normal">
Leave a message on our answerphone if you’d like us to call you
</Text>

<VerticalSpacing size={2}></VerticalSpacing>

<Text color="#561dee">0845 689 0896</Text>
</div>
</Container>

<VerticalSpacing size={9}></VerticalSpacing>
<Text size="small" color="black">
<p>Neontribe Ltd</p>
<p>Registered in England & Wales Registration number: 06165574</p>
<p>Registered office: 106 Lincoln St. Norwich, Norfolk, NR2 3LB</p>
</Text>
</ConstrainedWidth>
</div>

<style jsx>{`
p {
line-height: 1;
}
.logo {
height: 1.5rem;
width: 100%;
}

.contact-header {
display: flex;
justify-content: space-between;
align-items: center;
}

.subtitle {
max-width: 45ch;
}

.white-background {
background-color: white;
padding-top: 3rem;
padding-bottom: 3rem;
}

.social-media-container {
width: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
}
.social-media-labels {
display: flex;
justify-content: space-between;
margin-right: 10vh;
width: 15vh;
Comment on lines +156 to +157
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using vertical height to style horizontally can have some unexpected effects, especially on large monitors.

align-items: center;
}

.button {
display: flex;
}

.main-arc-container {
display: flex;
padding-right: 6rem;
}

.contact-container {
display: flex;
padding-right: 2rem;
}

.twitter-container {
display: flex;
padding-top: 1rem;
}

.answerphone-text {
padding-left: 10rem;
max-width: 40ch;
}

@media (max-width: 860px) {
.contact-header {
flex-direction: column;
}

.answerphone-text {
padding-left: 0;
max-width: 53ch;
padding-top: 2rem;
}

.social-media-container {
width: 100%;
margin-top: 2rem;
margin-bottom: 2rem;

flex-direction: column;
align-items: start;
}

.contact-header {
align-items: start;
}

.social-media-labels {
margin-right: 0;
align-items: start;
display: block;
}

.subtitle {
max-width: 100%;
padding-top: 2rem;
}

.button {
flex-direction: column;
max-width: 100%;
}
.main-arc-container {
justify-content: center;
padding-right: 0;
margin-top: 3rem;
margin-bottom: 3rem;
width: 100%;
}
}
`}</style>
</Layout>
)

export default ContactUs