diff --git a/imports/startup/client/i18n.js b/imports/startup/client/i18n.js index da0c122..6abc3c6 100644 --- a/imports/startup/client/i18n.js +++ b/imports/startup/client/i18n.js @@ -60,7 +60,7 @@ i18n.use(backend) whitelist: false, // whitelist: ['es', 'en'], // allowed languages load: 'all', // es-ES -> es, en-US -> en - debug: true, + debug: false, ns: 'common', defaultNS: 'common', saveMissing: true, // if true seems it's fails to getResourceBundle @@ -79,7 +79,7 @@ i18n.use(backend) } }, function(err, t) { // initialized and ready to - console.log(t('AppName')); + // console.log(t('AppName')); }); export default i18n; diff --git a/imports/ui/layouts/App/App.js b/imports/ui/layouts/App/App.js index 2452d29..c22a363 100644 --- a/imports/ui/layouts/App/App.js +++ b/imports/ui/layouts/App/App.js @@ -54,7 +54,7 @@ const App = props => ( {!props.loading ?
{props.userId && !props.emailVerified ?

Hey friend! Can you verify your email address ({props.emailAddress}) for us?

: ''} - + diff --git a/imports/ui/pages/Index/Index-custom.scss b/imports/ui/pages/Index/Index-custom.scss new file mode 100644 index 0000000..16da13c --- /dev/null +++ b/imports/ui/pages/Index/Index-custom.scss @@ -0,0 +1,120 @@ +.carousel-item { + height: 65vh; + min-height: 300px; + background: no-repeat center center scroll; + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; +} + +.carousel-control-next-icon, .carousel-control-prev-icon { + width: 40px; + height: 40px; +} + +.carousel-indicators li { + height: 5px; + border-radius: 2px; + cursor: pointer; +} + +.carousel-caption > h3 { + > i { + display: none; + } + font-size: 2.2rem; + text-shadow: 2px 2px 1px #280B0B; +} + +.py-5 > .container > { + div > h1 { + color: #280B0B; + font-weight: bold; + text-transform: uppercase; + font-size: 10px; + } + p { + padding-top: 10px; + font-size: 1.1em; + } +} + +.slide-2-icon { + border-radius: 50%; + position: relative; + width: 30%; + top: 25%; + left: 35%; + border: 14px solid #FFF; + opacity: .5; + &:after { + content: ""; + display: block; + padding-bottom: 100%; + } +} + +.slide-1-icon, .slide-2-icon, .slide-3-icon, .slide-4-icon { + position: relative; + top: 35%; +} + +.slide-1-icon:before, .slide-2-icon:before, .slide-3-icon:before, .slide-4-icon:before { + font-family: FontAwesome; + position: absolute; + font-size: 140px; + color: white; + opacity: .7; + right: 35%; + text-shadow: 1px 1px #280B0B; +} + +.slide-1-icon:before { + content: ""; +} + +.slide-2-icon { + top: 20%; +} + +.slide-2-iconDISABLED:before { + content: ""; + font-size: 320px; + top: -10%; +} + +.slide-3-icon:before { + content: ""; +} + +.slide-4-icon:before { + content: ""; +} + +.scale__container--js { + text-align: center; +} + +.scale--js { + display: inline-block; + transform-origin: 50% 0; + -webkit-font-smoothing: antialiased; + transform: translate3d(0, 0, 0); +} + +.carousel-item-1 { + background-image: url('/home-slide1.jpg') +} + +.carousel-item-2 { + background-image: url('/home-slide2.jpg') +} + +.carousel-item-3 { + background-image: url('/home-slide3.jpg') +} + +.carousel-item-4 { + background-image: url('/home-slide4.jpg') +} diff --git a/imports/ui/pages/Index/Index.js b/imports/ui/pages/Index/Index.js index 4d8a5ab..517041b 100644 --- a/imports/ui/pages/Index/Index.js +++ b/imports/ui/pages/Index/Index.js @@ -3,22 +3,117 @@ import { Button } from 'react-bootstrap'; import { translate } from 'react-i18next'; import './Index.scss'; +import './Index-custom.scss'; const Index = (props) => { const { t } = props; return ( -
-

{props.t('AppName')}

-

A boilerplate for products.

-
- - +
+ {/* https://v4-alpha.getbootstrap.com/components/carousel/ */} +
+
+
    +
  1. +
  2. +
  3. +
  4. +
+
+ +
+
+
+

Elige un lugar

+

+
+
+ +
+
+
+

Elige un radio de vigilancia

+

+
+
+ +
+
+
+

Recibe alertas de fuegos en esa zona

+

+
+
+ +
+
+
+

Alerta cuando hay un fuego

+

+
+
+
+ + + Previous + + + + Next + +
+
+ +
+
+
+

{props.t('AppName')}

+
+

Siempre alerta a los fuegos en nuestro vecindario

+ +
+
- -
); }; +function scaleHeader() { + var scalable = document.querySelectorAll('.scale--js'); + var margin = 10; + for (var i = 0; i < scalable.length; i++) { + var scalableContainer = scalable[i].parentNode; + scalable[i].style.transform = 'scale(1)'; + var scalableContainerWidth = scalableContainer.offsetWidth - margin; + var scalableWidth = scalable[i].offsetWidth; + scalable[i].style.transform = 'scale(' + scalableContainerWidth / scalableWidth + ')'; + scalableContainer.style.height = scalable[i].getBoundingClientRect().height + 'px'; + } +} + + +// Debounce by David Walsch +// https://davidwalsh.name/javascript-debounce-function + +function debounce(func, wait, immediate) { + var timeout; + return function() { + var context = this, args = arguments; + var later = function() { + timeout = null; + if (!immediate) func.apply(context, args); + }; + var callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) func.apply(context, args); + }; +}; + +var myScaleFunction = debounce(function() { + scaleHeader(); +}, 250); + +myScaleFunction(); + +window.addEventListener('resize', myScaleFunction); + export default translate([], { wait: true })(Index); diff --git a/imports/ui/stylesheets/app.scss b/imports/ui/stylesheets/app.scss index 21c9469..f1676f0 100644 --- a/imports/ui/stylesheets/app.scss +++ b/imports/ui/stylesheets/app.scss @@ -1,3 +1,4 @@ @import './colors'; @import './forms'; @import './bootstrap-overrides'; +@import './custom'; diff --git a/package.json b/package.json index 2246aa5..6e260fd 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "react-i18next": "^6.1.0", "react-router-bootstrap": "^0.24.3", "react-router-dom": "^4.2.2", + "reactstrap": "^5.0.0-alpha.3", "simpl-schema": "^0.3.2" }, "devDependencies": {