Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
109 changes: 96 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,40 +1,123 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Configuration
.env
.env.local
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
# Dependency directories
node_modules/
jspm_packages/

# Bower
bower_components/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# IDE/Editor data
.idea
# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.local
.env.test
.env.production

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# next.js
# Next.js build output
.next
.next/
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# IDE/Editor data
.idea
4 changes: 2 additions & 2 deletions components/ErrorMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class ErrorMessage extends Component {

return (
<Context.Consumer>
{(context) => (
{( context ) => (
<h3 style={errorMessageStyle} className="error-message">{props.message}</h3>
)}
</Context.Consumer>
)
);
}
}

Expand Down
16 changes: 8 additions & 8 deletions components/Jumbotron.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Jumbotron extends Component {
constructor( props ) {
super( props );
}

render() {
return (
<div>
Expand Down Expand Up @@ -45,12 +45,12 @@ class Jumbotron extends Component {
Anyone of any age or background is welcome to attend. No RSVP is required; just show up!
<br />
<br />
Our workshops are led by people like you. If you would like to schedule a workshop with us, we'll market it to our community.
Our workshops are led by people like you. If you would like to schedule a workshop with us, we'll market it to our community.
<br />
For inquires about scheduling a workshop, please contact Clark Dunn @ <a href="mailto:clark@beyondrockets.com">clark@beyondrockets.com</a>
</p>
<FlyerContext.Consumer>
{(context) => {
{( context ) => {
const cwn = context.state.cwn;

return (
Expand All @@ -59,20 +59,20 @@ class Jumbotron extends Component {
<span className="cwn-date-time">
<span className="cwn-date">
<Moment format="LL" tz="America/Chicago">
{ cwn.start_time }
{cwn.start_time}
</Moment>
</span>
</span>
<span className="cwn-location">{ cwn.location ? cwn.location : "Not Available" }</span>
<span className="cwn-location">{cwn.location ? cwn.location : "Not Available"}</span>
</h2>
</div>
)
} }
);
}}
</FlyerContext.Consumer>
</div>
</div>
</div>
)
);
}
}

Expand Down
4 changes: 2 additions & 2 deletions components/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Layout = props => (
<meta name="viewport" content="width=device-width, initial-scale=1.0" key="viewport" />

<meta property="og:type" content="event" key="og:type" />
<meta property="og:url" content="https://cwnflyer.com" key="og:url" />
<meta property="og:url" content="https://cwnflyer.com" key="og:url" />
<meta
property="og:image"
content="http://api.screenshotmachine.com/?key=cc48ac&dimension=1200x630&format=png&hash=0ce5a0fa9c3712995bfb21b1719381cb&cacheLimit=1&timeout=3000&url=https://www.cwnflyer.com/"
Expand All @@ -35,6 +35,6 @@ const Layout = props => (
<Sponsors />
</footer>
</div>
)
);

export default Layout;
30 changes: 15 additions & 15 deletions components/Schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import FlyerContext from './FlyerContext';
import TimeSlot from './TimeSlot';

const isEmpty = ( value ) => {
return ( value === null ) || ( value === undefined ) || ( Array.isArray( value ) && value.length === 0 ) || ( JSON.stringify( value ) === '{}');
}
return ( value === null ) || ( value === undefined ) || ( Array.isArray( value ) && value.length === 0 ) || ( JSON.stringify( value ) === '{}' );
};

class Schedule extends Component {

Expand All @@ -18,28 +18,28 @@ class Schedule extends Component {

return (
<FlyerContext.Consumer>
{(context) => {
const cwn = context.state.cwn;
{( context ) => {
const cwn = context.state.cwn;
const showErrorMessage = isEmpty( cwn ) || ( isEmpty( cwn ) === false && isEmpty( cwn.workshops ) );

// This should only be shown if showErrorMessage above returns true
if ( showErrorMessage ) {
return <h3 style={errorMessageStyle} className="error-message">{context.state.message}</h3>
return <h3 style={errorMessageStyle} className="error-message">{context.state.message}</h3>;
}
else {
var timeSlots = {};

// Create an object where each property is an array of events based on the start_time
// The properties key will match the start time of the events within the array
cwn.workshops.forEach(function( workshop ) {
cwn.workshops.forEach( function ( workshop ) {
var startTime = workshop.start_time;
if ( timeSlots[ startTime ] == undefined ) {
timeSlots[ startTime ] = [];

if ( timeSlots[startTime] == undefined ) {
timeSlots[startTime] = [];
}

timeSlots[ startTime ].push( workshop );
});
timeSlots[startTime].push( workshop );
} );

// Grab the start times for each time slot so we can associate the time to the timeslot
const startTimes = Object.keys( timeSlots );
Expand All @@ -58,12 +58,12 @@ class Schedule extends Component {
<link rel="stylesheet" href="/static/css/schedule.css" key="schedule:css" />
</Head>
<div className="container my-2 cwn-schedule">
{ timeSlotList }
{timeSlotList}
</div>
</div>
)
);
}
} }
}}
</FlyerContext.Consumer>
);
}
Expand Down
12 changes: 6 additions & 6 deletions components/Sponsors.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class Sponsors extends Component {
<div className="footer-spacer" />
<footer className="footer fixed-bottom text-center">
<div className="container">
<FlyerContext.Consumer>
{(context) => {
<FlyerContext.Consumer>
{( context ) => {
const city = context.state.city;

return (
Expand All @@ -34,13 +34,13 @@ class Sponsors extends Component {
</a>
.
</p>
)
} }
</FlyerContext.Consumer>
);
}}
</FlyerContext.Consumer>
</div>
</footer>
</div>
)
);
}
}

Expand Down
Loading