Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Events page updated #11

Merged
merged 17 commits into from
Oct 17, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
events page completed
  • Loading branch information
M-ZubairAhmed committed Oct 15, 2017
commit 9d6a2f11bf6ea4166382a9e74a2db2e0cc407829
16 changes: 12 additions & 4 deletions components/row-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ import moment from 'moment'

const RowEvent = props => {
return (
<div>
<cardhead onClick={() => window.open(props.link)}>
{/* <div style={{ display: 'inline-block' }}>Picture goes here</div> */}
<Card
style={{ marginTop: '15px', display: 'inline-block', width: '600' }}
style={{
marginTop: '15px',
width: '800px',
backgroundColor: '#fafafa',
}}
>
Copy link
Contributor

Choose a reason for hiding this comment

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

Please move all inline styles to <style jsx> tag

{/* {props.venue} */}
<Card.Content>
<Card.Header>{props.name}</Card.Header>
<Card.Meta style={{ marginTop: '15px' }}>
Expand All @@ -28,7 +31,12 @@ const RowEvent = props => {
{props.venue === undefined ? 'Free session' : 'Free entry'}
</Card.Content>
</Card>
</div>
<style jsx>{`
cardhead :hover {
cursor: pointer;
}
`}</style>
</cardhead>
)
}

Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

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

19 changes: 14 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"main": "index.js",
"scripts": {
"test": "xo",
"lint":
"prettier 'utils/**/*.js' 'components/**/*.js' 'pages/**/*.js' 'lib/**/*.js' 'hocs/**/*.js' '*.js' --write --single-quote --print-width='80' --trailing-comma='all' && xo --fix",
"lint": "prettier 'utils/**/*.js' 'components/**/*.js' 'pages/**/*.js' 'lib/**/*.js' 'hocs/**/*.js' '*.js' --write --single-quote --print-width='80' --trailing-comma='all' && xo --fix",
"precommit": "lint-staged",
"analyze": "cross-env ANALYZE=1 next build",
"dev": "cross-env NODE_ENV=development nodemon server.js -w server.js",
Expand All @@ -17,15 +16,24 @@
},
"xo": {
"parser": "babel-eslint",
"extends": ["prettier", "prettier/react", "plugin:react/recommended"],
"env": ["browser", "node"],
"extends": [
"prettier",
"prettier/react",
"plugin:react/recommended"
],
"env": [
"browser",
"node"
],
"rules": {
"linebreak-style": 0,
"react/display-name": 0,
"react/prop-types": 0
},
"space:": 2,
"ignores": ["next.config.js"]
"ignores": [
"next.config.js"
]
},
"lint-staged": {
"*.js": [
Expand Down Expand Up @@ -62,6 +70,7 @@
"react-ga": "^2.2.0",
"react-headroom": "^2.1.6",
"react-icons": "^2.2.5",
"react-textgradient": "0.0.2",
"semantic-ui-react": "^0.71.3"
},
"devDependencies": {
Expand Down
30 changes: 26 additions & 4 deletions pages/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,27 @@ export default publicPage(
render() {
return (
<div>
<div
style={{
backgroundColor: '#f4f7fb',
minHeight: '200px',
}}
>
<h1
style={{
Copy link
Contributor

Choose a reason for hiding this comment

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

Move inline styles to <style jsx>

textAlign: 'center',
paddingTop: '20px',
fontSize: '4em',
color: '#DF1CB5',
fontWeight: '900',
}}
>
Events
</h1>
<h2 style={{ textAlign: 'center' }}>
Because you cannot change the world alone
</h2>
</div>
<main>
{this.state.pastEvents.length !== 0 &&
this.state.futureEvents.length !== 0 ? (
Expand All @@ -43,9 +64,9 @@ export default publicPage(
key={event.id}
name={event.name}
yesCount={event.yes_rsvp_count}
description={event.description}
time={event.time}
venue={event.venue}
link={event.link}
/>
))}
</div>
Expand All @@ -56,9 +77,9 @@ export default publicPage(
key={event.id}
name={event.name}
yesCount={event.yes_rsvp_count}
description={event.description}
time={event.time}
venue={event.venue}
link={event.link}
/>
))}
</div>
Expand All @@ -69,10 +90,11 @@ export default publicPage(
</main>
<style jsx>{`
main {
background-color :#FFFFFF
padding-top: 30px;
padding-bottom:30px;
min-height: calc(100vh - 70px);
background: #f4f7fb;
padding-left: 40;
color: #314159;
display: flex;
justify-content: center;
align-items: center;
Expand Down