diff --git a/designs/California_Wildfires_October_23_2007.jpg b/designs/California_Wildfires_October_23_2007.jpg new file mode 100644 index 0000000..0ecf0b7 Binary files /dev/null and b/designs/California_Wildfires_October_23_2007.jpg differ diff --git a/imports/ui/components/CenterInMyPosition/CenterInMyPosition.js b/imports/ui/components/CenterInMyPosition/CenterInMyPosition.js index 85f94ed..167bcfa 100644 --- a/imports/ui/components/CenterInMyPosition/CenterInMyPosition.js +++ b/imports/ui/components/CenterInMyPosition/CenterInMyPosition.js @@ -24,7 +24,7 @@ class CenterInMyPosition extends React.Component { var viewport = { center: [userGeoLocation.get().lat, userGeoLocation.get().lng], zoom: 11 - } + }; self.props.onClick(viewport); // console.log(viewport); // self.onViewportChanged(viewport); diff --git a/imports/ui/components/Footer/Footer.js b/imports/ui/components/Footer/Footer.js index be110b7..e27f8ae 100644 --- a/imports/ui/components/Footer/Footer.js +++ b/imports/ui/components/Footer/Footer.js @@ -22,6 +22,7 @@ const Footer = (props) => {
  • {t('Términos')} {t('de Servicio')}
  • {t('Política de')} {t('Privacidad')}
  • {t('Licencia')}
  • +
  • {t('Créditos')}
  • diff --git a/imports/ui/components/Footer/Footer.scss b/imports/ui/components/Footer/Footer.scss index 2a459a7..18cd297 100644 --- a/imports/ui/components/Footer/Footer.scss +++ b/imports/ui/components/Footer/Footer.scss @@ -43,7 +43,7 @@ body { ul li { float: left; - &:first-child, &:nth-child(2) { + &:first-child, &:nth-child(3) { margin-right: 15px; } diff --git a/imports/ui/layouts/App/App.js b/imports/ui/layouts/App/App.js index 0434406..b4d713b 100644 --- a/imports/ui/layouts/App/App.js +++ b/imports/ui/layouts/App/App.js @@ -40,6 +40,7 @@ import Footer from '../../components/Footer/Footer'; import Terms from '../../pages/Terms/Terms'; import Privacy from '../../pages/Privacy/Privacy'; import License from '../../pages/License/License'; +import Credits from '../../pages/Credits/Credits'; import FireSubscription from '../../pages/FireSubscription/FireSubscription'; import ReSendEmail from '../../components/ReSendEmail/ReSendEmail'; import FiresMap from '../../pages/FiresMap/FiresMap'; @@ -74,13 +75,14 @@ const App = props => ( - + + diff --git a/imports/ui/pages/Credits/Credits.js b/imports/ui/pages/Credits/Credits.js new file mode 100644 index 0000000..7fe073a --- /dev/null +++ b/imports/ui/pages/Credits/Credits.js @@ -0,0 +1,15 @@ +import React from 'react'; +import Page from '../Page/Page'; +import { translate } from 'react-i18next'; + +const Credits = props => ( +
    + +
    +); + +export default translate([], { wait: true })(Credits); diff --git a/imports/ui/pages/FireSubscription/FireSubscription.js b/imports/ui/pages/FireSubscription/FireSubscription.js index c9a72e6..02e47b5 100644 --- a/imports/ui/pages/FireSubscription/FireSubscription.js +++ b/imports/ui/pages/FireSubscription/FireSubscription.js @@ -50,6 +50,7 @@ class FireSubscription extends React.Component {

    Suscríbete a alertas de fuegos

    this.onAutocompleteChange(value) }/>
    @@ -75,7 +76,8 @@ class FireSubscription extends React.Component { } FireSubscription.propTypes = { - history: PropTypes.object.isRequired + history: PropTypes.object.isRequired, + focusInput: PropTypes.bool.isRequired }; export default translate([], { wait: true })(FireSubscription); diff --git a/imports/ui/pages/FireSubscription/SubsAutocomplete.js b/imports/ui/pages/FireSubscription/SubsAutocomplete.js index 9547abb..050dc15 100644 --- a/imports/ui/pages/FireSubscription/SubsAutocomplete.js +++ b/imports/ui/pages/FireSubscription/SubsAutocomplete.js @@ -1,6 +1,7 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { Trans, translate } from 'react-i18next'; -import PlacesAutocomplete, { geocodeByAddress, geocodeByPlaceId, getLatLng } from 'react-places-autocomplete' +import PlacesAutocomplete, { geocodeByAddress, geocodeByPlaceId, getLatLng } from 'react-places-autocomplete'; import { FormGroup, ControlLabel, HelpBlock } from 'react-bootstrap'; class SubsAutocomplete extends React.Component { @@ -84,7 +85,7 @@ class SubsAutocomplete extends React.Component { placeholder: this.props.t("Escribe aquí un lugar "), onBlur:() => { /* console.log('Blur event!'); */ }, onFocus:() => { /* console.log('Focused!'); */ }, - autoFocus:true + autoFocus: this.props.focusInput }} /> También puedes seleccionar el lugar en el mapa arrastrando el puntero naranja. @@ -93,5 +94,8 @@ class SubsAutocomplete extends React.Component { } } +SubsAutocomplete.propTypes = { + focusInput: PropTypes.bool.isRequired +}; export default translate([], { wait: true }) (SubsAutocomplete); diff --git a/imports/ui/pages/FiresMap/FiresMap.js b/imports/ui/pages/FiresMap/FiresMap.js index 4ba7508..39b9bf7 100644 --- a/imports/ui/pages/FiresMap/FiresMap.js +++ b/imports/ui/pages/FiresMap/FiresMap.js @@ -94,7 +94,7 @@ FireMark.propTypes = { }; // Below this use only pixels -const MAXZOOM = 7; +const MAXZOOM = 6; const MyMarkersList = ({ markers }) => { const items = markers.map(({ key, ...props }) => ( @@ -111,7 +111,7 @@ const FireList = ({ fires, scale, useMarkers, nasa }) => { * } * }*/ const items = fires.map(({ _id, ...props }) => ( - useMarkers && !scale? : + useMarkers && scale? : (!nasa && !scale)? :)); return
    {items}
    ; }; @@ -141,30 +141,33 @@ class FiresMap extends React.Component { } centerOnUserLocation = (viewport) => { - this.onViewportChanged(viewport); + this.handleViewportChange(viewport); }; + handleViewportChange = function (viewport) { + console.log(`Viewport changed: ${JSON.stringify(viewport)}`); + zoom.set(viewport.zoom); + lat.set(viewport.center[0]); + lng.set(viewport.center[1]); + this.state.viewport = viewport; + this.state.modified = true; + if (this.props.subsready && this.refs.fireMap) { + this.showSubsUnion(this.state.showSubsUnion); + } + } + componentDidMount() { height.set(this.divElement.clientHeight); width.set(this.divElement.clientWidth); this.addScale(); const self = this; - this.handleViewportChangeDebounced = _.debounce(function (viewport) { - console.log(`Viewport changed: ${JSON.stringify(this.state.viewport)}`); - zoom.set(viewport.zoom); - lat.set(viewport.center[0]); - lng.set(viewport.center[1]); - self.state.viewport = viewport; - self.state.modified = true; - if (self.props.subsready && self.refs.fireMap) { - self.showSubsUnion(self.state.showSubsUnion); - } - }, 2000); + // viewportchange + this.debounceView = _.debounce(function(viewport) {this.handleViewportChange(viewport); }.bind(this), 2000); } // https://stackoverflow.com/questions/23123138/perform-debounce-in-react-js onViewportChanged = (viewport) => { - this.handleViewportChangeDebounced(viewport); + this.debounceView(viewport); }; onClickReset = () => { @@ -253,15 +256,16 @@ class FiresMap extends React.Component { this.showSubsUnion(e.target.checked)}> Resaltar en verde el área vigilada por nuestros usuarios/as (*) - this.useMarkers(e.target.checked)}> + {(this.state.viewport.zoom >= MAXZOOM) && this.useMarkers(e.target.checked)}> Resaltar los fuegos con un marcador - + } this.centerOnUserLocation(viewport)} /> MAXZOOM} + scale={this.state.viewport.zoom >= MAXZOOM} useMarkers={this.state.useMarkers} nasa={true} /> diff --git a/imports/ui/pages/Index/Index-custom.scss b/imports/ui/pages/Index/Index-custom.scss index 53bc0af..b18ec37 100644 --- a/imports/ui/pages/Index/Index-custom.scss +++ b/imports/ui/pages/Index/Index-custom.scss @@ -140,3 +140,31 @@ color: white; text-transform: uppercase; } + +.bg-image-full { + color: white; + text-shadow: 2px 2px 1px #280B0B; + background: no-repeat center center scroll; + -webkit-background-size: cover; + -moz-background-size: cover; + background-size: cover; + -o-background-size: cover; + background-image: url('/home-fires.jpg'); +} + +@media only screen and (max-width: 767px) { + .bg-image-full { + background-image: url('/home-fires-800.jpg'); + } +} + +@media only screen and (max-width: 400px) { + .bg-image-full { + background-image: url('/home-fires-400.jpg'); + } +} + +@media only screen and (max-width: 1000px) { + .bg-image-full { + background-image: url('/home-fires-1000.jpg'); } +} diff --git a/imports/ui/pages/Index/Index.js b/imports/ui/pages/Index/Index.js index 546dea2..3e28553 100644 --- a/imports/ui/pages/Index/Index.js +++ b/imports/ui/pages/Index/Index.js @@ -7,7 +7,7 @@ import { Link } from 'react-router-dom'; import ReactResizeDetector from 'react-resize-detector'; import FiresMap from '../FiresMap/FiresMap'; import FireSubscription from '/imports/ui/pages/FireSubscription/FireSubscription'; -import './new-age.js'; +// disabled import './new-age.js'; import './Index.scss'; import './Index-custom.scss'; @@ -123,12 +123,12 @@ class Index extends Component { -
    +
    -

    Discover what all the buzz is about!

    -

    Our app is available on any mobile device! Download now to get started!

    +

    Colaboración masiva contra los incendios

    +

    Imágenes capturadas por los satélites de la NASA muestran el humo de grandes incendios que se extienden sobre el Océano Pacífico. La actividad del fuego está delineada en rojo.

    @@ -141,8 +141,8 @@ class Index extends Component {
    -

    Unlimited Features, Unlimited Fun

    -

    Check out what you can do with this app theme!

    +

    Somos muchos ojos

    +

    Usamos diferentes fuentes de datos para notificarte de fuegos activos en tus zonas de interés


    @@ -165,11 +165,11 @@ class Index extends Component {
    @@ -204,8 +204,7 @@ class Index extends Component {
    -

    Stop waiting.
    Start building.

    - Let's Get Started! +
    @@ -213,38 +212,7 @@ class Index extends Component {
    -

    We - - new friends!

    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - +
    diff --git a/imports/ui/pages/Login/Login.js b/imports/ui/pages/Login/Login.js index 1e41299..ecb8881 100644 --- a/imports/ui/pages/Login/Login.js +++ b/imports/ui/pages/Login/Login.js @@ -75,7 +75,7 @@ class Login extends React.Component { services={['google']} emailMessage={{ offset: 100, - text: this.t('o inicia sesión con un correo') + text: this.t('o con un correo') }} /> diff --git a/imports/ui/stylesheets/new-age.scss b/imports/ui/stylesheets/new-age.scss index cef5356..d458745 100644 --- a/imports/ui/stylesheets/new-age.scss +++ b/imports/ui/stylesheets/new-age.scss @@ -14,13 +14,13 @@ body { } a { - color: #fdcc52; + /* color: #fdcc52; */ -webkit-transition: all .35s; -moz-transition: all .35s; transition: all .35s; } a:hover, a:focus { - color: #fcbd20; } + /* color: #fcbd20; */ } hr { max-width: 100px; @@ -263,22 +263,6 @@ section.contact ul.list-social li.social-google-plus a { section.contact ul.list-social li.social-google-plus a:hover { background-color: #d73925; } -footer { - padding: 25px 0; - text-align: center; - color: rgba(255, 255, 255, 0.3); - background-color: #222222; } -footer p { - font-size: 12px; - margin: 0; } -footer ul { - margin-bottom: 0; } -footer ul li a { - font-size: 12px; - color: rgba(255, 255, 255, 0.3); } -footer ul li a:hover, footer ul li a:focus, footer ul li a:active, footer ul li a.active { - text-decoration: none; } - .bg-primary { background: #fdcc52; background: -webkit-linear-gradient(#fdcc52, #fdc539); @@ -301,11 +285,34 @@ footer ul li a:hover, footer ul li a:focus, footer ul li a:active, footer ul li background-color: #fdcc52; } .btn { - border-radius: 300px; + /* border-radius: 300px; */ font-family: 'Lato', 'Helvetica', 'Arial', 'sans-serif'; - letter-spacing: 2px; - text-transform: uppercase; } + /* text-transform: uppercase; */ } + +@media (min-width: 480px) { + .btn { + letter-spacing: 2px; + text-transform: uppercase; + } +} + +.EmailMessage { + font-size: 16px; +} + +.OAuthLoginButtons > .btn { + letter-spacing: inherit; + text-transform: none; +} + +h1 { + font-family: 'Lato', 'Helvetica', 'Arial', 'sans-serif'; +} .btn-xl { font-size: 11px; padding: 15px 45px; } + +a.feature-link:hover { + text-decoration: none; +} diff --git a/package-lock.json b/package-lock.json index 96dada4..bda53ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4849,10 +4849,6 @@ "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" }, - "hoist-non-react-statics": { - "version": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz", - "integrity": "sha1-ND24TGAYxlB3iJgkATWhQg7iLOA=" - }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -9861,13 +9857,20 @@ } }, "react-i18next": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-6.2.0.tgz", - "integrity": "sha512-OYoZku8QErBiqEvSq8/Lm7RPdOQP/TQF/CWa52vwT6SeBll4YFeGu4dssz3fmKgTEDmxC3MOaNb7NZv9V4Yc8Q==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-7.1.1.tgz", + "integrity": "sha1-T7XLTvf3rU/HfMKY6Sln0H1t7nU=", "requires": { - "hoist-non-react-statics": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz", + "hoist-non-react-statics": "2.3.1", "html-parse-stringify2": "2.0.1", "prop-types": "15.6.0" + }, + "dependencies": { + "hoist-non-react-statics": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz", + "integrity": "sha1-ND24TGAYxlB3iJgkATWhQg7iLOA=" + } } }, "react-leaflet": { diff --git a/package.json b/package.json index f3080d7..ec0ded3 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "react-addons-pure-render-mixin": "^15.6.2", "react-bootstrap": "^0.31.5", "react-dom": "^16.0.0", - "react-i18next": "^6.1.0", + "react-i18next": "^7.1.1", "react-leaflet": "^1.7.7", "react-leaflet-control": "^1.4.0", "react-places-autocomplete": "^5.4.3", diff --git a/private/pages/credits.md b/private/pages/credits.md new file mode 100644 index 0000000..3e4e86b --- /dev/null +++ b/private/pages/credits.md @@ -0,0 +1,9 @@ + +## Data ## + +We acknowledge the use of data and imagery from LANCE FIRMS operated by the NASA/GSFC/Earth Science Data and Information System (ESDIS) with funding provided by NASA/HQ. + +## Photos ## + +https://commons.wikimedia.org/wiki/File:California_Wildfires_October_23_2007.jpg +Source: http://www.nasa.gov/vision/earth/lookingatearth/socal_wildfires_oct07.html diff --git a/public/home-fires-1000.jpg b/public/home-fires-1000.jpg new file mode 100644 index 0000000..ef92b60 Binary files /dev/null and b/public/home-fires-1000.jpg differ diff --git a/public/home-fires-400.jpg b/public/home-fires-400.jpg new file mode 100644 index 0000000..cba887a Binary files /dev/null and b/public/home-fires-400.jpg differ diff --git a/public/home-fires-800.jpg b/public/home-fires-800.jpg new file mode 100644 index 0000000..9e1d0d7 Binary files /dev/null and b/public/home-fires-800.jpg differ diff --git a/public/home-fires.jpg b/public/home-fires.jpg new file mode 100644 index 0000000..d1d835a Binary files /dev/null and b/public/home-fires.jpg differ diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 1105b53..499d537 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -15,8 +15,8 @@ "Regístrate": "Sign Up", "Iniciar sesión": "Login", "o regístrate con un correo": "or Sign Up with an Email Address", - "o inicia sesión con un correo": - "or Log In with an Email Address", + "o con un correo": + "or with an Email Address", "Nombre": "First Name", "Apellidos": @@ -100,5 +100,9 @@ "Repite la nueva contraseña": "Repeat New Password", "Resetea la contraseña y entra": - "Reset Password & Login" + "Reset Password & Login", + "Imágenes capturadas por los satélites de la NASA muestran el humo de grandes incendios que se extienden sobre el Océano Pacífico. La actividad del fuego está delineada en rojo.": + "Images captured by NASA satellites show the smoke of large fires spreading over the Pacific Ocean. Fire activity is outlined in red.", + "Colaboración masiva contra los incendios": + "Corwdsourcing against wildfires" } diff --git a/public/locales/es/common.json b/public/locales/es/common.json index ef9cad3..ffa21a4 100644 --- a/public/locales/es/common.json +++ b/public/locales/es/common.json @@ -16,8 +16,8 @@ "Iniciar sesión": "Iniciar sesión", "o regístrate con un correo": "o regístrate con un correo", - "o inicia sesión con un correo": - "o inicia sesión con un correo", + "o con un correo": + "o con un correo", "Nombre": "Nombre", "Apellidos": @@ -127,5 +127,9 @@ "mapPrivacy": "<0>Para preservar la privacidad de nuestros usuarios/as, los datos reflejados están aleatoriamente alterados y son solo orientativos. <0>Para preservar la privacidad de nuestros usuarios/as, los datos reflejados están aleatoriamente alterados y son solo orientativos.", "Nuevas notificaciones de {{app}}": - "Nuevas notificaciones de {{app}}" + "Nuevas notificaciones de {{app}}", + "Imágenes capturadas por los satélites de la NASA muestran el humo de grandes incendios que se extienden sobre el Océano Pacífico. La actividad del fuego está delineada en rojo.": + "Imágenes capturadas por los satélites de la NASA muestran el humo de grandes incendios que se extienden sobre el Océano Pacífico. La actividad del fuego está delineada en rojo.", + "Colaboración masiva contra los incendios": + "Colaboración masiva contra los incendios" }