-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added photo grids for album/photo galleries #3
Open
sherylchang
wants to merge
7
commits into
InnoD-WebTier:master
Choose a base branch
from
sherylchang:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
cd663e5
first commit
sherylchang d6368d9
separated styling into different files and linked css to js
sherylchang 44671c1
adding App.js and general styling files
sherylchang 6afb9af
added in mason's files
sherylchang 89a252b
changed linking of css files
sherylchang e9bf6d1
created initial version of the modal box
sherylchang 443d5be
got new files and routing and used npm start instead of yarn
sherylchang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React, { Component } from 'react'; | ||
import Photo from './Photo.js'; | ||
|
||
class Grid extends Component { | ||
render() { | ||
const gridElements = this.props.urls.map((grid) => | ||
<Photo src={grid.url} name={grid.name} className="grid__photo"/> | ||
); | ||
|
||
return ( | ||
<div className={this.props.className}>{gridElements}</div> | ||
); | ||
} | ||
} | ||
|
||
export default Grid; |
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,16 @@ | ||
import React, { Component } from 'react'; | ||
|
||
class Photo extends Component { | ||
render() { | ||
return ( | ||
<div className={this.props.className}> | ||
<img src={this.props.src}/> | ||
<div className="label"> | ||
{this.props.name} | ||
</div> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default Photo; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,28 @@ | ||
import React, { Component } from 'react'; | ||
import Grid from '../Grid.js'; | ||
import '../styles/Album.css'; | ||
|
||
const items = [ | ||
{ name: '2017-2018', url: 'http://www.dogbreedslist.info/uploads/allimg/dog-pictures/Samoyed-2.jpg' }, | ||
{ name: '2016-2017', url: 'http://cdn.akc.org/Marketplace/Breeds/Pembroke_Welsh_Corgi_SERP.jpg' }, | ||
{ name: '2015-2016', url: 'https://i.ytimg.com/vi/wRx3Uvcktm8/maxresdefault.jpg' } | ||
]; | ||
|
||
const items1 = [ | ||
{ name: '2014-2015', url: 'https://www.thelabradorsite.com/wp-content/uploads/2015/07/yellow-labrador-puppy-garden.jpg' }, | ||
{ name: '2013-2014', url: 'https://cdn.marketplace.akc.org/media/45488/1456977861_4573_8635.jpg' }, | ||
]; | ||
|
||
class Album extends Component { | ||
render() { | ||
return( | ||
<div> | ||
<div className="title">ALBUMS</div> | ||
<Grid className="album__grid" urls={items} /> | ||
<Grid className="album__grid" urls={items1} /> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default Album; |
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,28 @@ | ||
import React, { Component } from 'react'; | ||
import Grid from '../Grid.js'; | ||
import '../styles/Events.css'; | ||
|
||
const items = [ | ||
{ name: 'First General Meeting', url: 'http://www.dogbreedslist.info/uploads/allimg/dog-pictures/Samoyed-2.jpg' }, | ||
{ name: 'Big C Hike + Pieology', url: 'http://cdn.akc.org/Marketplace/Breeds/Pembroke_Welsh_Corgi_SERP.jpg' }, | ||
{ name: '2nd General Meeting', url: 'https://i.ytimg.com/vi/wRx3Uvcktm8/maxresdefault.jpg' } | ||
]; | ||
|
||
const items1 = [ | ||
{ name: 'Guide Dogs for the Blind', url: 'https://www.thelabradorsite.com/wp-content/uploads/2015/07/yellow-labrador-puppy-garden.jpg' }, | ||
{ name: 'Go Bears', url: 'https://cdn.marketplace.akc.org/media/45488/1456977861_4573_8635.jpg' }, | ||
]; | ||
|
||
class Events extends Component { | ||
render() { | ||
return( | ||
<div> | ||
<div className="title">2015-2016</div> | ||
<Grid className="album__grid" urls={items} /> | ||
<Grid className="album__grid" urls={items1} /> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default Events; |
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,29 @@ | ||
import React, { Component } from 'react'; | ||
import Grid from '../Grid.js'; | ||
import '../styles/Gallery.css'; | ||
|
||
const items = [ | ||
{ url: 'http://www.dogbreedslist.info/uploads/allimg/dog-pictures/Samoyed-2.jpg' }, | ||
{ url: 'http://cdn.akc.org/Marketplace/Breeds/Pembroke_Welsh_Corgi_SERP.jpg' }, | ||
{ url: 'https://i.ytimg.com/vi/wRx3Uvcktm8/maxresdefault.jpg' } | ||
]; | ||
|
||
const items1 = [ | ||
{ url: 'https://www.thelabradorsite.com/wp-content/uploads/2015/07/yellow-labrador-puppy-garden.jpg' }, | ||
{ url: 'https://cdn.marketplace.akc.org/media/45488/1456977861_4573_8635.jpg' }, | ||
{ url: 'https://cdn.marketplace.akc.org/media/45488/1456977861_4573_8635.jpg' } | ||
]; | ||
|
||
class Gallery extends Component { | ||
render() { | ||
return( | ||
<div> | ||
<div className="title">PUMPKIN CARVING SOCIAL [FALL 2014]</div> | ||
<Grid className="gallery__grid" urls={items} /> | ||
<Grid className="gallery__grid" urls={items1} /> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default Gallery; |
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,33 @@ | ||
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro"); | ||
* { | ||
box-sizing: border-box; } | ||
|
||
body { | ||
margin: 0; | ||
padding: 0; } | ||
|
||
.album__grid { | ||
margin: auto; | ||
max-width: 1200px; } | ||
.album__grid .grid__photo { | ||
width: 33%; | ||
height: 350px; | ||
display: inline-block; | ||
margin-bottom: 70px; | ||
padding: 25px; | ||
vertical-align: top; } | ||
.album__grid .grid__photo img { | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; } | ||
.album__grid .grid__photo img:hover { | ||
opacity: 0.5; | ||
transition: 0.5s; | ||
cursor: pointer; } | ||
.album__grid .grid__photo .label { | ||
font-family: 'Source Sans Pro', sans-serif; | ||
border-bottom: 2.5px solid #424242; | ||
padding-top: 11px; | ||
padding-bottom: 7px; | ||
font-size: 20px; | ||
color: #424242; } |
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,33 @@ | ||
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro"); | ||
* { | ||
box-sizing: border-box; } | ||
|
||
body { | ||
margin: 0; | ||
padding: 0; } | ||
|
||
.album__grid { | ||
margin: auto; | ||
max-width: 1200px; } | ||
.album__grid .grid__photo { | ||
width: 33%; | ||
height: 350px; | ||
display: inline-block; | ||
margin-bottom: 70px; | ||
padding: 25px; | ||
vertical-align: top; } | ||
.album__grid .grid__photo img { | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; } | ||
.album__grid .grid__photo img:hover { | ||
opacity: 0.5; | ||
transition: 0.5s; | ||
cursor: pointer; } | ||
.album__grid .grid__photo .label { | ||
font-family: 'Source Sans Pro', sans-serif; | ||
border-bottom: 2.5px solid #424242; | ||
padding-top: 11px; | ||
padding-bottom: 7px; | ||
font-size: 20px; | ||
color: #424242; } |
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,33 @@ | ||
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro"); | ||
* { | ||
box-sizing: border-box; } | ||
|
||
body { | ||
margin: 0; | ||
padding: 0; } | ||
|
||
.title { | ||
margin-top: 30px; | ||
text-align: center; | ||
font-family: 'Source Sans Pro', sans-serif; | ||
font-size: 30px; | ||
color: #424242; } | ||
|
||
.gallery__grid { | ||
margin: auto; | ||
max-width: 1200px; | ||
margin-top: 10px; } | ||
.gallery__grid .grid__photo { | ||
width: 33%; | ||
height: 275px; | ||
display: inline-block; | ||
padding: 20px; } | ||
.gallery__grid .grid__photo img { | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
vertical-align: top; } | ||
.gallery__grid .grid__photo img:hover { | ||
opacity: 0.5; | ||
transition: 0.5s; | ||
cursor: pointer; } |
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,45 @@ | ||
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro'); | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
.album__grid { | ||
margin: auto; | ||
max-width: 1200px; | ||
.grid__photo { | ||
width: 33%; | ||
height: 350px; | ||
display: inline-block; | ||
margin-bottom: 70px; | ||
padding: 25px; | ||
vertical-align: top; | ||
img { | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
} | ||
|
||
img:hover { | ||
opacity: 0.5; | ||
transition: 0.5s; | ||
cursor: pointer; | ||
} | ||
|
||
.label { | ||
font-family: 'Source Sans Pro', sans-serif; | ||
// text-align: center; | ||
border-bottom: 2.5px solid #424242; | ||
padding-top: 11px; | ||
padding-bottom: 7px; | ||
font-size: 20px; | ||
color: #424242; | ||
} | ||
} | ||
|
||
} |
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,45 @@ | ||
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro'); | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
.album__grid { | ||
margin: auto; | ||
max-width: 1200px; | ||
.grid__photo { | ||
width: 33%; | ||
height: 350px; | ||
display: inline-block; | ||
margin-bottom: 70px; | ||
padding: 25px; | ||
vertical-align: top; | ||
img { | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
} | ||
|
||
img:hover { | ||
opacity: 0.5; | ||
transition: 0.5s; | ||
cursor: pointer; | ||
} | ||
|
||
.label { | ||
font-family: 'Source Sans Pro', sans-serif; | ||
// text-align: center; | ||
border-bottom: 2.5px solid #424242; | ||
padding-top: 11px; | ||
padding-bottom: 7px; | ||
font-size: 20px; | ||
color: #424242; | ||
} | ||
} | ||
|
||
} |
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,44 @@ | ||
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro'); | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
.title { | ||
margin-top: 30px; | ||
text-align: center; | ||
font-family: 'Source Sans Pro', sans-serif; | ||
font-size: 30px; | ||
color: #424242; | ||
} | ||
|
||
.gallery__grid { | ||
margin: auto; | ||
max-width: 1200px; | ||
margin-top: 10px; | ||
.grid__photo { | ||
width: 33%; | ||
height: 275px; | ||
display: inline-block; | ||
padding: 20px; | ||
img { | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
// margin-left: 15px; | ||
// margin-right: 15px; | ||
vertical-align: top; | ||
} | ||
|
||
img:hover { | ||
opacity: 0.5; | ||
transition: 0.5s; | ||
cursor: pointer; | ||
} | ||
} | ||
} |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you structure your Grid component so that it represents an entire grid, and not just a row?