summaryrefslogtreecommitdiff
path: root/frontend/site
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-04-20 00:02:36 +0200
committerJules Laplace <julescarbon@gmail.com>2021-04-20 00:02:36 +0200
commit5a6d9dc77ffd0124b96ad0998050ed5f7ba3e228 (patch)
tree6325022ea9a1ce178f84bdf0f7aa9fb3132319be /frontend/site
parent1544c7aaac4234b0e73a400ffaa7534a0077f37e (diff)
locations
Diffstat (limited to 'frontend/site')
-rw-r--r--frontend/site/projects/museum/constants.js30
-rw-r--r--frontend/site/projects/museum/views/artists.js18
-rw-r--r--frontend/site/projects/museum/views/nav.overlay.js3
3 files changed, 42 insertions, 9 deletions
diff --git a/frontend/site/projects/museum/constants.js b/frontend/site/projects/museum/constants.js
index 4e82030..27b2044 100644
--- a/frontend/site/projects/museum/constants.js
+++ b/frontend/site/projects/museum/constants.js
@@ -1,7 +1,10 @@
export const ARTISTS = {
nora: {
name: "Nora Al-Badri",
- location: "CCCB and c-base, Berlin, Germany",
+ location: {
+ en: "CCCB and c-base, Berlin, Germany",
+ de: "CCCB and c-base, Berlin, Deutschland",
+ },
start: "nora-1",
bio: {
en: `
@@ -71,7 +74,10 @@ export const ARTISTS = {
},
leite: {
name: "Juliana Cerqueria Leite",
- location: "Santa Ifigênia, São Paolo, Brazil",
+ location: {
+ en: "Santa Ifigênia, São Paolo, Brazil",
+ de: "Santa Ifigênia, São Paulo, Brasilien",
+ },
start: "leite-chapter-1",
bio: {
en: `
@@ -141,7 +147,10 @@ export const ARTISTS = {
},
foreshew: {
name: "Nicole Foreshew",
- location: "Urumbilum River, Gumbaynggirr Country, Australia",
+ location: {
+ en: "Urumbilum River, Gumbaynggirr Country, Australia",
+ de: "Urumbilum River, Gumbaynggirr Country, Australien",
+ },
start: "foreshew-1",
bio: {
en: `
@@ -193,7 +202,10 @@ export const ARTISTS = {
},
stankievech: {
name: "Charles Stankievech",
- location: "Cosmic Ray Research Station, Canadian Rockies (Winter Solstice)",
+ location: {
+ en: "Cosmic Ray Research Station, Canadian Rockies (Winter Solstice)",
+ de: "Cosmic Ray Research Station, Kanadische Rockies (Wintersonnenwende)",
+ },
start: "stankievech-1",
bio: {
en: `
@@ -269,7 +281,10 @@ export const ARTISTS = {
},
nilthamrong: {
name: "Jakrawal Nilthamrong",
- location: "Chiang Mai, Thailand",
+ location: {
+ en: "Chiang Mai, Thailand",
+ de: "Chiang Mai, Thailand",
+ },
start: "nilthamrong-home",
bio: {
en: `<p>
@@ -295,7 +310,10 @@ export const ARTISTS = {
},
opoku: {
name: "Zohra Opoku",
- location: "Mortuary (unfinished), Accra, Ghana",
+ location: {
+ en: "Mortuary (unfinished), Accra, Ghana",
+ de: "Unfertige Leichenhalle, Accra, Ghana",
+ },
start: "opoku-1-hail-to-you",
bio: {
en: `
diff --git a/frontend/site/projects/museum/views/artists.js b/frontend/site/projects/museum/views/artists.js
index 52a71e3..ed6ba0d 100644
--- a/frontend/site/projects/museum/views/artists.js
+++ b/frontend/site/projects/museum/views/artists.js
@@ -1,4 +1,5 @@
import React, { Component } from 'react'
+import { connect } from 'react-redux'
import actions from 'site/actions'
import "./artists.css"
@@ -8,7 +9,7 @@ import { ArrowLeft, ArrowRight } from "site/projects/museum/icons"
import { history } from "site/store"
-export default class Artists extends Component {
+class Artists extends Component {
state = {
currentIndex: 0,
detail: false,
@@ -21,6 +22,7 @@ export default class Artists extends Component {
this.previousArtist = this.previousArtist.bind(this)
this.nextArtist = this.nextArtist.bind(this)
this.goHome = this.goHome.bind(this)
+ this.changeLanguage = this.changeLanguage.bind(this)
}
componentDidMount() {
@@ -50,8 +52,13 @@ export default class Artists extends Component {
history.push(`/last-museum/home/`)
}
+ changeLanguage() {
+ actions.site.changeLanguage(this.props.language === "de" ? "en" : "de")
+ }
+
scrollToTop() {
setTimeout(() => {
+ if (!this.ref.current) return
Array.from(this.ref.current.querySelectorAll(".artist-content")).forEach(el => {
el.scrollTo(0, 0)
})
@@ -103,6 +110,13 @@ export default class Artists extends Component {
}
}
+const mapStateToProps = state => ({
+ interactive: state.site.interactive,
+ language: state.site.language,
+})
+
+export default connect(mapStateToProps)(Artists)
+
const ArtistDetail = ({ artist, index, isCurrent, language, onClose }) => {
return (
<div className={isCurrent ? "artist-detail visible" : "artist-detail"}>
@@ -116,7 +130,7 @@ const ArtistDetail = ({ artist, index, isCurrent, language, onClose }) => {
<div className="artist-detail-name" onClick={onClose}>
{artist.name}
</div>
- <div className="artist-location">{artist.location}</div>
+ <div className="artist-location">{artist.location[language]}</div>
</div>
)
}
diff --git a/frontend/site/projects/museum/views/nav.overlay.js b/frontend/site/projects/museum/views/nav.overlay.js
index 7a6c7a5..501b5af 100644
--- a/frontend/site/projects/museum/views/nav.overlay.js
+++ b/frontend/site/projects/museum/views/nav.overlay.js
@@ -157,6 +157,7 @@ class NavOverlay extends Component {
}
render() {
+ const { language } = this.props
const { showArtist, showHome, showLanguage, showMuteButton, showCounter, showFooter, isProjectPage, artist } = this.state
return (
<div className="museum-nav">
@@ -169,7 +170,7 @@ class NavOverlay extends Component {
<div className="footer-gradient" />
<div className="artist-desc">
<span className="artist-name">{artist.name}</span>
- <span className="artist-location">{artist.location}</span>
+ <span className="artist-location">{artist.location[language]}</span>
</div>
<div className="nav-arrow arrow-left" onClick={this.previousArtist}>{ArrowLeft}</div>
<div className="nav-arrow arrow-right" onClick={this.nextArtist}>{ArrowRight}</div>