Basic tcef home
This commit is contained in:
parent
460d0a0b5e
commit
60fcd48140
6 changed files with 230 additions and 13 deletions
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>
|
||||
</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>
|
||||
<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>
|
||||
);
|
||||
};
|
||||
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue