Add new kompose site (#1475)
Adds the new kompose site and moves it to the /docs folder so that it's compatible with old links as well as gh-pages
@@ -0,0 +1,63 @@
|
||||
/*!
|
||||
* jQuery Accordion 0.0.1
|
||||
* (c) 2014 Victor Fernandez <victor@vctrfrnndz.com>
|
||||
* MIT Licensed.
|
||||
*/
|
||||
|
||||
/* Requirements */
|
||||
|
||||
[data-accordion] [data-content] {
|
||||
overflow: hidden;
|
||||
max-height: 0;
|
||||
}
|
||||
|
||||
/* Basic Theme */
|
||||
|
||||
[data-accordion-group] {
|
||||
padding: 20px;
|
||||
box-shadow: 0 0px 15px rgba(0,0,0,0.06);
|
||||
}
|
||||
|
||||
[data-control] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
[data-accordion] {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
[data-control],
|
||||
[data-content] > * {
|
||||
border-bottom: 1px solid #EEE;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
[data-content] [data-accordion] {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
[data-accordion] [data-control] {
|
||||
position: relative;
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
[data-accordion] > [data-control]:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 12px;
|
||||
font-size: 25px;
|
||||
font-weight: 200;
|
||||
color: #444;
|
||||
height: 15px;
|
||||
width: 24px;
|
||||
background: url('../images/down.png') center center no-repeat;
|
||||
background-size: 50%;
|
||||
}
|
||||
|
||||
[data-accordion].open > [data-control]:after {
|
||||
-webkit-transform: rotate(-180deg);
|
||||
-ms-transform: rotate(-180deg);
|
||||
transform: rotate(-180deg);
|
||||
}
|
||||
@@ -0,0 +1,351 @@
|
||||
/* Magnific Popup CSS */
|
||||
.mfp-bg {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1042;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
background: #0b0b0b;
|
||||
opacity: 0.8; }
|
||||
|
||||
.mfp-wrap {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1043;
|
||||
position: fixed;
|
||||
outline: none !important;
|
||||
-webkit-backface-visibility: hidden; }
|
||||
|
||||
.mfp-container {
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
padding: 0 8px;
|
||||
box-sizing: border-box; }
|
||||
|
||||
.mfp-container:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
vertical-align: middle; }
|
||||
|
||||
.mfp-align-top .mfp-container:before {
|
||||
display: none; }
|
||||
|
||||
.mfp-content {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin: 0 auto;
|
||||
text-align: left;
|
||||
z-index: 1045; }
|
||||
|
||||
.mfp-inline-holder .mfp-content,
|
||||
.mfp-ajax-holder .mfp-content {
|
||||
width: 100%;
|
||||
cursor: auto; }
|
||||
|
||||
.mfp-ajax-cur {
|
||||
cursor: progress; }
|
||||
|
||||
.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
|
||||
cursor: -moz-zoom-out;
|
||||
cursor: -webkit-zoom-out;
|
||||
cursor: zoom-out; }
|
||||
|
||||
.mfp-zoom {
|
||||
cursor: pointer;
|
||||
cursor: -webkit-zoom-in;
|
||||
cursor: -moz-zoom-in;
|
||||
cursor: zoom-in; }
|
||||
|
||||
.mfp-auto-cursor .mfp-content {
|
||||
cursor: auto; }
|
||||
|
||||
.mfp-close,
|
||||
.mfp-arrow,
|
||||
.mfp-preloader,
|
||||
.mfp-counter {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none; }
|
||||
|
||||
.mfp-loading.mfp-figure {
|
||||
display: none; }
|
||||
|
||||
.mfp-hide {
|
||||
display: none !important; }
|
||||
|
||||
.mfp-preloader {
|
||||
color: #CCC;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: auto;
|
||||
text-align: center;
|
||||
margin-top: -0.8em;
|
||||
left: 8px;
|
||||
right: 8px;
|
||||
z-index: 1044; }
|
||||
.mfp-preloader a {
|
||||
color: #CCC; }
|
||||
.mfp-preloader a:hover {
|
||||
color: #FFF; }
|
||||
|
||||
.mfp-s-ready .mfp-preloader {
|
||||
display: none; }
|
||||
|
||||
.mfp-s-error .mfp-content {
|
||||
display: none; }
|
||||
|
||||
button.mfp-close,
|
||||
button.mfp-arrow {
|
||||
overflow: visible;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
-webkit-appearance: none;
|
||||
display: block;
|
||||
outline: none;
|
||||
padding: 0;
|
||||
z-index: 1046;
|
||||
box-shadow: none;
|
||||
touch-action: manipulation; }
|
||||
|
||||
button::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border: 0; }
|
||||
|
||||
.mfp-close {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
line-height: 44px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
opacity: 0.65;
|
||||
padding: 0 0 18px 10px;
|
||||
color: #FFF;
|
||||
font-style: normal;
|
||||
font-size: 28px;
|
||||
font-family: Arial, Baskerville, monospace; }
|
||||
.mfp-close:hover,
|
||||
.mfp-close:focus {
|
||||
opacity: 1; }
|
||||
.mfp-close:active {
|
||||
top: 1px; }
|
||||
|
||||
.mfp-close-btn-in .mfp-close {
|
||||
color: #333; }
|
||||
|
||||
.mfp-image-holder .mfp-close,
|
||||
.mfp-iframe-holder .mfp-close {
|
||||
color: #FFF;
|
||||
right: -6px;
|
||||
text-align: right;
|
||||
padding-right: 6px;
|
||||
width: 100%; }
|
||||
|
||||
.mfp-counter {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
color: #CCC;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
white-space: nowrap; }
|
||||
|
||||
.mfp-arrow {
|
||||
position: absolute;
|
||||
opacity: 0.65;
|
||||
margin: 0;
|
||||
top: 50%;
|
||||
margin-top: -55px;
|
||||
padding: 0;
|
||||
width: 90px;
|
||||
height: 110px;
|
||||
-webkit-tap-highlight-color: transparent; }
|
||||
.mfp-arrow:active {
|
||||
margin-top: -54px; }
|
||||
.mfp-arrow:hover,
|
||||
.mfp-arrow:focus {
|
||||
opacity: 1; }
|
||||
.mfp-arrow:before,
|
||||
.mfp-arrow:after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
margin-top: 35px;
|
||||
margin-left: 35px;
|
||||
border: medium inset transparent; }
|
||||
.mfp-arrow:after {
|
||||
border-top-width: 13px;
|
||||
border-bottom-width: 13px;
|
||||
top: 8px; }
|
||||
.mfp-arrow:before {
|
||||
border-top-width: 21px;
|
||||
border-bottom-width: 21px;
|
||||
opacity: 0.7; }
|
||||
|
||||
.mfp-arrow-left {
|
||||
left: 0; }
|
||||
.mfp-arrow-left:after {
|
||||
border-right: 17px solid #FFF;
|
||||
margin-left: 31px; }
|
||||
.mfp-arrow-left:before {
|
||||
margin-left: 25px;
|
||||
border-right: 27px solid #3F3F3F; }
|
||||
|
||||
.mfp-arrow-right {
|
||||
right: 0; }
|
||||
.mfp-arrow-right:after {
|
||||
border-left: 17px solid #FFF;
|
||||
margin-left: 39px; }
|
||||
.mfp-arrow-right:before {
|
||||
border-left: 27px solid #3F3F3F; }
|
||||
|
||||
.mfp-iframe-holder {
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px; }
|
||||
.mfp-iframe-holder .mfp-content {
|
||||
line-height: 0;
|
||||
width: 100%;
|
||||
max-width: 900px; }
|
||||
.mfp-iframe-holder .mfp-close {
|
||||
top: -40px; }
|
||||
|
||||
.mfp-iframe-scaler {
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
padding-top: 56.25%; }
|
||||
.mfp-iframe-scaler iframe {
|
||||
position: absolute;
|
||||
display: block;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
||||
background: #000; }
|
||||
|
||||
/* Main image in popup */
|
||||
img.mfp-img {
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
line-height: 0;
|
||||
box-sizing: border-box;
|
||||
padding: 40px 0 40px;
|
||||
margin: 0 auto; }
|
||||
|
||||
/* The shadow behind the image */
|
||||
.mfp-figure {
|
||||
line-height: 0; }
|
||||
.mfp-figure:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 40px;
|
||||
bottom: 40px;
|
||||
display: block;
|
||||
right: 0;
|
||||
width: auto;
|
||||
height: auto;
|
||||
z-index: -1;
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
||||
background: #444; }
|
||||
.mfp-figure small {
|
||||
color: #BDBDBD;
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
line-height: 14px; }
|
||||
.mfp-figure figure {
|
||||
margin: 0; }
|
||||
|
||||
.mfp-bottom-bar {
|
||||
margin-top: -36px;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
cursor: auto; }
|
||||
|
||||
.mfp-title {
|
||||
text-align: left;
|
||||
line-height: 18px;
|
||||
color: #F3F3F3;
|
||||
word-wrap: break-word;
|
||||
padding-right: 36px; }
|
||||
|
||||
.mfp-image-holder .mfp-content {
|
||||
max-width: 100%; }
|
||||
|
||||
.mfp-gallery .mfp-image-holder .mfp-figure {
|
||||
cursor: pointer; }
|
||||
|
||||
@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
|
||||
/**
|
||||
* Remove all paddings around the image on small screen
|
||||
*/
|
||||
.mfp-img-mobile .mfp-image-holder {
|
||||
padding-left: 0;
|
||||
padding-right: 0; }
|
||||
.mfp-img-mobile img.mfp-img {
|
||||
padding: 0; }
|
||||
.mfp-img-mobile .mfp-figure:after {
|
||||
top: 0;
|
||||
bottom: 0; }
|
||||
.mfp-img-mobile .mfp-figure small {
|
||||
display: inline;
|
||||
margin-left: 5px; }
|
||||
.mfp-img-mobile .mfp-bottom-bar {
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
bottom: 0;
|
||||
margin: 0;
|
||||
top: auto;
|
||||
padding: 3px 5px;
|
||||
position: fixed;
|
||||
box-sizing: border-box; }
|
||||
.mfp-img-mobile .mfp-bottom-bar:empty {
|
||||
padding: 0; }
|
||||
.mfp-img-mobile .mfp-counter {
|
||||
right: 5px;
|
||||
top: 3px; }
|
||||
.mfp-img-mobile .mfp-close {
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
position: fixed;
|
||||
text-align: center;
|
||||
padding: 0; } }
|
||||
|
||||
@media all and (max-width: 900px) {
|
||||
.mfp-arrow {
|
||||
-webkit-transform: scale(0.75);
|
||||
transform: scale(0.75); }
|
||||
.mfp-arrow-left {
|
||||
-webkit-transform-origin: 0;
|
||||
transform-origin: 0; }
|
||||
.mfp-arrow-right {
|
||||
-webkit-transform-origin: 100%;
|
||||
transform-origin: 100%; }
|
||||
.mfp-container {
|
||||
padding-left: 6px;
|
||||
padding-right: 6px; } }
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Core Owl Carousel CSS File
|
||||
* v1.3.3
|
||||
*/
|
||||
|
||||
/* clearfix */
|
||||
.owl-carousel .owl-wrapper:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
line-height: 0;
|
||||
height: 0;
|
||||
}
|
||||
/* display none until init */
|
||||
.owl-carousel{
|
||||
display: none;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
-ms-touch-action: pan-y;
|
||||
}
|
||||
.owl-carousel .owl-wrapper{
|
||||
display: none;
|
||||
position: relative;
|
||||
-webkit-transform: translate3d(0px, 0px, 0px);
|
||||
}
|
||||
.owl-carousel .owl-wrapper-outer{
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
.owl-carousel .owl-wrapper-outer.autoHeight{
|
||||
-webkit-transition: height 500ms ease-in-out;
|
||||
-moz-transition: height 500ms ease-in-out;
|
||||
-ms-transition: height 500ms ease-in-out;
|
||||
-o-transition: height 500ms ease-in-out;
|
||||
transition: height 500ms ease-in-out;
|
||||
}
|
||||
|
||||
.owl-carousel .owl-item{
|
||||
float: left;
|
||||
}
|
||||
.owl-controls .owl-page,
|
||||
.owl-controls .owl-buttons div{
|
||||
cursor: pointer;
|
||||
}
|
||||
.owl-controls {
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
/* mouse grab icon */
|
||||
.grabbing {
|
||||
cursor:url(grabbing.png) 8 8, move;
|
||||
}
|
||||
|
||||
/* fix */
|
||||
.owl-carousel .owl-wrapper,
|
||||
.owl-carousel .owl-item{
|
||||
-webkit-backface-visibility: hidden;
|
||||
-moz-backface-visibility: hidden;
|
||||
-ms-backface-visibility: hidden;
|
||||
-webkit-transform: translate3d(0,0,0);
|
||||
-moz-transform: translate3d(0,0,0);
|
||||
-ms-transform: translate3d(0,0,0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Owl Carousel Owl Demo Theme
|
||||
* v1.3.3
|
||||
*/
|
||||
|
||||
.owl-theme .owl-controls{
|
||||
margin-top: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Styling Next and Prev buttons */
|
||||
|
||||
.owl-theme .owl-controls .owl-buttons div{
|
||||
color: #FFF;
|
||||
display: inline-block;
|
||||
zoom: 1;
|
||||
*display: inline;/*IE7 life-saver */
|
||||
margin: 5px;
|
||||
padding: 3px 10px;
|
||||
font-size: 12px;
|
||||
-webkit-border-radius: 30px;
|
||||
-moz-border-radius: 30px;
|
||||
border-radius: 30px;
|
||||
background: #869791;
|
||||
filter: Alpha(Opacity=50);/*IE7 fix*/
|
||||
opacity: 0.5;
|
||||
}
|
||||
/* Clickable class fix problem with hover on touch devices */
|
||||
/* Use it for non-touch hover action */
|
||||
.owl-theme .owl-controls.clickable .owl-buttons div:hover{
|
||||
filter: Alpha(Opacity=100);/*IE7 fix*/
|
||||
opacity: 1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Styling Pagination*/
|
||||
|
||||
.owl-theme .owl-controls .owl-page{
|
||||
display: inline-block;
|
||||
zoom: 1;
|
||||
*display: inline;/*IE7 life-saver */
|
||||
}
|
||||
.owl-theme .owl-controls .owl-page span{
|
||||
display: block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin: 5px 7px;
|
||||
filter: Alpha(Opacity=50);/*IE7 fix*/
|
||||
opacity: 0.5;
|
||||
-webkit-border-radius: 20px;
|
||||
-moz-border-radius: 20px;
|
||||
border-radius: 20px;
|
||||
background: #869791;
|
||||
}
|
||||
|
||||
.owl-theme .owl-controls .owl-page.active span,
|
||||
.owl-theme .owl-controls.clickable .owl-page:hover span{
|
||||
filter: Alpha(Opacity=100);/*IE7 fix*/
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* If PaginationNumbers is true */
|
||||
|
||||
.owl-theme .owl-controls .owl-page span.owl-numbers{
|
||||
height: auto;
|
||||
width: auto;
|
||||
color: #FFF;
|
||||
padding: 2px 10px;
|
||||
font-size: 12px;
|
||||
-webkit-border-radius: 30px;
|
||||
-moz-border-radius: 30px;
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
/* preloading images */
|
||||
.owl-item.loading{
|
||||
min-height: 150px;
|
||||
background: url(AjaxLoader.gif) no-repeat center center
|
||||
}
|
||||
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 30 KiB |
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/assets/favicons/mstile-150x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
||||
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="300.000000pt" height="300.000000pt" viewBox="0 0 300.000000 300.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,300.000000) scale(0.100000,-0.100000)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M1450 2910 c-31 -9 -109 -45 -325 -150 -93 -45 -206 -99 -250 -120
|
||||
-44 -21 -147 -70 -230 -110 -82 -40 -177 -85 -210 -100 -96 -45 -130 -88 -150
|
||||
-190 -2 -8 -13 -55 -24 -105 -20 -83 -27 -114 -36 -155 -2 -8 -16 -67 -31
|
||||
-130 -14 -63 -34 -151 -44 -195 -14 -61 -105 -463 -113 -494 0 -3 2 -26 6 -51
|
||||
7 -42 61 -122 165 -245 9 -11 33 -40 52 -65 19 -25 40 -51 48 -58 7 -8 25 -30
|
||||
40 -50 15 -21 29 -39 32 -42 4 -3 33 -39 65 -80 71 -90 70 -88 98 -123 13 -15
|
||||
75 -92 137 -171 122 -153 158 -185 218 -195 20 -4 300 -6 622 -6 584 1 585 1
|
||||
630 23 38 19 99 90 410 478 201 251 373 473 383 493 19 41 18 97 -7 202 -17
|
||||
71 -56 245 -61 269 -2 8 -8 33 -13 55 -6 22 -13 51 -15 65 -3 14 -26 114 -51
|
||||
223 -25 109 -48 208 -50 220 -15 76 -50 205 -61 227 -29 55 -30 55 -530 295
|
||||
-66 31 -167 80 -225 108 -58 28 -107 52 -110 52 -3 1 -63 29 -134 64 -128 62
|
||||
-185 77 -236 61z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "",
|
||||
"short_name": "",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/assets/favicons/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/assets/favicons/android-chrome-256x256.png",
|
||||
"sizes": "256x256",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|
||||
|
After Width: | Height: | Size: 326 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 992 B |
|
After Width: | Height: | Size: 992 B |
|
After Width: | Height: | Size: 992 B |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 179 B |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 319 KiB |
@@ -0,0 +1,31 @@
|
||||
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
|
||||
$('#contact-form').validator();
|
||||
|
||||
$('#contact-form').on('submit', function (e) {
|
||||
if (!e.isDefaultPrevented()) {
|
||||
var url = "assets/php/contact.php";
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
data: $(this).serialize(),
|
||||
success: function (data)
|
||||
{
|
||||
var messageAlert = 'alert-' + data.type;
|
||||
var messageText = data.message;
|
||||
|
||||
var alertBox = '<div class="alert ' + messageAlert + ' alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>' + messageText + '</div>';
|
||||
if (messageAlert && messageText) {
|
||||
$('#contact-form').find('.messages').html(alertBox);
|
||||
$('#contact-form')[0].reset();
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
})
|
||||
});
|
||||
@@ -0,0 +1,153 @@
|
||||
// Custom Scripts for Primal Template //
|
||||
|
||||
jQuery(function($) {
|
||||
"use strict";
|
||||
|
||||
|
||||
// get the value of the bottom of the #main element by adding the offset of that element plus its height, set it as a variable
|
||||
var mainbottom = $('#main').offset().top;
|
||||
|
||||
// on scroll,
|
||||
$(window).on('scroll',function(){
|
||||
|
||||
// we round here to reduce a little workload
|
||||
stop = Math.round($(window).scrollTop());
|
||||
if (stop > mainbottom) {
|
||||
$('.navbar').addClass('past-main');
|
||||
$('.navbar').addClass('effect-main')
|
||||
} else {
|
||||
$('.navbar').removeClass('past-main');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// Collapse navbar on click
|
||||
|
||||
$(document).on('click.nav','.navbar-collapse.in',function(e) {
|
||||
if( $(e.target).is('a') ) {
|
||||
$(this).removeClass('in').addClass('collapse');
|
||||
}
|
||||
});
|
||||
|
||||
/*-----------------------------------
|
||||
----------- Scroll To Top -----------
|
||||
------------------------------------*/
|
||||
|
||||
$(window).scroll(function () {
|
||||
if ($(this).scrollTop() > 1000) {
|
||||
$('#back-top').fadeIn();
|
||||
} else {
|
||||
$('#back-top').fadeOut();
|
||||
}
|
||||
});
|
||||
// scroll body to 0px on click
|
||||
$('#back-top').on('click', function () {
|
||||
$('#back-top').tooltip('hide');
|
||||
$('body,html').animate({
|
||||
scrollTop: 0
|
||||
}, 1500);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
/*-------- Owl Carousel ---------- */
|
||||
$(".reviews").owlCarousel({
|
||||
|
||||
slideSpeed : 200,
|
||||
items: 1,
|
||||
singleItem: true,
|
||||
autoPlay : true,
|
||||
pagination : false
|
||||
});
|
||||
|
||||
|
||||
/*-------- Owl Carousel ---------- */
|
||||
$(".review-cards").owlCarousel({
|
||||
|
||||
slideSpeed : 200,
|
||||
items: 1,
|
||||
singleItem: true,
|
||||
autoPlay : true,
|
||||
pagination : false
|
||||
});
|
||||
|
||||
|
||||
/* ------ jQuery for Easing min -- */
|
||||
|
||||
// Smooth scrolling using jQuery easing
|
||||
$('a.js-scroll-trigger[href*="#"]:not([href="#"])').on('click', function () {
|
||||
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
|
||||
var target = $(this.hash);
|
||||
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
|
||||
if (target.length) {
|
||||
$('html, body').animate({
|
||||
scrollTop: (target.offset().top - 54)
|
||||
}, 1000, "easeInOutExpo");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/* --------- Wow Init ------ */
|
||||
|
||||
new WOW().init();
|
||||
|
||||
|
||||
/* ------ Countdown ----- */
|
||||
|
||||
$('#countdown').countdown({
|
||||
date: '12/12/2031 12:00:00',
|
||||
offset: +2,
|
||||
day: 'Day',
|
||||
days: 'Days'
|
||||
}, function () {
|
||||
alert('Done!');
|
||||
});
|
||||
|
||||
|
||||
/*----- Preloader ----- */
|
||||
|
||||
$(window).load(function() {
|
||||
setTimeout(function() {
|
||||
$('#loading').fadeOut('slow', function() {
|
||||
});
|
||||
}, 3000);
|
||||
});
|
||||
|
||||
|
||||
/*----- Subscription Form ----- */
|
||||
|
||||
$(document).ready(function() {
|
||||
// jQuery Validation
|
||||
$("#chimp-form").validate({
|
||||
// if valid, post data via AJAX
|
||||
submitHandler: function(form) {
|
||||
$.post("assets/php/subscribe.php", { email: $("#email").val() }, function(data) {
|
||||
$('#response').html(data);
|
||||
});
|
||||
},
|
||||
// all fields are required
|
||||
rules: {
|
||||
email: {
|
||||
required: true,
|
||||
email: true
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Accordion //
|
||||
|
||||
function toggleChevron(e) {
|
||||
$(e.target)
|
||||
.prev('.panel-heading')
|
||||
.find("span.glyphicon")
|
||||
.toggleClass('glyphicon-chevron-down glyphicon-chevron-right');
|
||||
}
|
||||
$('#accordion').on('hide.bs.collapse show.bs.collapse', toggleChevron);
|
||||
|
||||
|
||||
|
||||
});
|
||||
@@ -0,0 +1,302 @@
|
||||
/*!
|
||||
* jQuery Accordion 0.0.1
|
||||
* (c) 2014 Victor Fernandez <victor@vctrfrnndz.com>
|
||||
* MIT Licensed.
|
||||
*/
|
||||
|
||||
;(function ( $, window, document, undefined ) {
|
||||
|
||||
var pluginName = 'accordion',
|
||||
defaults = {
|
||||
transitionSpeed: 300,
|
||||
transitionEasing: 'ease',
|
||||
controlElement: '[data-control]',
|
||||
contentElement: '[data-content]',
|
||||
groupElement: '[data-accordion-group]',
|
||||
singleOpen: true
|
||||
};
|
||||
|
||||
function Accordion(element, options) {
|
||||
this.element = element;
|
||||
this.options = $.extend({}, defaults, options);
|
||||
this._defaults = defaults;
|
||||
this._name = pluginName;
|
||||
this.init();
|
||||
}
|
||||
|
||||
Accordion.prototype.init = function () {
|
||||
var self = this,
|
||||
opts = self.options;
|
||||
|
||||
var $accordion = $(self.element),
|
||||
$controls = $accordion.find('> ' + opts.controlElement),
|
||||
$content = $accordion.find('> ' + opts.contentElement);
|
||||
|
||||
var accordionParentsQty = $accordion.parents('[data-accordion]').length,
|
||||
accordionHasParent = accordionParentsQty > 0;
|
||||
|
||||
var closedCSS = { 'max-height': 0, 'overflow': 'hidden' };
|
||||
|
||||
var CSStransitions = supportsTransitions();
|
||||
|
||||
function debounce(func, threshold, execAsap) {
|
||||
var timeout;
|
||||
|
||||
return function debounced() {
|
||||
var obj = this,
|
||||
args = arguments;
|
||||
|
||||
function delayed() {
|
||||
if (!execAsap) func.apply(obj, args);
|
||||
timeout = null;
|
||||
};
|
||||
|
||||
if (timeout) clearTimeout(timeout);
|
||||
else if (execAsap) func.apply(obj, args);
|
||||
|
||||
timeout = setTimeout(delayed, threshold || 100);
|
||||
};
|
||||
}
|
||||
|
||||
function supportsTransitions() {
|
||||
var b = document.body || document.documentElement,
|
||||
s = b.style,
|
||||
p = 'transition';
|
||||
|
||||
if (typeof s[p] == 'string') {
|
||||
return true;
|
||||
}
|
||||
|
||||
var v = ['Moz', 'webkit', 'Webkit', 'Khtml', 'O', 'ms'];
|
||||
|
||||
p = 'Transition';
|
||||
|
||||
for (var i=0; i<v.length; i++) {
|
||||
if (typeof s[v[i] + p] == 'string') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function requestAnimFrame(cb) {
|
||||
if(window.requestAnimationFrame){
|
||||
requestAnimationFrame(cb);
|
||||
} else if (window.webkitRequestAnimationFrame) {
|
||||
webkitRequestAnimationFrame(cb);
|
||||
} else if (window.mozRequestAnimationFrame) {
|
||||
mozRequestAnimationFrame(cb);
|
||||
} else {
|
||||
setTimeout(cb, 1000 / 60);
|
||||
}
|
||||
}
|
||||
|
||||
function toggleTransition($el, remove) {
|
||||
if(!remove) {
|
||||
$content.css({
|
||||
'-webkit-transition': 'max-height ' + opts.transitionSpeed + 'ms ' + opts.transitionEasing,
|
||||
'transition': 'max-height ' + opts.transitionSpeed + 'ms ' + opts.transitionEasing
|
||||
});
|
||||
} else {
|
||||
$content.css({
|
||||
'-webkit-transition': '',
|
||||
'transition': ''
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function calculateHeight($el) {
|
||||
var height = 0;
|
||||
|
||||
$el.children().each(function() {
|
||||
height = height + $(this).outerHeight(true);
|
||||
});
|
||||
|
||||
$el.data('oHeight', height);
|
||||
}
|
||||
|
||||
function updateParentHeight($parentAccordion, $currentAccordion, qty, operation) {
|
||||
var $content = $parentAccordion.filter('.open').find('> [data-content]'),
|
||||
$childs = $content.find('[data-accordion].open > [data-content]'),
|
||||
$matched;
|
||||
|
||||
if(!opts.singleOpen) {
|
||||
$childs = $childs.not($currentAccordion.siblings('[data-accordion].open').find('> [data-content]'));
|
||||
}
|
||||
|
||||
$matched = $content.add($childs);
|
||||
|
||||
if($parentAccordion.hasClass('open')) {
|
||||
$matched.each(function() {
|
||||
var currentHeight = $(this).data('oHeight');
|
||||
|
||||
switch (operation) {
|
||||
case '+':
|
||||
$(this).data('oHeight', currentHeight + qty);
|
||||
break;
|
||||
case '-':
|
||||
$(this).data('oHeight', currentHeight - qty);
|
||||
break;
|
||||
default:
|
||||
throw 'updateParentHeight method needs an operation';
|
||||
}
|
||||
|
||||
$(this).css('max-height', $(this).data('oHeight'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function refreshHeight($accordion) {
|
||||
if($accordion.hasClass('open')) {
|
||||
var $content = $accordion.find('> [data-content]'),
|
||||
$childs = $content.find('[data-accordion].open > [data-content]'),
|
||||
$matched = $content.add($childs);
|
||||
|
||||
calculateHeight($matched);
|
||||
|
||||
$matched.css('max-height', $matched.data('oHeight'));
|
||||
}
|
||||
}
|
||||
|
||||
function closeAccordion($accordion, $content) {
|
||||
$accordion.trigger('accordion.close');
|
||||
|
||||
if(CSStransitions) {
|
||||
if(accordionHasParent) {
|
||||
var $parentAccordions = $accordion.parents('[data-accordion]');
|
||||
|
||||
updateParentHeight($parentAccordions, $accordion, $content.data('oHeight'), '-');
|
||||
}
|
||||
|
||||
$content.css(closedCSS);
|
||||
|
||||
$accordion.removeClass('open');
|
||||
} else {
|
||||
$content.css('max-height', $content.data('oHeight'));
|
||||
|
||||
$content.animate(closedCSS, opts.transitionSpeed);
|
||||
|
||||
$accordion.removeClass('open');
|
||||
}
|
||||
}
|
||||
|
||||
function openAccordion($accordion, $content) {
|
||||
$accordion.trigger('accordion.open');
|
||||
if(CSStransitions) {
|
||||
toggleTransition($content);
|
||||
|
||||
if(accordionHasParent) {
|
||||
var $parentAccordions = $accordion.parents('[data-accordion]');
|
||||
|
||||
updateParentHeight($parentAccordions, $accordion, $content.data('oHeight'), '+');
|
||||
}
|
||||
|
||||
requestAnimFrame(function() {
|
||||
$content.css('max-height', $content.data('oHeight'));
|
||||
});
|
||||
|
||||
$accordion.addClass('open');
|
||||
} else {
|
||||
$content.animate({
|
||||
'max-height': $content.data('oHeight')
|
||||
}, opts.transitionSpeed, function() {
|
||||
$content.css({'max-height': 'none'});
|
||||
});
|
||||
|
||||
$accordion.addClass('open');
|
||||
}
|
||||
}
|
||||
|
||||
function closeSiblingAccordions($accordion) {
|
||||
var $accordionGroup = $accordion.closest(opts.groupElement);
|
||||
|
||||
var $siblings = $accordion.siblings('[data-accordion]').filter('.open'),
|
||||
$siblingsChildren = $siblings.find('[data-accordion]').filter('.open');
|
||||
|
||||
var $otherAccordions = $siblings.add($siblingsChildren);
|
||||
|
||||
$otherAccordions.each(function() {
|
||||
var $accordion = $(this),
|
||||
$content = $accordion.find(opts.contentElement);
|
||||
|
||||
closeAccordion($accordion, $content);
|
||||
});
|
||||
|
||||
$otherAccordions.removeClass('open');
|
||||
}
|
||||
|
||||
function toggleAccordion() {
|
||||
var isAccordionGroup = (opts.singleOpen) ? $accordion.parents(opts.groupElement).length > 0 : false;
|
||||
|
||||
calculateHeight($content);
|
||||
|
||||
if(isAccordionGroup) {
|
||||
closeSiblingAccordions($accordion);
|
||||
}
|
||||
|
||||
if($accordion.hasClass('open')) {
|
||||
closeAccordion($accordion, $content);
|
||||
} else {
|
||||
openAccordion($accordion, $content);
|
||||
}
|
||||
}
|
||||
|
||||
function addEventListeners() {
|
||||
$controls.on('click', toggleAccordion);
|
||||
|
||||
$controls.on('accordion.toggle', function() {
|
||||
if(opts.singleOpen && $controls.length > 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
toggleAccordion();
|
||||
});
|
||||
|
||||
$controls.on('accordion.refresh', function() {
|
||||
refreshHeight($accordion);
|
||||
});
|
||||
|
||||
$(window).on('resize', debounce(function() {
|
||||
refreshHeight($accordion);
|
||||
}));
|
||||
}
|
||||
|
||||
function setup() {
|
||||
$content.each(function() {
|
||||
var $curr = $(this);
|
||||
|
||||
if($curr.css('max-height') != 0) {
|
||||
if(!$curr.closest('[data-accordion]').hasClass('open')) {
|
||||
$curr.css({ 'max-height': 0, 'overflow': 'hidden' });
|
||||
} else {
|
||||
toggleTransition($curr);
|
||||
calculateHeight($curr);
|
||||
|
||||
$curr.css('max-height', $curr.data('oHeight'));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if(!$accordion.attr('data-accordion')) {
|
||||
$accordion.attr('data-accordion', '');
|
||||
$accordion.find(opts.controlElement).attr('data-control', '');
|
||||
$accordion.find(opts.contentElement).attr('data-content', '');
|
||||
}
|
||||
}
|
||||
|
||||
setup();
|
||||
addEventListeners();
|
||||
};
|
||||
|
||||
$.fn[pluginName] = function ( options ) {
|
||||
return this.each(function () {
|
||||
if (!$.data(this, 'plugin_' + pluginName)) {
|
||||
$.data(this, 'plugin_' + pluginName,
|
||||
new Accordion( this, options ));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
})( jQuery, window, document );
|
||||
@@ -0,0 +1,233 @@
|
||||
/*
|
||||
Live.js - One script closer to Designing in the Browser
|
||||
Written for Handcraft.com by Martin Kool (@mrtnkl).
|
||||
|
||||
Version 4.
|
||||
Recent change: Made stylesheet and mimetype checks case insensitive.
|
||||
|
||||
http://livejs.com
|
||||
http://livejs.com/license (MIT)
|
||||
@livejs
|
||||
|
||||
Include live.js#css to monitor css changes only.
|
||||
Include live.js#js to monitor js changes only.
|
||||
Include live.js#html to monitor html changes only.
|
||||
Mix and match to monitor a preferred combination such as live.js#html,css
|
||||
|
||||
By default, just include live.js to monitor all css, js and html changes.
|
||||
|
||||
Live.js can also be loaded as a bookmarklet. It is best to only use it for CSS then,
|
||||
as a page reload due to a change in html or css would not re-include the bookmarklet.
|
||||
To monitor CSS and be notified that it has loaded, include it as: live.js#css,notify
|
||||
*/
|
||||
(function () {
|
||||
|
||||
var headers = { "Etag": 1, "Last-Modified": 1, "Content-Length": 1, "Content-Type": 1 },
|
||||
resources = {},
|
||||
pendingRequests = {},
|
||||
currentLinkElements = {},
|
||||
oldLinkElements = {},
|
||||
interval = 1000,
|
||||
loaded = false,
|
||||
active = { "html": 1, "css": 1, "js": 1 };
|
||||
|
||||
var Live = {
|
||||
|
||||
// performs a cycle per interval
|
||||
heartbeat: function () {
|
||||
if (document.body) {
|
||||
// make sure all resources are loaded on first activation
|
||||
if (!loaded) Live.loadresources();
|
||||
Live.checkForChanges();
|
||||
}
|
||||
setTimeout(Live.heartbeat, interval);
|
||||
},
|
||||
|
||||
// loads all local css and js resources upon first activation
|
||||
loadresources: function () {
|
||||
|
||||
// helper method to assert if a given url is local
|
||||
function isLocal(url) {
|
||||
var loc = document.location,
|
||||
reg = new RegExp("^\\.|^\/(?!\/)|^[\\w]((?!://).)*$|" + loc.protocol + "//" + loc.host);
|
||||
return url.match(reg);
|
||||
}
|
||||
|
||||
// gather all resources
|
||||
var scripts = document.getElementsByTagName("script"),
|
||||
links = document.getElementsByTagName("link"),
|
||||
uris = [];
|
||||
|
||||
// track local js urls
|
||||
for (var i = 0; i < scripts.length; i++) {
|
||||
var script = scripts[i], src = script.getAttribute("src");
|
||||
if (src && isLocal(src))
|
||||
uris.push(src);
|
||||
if (src && src.match(/\blive.js#/)) {
|
||||
for (var type in active)
|
||||
active[type] = src.match("[#,|]" + type) != null
|
||||
if (src.match("notify"))
|
||||
alert("Live.js is loaded.");
|
||||
}
|
||||
}
|
||||
if (!active.js) uris = [];
|
||||
if (active.html) uris.push(document.location.href);
|
||||
|
||||
// track local css urls
|
||||
for (var i = 0; i < links.length && active.css; i++) {
|
||||
var link = links[i], rel = link.getAttribute("rel"), href = link.getAttribute("href", 2);
|
||||
if (href && rel && rel.match(new RegExp("stylesheet", "i")) && isLocal(href)) {
|
||||
uris.push(href);
|
||||
currentLinkElements[href] = link;
|
||||
}
|
||||
}
|
||||
|
||||
// initialize the resources info
|
||||
for (var i = 0; i < uris.length; i++) {
|
||||
var url = uris[i];
|
||||
Live.getHead(url, function (url, info) {
|
||||
resources[url] = info;
|
||||
});
|
||||
}
|
||||
|
||||
// add rule for morphing between old and new css files
|
||||
var head = document.getElementsByTagName("head")[0],
|
||||
style = document.createElement("style"),
|
||||
rule = "transition: all .3s ease-out;"
|
||||
css = [".livejs-loading * { ", rule, " -webkit-", rule, "-moz-", rule, "-o-", rule, "}"].join('');
|
||||
style.setAttribute("type", "text/css");
|
||||
head.appendChild(style);
|
||||
style.styleSheet ? style.styleSheet.cssText = css : style.appendChild(document.createTextNode(css));
|
||||
|
||||
// yep
|
||||
loaded = true;
|
||||
},
|
||||
|
||||
// check all tracking resources for changes
|
||||
checkForChanges: function () {
|
||||
for (var url in resources) {
|
||||
if (pendingRequests[url])
|
||||
continue;
|
||||
|
||||
Live.getHead(url, function (url, newInfo) {
|
||||
var oldInfo = resources[url],
|
||||
hasChanged = false;
|
||||
resources[url] = newInfo;
|
||||
for (var header in oldInfo) {
|
||||
// do verification based on the header type
|
||||
var oldValue = oldInfo[header],
|
||||
newValue = newInfo[header],
|
||||
contentType = newInfo["Content-Type"];
|
||||
switch (header.toLowerCase()) {
|
||||
case "etag":
|
||||
if (!newValue) break;
|
||||
// fall through to default
|
||||
default:
|
||||
hasChanged = oldValue != newValue;
|
||||
break;
|
||||
}
|
||||
// if changed, act
|
||||
if (hasChanged) {
|
||||
Live.refreshResource(url, contentType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// act upon a changed url of certain content type
|
||||
refreshResource: function (url, type) {
|
||||
switch (type.toLowerCase()) {
|
||||
// css files can be reloaded dynamically by replacing the link element
|
||||
case "text/css":
|
||||
var link = currentLinkElements[url],
|
||||
html = document.body.parentNode,
|
||||
head = link.parentNode,
|
||||
next = link.nextSibling,
|
||||
newLink = document.createElement("link");
|
||||
|
||||
html.className = html.className.replace(/\s*livejs\-loading/gi, '') + ' livejs-loading';
|
||||
newLink.setAttribute("type", "text/css");
|
||||
newLink.setAttribute("rel", "stylesheet");
|
||||
newLink.setAttribute("href", url + "?now=" + new Date() * 1);
|
||||
next ? head.insertBefore(newLink, next) : head.appendChild(newLink);
|
||||
currentLinkElements[url] = newLink;
|
||||
oldLinkElements[url] = link;
|
||||
|
||||
// schedule removal of the old link
|
||||
Live.removeoldLinkElements();
|
||||
break;
|
||||
|
||||
// check if an html resource is our current url, then reload
|
||||
case "text/html":
|
||||
if (url != document.location.href)
|
||||
return;
|
||||
|
||||
// local javascript changes cause a reload as well
|
||||
case "text/javascript":
|
||||
case "application/javascript":
|
||||
case "application/x-javascript":
|
||||
document.location.reload();
|
||||
}
|
||||
},
|
||||
|
||||
// removes the old stylesheet rules only once the new one has finished loading
|
||||
removeoldLinkElements: function () {
|
||||
var pending = 0;
|
||||
for (var url in oldLinkElements) {
|
||||
// if this sheet has any cssRules, delete the old link
|
||||
try {
|
||||
var link = currentLinkElements[url],
|
||||
oldLink = oldLinkElements[url],
|
||||
html = document.body.parentNode,
|
||||
sheet = link.sheet || link.styleSheet,
|
||||
rules = sheet.rules || sheet.cssRules;
|
||||
if (rules.length >= 0) {
|
||||
oldLink.parentNode.removeChild(oldLink);
|
||||
delete oldLinkElements[url];
|
||||
setTimeout(function () {
|
||||
html.className = html.className.replace(/\s*livejs\-loading/gi, '');
|
||||
}, 100);
|
||||
}
|
||||
} catch (e) {
|
||||
pending++;
|
||||
}
|
||||
if (pending) setTimeout(Live.removeoldLinkElements, 50);
|
||||
}
|
||||
},
|
||||
|
||||
// performs a HEAD request and passes the header info to the given callback
|
||||
getHead: function (url, callback) {
|
||||
pendingRequests[url] = true;
|
||||
var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XmlHttp");
|
||||
xhr.open("HEAD", url, true);
|
||||
xhr.onreadystatechange = function () {
|
||||
delete pendingRequests[url];
|
||||
if (xhr.readyState == 4 && xhr.status != 304) {
|
||||
xhr.getAllResponseHeaders();
|
||||
var info = {};
|
||||
for (var h in headers) {
|
||||
var value = xhr.getResponseHeader(h);
|
||||
// adjust the simple Etag variant to match on its significant part
|
||||
if (h.toLowerCase() == "etag" && value) value = value.replace(/^W\//, '');
|
||||
if (h.toLowerCase() == "content-type" && value) value = value.replace(/^(.*?);.*?$/i, "$1");
|
||||
info[h] = value;
|
||||
}
|
||||
callback(url, info);
|
||||
}
|
||||
}
|
||||
xhr.send();
|
||||
}
|
||||
};
|
||||
|
||||
// start listening
|
||||
if (document.location.protocol != "file:") {
|
||||
if (!window.liveJsLoaded)
|
||||
Live.heartbeat();
|
||||
|
||||
window.liveJsLoaded = true;
|
||||
}
|
||||
else if (window.console)
|
||||
console.log("Live.js doesn't support the file protocol. It needs http.");
|
||||
})();
|
||||
@@ -0,0 +1,37 @@
|
||||
jQuery(document).ready(function($){
|
||||
var $lateral_menu_trigger = $('.nav-trigger'),
|
||||
$content_wrapper = $('.main');
|
||||
|
||||
//open-close lateral menu clicking on the menu icon
|
||||
$lateral_menu_trigger.on('click', function(event){
|
||||
event.preventDefault();
|
||||
|
||||
$lateral_menu_trigger.toggleClass('is-open');
|
||||
$content_wrapper.toggleClass('is-open').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(){
|
||||
// firefox transitions break when parent overflow is changed, so we need to wait for the end of the trasition to give the body an overflow hidden
|
||||
$('body').toggleClass('overflow-hidden');
|
||||
});
|
||||
$('.menu-inner').toggleClass('is-open');
|
||||
|
||||
//check if transitions are not supported - i.e. in IE9
|
||||
if($('html').hasClass('no-csstransitions')) {
|
||||
$('body').toggleClass('overflow-hidden');
|
||||
}
|
||||
});
|
||||
|
||||
//close lateral menu clicking outside the menu itself
|
||||
$content_wrapper.on('mouseover', function(event){
|
||||
if( !$(event.target).is('.nav-trigger, .nav-trigger span') ) {
|
||||
$lateral_menu_trigger.removeClass('is-open');
|
||||
$content_wrapper.removeClass('is-open').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(){
|
||||
$('body').removeClass('overflow-hidden');
|
||||
});
|
||||
$('.menu-inner').removeClass('is-open');
|
||||
//check if transitions are not supported
|
||||
if($('html').hasClass('no-csstransitions')) {
|
||||
$('body').removeClass('overflow-hidden');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,39 @@
|
||||
/* ---- Menu Section For Fold Personal Portfolio HTML Template --- */
|
||||
|
||||
jQuery(document).ready(function($){
|
||||
var $lateral_menu_trigger = $('.nav-trigger'),
|
||||
$content_wrapper = $('.main');
|
||||
|
||||
//open-close lateral menu clicking on the menu icon
|
||||
$lateral_menu_trigger.on('click', function(event){
|
||||
event.preventDefault();
|
||||
|
||||
$lateral_menu_trigger.toggleClass('is-active');
|
||||
$content_wrapper.toggleClass('is-active').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(){
|
||||
// firefox transitions break when parent overflow is changed, so we need to wait for the end of the trasition to give the body an overflow hidden
|
||||
$('body').toggleClass('overflow-hidden');
|
||||
});
|
||||
$('#fld-nav').toggleClass('is-active');
|
||||
|
||||
//check if transitions are not supported - i.e. in IE9
|
||||
if($('html').hasClass('no-csstransitions')) {
|
||||
$('body').toggleClass('overflow-hidden');
|
||||
}
|
||||
});
|
||||
|
||||
//close lateral menu clicking outside the menu itself
|
||||
$content_wrapper.on('mouseover', function(event){
|
||||
if( !$(event.target).is('.nav-trigger, .nav-trigger span') ) {
|
||||
$lateral_menu_trigger.removeClass('is-active');
|
||||
$content_wrapper.removeClass('is-active').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(){
|
||||
$('body').removeClass('overflow-hidden');
|
||||
});
|
||||
$('#fld-nav').removeClass('is-active');
|
||||
//check if transitions are not supported
|
||||
if($('html').hasClass('no-csstransitions')) {
|
||||
$('body').removeClass('overflow-hidden');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,362 @@
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap (plugin): validator.js v0.10.2
|
||||
* ========================================================================
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2015 Cina Saffary.
|
||||
* Made by @1000hz in the style of Bootstrap 3 era @fat
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
* ======================================================================== */
|
||||
|
||||
|
||||
+function ($) {
|
||||
'use strict';
|
||||
|
||||
// VALIDATOR CLASS DEFINITION
|
||||
// ==========================
|
||||
|
||||
function getValue($el) {
|
||||
return $el.is('[type="checkbox"]') ? $el.prop('checked') :
|
||||
$el.is('[type="radio"]') ? !!$('[name="' + $el.attr('name') + '"]:checked').length :
|
||||
$.trim($el.val())
|
||||
}
|
||||
|
||||
var Validator = function (element, options) {
|
||||
this.options = options
|
||||
this.$element = $(element)
|
||||
this.$inputs = this.$element.find(Validator.INPUT_SELECTOR)
|
||||
this.$btn = $('button[type="submit"], input[type="submit"]')
|
||||
.filter('[form="' + this.$element.attr('id') + '"]')
|
||||
.add(this.$element.find('input[type="submit"], button[type="submit"]'))
|
||||
|
||||
options.errors = $.extend({}, Validator.DEFAULTS.errors, options.errors)
|
||||
|
||||
for (var custom in options.custom) {
|
||||
if (!options.errors[custom]) throw new Error('Missing default error message for custom validator: ' + custom)
|
||||
}
|
||||
|
||||
$.extend(Validator.VALIDATORS, options.custom)
|
||||
|
||||
this.$element.attr('novalidate', true) // disable automatic native validation
|
||||
this.toggleSubmit()
|
||||
|
||||
this.$element.on('input.bs.validator change.bs.validator focusout.bs.validator', Validator.INPUT_SELECTOR, $.proxy(this.onInput, this))
|
||||
this.$element.on('submit.bs.validator', $.proxy(this.onSubmit, this))
|
||||
|
||||
this.$element.find('[data-match]').each(function () {
|
||||
var $this = $(this)
|
||||
var target = $this.data('match')
|
||||
|
||||
$(target).on('input.bs.validator', function (e) {
|
||||
getValue($this) && $this.trigger('input.bs.validator')
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Validator.INPUT_SELECTOR = ':input:not([type="submit"], button):enabled:visible'
|
||||
|
||||
Validator.FOCUS_OFFSET = 20
|
||||
|
||||
Validator.DEFAULTS = {
|
||||
delay: 500,
|
||||
html: false,
|
||||
disable: true,
|
||||
focus: true,
|
||||
custom: {},
|
||||
errors: {
|
||||
match: 'Does not match',
|
||||
minlength: 'Not long enough'
|
||||
},
|
||||
feedback: {
|
||||
success: 'glyphicon-ok',
|
||||
error: 'glyphicon-remove'
|
||||
}
|
||||
}
|
||||
|
||||
Validator.VALIDATORS = {
|
||||
'native': function ($el) {
|
||||
var el = $el[0]
|
||||
return el.checkValidity ? el.checkValidity() : true
|
||||
},
|
||||
'match': function ($el) {
|
||||
var target = $el.data('match')
|
||||
return !$el.val() || $el.val() === $(target).val()
|
||||
},
|
||||
'minlength': function ($el) {
|
||||
var minlength = $el.data('minlength')
|
||||
return !$el.val() || $el.val().length >= minlength
|
||||
}
|
||||
}
|
||||
|
||||
Validator.prototype.onInput = function (e) {
|
||||
var self = this
|
||||
var $el = $(e.target)
|
||||
var deferErrors = e.type !== 'focusout'
|
||||
this.validateInput($el, deferErrors).done(function () {
|
||||
self.toggleSubmit()
|
||||
})
|
||||
}
|
||||
|
||||
Validator.prototype.validateInput = function ($el, deferErrors) {
|
||||
var value = getValue($el)
|
||||
var prevValue = $el.data('bs.validator.previous')
|
||||
var prevErrors = $el.data('bs.validator.errors')
|
||||
var errors
|
||||
|
||||
if (prevValue === value) return $.Deferred().resolve()
|
||||
else $el.data('bs.validator.previous', value)
|
||||
|
||||
if ($el.is('[type="radio"]')) $el = this.$element.find('input[name="' + $el.attr('name') + '"]')
|
||||
|
||||
var e = $.Event('validate.bs.validator', {relatedTarget: $el[0]})
|
||||
this.$element.trigger(e)
|
||||
if (e.isDefaultPrevented()) return
|
||||
|
||||
var self = this
|
||||
|
||||
return this.runValidators($el).done(function (errors) {
|
||||
$el.data('bs.validator.errors', errors)
|
||||
|
||||
errors.length
|
||||
? deferErrors ? self.defer($el, self.showErrors) : self.showErrors($el)
|
||||
: self.clearErrors($el)
|
||||
|
||||
if (!prevErrors || errors.toString() !== prevErrors.toString()) {
|
||||
e = errors.length
|
||||
? $.Event('invalid.bs.validator', {relatedTarget: $el[0], detail: errors})
|
||||
: $.Event('valid.bs.validator', {relatedTarget: $el[0], detail: prevErrors})
|
||||
|
||||
self.$element.trigger(e)
|
||||
}
|
||||
|
||||
self.toggleSubmit()
|
||||
|
||||
self.$element.trigger($.Event('validated.bs.validator', {relatedTarget: $el[0]}))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Validator.prototype.runValidators = function ($el) {
|
||||
var errors = []
|
||||
var deferred = $.Deferred()
|
||||
var options = this.options
|
||||
|
||||
$el.data('bs.validator.deferred') && $el.data('bs.validator.deferred').reject()
|
||||
$el.data('bs.validator.deferred', deferred)
|
||||
|
||||
function getErrorMessage(key) {
|
||||
return $el.data(key + '-error')
|
||||
|| $el.data('error')
|
||||
|| key == 'native' && $el[0].validationMessage
|
||||
|| options.errors[key]
|
||||
}
|
||||
|
||||
$.each(Validator.VALIDATORS, $.proxy(function (key, validator) {
|
||||
if ((getValue($el) || $el.attr('required')) &&
|
||||
($el.data(key) || key == 'native') &&
|
||||
!validator.call(this, $el)) {
|
||||
var error = getErrorMessage(key)
|
||||
!~errors.indexOf(error) && errors.push(error)
|
||||
}
|
||||
}, this))
|
||||
|
||||
if (!errors.length && getValue($el) && $el.data('remote')) {
|
||||
this.defer($el, function () {
|
||||
var data = {}
|
||||
data[$el.attr('name')] = getValue($el)
|
||||
$.get($el.data('remote'), data)
|
||||
.fail(function (jqXHR, textStatus, error) { errors.push(getErrorMessage('remote') || error) })
|
||||
.always(function () { deferred.resolve(errors)})
|
||||
})
|
||||
} else deferred.resolve(errors)
|
||||
|
||||
return deferred.promise()
|
||||
}
|
||||
|
||||
Validator.prototype.validate = function () {
|
||||
var self = this
|
||||
|
||||
$.when(this.$inputs.map(function (el) {
|
||||
return self.validateInput($(this), false)
|
||||
})).then(function () {
|
||||
self.toggleSubmit()
|
||||
self.focusError()
|
||||
})
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
Validator.prototype.focusError = function () {
|
||||
if (!this.options.focus) return
|
||||
|
||||
var $input = $(".has-error:first :input")
|
||||
if ($input.length === 0) return
|
||||
|
||||
$(document.body).animate({scrollTop: $input.offset().top - Validator.FOCUS_OFFSET}, 250)
|
||||
$input.focus()
|
||||
}
|
||||
|
||||
Validator.prototype.showErrors = function ($el) {
|
||||
var method = this.options.html ? 'html' : 'text'
|
||||
var errors = $el.data('bs.validator.errors')
|
||||
var $group = $el.closest('.form-group')
|
||||
var $block = $group.find('.help-block.with-errors')
|
||||
var $feedback = $group.find('.form-control-feedback')
|
||||
|
||||
if (!errors.length) return
|
||||
|
||||
errors = $('<ul/>')
|
||||
.addClass('list-unstyled')
|
||||
.append($.map(errors, function (error) { return $('<li/>')[method](error) }))
|
||||
|
||||
$block.data('bs.validator.originalContent') === undefined && $block.data('bs.validator.originalContent', $block.html())
|
||||
$block.empty().append(errors)
|
||||
$group.addClass('has-error has-danger')
|
||||
|
||||
$group.hasClass('has-feedback')
|
||||
&& $feedback.removeClass(this.options.feedback.success)
|
||||
&& $feedback.addClass(this.options.feedback.error)
|
||||
&& $group.removeClass('has-success')
|
||||
}
|
||||
|
||||
Validator.prototype.clearErrors = function ($el) {
|
||||
var $group = $el.closest('.form-group')
|
||||
var $block = $group.find('.help-block.with-errors')
|
||||
var $feedback = $group.find('.form-control-feedback')
|
||||
|
||||
$block.html($block.data('bs.validator.originalContent'))
|
||||
$group.removeClass('has-error has-danger')
|
||||
|
||||
$group.hasClass('has-feedback')
|
||||
&& $feedback.removeClass(this.options.feedback.error)
|
||||
&& getValue($el)
|
||||
&& $feedback.addClass(this.options.feedback.success)
|
||||
&& $group.addClass('has-success')
|
||||
}
|
||||
|
||||
Validator.prototype.hasErrors = function () {
|
||||
function fieldErrors() {
|
||||
return !!($(this).data('bs.validator.errors') || []).length
|
||||
}
|
||||
|
||||
return !!this.$inputs.filter(fieldErrors).length
|
||||
}
|
||||
|
||||
Validator.prototype.isIncomplete = function () {
|
||||
function fieldIncomplete() {
|
||||
return !getValue($(this))
|
||||
}
|
||||
|
||||
return !!this.$inputs.filter('[required]').filter(fieldIncomplete).length
|
||||
}
|
||||
|
||||
Validator.prototype.onSubmit = function (e) {
|
||||
this.validate()
|
||||
if (this.isIncomplete() || this.hasErrors()) e.preventDefault()
|
||||
}
|
||||
|
||||
Validator.prototype.toggleSubmit = function () {
|
||||
if (!this.options.disable) return
|
||||
this.$btn.toggleClass('disabled', this.isIncomplete() || this.hasErrors())
|
||||
}
|
||||
|
||||
Validator.prototype.defer = function ($el, callback) {
|
||||
callback = $.proxy(callback, this, $el)
|
||||
if (!this.options.delay) return callback()
|
||||
window.clearTimeout($el.data('bs.validator.timeout'))
|
||||
$el.data('bs.validator.timeout', window.setTimeout(callback, this.options.delay))
|
||||
}
|
||||
|
||||
Validator.prototype.destroy = function () {
|
||||
this.$element
|
||||
.removeAttr('novalidate')
|
||||
.removeData('bs.validator')
|
||||
.off('.bs.validator')
|
||||
.find('.form-control-feedback')
|
||||
.removeClass([this.options.feedback.error, this.options.feedback.success].join(' '))
|
||||
|
||||
this.$inputs
|
||||
.off('.bs.validator')
|
||||
.removeData(['bs.validator.errors', 'bs.validator.deferred', 'bs.validator.previous'])
|
||||
.each(function () {
|
||||
var $this = $(this)
|
||||
var timeout = $this.data('bs.validator.timeout')
|
||||
window.clearTimeout(timeout) && $this.removeData('bs.validator.timeout')
|
||||
})
|
||||
|
||||
this.$element.find('.help-block.with-errors').each(function () {
|
||||
var $this = $(this)
|
||||
var originalContent = $this.data('bs.validator.originalContent')
|
||||
|
||||
$this
|
||||
.removeData('bs.validator.originalContent')
|
||||
.html(originalContent)
|
||||
})
|
||||
|
||||
this.$element.find('input[type="submit"], button[type="submit"]').removeClass('disabled')
|
||||
|
||||
this.$element.find('.has-error, .has-danger').removeClass('has-error has-danger')
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
// VALIDATOR PLUGIN DEFINITION
|
||||
// ===========================
|
||||
|
||||
|
||||
function Plugin(option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var options = $.extend({}, Validator.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
||||
var data = $this.data('bs.validator')
|
||||
|
||||
if (!data && option == 'destroy') return
|
||||
if (!data) $this.data('bs.validator', (data = new Validator(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
}
|
||||
|
||||
var old = $.fn.validator
|
||||
|
||||
$.fn.validator = Plugin
|
||||
$.fn.validator.Constructor = Validator
|
||||
|
||||
|
||||
// VALIDATOR NO CONFLICT
|
||||
// =====================
|
||||
|
||||
$.fn.validator.noConflict = function () {
|
||||
$.fn.validator = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
// VALIDATOR DATA-API
|
||||
// ==================
|
||||
|
||||
$(window).on('load', function () {
|
||||
$('form[data-toggle="validator"]').each(function () {
|
||||
var $form = $(this)
|
||||
Plugin.call($form, $form.data())
|
||||
})
|
||||
})
|
||||
|
||||
}(jQuery);
|
||||