Skip to content

Commit

Permalink
add/update
Browse files Browse the repository at this point in the history
  • Loading branch information
darkenergy96 committed Jul 11, 2018
1 parent ad1bda4 commit 8ea32f3
Show file tree
Hide file tree
Showing 39 changed files with 497 additions and 72 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,6 @@ typings/

# ignore .next folder
.next
# ignore out folder
out

2 changes: 1 addition & 1 deletion components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default () => (
}
@media (max-width: 700px) {
footer {
padding: 30px;
padding: 30px 15px;
}
}
`}
Expand Down
2 changes: 1 addition & 1 deletion components/IconEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class IconEvents extends Component {
style={{ cursor: "pointer" }}
>
<div className="img-container">
<img src={`static/icon/${event}.png`} />
<img src={`/static/icon/${event}.png`} />
</div>
</div>
<div className="event-title">
Expand Down
102 changes: 72 additions & 30 deletions components/Navbar.js
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>
);
4 changes: 2 additions & 2 deletions components/events/EventBanner.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import Image from "./Image";
import GoHome from "./GoHome";
//import GoHome from "./GoHome";
export default ({ eventName }) => {
const img = `/static/backgrounds/${eventName}_edited.jpg`;
const heading =
eventName === "aerodynamix" ? eventName : `${eventName} events`;
return (
<section>
<div className="event-title">
<GoHome />
{/* <GoHome /> */}
<h2>{heading}</h2>
<div className="img-container">
{/* <img src={img} alt={`${eventName} background image`} /> */}
Expand Down
140 changes: 140 additions & 0 deletions components/team/Person.js
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;
88 changes: 88 additions & 0 deletions components/team/Team.js
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>
);
};
Loading

0 comments on commit 8ea32f3

Please sign in to comment.