-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad1bda4
commit 8ea32f3
Showing
39 changed files
with
497 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,4 +59,6 @@ typings/ | |
|
||
# ignore .next folder | ||
.next | ||
# ignore out folder | ||
out | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,76 @@ | ||
export default () => ( | ||
<section> | ||
<nav> | ||
<div className="navbar"> | ||
<div className="logo-container"> | ||
<img src="static/logo/main.jpeg" /> | ||
</div> | ||
<div className="title-container">Avishkar</div> | ||
</div> | ||
</nav> | ||
<style jsx>{` | ||
.navbar{ | ||
width: 100%; | ||
height:56px; | ||
padding:4px 80px; | ||
box-sizing:border-box; | ||
import Link from "next/link"; | ||
|
||
const data = [["/", "Home"], ["/events", "Events"], ["/team", "Team"]]; | ||
export default ({ path }) => ( | ||
<section> | ||
<nav> | ||
<div className="navbar"> | ||
<div className="wrapper"> | ||
{data.map(function(item) { | ||
const className = | ||
item[0] === path ? "link-container active" : "link-container"; | ||
return ( | ||
<div className={className}> | ||
<Link href={item[0]}> | ||
<a href={item[0]}>{item[1]}</a> | ||
</Link> | ||
</div> | ||
); | ||
})} | ||
</div> | ||
</div> | ||
</nav> | ||
<style jsx> | ||
{` | ||
.navbar { | ||
width: 100vw; | ||
height: 56px; | ||
padding: 4px 80px; | ||
box-sizing: border-box; | ||
/*background-color: #21d4fd;*/ | ||
} | ||
.logo-container{ | ||
width:auto; | ||
height:48px; | ||
float:left; | ||
div.wrapper { | ||
display: flex; | ||
width: 400px; | ||
height: 100%; | ||
justify-content: center; | ||
align-items: center; | ||
margin: 0 auto; | ||
box-sizing: border-box; | ||
} | ||
.logo-container img{ | ||
height:100%; | ||
width:auto; | ||
div.link-container { | ||
height: 80%; | ||
width: 90px; | ||
padding: 10px 20px; | ||
margin: 10px; | ||
background-color: #eeeeee; | ||
border-radius: 6px; | ||
box-sizing: border-box; | ||
display: flex; | ||
align-items: center; | ||
text-align: center; | ||
} | ||
.title-container{ | ||
font-family: 'Merienda', cursive; | ||
div.active { | ||
border: 2px solid #21d4fd; | ||
} | ||
`} | ||
</style> | ||
|
||
</section> | ||
) | ||
div.active a { | ||
color: #21d4fd; | ||
} | ||
a { | ||
margin: 0px; | ||
text-decoration: none; | ||
color: #424242; | ||
width: 100%; | ||
} | ||
@media (max-width: 700px) { | ||
section { | ||
display: none; | ||
} | ||
.navbar { | ||
padding: 0px; | ||
} | ||
} | ||
`} | ||
</style> | ||
</section> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
import ToggleDisplay from "react-toggle-display"; | ||
import React, { Component } from "react"; | ||
class Person extends Component { | ||
state = { | ||
detailsExpanded: false | ||
}; | ||
expandDetails = () => { | ||
this.setState({ | ||
detailsExpanded: true | ||
}); | ||
}; | ||
hideDetails = () => { | ||
this.setState({ | ||
detailsExpanded: false | ||
}); | ||
}; | ||
render() { | ||
const { person } = this.props; | ||
return ( | ||
<div | ||
className="card" | ||
onMouseEnter={this.expandDetails} | ||
onMouseLeave={this.hideDetails} | ||
> | ||
<div className="event-element" style={{ cursor: "pointer" }}> | ||
<div className="img-container"> | ||
<img src={person.img} /> | ||
</div> | ||
</div> | ||
<div | ||
className={ | ||
this.state.detailsExpanded ? "event-title-animated" : "event-title" | ||
} | ||
> | ||
<p>{person.name}</p> | ||
<ToggleDisplay show={this.state.detailsExpanded}> | ||
<p> | ||
<a href={`mailto:${person.email}`}>{person.email}</a> | ||
</p> | ||
<p> | ||
<a href={`tel:${person.phone}`}>{person.phone}</a> | ||
</p> | ||
</ToggleDisplay> | ||
</div> | ||
<style jsx>{` | ||
.event-title { | ||
position: absolute; | ||
transform: translateY(-90%); | ||
text-align: center; | ||
width: 100%; | ||
background-color: white; | ||
padding-top: 10px; | ||
transition: all 0.5s; | ||
} | ||
.event-title-animated { | ||
position: absolute; | ||
transform: translateY(-100%); | ||
background-color: white; | ||
width: 100%; | ||
transition: all 0.5s; | ||
padding-top: 10px; | ||
} | ||
section { | ||
padding: 20px 0px; | ||
background-color: #f5f5f5; | ||
} | ||
h2 { | ||
text-align: center; | ||
color: #e91e63; | ||
} | ||
div.container { | ||
display: flex; | ||
width: 80%; | ||
height: auto; | ||
margin: 0 auto; | ||
flex-wrap: wrap; | ||
justify-content: center; | ||
box-sizing: border-box; | ||
} | ||
div.card { | ||
width: 260px; | ||
position: relative; | ||
background-color: white; | ||
z-index: 10; | ||
transition: transform 0.6s; | ||
margin: 6px; | ||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), | ||
0 1px 2px rgba(0, 0, 0, 0.24); | ||
border-radius: 4px; | ||
box-sizing: border-box; | ||
transition: all 0.5s; | ||
overflow: hidden; | ||
} | ||
div.event-element { | ||
width: 100%; | ||
height: auto; | ||
padding: 20px; | ||
box-sizing: border-box; | ||
} | ||
div.img-container { | ||
width: 100%; | ||
height: auto; | ||
} | ||
img { | ||
width: 100%; | ||
height: auto; | ||
} | ||
p { | ||
text-align: center; | ||
margin: 0px 0px 10px 0px; | ||
font-size: 15px; | ||
} | ||
a { | ||
text-decoration: none; | ||
color: black; | ||
} | ||
@media (max-width: 700px) { | ||
div.container { | ||
width: 100%; | ||
} | ||
section { | ||
background-color: white; | ||
} | ||
div.card { | ||
margin: 10px; | ||
} | ||
} | ||
@media (min-width: 701px) { | ||
div.card:hover { | ||
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), | ||
0 10px 10px rgba(0, 0, 0, 0.22); | ||
} | ||
} | ||
`}</style> | ||
</div> | ||
); | ||
} | ||
} | ||
export default Person; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import React, { Component } from "react"; | ||
import Person from "./Person"; | ||
|
||
export default ({ people, heading }) => { | ||
return ( | ||
<section> | ||
<h2>{heading}</h2> | ||
<div className="container"> | ||
{people.map(function(person) { | ||
return <Person person={person} />; | ||
})} | ||
</div> | ||
<style jsx>{` | ||
section { | ||
padding: 20px 0px; | ||
background-color: #f5f5f5; | ||
} | ||
h2 { | ||
text-align: center; | ||
color: #e91e63; | ||
} | ||
div.container { | ||
display: flex; | ||
width: 80%; | ||
height: auto; | ||
margin: 0 auto; | ||
flex-wrap: wrap; | ||
justify-content: center; | ||
box-sizing: border-box; | ||
} | ||
div.card { | ||
width: 260px; | ||
height: auto; | ||
background-color: white; | ||
z-index: 10; | ||
transition: transform 0.6s; | ||
margin: 6px; | ||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), | ||
0 1px 2px rgba(0, 0, 0, 0.24); | ||
border-radius: 4px; | ||
box-sizing: border-box; | ||
transition: all 0.5s; | ||
} | ||
div.event-element { | ||
width: 100%; | ||
height: auto; | ||
padding: 20px; | ||
box-sizing: border-box; | ||
} | ||
div.img-container { | ||
width: 100%; | ||
height: auto; | ||
} | ||
img { | ||
width: 100%; | ||
height: auto; | ||
} | ||
.event-title p { | ||
text-align: center; | ||
margin: 0px 0px 10px 0px; | ||
} | ||
a { | ||
text-decoration: none; | ||
color: black; | ||
} | ||
@media (max-width: 700px) { | ||
div.container { | ||
width: 100%; | ||
} | ||
section { | ||
background-color: white; | ||
} | ||
div.card { | ||
margin: 10px; | ||
} | ||
} | ||
@media (min-width: 701px) { | ||
div.card:hover { | ||
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), | ||
0 10px 10px rgba(0, 0, 0, 0.22); | ||
} | ||
} | ||
`}</style> | ||
</section> | ||
); | ||
}; |
Oops, something went wrong.