summaryrefslogtreecommitdiff
path: root/frontend/site/projects/museum/views
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/site/projects/museum/views')
-rw-r--r--frontend/site/projects/museum/views/artists.css4
-rw-r--r--frontend/site/projects/museum/views/artists.js6
-rw-r--r--frontend/site/projects/museum/views/jakrawal.links.js43
-rw-r--r--frontend/site/projects/museum/views/nav.overlay.js2
-rw-r--r--frontend/site/projects/museum/views/titles.overlay.js4
5 files changed, 26 insertions, 33 deletions
diff --git a/frontend/site/projects/museum/views/artists.css b/frontend/site/projects/museum/views/artists.css
index 312407a..66c7005 100644
--- a/frontend/site/projects/museum/views/artists.css
+++ b/frontend/site/projects/museum/views/artists.css
@@ -84,8 +84,8 @@
text-shadow: 0 0 5px #FF790D;
cursor: pointer;
}
-.page-artists .artist-detail-name,
-.page-artists .artist-detail-name:hover {
+.page-artists .artist-detail-name a,
+.page-artists .artist-detail-name a:hover {
text-decoration: none;
}
.page-artists .nav-arrow {
diff --git a/frontend/site/projects/museum/views/artists.js b/frontend/site/projects/museum/views/artists.js
index fe07598..b6af721 100644
--- a/frontend/site/projects/museum/views/artists.js
+++ b/frontend/site/projects/museum/views/artists.js
@@ -129,9 +129,11 @@ const ArtistDetail = ({ artist, index, isCurrent, language, onClose }) => {
<Link to={`/thelastmuseum/${artist.start}`} className="artist-right-inner" />
</div>
<div className="artist-detail-name">
- <Link to={artist.homepage} target="_blank">{artist.name}</Link>
+ <a href={artist.homepage} target="_blank">{artist.name}</a>
+ </div>
+ <div onClick={onClose} className="artist-close">
+ <img src="/thelastmuseum/static/img/close-orange.png" />
</div>
- <img src="/thelastmuseum/static/img/close-orange.png" onClick={onClose} className="artist-close" />
<div className="artist-location">{artist.location[language]}</div>
</div>
)
diff --git a/frontend/site/projects/museum/views/jakrawal.links.js b/frontend/site/projects/museum/views/jakrawal.links.js
index 90c4871..2447728 100644
--- a/frontend/site/projects/museum/views/jakrawal.links.js
+++ b/frontend/site/projects/museum/views/jakrawal.links.js
@@ -5,25 +5,13 @@ import './jakrawal.links.css'
import { history } from "site/store"
-const JAKRAWAL_TEXTS = [
- "<i>Wildfires</i> occur frequently during the dry season in northern Thailand’s high mountains. The source of fire is not natural but arson.",
- "In the past it was hypothesized that local people set the fires to clear land for agricultural use, or for hunting.",
- "There were efforts to solve the problem at the community level, but the fires only became more severe.",
- "Strangely, the blazes often occurred in the national park—an area difficult for villagers to access.",
- "During the wildfire suppression efforts of May 2020, a group of scholars and volunteers discovered important evidence that would change the original hypothesis.",
- "They found several instances of improvised devices made of clothes pegs connected to a small battery by a power cable.",
- "Combustion was triggered by a small clod of clay positioned in the middle between the pegs, acting as a timer. After melting in the heat the wires attached to the batteries would ignite.",
- "Villagers who were interviewed said that this was not a technique that they were familiar with.",
- "Although we cannot know the intention of the burners, it is likely that the park’s natural resources are being used to benefit some group of people. And the poor have always been condemned.",
-]
-
const RESET_STATE = {
left: null,
right: null,
vertical: false,
+ curtain: false,
lateralLink: null,
verticalLink: null,
- text: null,
hovering: false,
}
@@ -77,24 +65,28 @@ class JakrawalLinks extends Component {
this.autoadvanceTimeout = setTimeout(this.goVertical, AUTOADVANCE_TIMEOUT)
this.setState({
...RESET_STATE,
+ curtain: true,
verticalLink: "home",
})
+ clearTimeout(this.timeout)
+ this.timeout = setTimeout(() => {
+ this.setState({ vertical: true })
+ }, VERTICAL_TIMEOUT)
return
}
const partz = page_partz[1].split("")
const isOnA = partz[0] === 'a';
const lateralLink = (isOnA ? 'b' : 'a') + partz[1]
- const verticalLink = partz[0] + (parseInt(partz[1]) + 1)
- const text = JAKRAWAL_TEXTS[parseInt(partz[1]) - 1]
+ const verticalLink = lateralLink === 'a8' ? "home" : partz[0] + (parseInt(partz[1]) + 1)
this.setState({
left: !isOnA,
right: isOnA,
lateralLink,
verticalLink,
- text,
+ curtain: true,
hovering: false,
})
- if (!lastParams || lastParams.page_name !== ('nilthamrong' + lateralLink)) {
+ if (!lastParams || lastParams.page_name !== ('nilthamrong-' + lateralLink)) {
clearTimeout(this.autoadvanceTimeout)
this.autoadvanceTimeout = setTimeout(this.goVertical, AUTOADVANCE_TIMEOUT)
clearTimeout(this.timeout)
@@ -111,16 +103,20 @@ class JakrawalLinks extends Component {
this.setState({ hovering: false })
}
goLateral() {
- history.push(`/thelastmuseum/nilthamrong-${this.state.lateralLink}/`)
+ history.push(`/thelastmuseum/nilthamrong-${this.state.lateralLink}`)
}
goVertical() {
this.setState({ vertical: false })
- history.push(`/thelastmuseum/nilthamrong-${this.state.verticalLink}/`)
+ if (this.state.verticalLink === 'home') {
+ history.push(`/thelastmuseum/home`)
+ } else {
+ history.push(`/thelastmuseum/nilthamrong-${this.state.verticalLink}`)
+ }
}
render() {
- const { left, right, vertical } = this.state
- if (!this.props.interactive || (!left && !right && !vertical)) return null
+ const { left, right, vertical, curtain } = this.state
+ if (!this.props.interactive || (!left && !right && !vertical && !curtain)) return null
return (
<div>
<div className="jakrawal-curtain" />
@@ -137,8 +133,3 @@ const mapStateToProps = state => ({
})
export default connect(mapStateToProps)(JakrawalLinks)
-
-/*
- {text && <div className={hovering ? "jakrawal-text hovering" : "jakrawal-text"} dangerouslySetInnerHTML={{ __html: text }}></div>}
- {text && <div className="jakrawal-text-icon" onMouseEnter={this.handleEnter} onMouseLeave={this.handleLeave}><img src="/thelastmuseum/static/uploads/3/cursor/The_Last_Museum_-_Symbols-103.png"/></div>}
- */ \ No newline at end of file
diff --git a/frontend/site/projects/museum/views/nav.overlay.js b/frontend/site/projects/museum/views/nav.overlay.js
index bf43c52..37d30d3 100644
--- a/frontend/site/projects/museum/views/nav.overlay.js
+++ b/frontend/site/projects/museum/views/nav.overlay.js
@@ -168,7 +168,7 @@ class NavOverlay extends Component {
nextPage.tiles.forEach(tile => {
if (tile.type === 'video' && !this.preloaded[tile.settings.url]) {
this.preloaded[tile.settings.url] = true
- preloadVideo(tile.settings.url)
+ preloadVideo(tile.settings.url, { canplaythrough: true })
.then(video => {
// console.log("preloaded", video.src)
// video.src = null
diff --git a/frontend/site/projects/museum/views/titles.overlay.js b/frontend/site/projects/museum/views/titles.overlay.js
index bf7bb97..32e7344 100644
--- a/frontend/site/projects/museum/views/titles.overlay.js
+++ b/frontend/site/projects/museum/views/titles.overlay.js
@@ -99,9 +99,9 @@ class TitlesOverlay extends Component {
showHeadphones() {
if (!this.headphonesRef.current) return
- this.titleTimeout = setTimeout(() => {
+ this.headphonesTimeout = setTimeout(() => {
this.headphonesRef.current.style.opacity = 1
- this.titleTimeout = setTimeout(() => {
+ this.headphonesTimeout = setTimeout(() => {
this.headphonesRef.current.style.opacity = 0
setTimeout(this.showTitle, TITLE_SHOW_DELAY)
}, HEADPHONES_HIDE_DELAY)