Remove active fires in home for mobiles
This commit is contained in:
parent
edb3d20fca
commit
2e39c4eb52
1 changed files with 15 additions and 7 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
/* eslint-disable react/jsx-indent-props */
|
/* eslint-disable react/jsx-indent-props */
|
||||||
/* eslint-disable key-spacing */
|
/* eslint-disable key-spacing */
|
||||||
/* eslint-env jquery */
|
/* eslint-env jquery */
|
||||||
import React, { Component } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { translate, Trans } from 'react-i18next';
|
import { translate, Trans } from 'react-i18next';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
// import { HashLink as Link } from 'react-router-hash-link';
|
// import { HashLink as Link } from 'react-router-hash-link';
|
||||||
|
|
@ -40,6 +40,18 @@ class Index extends Component {
|
||||||
this.myScaleFunction();
|
this.myScaleFunction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getMap(isMobile) {
|
||||||
|
if (!isMobile) {
|
||||||
|
return (
|
||||||
|
<Section className="">
|
||||||
|
<div className="container">
|
||||||
|
<FiresMap />
|
||||||
|
</div>
|
||||||
|
</Section>);
|
||||||
|
}
|
||||||
|
return (<Fragment />);
|
||||||
|
}
|
||||||
|
|
||||||
scaleHeader() {
|
scaleHeader() {
|
||||||
const scalable = document.getElementById('tcefh1');
|
const scalable = document.getElementById('tcefh1');
|
||||||
const margin = 10;
|
const margin = 10;
|
||||||
|
|
@ -58,8 +70,8 @@ class Index extends Component {
|
||||||
render() {
|
render() {
|
||||||
// https://github.com/subtirelumihail/react-fullpage
|
// https://github.com/subtirelumihail/react-fullpage
|
||||||
const fullPageOptions = {
|
const fullPageOptions = {
|
||||||
|
anchors: isAnyMobile ? ['home', 'crowdsourcing', 'participe', 'platforms'] : ['home', 'crowdsourcing', 'participe', 'fires', 'platforms'], // the anchors for each sections
|
||||||
activeClass: 'active', // the class that is appended to the sections links
|
activeClass: 'active', // the class that is appended to the sections links
|
||||||
anchors: ['home', 'crowdsourcing', 'participe', 'fires', 'platforms'], // the anchors for each sections
|
|
||||||
arrowNavigation: true, // use arrow keys (true after development)
|
arrowNavigation: true, // use arrow keys (true after development)
|
||||||
className: 'section-container', // the class name for the section container
|
className: 'section-container', // the class name for the section container
|
||||||
delay: 1000, // the scroll animation speed
|
delay: 1000, // the scroll animation speed
|
||||||
|
|
@ -169,11 +181,7 @@ class Index extends Component {
|
||||||
<div className="overlay" />
|
<div className="overlay" />
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
<Section className="">
|
{this.getMap(isAnyMobile)}
|
||||||
<div className="container">
|
|
||||||
<FiresMap />
|
|
||||||
</div>
|
|
||||||
</Section>
|
|
||||||
|
|
||||||
<Section className="platf">
|
<Section className="platf">
|
||||||
<div className="container">
|
<div className="container">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue