Skip to content
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

Take that #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
15 changes: 15 additions & 0 deletions src/components/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,23 @@ export default class Card extends PureComponent {
imageName: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
tourId: PropTypes.number.isRequired,
navigation: PropTypes.object.isRequired,
imageList: PropTypes.array.isRequired,
}
static defaultProps = {}

onPress = () => {
const {
tourId,
imageList,
} = this.props;

this.props.navigation.navigate('Lightbox', {
tourId,
imageList
});
}

render() {
const {
imageName,
Expand All @@ -26,6 +40,7 @@ export default class Card extends PureComponent {
imageSrc={requireImage(tourId, imageName)}
title={title}
titleStyle={styles.title}
onPress={() => this.onPress()}
featured
/>
);
Expand Down
8 changes: 8 additions & 0 deletions src/containers/DetailScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,20 @@ class DetailScreen extends PureComponent {

const tourId = this.props.navigation.state.params.tourId;

// hacks
const allImages = details
.map((detail) => { return detail.carousel; })
.filter((element) => { return element !== undefined; })
.reduce((a, b) => { return a.concat(b) });

return (
<ScrollView contentContainerStyle={styles.container}>
<Card
imageName={locationImage}
tourId={tourId}
title={name}
navigation={this.props.navigation}
imageList={allImages}
/>
{this.renderDetails(details, tourId, this.props.navigation)}
<TouchableHighlight onPress={this.onDirectionsPress}>
Expand Down
7 changes: 7 additions & 0 deletions src/data/tours/tour_0/tour.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"title": "Overview",
"text": "Project Bayview is a Christian non-profit located in the Hunters Point/Bayview area of San Francisco. Bayview makes up for less than 1% of San Francisco’s population and accounts for over 50% of San Francisco’s violent crimes. It is an area filled with gangs and drugs with limited resources, education and opportunities.\n\nThe goal of Project Bayview is to invite people from the community coming out of gangs, prison and addiction into a life of discipleship and following Jesus. The 4100 3rd Street building was once a brothel and a saloon and has been converted into a men’s discipleship house and a missional restaurant business called Huli Huli’s. Huli Huli is a Hawaiian culinary term meaning “turn, turn”. The founders of this ministry thought it appropriate to name the restaurant that because of its mission to see lives turned around.",
"carousel": [
"bayview0",
"bayview1",
"bayview2"
]
Expand Down Expand Up @@ -49,6 +50,7 @@
"title": "Overview",
"text": "The Cathedral of Saint Mary of the Assumption, also known as Saint Mary’s Cathedral, is a church part of the Roman Catholic Archdiocese of San Francisco. Known to be a sacred place where ancient faith and modern technology intertwine, Saint Mary’s is a popular destination for both those interested in faith and those interested in design/architecture.\n\nThe Cathedral of St. Mary of the Assumption is an artistic and architectural poem evocative of the union between heaven and earth attained for us in Jesus Christ. The balance and simplicity of modern engineering echo the union of human and divine in creation and life. Faith and art combine to create in our contemporary world a worthy heir to the beautiful churches of the past.\n\nThe cathedral’s saddle roof is composed of eight segments of hyperbolic paraboloids, in such a fashion that the bottom horizontal cross section of the roof is a square and the top cross section is a cross. Like the Cross itself, St. Mary's Cathedral moves us both vertically and horizontally. As ones eyes are drawn upward in the graceful sweep of the cupola, hearts are lifted up to God.",
"carousel": [
"cathedral0",
"cathedral1"
]
},
Expand Down Expand Up @@ -100,6 +102,7 @@
"title": "Overview",
"text": "Glide Memorial Church is a historic church in San Francisco affiliated with the United Methodist Church. Although conservative until the 1960s, since then it has served as a counter-culture rallying point and has been one of the most prominently liberal churches in the United States.\n\nGlide is also famous for its Gospel Choir and numerous social service programs. Its contributions to the community have been recognized by public figures such as Maya Angelou, Oprah Winfrey, Bill Clinton and Warren Buffett.",
"carousel": [
"glide0",
"glide1",
"glide2"
]
Expand Down Expand Up @@ -128,6 +131,7 @@
"title": "Overview",
"text": "The cross atop Mt. Davidson was erected by the resolve and perseverance of the local Christian communities that invested decades in trying to construct a lasting icon of their faith. In 1923, George Decatur, official of the Western Union Telegraph Co., Director of the YMCA, and resident of San Francisco, organized the first sunrise service, drawing over 5,000 attendees. In 1931 arsonists burned down the cross. In 1933, during the depression, Margaret May Morgan, the first woman to sit on the San Francisco Board of Supervisors, and others on the Easter Sunrise Committee, solicited $1+ contributions to build a concrete Cross. On March 25, 1934, one week before Easter, Franklin D. Roosevelt pressed a golden telegraph key in Washington, D.C. to light up the cross in front of an audience of 50,000.\n\nIn 1991, several organizations, including the Americans United for Separation of Church and State, sued the City of San Francisco for owning a cross on city (public) land, and several court battles ensued. Eventually the courts forced the City to either tear down the Cross or sell it to a private entity.\n\nOn July 12, 1997, the Council of Armenian-American Organizations of Northern California (CAAONC), a coalition of over 30 Armenian-American Organizations outbid other groups and purchased the Cross from the City of San Francisco. The sale was unanimously approved by the San Francisco Board of Supervisors and placed on the ballot as Proposition F. On November 4, 1997, the voters of San Francisco overwhelmingly voted to approve the sale. The CAAONC thus became the legal owner of the Mt. Davidson Cross and assumed the responsibility for maintaining it.\n\nThe cross can be seen from all around the city when it is lit up, on Easter and on April 24th, Armenian Genocide Memorial Day.",
"carousel": [
"davidson0",
"davidson1",
"davidson2"
]
Expand Down Expand Up @@ -156,6 +160,7 @@
"title": "Overview",
"text": "The Castro District is one of the most famous gay neighborhoods in the world. Having transformed from a working-class neighborhood through the 1960s and 1970s, the Castro remains one of the most prominent symbols of lesbian, gay, bisexual, and transgender (LGBT) activism and events in the world.\n\nCastro & Market is the historical heart of the Gay/Lesbian community so most new visitors will start from somewhere near here.",
"carousel": [
"castro0",
"castro1",
"castro2"
]
Expand Down Expand Up @@ -184,6 +189,7 @@
"title": "Overview",
"text": "In 1992, the City of San Francisco commissioned a study of homeless youth in the Haight Ashbury district. This study demonstrated that homeless young people have a high incidence of health and psychological problems as well as a lack of access to health and human services. In response, coordinated efforts to reach these youth began springing up in the Haight. Two such efforts were the San Francisco Needle Exchange (SFNE) and the Haight Ashbury Youth Outreach Team (HAYOT). It was with HAYOT that Mary Howe, a formerly homeless youth herself, began to work with youth in the neighborhood.\n\nIn 2006, seven years after Mary first got involved, she merged the two organizations to form Homeless Youth Alliance: the city’s only grassroots harm reduction coalition designed by and for the marginalized and underserved youth experiencing homelessness of the Haight Ashbury district. Mary along side dedicated staff and the youth we work with has shaped and built an agency that reaches 13,000 at-risk youth annually, providing a drop-in center, harm reduction education, and medical and mental health services. HYA is the only youth-focused agency in San Francisco whose staff mirrors the target population it serves: most of the agency’s 14 staff and 30 volunteers have histories that include homelessness, many of whom utilized HYA’s services while living on the street. HYA trains constituents to be peer educators, helping them transcend the conditioned passivity and powerlessness that lead to self-destructive choices. As a result, many former participants have gone on to pursue careers in human services and counseling.",
"carousel": [
"hya0",
"hya1"
]
},
Expand Down Expand Up @@ -211,6 +217,7 @@
"title": "Overview",
"text": "City Hall represents the political and cultural power structures of San Francisco.\n\nThe City Hall you see today took two years to build. Steel, granite, and four floors of white marble interiors make up San Francisco's symbol of resilience, built after the previous City Hall was destroyed in the Great Earthquake and Fire of April 18, 1906.\n\nCivic leaders were determined to demonstrate the city's rebirth in time for the start of the World's Fair of 1915. Designed by architect Arthur Brown, Jr. and begun in 1913, natives and the world were suitably awed by the gilt exterior detailing, the sweeping grand staircase, and the massive dome. At 307 feet in height, the dome is a full 42 feet taller than the dome of the nation's capitol.\n\nDuring the past century, the building has seen major political upheavals and demographic shifts in the makeup of its legislators. City Hall is often a focus of drama: the tragic assassinations of 1979; and jubilation, when same-sex marriages were first performed in 2004. Once the repository of records and a site for smaller courts, current debates and decisions about labor, land use, and public policy issues take place inside on a regular basis.",
"carousel": [
"sfch0",
"sfch1"
]
},
Expand Down