Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
Merge pull request #237 from oneleif/develop
Browse files Browse the repository at this point in the history
1.0.0 09-09-2020
  • Loading branch information
will-nemo authored Sep 10, 2020
2 parents 9ed5dae + cffef66 commit c07c85b
Show file tree
Hide file tree
Showing 20 changed files with 397 additions and 173 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,19 @@ workflows:
filters:
branches:
only:
- develop-v1
- develop
- master
- deploy:
name: deploy_develop_v1
name: deploy_develop
bucket_url: S3_BUCKET_URL_DEV
context: oneleif-aws
requires:
- build
filters:
branches:
only: develop-v1
only: develop
- deploy:
name: deploy_propuction
name: deploy_production
bucket_url: S3_BUCKET_URL_PROD
context: oneleif-aws
requires:
Expand Down
21 changes: 21 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"react-dom": "^16.10.2",
"react-ga": "^2.7.0",
"react-hamburger-menu": "^1.2.1",
"react-helmet": "^6.1.0",
"react-icons": "^3.8.0",
"react-responsive": "^8.1.0",
"react-router-dom": "^5.1.2",
Expand Down
8 changes: 8 additions & 0 deletions src/OlWebsiteApp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import ScrollToTop from './components/ScrollToTop';
import Toolbar from './components/Toolbar/Toolbar';
import { UserProvider } from './contexts/UserContext';
import './style-sheets/main.scss';
import ReactHelmetWrapper from './components/ReactHelmetWrapper';

import LinkPreviewImage from './assets/LinkPreview/ol-socialCard_1.png';

export default function OlWebsiteApp() {
const history = createBrowserHistory();
Expand All @@ -32,6 +35,11 @@ export default function OlWebsiteApp() {
return (
<UserProvider>
<div className='app'>
<ReactHelmetWrapper
title='oneleif Website'
description='Grow and create together.'
image={LinkPreviewImage}
/>
<Router basename={process.env.PUBLIC_URL} history={history}>
<Toolbar />
<ScrollToTop>
Expand Down
Binary file added src/assets/LinkPreview/ol-socialCard_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/components/FeatureContainer/FeatureContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import React from "react";
* Invert being false has the text on the left, true it is positioned on the
*
*/
export default function FeatureContainer({ children, image, invert }) {
export default function FeatureContainer({ children, image, invert, className = '' }) {
/************************************
* Render
************************************/

return (
<div className={'feature-container ' + (invert ? 'inverted' : 'normal')}>
<div>
<div className={`feature-container ${invert ? 'inverted' : 'normal'}`}>
<div className={className}>
{children}
</div>
<div className="feature-image-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ describe('Feature Container Tests', () => {
<div
class="feature-container normal"
>
<div>
<div
class=""
>
<p>
${TEST}
</p>
Expand All @@ -54,7 +56,9 @@ describe('Feature Container Tests', () => {
<div
class="feature-container inverted"
>
<div>
<div
class=""
>
<p>
${TEST}
</p>
Expand Down
37 changes: 37 additions & 0 deletions src/components/ReactHelmetWrapper/ReactHelmetWrapper.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';

import { Helmet } from 'react-helmet';

export default function ReactHelmetWrapper({ title, description, image, path }) {
/************************************
* Render
************************************/

return (
<Helmet titleTemplate='%s | oneleif' defaultTitle='oneleif Website' defer={false}>
<title itemProp='name' lang='en'>
{title}
</title>
<base target='_blank' href='https://oneleif.com/' />
<meta name='description' content={description} />
<meta name='robots' content='max-snippet:-1, max-image-preview:large, max-video-preview:-1' />
<link rel='canonical' href={`https://oneleif.com${path}`} />
<meta property='og:locale' content='en_US' />
<meta property='og:type' content='website' />
<meta property='og:title' content={title} />
<meta property='og:description' content={description} />
<meta property='og:url' content={`https://oneleif.com${path}`} />
<meta property='og:site_name' content='oneleif' />
<meta property='og:image' content={image} />
<meta property='og:image:secure_url' content={image} />
<meta property='og:image:width' content='1280' />
<meta property='og:image:height' content='720' />
<meta name='twitter:card' content='summary_large_image' />
<meta name='twitter:description' content={description} />
<meta name='twitter:title' content={title} />
<meta name='twitter:site' content='@oneleifdev' />
<meta name='twitter:creator' content='@oneleifdev' />
<meta name='twitter:image' content={image} />
</Helmet>
);
}
3 changes: 3 additions & 0 deletions src/components/ReactHelmetWrapper/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import ReactHelmetWrapper from './ReactHelmetWrapper';

export default ReactHelmetWrapper;
18 changes: 7 additions & 11 deletions src/components/TestimonialContainer/TestimonialContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,13 @@ export default function TestimonialContainer({ children, name, location, image})
************************************/

return (
<div className='testimonial-container'>
<div className='testimony-module'>
<p>{children}</p>
</div>
<div className='featured-person-module'>
<div>
<h4>{name}</h4>
<p>{location}</p>
</div>
<img src={image} alt='NAME'/>
</div>
<div className='testimonial-container'>
<p>{children}</p>
<div>
<h4>{name}</h4>
<p>{location}</p>
</div>
<img src={image} alt={name}/>
</div>
);
}
109 changes: 76 additions & 33 deletions src/pages/ContactUsView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,37 @@ import OlContactBean from '../assets/olLilBean/OlContactBean';
import Input from '../components/Objects/Input/Input';
import TextArea from '../components/Objects/TextArea/TextArea';
import ButtonLink from '../components/Objects/ButtonLink/ButtonLink';
import ReactHelmetWrapper from '../components/ReactHelmetWrapper';
import LinkPreviewImage from '../assets/LinkPreview/ol-socialCard_1.png';

import ReactGA from 'react-ga';

/************************************
* Constants
************************************/
/************************************
* Constants
************************************/

const TARGET_EMAIL = 'mailto:[email protected]';
const ERROR_MESSAGE = 'Please enter a';
const TARGET_EMAIL = 'mailto:[email protected]';
const ERROR_MESSAGE = 'Please enter a';

export default function ContactUsView() {
/************************************
* State
************************************/
* State
************************************/

const [mailTo, setMailTo] = useState('');
const [formData, setFormData] = useState({message: {value: '', error: ''}, subject: {value: '', error: ''}});
const [formData, setFormData] = useState({ message: { value: '', error: '' }, subject: { value: '', error: '' } });

/************************************
* Private Methods
************************************/
* Private Methods
************************************/

/**
* Passes the id and value of the input into helper functions to be handled
* @param {Event} value change event from the message textarea
*/
function handleInput(event) {
const { id, value } = event.target;
setData(id, value)
setData(id, value);
handleEnteredInput(id, value);
}

Expand All @@ -44,10 +46,9 @@ export default function ContactUsView() {
*/
function setData(id, value) {
if (value.length > 0) {
setFormData({...formData, [id] : {value : value, error: ''}});
}
else {
setFormData({...formData, [id] : {value : value, error: `${ERROR_MESSAGE} ${id}`}});
setFormData({ ...formData, [id]: { value: value, error: '' } });
} else {
setFormData({ ...formData, [id]: { value: value, error: `${ERROR_MESSAGE} ${id}` } });
}
}

Expand All @@ -62,9 +63,11 @@ export default function ContactUsView() {
setMailTo('');
return;
}

//if event comes from message then input will need to be in message param
(id === 'message') ? parseAndApplyEmailInput(formData.subject.value, value) : parseAndApplyEmailInput(value, formData.message.value);
id === 'message'
? parseAndApplyEmailInput(formData.subject.value, value)
: parseAndApplyEmailInput(value, formData.message.value);
}

/**
Expand All @@ -79,15 +82,16 @@ export default function ContactUsView() {
}

//prevents event from propogating to link functionality
event.preventDefault();
event.preventDefault();
if (formData.subject.value) {
setFormData({...formData, message : {value : '', error: `${ERROR_MESSAGE} message`}});
}
else if (formData.message.value) {
setFormData({...formData, subject : {value : '', error: `${ERROR_MESSAGE} subject`}});
}
else {
setFormData({message : {value : '', error: `${ERROR_MESSAGE} message`}, subject : {value : '', error: `${ERROR_MESSAGE} subject`}});
setFormData({ ...formData, message: { value: '', error: `${ERROR_MESSAGE} message` } });
} else if (formData.message.value) {
setFormData({ ...formData, subject: { value: '', error: `${ERROR_MESSAGE} subject` } });
} else {
setFormData({
message: { value: '', error: `${ERROR_MESSAGE} message` },
subject: { value: '', error: `${ERROR_MESSAGE} subject` }
});
}
}

Expand Down Expand Up @@ -124,22 +128,61 @@ export default function ContactUsView() {
************************************/

return (
<div className="contact-us-view-container">
<div className='contact-us-view-container'>
<ReactHelmetWrapper
title='Contact Us'
description='Have any questions? Or even a project proposal?'
image={LinkPreviewImage}
path='/contact'
/>
<div className='contact-us-content-container'>
<div className='contact-us-copy-container'>
<h1>Contact Us</h1>
<p className='call-to-action-text'>
Interested in learning more?
Looking to partner with us? We want to hear from you!
Interested in learning more? Looking to partner with us? We want to hear from you!
</p>
<p>
Email us at:{' '}
<a
href={`${TARGET_EMAIL}?Subject=oneleif%20submission%20form`}
target='_top'
onClickCapture={handleContactLinkClicked}
>
[email protected]
</a>
</p>
<p>
Call us:{' '}
<a href='tel:1-402-536-0377' onClickCapture={handleContactLinkClicked}>
+1 (402) 536-0377
</a>
</p>
<p>Email us at: <a href={`${TARGET_EMAIL}?Subject=oneleif%20submission%20form`} target="_top" onClickCapture={handleContactLinkClicked}>[email protected]</a></p>
<p>Call us: <a href="tel:1-402-536-0377" onClickCapture={handleContactLinkClicked}>+1 (402) 536-0377</a></p>
<OlContactBean />
</div>
<div className='contact-us-form-container'>
<Input id='subject' label='Subject' placeholder='Enter the subject...' caption='Subject Input' errorMessage={formData.subject.error} onValueChange={handleInput}/>
<TextArea id='message' label='Message' placeholder='Write your message here' caption='Message Input' errorMessage={formData.message.error} onValueChange={handleInput}/>
<ButtonLink aria-label='send' handleClick={handleSendClicked} href={mailTo} target="_top" eventLabel='Email Submission Attempted'>
<Input
id='subject'
label='Subject'
placeholder='Enter the subject...'
caption='Subject Input'
errorMessage={formData.subject.error}
onValueChange={handleInput}
/>
<TextArea
id='message'
label='Message'
placeholder='Write your message here'
caption='Message Input'
errorMessage={formData.message.error}
onValueChange={handleInput}
/>
<ButtonLink
aria-label='send'
handleClick={handleSendClicked}
href={mailTo}
target='_top'
eventLabel='Email Submission Attempted'
>
Send
</ButtonLink>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/LandingView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default function LandingView() {

return (
<div className='landing-view-container'>
<FeatureContainer image={olLandingImg(LandingImg)}>
<div className='feature-copy-container'>
<FeatureContainer className='title' image={olLandingImg(LandingImg)}>
<div className='feature-copy-container title'>
<h1>oneleif</h1>
<p className='title'>Grow and create together.</p>
</div>
Expand Down
Loading

0 comments on commit c07c85b

Please sign in to comment.