Basic tcef home
This commit is contained in:
parent
460d0a0b5e
commit
60fcd48140
6 changed files with 230 additions and 13 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ const App = props => (
|
|||
{!props.loading ? <div className="App">
|
||||
{props.userId && !props.emailVerified ? <Alert className="verify-email text-center"><p>Hey friend! Can you <strong>verify your email address</strong> ({props.emailAddress}) for us? <Button bsStyle="link" onClick={() => handleResendVerificationEmail(props.emailAddress)} href="#">Re-send verification email</Button></p></Alert> : ''}
|
||||
<Navigation {...props} />
|
||||
<Grid>
|
||||
<Grid bsClass="previously-container-but-disabled" >
|
||||
<Switch>
|
||||
<Route exact name="index" path="/" component={Index} />
|
||||
<Authenticated exact path="/documents" component={Documents} {...props} />
|
||||
|
|
|
|||
120
imports/ui/pages/Index/Index-custom.scss
Normal file
120
imports/ui/pages/Index/Index-custom.scss
Normal file
|
|
@ -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')
|
||||
}
|
||||
|
|
@ -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 (
|
||||
<div className="Index">
|
||||
<h1>{props.t('AppName')}</h1>
|
||||
<p>A boilerplate for products.</p>
|
||||
<div>
|
||||
<Button href="http://cleverbeagle.com/pup">Read the Docs</Button>
|
||||
<Button href="https://github.com/cleverbeagle/pup"><i className="fa fa-star" /> Star on GitHub</Button>
|
||||
<div className="IndexDisabled">
|
||||
{/* https://v4-alpha.getbootstrap.com/components/carousel/ */}
|
||||
<header>
|
||||
<div id="carouselExampleIndicators" className="carousel slide" data-ride="carousel">
|
||||
<ol className="carousel-indicators">
|
||||
<li data-target="#carouselExampleIndicators" data-slide-to="0" className="active"></li>
|
||||
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
|
||||
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
|
||||
<li data-target="#carouselExampleIndicators" data-slide-to="3"></li>
|
||||
</ol>
|
||||
<div className="carousel-inner" role="listbox">
|
||||
|
||||
<div className="carousel-item carousel-item-1 active">
|
||||
<div className="slide-1-icon"></div>
|
||||
<div className="carousel-caption">
|
||||
<h3><i className="fa fa-map-pointer" aria-hidden="true"></i>Elige un lugar</h3>
|
||||
<p></p>
|
||||
</div>
|
||||
<footer>
|
||||
<p>Need help and want to stay accountable building your product? <a href="http://cleverbeagle.com?utm_source=pupappindex&utm_campaign=oss">Check out Clever Beagle</a>.</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<div className="carousel-item carousel-item-2">
|
||||
<div className="slide-2-icon"></div>
|
||||
<div className="carousel-caption">
|
||||
<h3><i className="fa fa-dot-circle-o" aria-hidden="true"></i>Elige un radio de vigilancia</h3>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="carousel-item carousel-item-3">
|
||||
<div className="slide-3-icon"></div>
|
||||
<div className="carousel-caption">
|
||||
<h3><i className="fa fa-podcast" aria-hidden="true"></i>Recibe alertas de fuegos en esa zona</h3>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="carousel-item carousel-item-4">
|
||||
<div className="slide-4-icon"></div>
|
||||
<div className="carousel-caption">
|
||||
<h3><i className="fa fa-bell-o" aria-hidden="true"></i>Alerta cuando hay un fuego</h3>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a className="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
|
||||
<span className="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span className="sr-only">Previous</span>
|
||||
</a>
|
||||
<a className="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
|
||||
<span className="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span className="sr-only">Next</span>
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section className="py-5">
|
||||
<div className="container">
|
||||
<div className="scale__container--js">
|
||||
<h1 className="scale--js">{props.t('AppName')}</h1>
|
||||
</div>
|
||||
<p>Siempre alerta a los fuegos en nuestro vecindario</p>
|
||||
<button type="button" className="btn btn-raised btn-lg btn-warning">PARTICIPA</button>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
@import './colors';
|
||||
@import './forms';
|
||||
@import './bootstrap-overrides';
|
||||
@import './custom';
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue