Initialize website project structure
This commit is contained in:
Vendored
+9
File diff suppressed because one or more lines are too long
Vendored
+3221
File diff suppressed because it is too large
Load Diff
Vendored
+5
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -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,312 @@
|
||||
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
|
||||
.cb-cursor {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 150;
|
||||
contain: layout style size;
|
||||
pointer-events: none;
|
||||
will-change: transform;
|
||||
-webkit-transition: opacity 0.3s, color 0.4s;
|
||||
-o-transition: opacity 0.3s, color 0.4s;
|
||||
-moz-transition: opacity 0.3s, color 0.4s;
|
||||
transition: opacity 0.3s, color 0.4s;
|
||||
}
|
||||
|
||||
.cb-cursor:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -24px;
|
||||
left: -24px;
|
||||
display: block;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
-webkit-transform: scale(0);
|
||||
-moz-transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
-o-transform: scale(0);
|
||||
transform: scale(0);
|
||||
-webkit-border-radius: 50%;
|
||||
-moz-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
-webkit-transition: opacity 0.1s, -webkit-transform 0.3s ease-in-out;
|
||||
transition: opacity 0.1s, -webkit-transform 0.3s ease-in-out;
|
||||
-o-transition: opacity 0.1s, -o-transform 0.3s ease-in-out;
|
||||
-moz-transition: transform 0.3s ease-in-out, opacity 0.1s, -moz-transform 0.3s ease-in-out;
|
||||
transition: transform 0.3s ease-in-out, opacity 0.1s;
|
||||
transition: transform 0.3s ease-in-out, opacity 0.1s, -webkit-transform 0.3s ease-in-out, -moz-transform 0.3s ease-in-out, -o-transform 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.cb-cursor-text {
|
||||
position: absolute;
|
||||
top: -18px;
|
||||
left: -18px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -moz-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
-moz-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
-moz-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-transform: scale(0) rotate(10deg);
|
||||
-moz-transform: scale(0) rotate(10deg);
|
||||
-ms-transform: scale(0) rotate(10deg);
|
||||
-o-transform: scale(0) rotate(10deg);
|
||||
transform: scale(0) rotate(10deg);
|
||||
opacity: 0;
|
||||
color: white;
|
||||
font-size: 16px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
letter-spacing: -0.01em;
|
||||
-webkit-transition: opacity 0.4s, -webkit-transform 0.3s;
|
||||
transition: opacity 0.4s, -webkit-transform 0.3s;
|
||||
-o-transition: opacity 0.4s, -o-transform 0.3s;
|
||||
-moz-transition: opacity 0.4s, transform 0.3s, -moz-transform 0.3s;
|
||||
transition: opacity 0.4s, transform 0.3s;
|
||||
transition: opacity 0.4s, transform 0.3s, -webkit-transform 0.3s, -moz-transform 0.3s, -o-transform 0.3s;
|
||||
}
|
||||
|
||||
@supports (mix-blend-mode: exclusion) {
|
||||
.cb-cursor.-exclusion, .cb-cursor.-opaque {
|
||||
mix-blend-mode: exclusion;
|
||||
}
|
||||
}
|
||||
|
||||
@supports (mix-blend-mode: exclusion) {
|
||||
.cb-cursor.-exclusion:before, .cb-cursor.-opaque:before {
|
||||
background: white;
|
||||
}
|
||||
}
|
||||
|
||||
.cb-cursor.-normal, .cb-cursor.-text {
|
||||
mix-blend-mode: normal;
|
||||
}
|
||||
|
||||
.cb-cursor.-normal:before, .cb-cursor.-text:before {
|
||||
background: currentColor;
|
||||
}
|
||||
|
||||
.cb-cursor.-inverse {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.cb-cursor.-visible:before {
|
||||
-webkit-transform: scale(0.2);
|
||||
-moz-transform: scale(0.2);
|
||||
-ms-transform: scale(0.2);
|
||||
-o-transform: scale(0.2);
|
||||
transform: scale(0.2);
|
||||
}
|
||||
|
||||
.cb-cursor.-visible.-active:before {
|
||||
-webkit-transform: scale(0.23);
|
||||
-moz-transform: scale(0.23);
|
||||
-ms-transform: scale(0.23);
|
||||
-o-transform: scale(0.23);
|
||||
transform: scale(0.23);
|
||||
-webkit-transition-duration: 0.2s;
|
||||
-moz-transition-duration: 0.2s;
|
||||
-o-transition-duration: 0.2s;
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
.cb-cursor.-pointer:before {
|
||||
-webkit-transform: scale(0);
|
||||
-moz-transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
-o-transform: scale(0);
|
||||
transform: scale(0);
|
||||
}
|
||||
|
||||
.cb-cursor.-text:before {
|
||||
background: #000;
|
||||
opacity: 0.80;
|
||||
backdrop-filter: blur(10);
|
||||
-webkit-transform: scale(1.7);
|
||||
-moz-transform: scale(1.7);
|
||||
-ms-transform: scale(1.7);
|
||||
-o-transform: scale(1.7);
|
||||
transform: scale(1.7);
|
||||
}
|
||||
|
||||
.cb-cursor.-text .cb-cursor-text {
|
||||
opacity: 1;
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
-o-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.cb-cursor.-text.-active:before {
|
||||
-webkit-transform: scale(1.6);
|
||||
-moz-transform: scale(1.6);
|
||||
-ms-transform: scale(1.6);
|
||||
-o-transform: scale(1.6);
|
||||
transform: scale(1.6);
|
||||
-webkit-transition-duration: 0.2s;
|
||||
-moz-transition-duration: 0.2s;
|
||||
-o-transition-duration: 0.2s;
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
.cb-cursor.-opaque:before {
|
||||
-webkit-transform: scale(1.32);
|
||||
-moz-transform: scale(1.32);
|
||||
-ms-transform: scale(1.32);
|
||||
-o-transform: scale(1.32);
|
||||
transform: scale(1.32);
|
||||
}
|
||||
|
||||
.cb-cursor.-opaque.-active:before {
|
||||
-webkit-transform: scale(1.2);
|
||||
-moz-transform: scale(1.2);
|
||||
-ms-transform: scale(1.2);
|
||||
-o-transform: scale(1.2);
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
.cb-cursor.-lg:before {
|
||||
-webkit-transform: scale(2);
|
||||
-moz-transform: scale(2);
|
||||
-ms-transform: scale(2);
|
||||
-o-transform: scale(2);
|
||||
transform: scale(2);
|
||||
}
|
||||
|
||||
.cb-cursor.-hidden:before {
|
||||
-webkit-transform: scale(0);
|
||||
-moz-transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
-o-transform: scale(0);
|
||||
transform: scale(0);
|
||||
}
|
||||
|
||||
.-color-red {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.-color-green {
|
||||
color: #51c67d;
|
||||
}
|
||||
|
||||
.cb-demo {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.cb-demo-content {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -moz-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
-moz-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
-moz-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.cb-demo-container {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
@media (min-width: 1600px) {
|
||||
.cb-demo-container {
|
||||
padding: 0 120px;
|
||||
}
|
||||
}
|
||||
|
||||
.cb-demo-row {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -moz-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
-moz-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
@media (min-width: 1600px) {
|
||||
.cb-demo-row {
|
||||
margin: 60px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.cb-demo-item {
|
||||
position: relative;
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-flex: 1;
|
||||
-moz-box-flex: 1;
|
||||
-ms-flex: 1;
|
||||
flex: 1;
|
||||
padding: 50px 30px;
|
||||
margin: 0 20px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
@media (min-width: 1600px) {
|
||||
.cb-demo-item {
|
||||
padding: 90px 30px;
|
||||
margin: 0 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.cb-demo-item-title {
|
||||
position: relative;
|
||||
margin: 0 0 25px 0;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cb-demo-item-text {
|
||||
position: relative;
|
||||
max-width: 70%;
|
||||
margin: 0 auto;
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
.cb-demo-item:before {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
-webkit-border-radius: 30px;
|
||||
-moz-border-radius: 30px;
|
||||
border-radius: 30px;
|
||||
background: #f8f8f8;
|
||||
-webkit-transition: -webkit-box-shadow 0.2s;
|
||||
transition: -webkit-box-shadow 0.2s;
|
||||
-o-transition: box-shadow 0.2s;
|
||||
-moz-transition: box-shadow 0.2s, -moz-box-shadow 0.2s;
|
||||
transition: box-shadow 0.2s;
|
||||
transition: box-shadow 0.2s, -webkit-box-shadow 0.2s, -moz-box-shadow 0.2s;
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
/*!
|
||||
* SlickNav Responsive Mobile Menu v1.0.10
|
||||
* (c) 2016 Josh Cope
|
||||
* licensed under MIT
|
||||
*/.slicknav_btn,.slicknav_nav .slicknav_item{cursor:pointer}.slicknav_menu,.slicknav_menu *{box-sizing:border-box}.slicknav_btn{position:relative;display:block;vertical-align:middle;float:right;padding:.438em .625em;line-height:1.125em}.slicknav_btn .slicknav_icon-bar+.slicknav_icon-bar{margin-top:.188em}.slicknav_menu .slicknav_menutxt{display:block;line-height:1.188em;float:left;color:#fff;font-weight:700;text-shadow:0 1px 3px #000}.slicknav_menu .slicknav_icon{float:left;width:1.125em;height:.875em;margin:.188em 0 0 .438em}.slicknav_menu .slicknav_icon:before{background:0 0;width:1.125em;height:.875em;display:block;content:"";position:absolute}.slicknav_menu .slicknav_no-text{margin:0}.slicknav_menu .slicknav_icon-bar{display:block;width:1.125em;height:.125em;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,.25);box-shadow:0 1px 0 rgba(0,0,0,.25)}.slicknav_menu:after,.slicknav_menu:before{content:" ";display:table}.slicknav_menu:after{clear:both}.slicknav_nav li,.slicknav_nav ul{display:block}.slicknav_nav .slicknav_arrow{font-size:.8em;margin:0 0 0 .4em}.slicknav_nav .slicknav_item a{display:inline}.slicknav_nav .slicknav_row,.slicknav_nav a{display:block}.slicknav_nav .slicknav_parent-link a{display:inline}.slicknav_menu{*zoom:1;font-size:16px;background:#4c4c4c;padding:5px}.slicknav_nav,.slicknav_nav ul{list-style:none;overflow:hidden;padding:0}.slicknav_menu .slicknav_icon-bar{background-color:#fff}.slicknav_btn{margin:5px 5px 6px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,.75);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;background-color:#222}.slicknav_nav{clear:both;color:#fff;margin:0;font-size:.875em}.slicknav_nav ul{margin:0 0 0 20px}.slicknav_nav .slicknav_row,.slicknav_nav a{padding:5px 10px;margin:2px 5px}.slicknav_nav .slicknav_row:hover{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;background:#ccc;color:#fff}.slicknav_nav a{text-decoration:none;color:#fff}.slicknav_nav a:hover{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;background:#ccc;color:#222}.slicknav_nav .slicknav_txtnode{margin-left:15px}.slicknav_nav .slicknav_item a,.slicknav_nav .slicknav_parent-link a{padding:0;margin:0}.slicknav_brand{float:left;color:#fff;font-size:18px;line-height:30px;padding:7px 12px;height:44px}
|
||||
+13
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
+11
File diff suppressed because one or more lines are too long
@@ -0,0 +1,815 @@
|
||||
//
|
||||
// SmoothScroll for websites v1.5.1 (Balazs Galambosi)
|
||||
// http://www.smoothscroll.net/
|
||||
//
|
||||
// Licensed under the terms of the MIT license.
|
||||
//
|
||||
// You may use it in your theme if you credit me.
|
||||
// It is also free to use on any individual website.
|
||||
//
|
||||
// Exception:
|
||||
// The only restriction is to not publish any
|
||||
// extension for browsers or native application
|
||||
// without getting a written permission first.
|
||||
//
|
||||
|
||||
(function () {
|
||||
|
||||
// Scroll Variables (tweakable)
|
||||
var defaultOptions = {
|
||||
|
||||
// Scrolling Core
|
||||
frameRate : 300, // [Hz]
|
||||
animationTime : 600, // [ms]
|
||||
stepSize : 100, // [px]
|
||||
|
||||
// Pulse (less tweakable)
|
||||
// ratio of "tail" to "acceleration"
|
||||
pulseAlgorithm : true,
|
||||
pulseScale : 4,
|
||||
pulseNormalize : 1,
|
||||
|
||||
// Acceleration
|
||||
accelerationDelta : 50, // 50
|
||||
accelerationMax : 3, // 3
|
||||
|
||||
// Keyboard Settings
|
||||
keyboardSupport : true, // option
|
||||
arrowScroll : 50, // [px]
|
||||
|
||||
// Other
|
||||
fixedBackground : true,
|
||||
excluded : ''
|
||||
};
|
||||
|
||||
var options = defaultOptions;
|
||||
|
||||
|
||||
// Other Variables
|
||||
var isExcluded = false;
|
||||
var isFrame = false;
|
||||
var direction = { x: 0, y: 0 };
|
||||
var initDone = false;
|
||||
var root = document.documentElement;
|
||||
var activeElement;
|
||||
var observer;
|
||||
var refreshSize;
|
||||
var deltaBuffer = [];
|
||||
var deltaBufferTimer;
|
||||
var isMac = /^Mac/.test(navigator.platform);
|
||||
|
||||
/***********************************************
|
||||
* INITIALIZE
|
||||
***********************************************/
|
||||
|
||||
/**
|
||||
* Tests if smooth scrolling is allowed. Shuts down everything if not.
|
||||
*/
|
||||
function initTest() {
|
||||
if (options.keyboardSupport) {
|
||||
addEvent('keydown', keydown);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up scrolls array, determines if frames are involved.
|
||||
*/
|
||||
function init() {
|
||||
|
||||
if (initDone || !document.body) return;
|
||||
|
||||
initDone = true;
|
||||
|
||||
var body = document.body;
|
||||
var html = document.documentElement;
|
||||
var windowHeight = window.innerHeight;
|
||||
var scrollHeight = body.scrollHeight;
|
||||
|
||||
// check compat mode for root element
|
||||
root = (document.compatMode.indexOf('CSS') >= 0) ? html : body;
|
||||
activeElement = body;
|
||||
|
||||
initTest();
|
||||
|
||||
// Checks if this script is running in a frame
|
||||
if (top != self) {
|
||||
isFrame = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Safari 10 fixed it, Chrome fixed it in v45:
|
||||
* This fixes a bug where the areas left and right to
|
||||
* the content does not trigger the onmousewheel event
|
||||
* on some pages. e.g.: html, body { height: 100% }
|
||||
*/
|
||||
else if (isOldSafari &&
|
||||
scrollHeight > windowHeight &&
|
||||
(body.offsetHeight <= windowHeight ||
|
||||
html.offsetHeight <= windowHeight)) {
|
||||
|
||||
var fullPageElem = document.createElement('div');
|
||||
fullPageElem.style.cssText = 'position:absolute; z-index:-10000; ' +
|
||||
'top:0; left:0; right:0; height:' +
|
||||
root.scrollHeight + 'px';
|
||||
document.body.appendChild(fullPageElem);
|
||||
|
||||
// DOM changed (throttled) to fix height
|
||||
var pendingRefresh;
|
||||
refreshSize = function () {
|
||||
if (pendingRefresh) return; // could also be: clearTimeout(pendingRefresh);
|
||||
pendingRefresh = setTimeout(function () {
|
||||
if (isExcluded) return; // could be running after cleanup
|
||||
fullPageElem.style.height = '0';
|
||||
fullPageElem.style.height = root.scrollHeight + 'px';
|
||||
pendingRefresh = null;
|
||||
}, 500); // act rarely to stay fast
|
||||
};
|
||||
|
||||
setTimeout(refreshSize, 10);
|
||||
|
||||
addEvent('resize', refreshSize);
|
||||
|
||||
// TODO: attributeFilter?
|
||||
var config = {
|
||||
attributes: true,
|
||||
childList: true,
|
||||
characterData: false
|
||||
// subtree: true
|
||||
};
|
||||
|
||||
observer = new MutationObserver(refreshSize);
|
||||
observer.observe(body, config);
|
||||
|
||||
if (root.offsetHeight <= windowHeight) {
|
||||
var clearfix = document.createElement('div');
|
||||
clearfix.style.clear = 'both';
|
||||
body.appendChild(clearfix);
|
||||
}
|
||||
}
|
||||
|
||||
// disable fixed background
|
||||
if (!options.fixedBackground && !isExcluded) {
|
||||
body.style.backgroundAttachment = 'scroll';
|
||||
html.style.backgroundAttachment = 'scroll';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes event listeners and other traces left on the page.
|
||||
*/
|
||||
function cleanup() {
|
||||
observer && observer.disconnect();
|
||||
removeEvent(wheelEvent, wheel);
|
||||
removeEvent('mousedown', mousedown);
|
||||
removeEvent('keydown', keydown);
|
||||
removeEvent('resize', refreshSize);
|
||||
removeEvent('load', init);
|
||||
}
|
||||
|
||||
|
||||
/************************************************
|
||||
* SCROLLING
|
||||
************************************************/
|
||||
|
||||
var que = [];
|
||||
var pending = false;
|
||||
var lastScroll = Date.now();
|
||||
|
||||
/**
|
||||
* Pushes scroll actions to the scrolling queue.
|
||||
*/
|
||||
function scrollArray(elem, left, top) {
|
||||
|
||||
directionCheck(left, top);
|
||||
|
||||
if (options.accelerationMax != 1) {
|
||||
var now = Date.now();
|
||||
var elapsed = now - lastScroll;
|
||||
if (elapsed < options.accelerationDelta) {
|
||||
var factor = (1 + (50 / elapsed)) / 2;
|
||||
if (factor > 1) {
|
||||
factor = Math.min(factor, options.accelerationMax);
|
||||
left *= factor;
|
||||
top *= factor;
|
||||
}
|
||||
}
|
||||
lastScroll = Date.now();
|
||||
}
|
||||
|
||||
// push a scroll command
|
||||
que.push({
|
||||
x: left,
|
||||
y: top,
|
||||
lastX: (left < 0) ? 0.99 : -0.99,
|
||||
lastY: (top < 0) ? 0.99 : -0.99,
|
||||
start: Date.now()
|
||||
});
|
||||
|
||||
// don't act if there's a pending queue
|
||||
if (pending) {
|
||||
return;
|
||||
}
|
||||
|
||||
var scrollRoot = getScrollRoot();
|
||||
var isWindowScroll = (elem === scrollRoot || elem === document.body);
|
||||
|
||||
// if we haven't already fixed the behavior,
|
||||
// and it needs fixing for this sesh
|
||||
if (elem.$scrollBehavior == null && isScrollBehaviorSmooth(elem)) {
|
||||
elem.$scrollBehavior = elem.style.scrollBehavior;
|
||||
elem.style.scrollBehavior = 'auto';
|
||||
}
|
||||
|
||||
var step = function (time) {
|
||||
|
||||
var now = Date.now();
|
||||
var scrollX = 0;
|
||||
var scrollY = 0;
|
||||
|
||||
for (var i = 0; i < que.length; i++) {
|
||||
|
||||
var item = que[i];
|
||||
var elapsed = now - item.start;
|
||||
var finished = (elapsed >= options.animationTime);
|
||||
|
||||
// scroll position: [0, 1]
|
||||
var position = (finished) ? 1 : elapsed / options.animationTime;
|
||||
|
||||
// easing [optional]
|
||||
if (options.pulseAlgorithm) {
|
||||
position = pulse(position);
|
||||
}
|
||||
|
||||
// only need the difference
|
||||
var x = (item.x * position - item.lastX) >> 0;
|
||||
var y = (item.y * position - item.lastY) >> 0;
|
||||
|
||||
// add this to the total scrolling
|
||||
scrollX += x;
|
||||
scrollY += y;
|
||||
|
||||
// update last values
|
||||
item.lastX += x;
|
||||
item.lastY += y;
|
||||
|
||||
// delete and step back if it's over
|
||||
if (finished) {
|
||||
que.splice(i, 1); i--;
|
||||
}
|
||||
}
|
||||
|
||||
// scroll left and top
|
||||
if (isWindowScroll) {
|
||||
window.scrollBy(scrollX, scrollY);
|
||||
}
|
||||
else {
|
||||
if (scrollX) elem.scrollLeft += scrollX;
|
||||
if (scrollY) elem.scrollTop += scrollY;
|
||||
}
|
||||
|
||||
// clean up if there's nothing left to do
|
||||
if (!left && !top) {
|
||||
que = [];
|
||||
}
|
||||
|
||||
if (que.length) {
|
||||
requestFrame(step, elem, (1000 / options.frameRate + 1));
|
||||
} else {
|
||||
pending = false;
|
||||
// restore default behavior at the end of scrolling sesh
|
||||
if (elem.$scrollBehavior != null) {
|
||||
elem.style.scrollBehavior = elem.$scrollBehavior;
|
||||
elem.$scrollBehavior = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// start a new queue of actions
|
||||
requestFrame(step, elem, 0);
|
||||
pending = true;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************
|
||||
* EVENTS
|
||||
***********************************************/
|
||||
|
||||
/**
|
||||
* Mouse wheel handler.
|
||||
* @param {Object} event
|
||||
*/
|
||||
function wheel(event) {
|
||||
|
||||
if (!initDone) {
|
||||
init();
|
||||
}
|
||||
|
||||
var target = getEventTargetDeep(event);
|
||||
|
||||
// leave early if default action is prevented
|
||||
// or it's a zooming event with CTRL
|
||||
if (event.defaultPrevented || event.ctrlKey) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// leave embedded content alone (flash & pdf)
|
||||
if (isNodeName(activeElement, 'embed') ||
|
||||
(isNodeName(target, 'embed') && /\.pdf/i.test(target.src)) ||
|
||||
isNodeName(activeElement, 'object')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// TODO:
|
||||
//
|
||||
// wheelDeltaY (DEPRECATED):
|
||||
// - Mac: positive (+) for scrolling down; Win: negative (-) for up
|
||||
// - Mac & Win: in simple case multiple of 120 or 100 (except Firefox maybe)
|
||||
// - scaled by zoom level (hard to detect, devicePixelRatio affected by ppi)
|
||||
// deltaY (NEW):
|
||||
// - Mac: negative (-) for scrolling down; Win: positive (+) for up
|
||||
// - Win: in simple case it's multiple of 300
|
||||
// - Mac: can be any number because of default shitty "acceleration"
|
||||
// some third party apps might change it to line-based (120x)
|
||||
// - scaled by zoom level (hard to detect, devicePixelRatio affected by ppi)
|
||||
//
|
||||
// For touchpad in Chromium this seems to hold true:
|
||||
// e.wheelDeltaY === (e.deltaY * -3)
|
||||
// but it also holds for mouses on Safari Mac with default "acceleration".
|
||||
// Also not future-proof because wheelDeltaY is deprecated
|
||||
|
||||
var deltaX = -event.wheelDeltaX || event.deltaX || 0;
|
||||
var deltaY = -event.wheelDeltaY || event.deltaY || 0;
|
||||
|
||||
if (isMac) {
|
||||
if (event.wheelDeltaX && isDivisible(event.wheelDeltaX, 120)) {
|
||||
deltaX = -120 * (event.wheelDeltaX / Math.abs(event.wheelDeltaX));
|
||||
}
|
||||
if (event.wheelDeltaY && isDivisible(event.wheelDeltaY, 120)) {
|
||||
deltaY = -120 * (event.wheelDeltaY / Math.abs(event.wheelDeltaY));
|
||||
}
|
||||
}
|
||||
|
||||
// use wheelDelta if deltaX/Y is not available
|
||||
if (!deltaX && !deltaY) {
|
||||
deltaY = -event.wheelDelta || 0;
|
||||
}
|
||||
|
||||
// line based scrolling (Firefox mostly)
|
||||
if (event.deltaMode === 1) {
|
||||
deltaX *= 40;
|
||||
deltaY *= 40;
|
||||
}
|
||||
|
||||
var overflowing = overflowingAncestor(target);
|
||||
|
||||
// nothing to do if there's no element that's scrollable
|
||||
if (!overflowing) {
|
||||
// except Chrome iframes seem to eat wheel events, which we need to
|
||||
// propagate up, if the iframe has nothing overflowing to scroll
|
||||
if (isFrame && isChrome) {
|
||||
// change target to iframe element itself for the parent frame
|
||||
Object.defineProperty(event, "target", {value: window.frameElement});
|
||||
return parent.wheel(event);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// check if it's a touchpad scroll that should be ignored
|
||||
if (isTouchpad(deltaY)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// scale by step size
|
||||
// delta is 120 most of the time
|
||||
// synaptics seems to send 1 sometimes
|
||||
if (Math.abs(deltaX) > 1.2) {
|
||||
deltaX *= options.stepSize / 120;
|
||||
}
|
||||
if (Math.abs(deltaY) > 1.2) {
|
||||
deltaY *= options.stepSize / 120;
|
||||
}
|
||||
|
||||
scrollArray(overflowing, deltaX, deltaY);
|
||||
event.preventDefault();
|
||||
scheduleClearCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* Keydown event handler.
|
||||
* @param {Object} event
|
||||
*/
|
||||
function keydown(event) {
|
||||
|
||||
var target = getEventTargetDeep(event);
|
||||
var modifier = event.ctrlKey || event.altKey || event.metaKey ||
|
||||
(event.shiftKey && event.code !== 'Space');
|
||||
|
||||
// our own tracked active element could've been removed from the DOM
|
||||
if (!document.body.contains(activeElement)) {
|
||||
activeElement = document.activeElement;
|
||||
}
|
||||
|
||||
// do nothing if user is editing text
|
||||
// or using a modifier key (except shift)
|
||||
// or in a dropdown
|
||||
// or inside interactive elements
|
||||
var inputNodeNames = /^(textarea|select|embed|object)$/i;
|
||||
var buttonTypes = /^(button|submit|radio|checkbox|file|color|image)$/i;
|
||||
if ( event.defaultPrevented ||
|
||||
inputNodeNames.test(target.nodeName) ||
|
||||
isNodeName(target, 'input') && !buttonTypes.test(target.type) ||
|
||||
isNodeName(activeElement, 'video') ||
|
||||
isInsideYoutubeVideo(event) ||
|
||||
target.isContentEditable ||
|
||||
modifier ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// [spacebar] should trigger button press, leave it alone
|
||||
if ((isNodeName(target, 'button') ||
|
||||
isNodeName(target, 'input') && buttonTypes.test(target.type)) &&
|
||||
event.code === 'Space') {
|
||||
return true;
|
||||
}
|
||||
|
||||
// [arrow keys] on radio buttons should be left alone
|
||||
if (isNodeName(target, 'input') && target.type == 'radio' &&
|
||||
(event.code === 'ArrowUp' || event.code === 'ArrowDown' ||
|
||||
event.code === 'ArrowLeft' || event.code === 'ArrowRight')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var shift, x = 0, y = 0;
|
||||
var overflowing = overflowingAncestor(activeElement);
|
||||
|
||||
if (!overflowing) {
|
||||
// Chrome iframes seem to eat key events, which we need to
|
||||
// propagate up, if the iframe has nothing overflowing to scroll
|
||||
return (isFrame && isChrome) ? parent.keydown(event) : true;
|
||||
}
|
||||
|
||||
var clientHeight = overflowing.clientHeight;
|
||||
|
||||
if (overflowing == document.body) {
|
||||
clientHeight = window.innerHeight;
|
||||
}
|
||||
|
||||
switch (event.code) {
|
||||
case 'ArrowUp':
|
||||
y = -options.arrowScroll;
|
||||
break;
|
||||
case 'ArrowDown':
|
||||
y = options.arrowScroll;
|
||||
break;
|
||||
case 'Space':
|
||||
shift = event.shiftKey ? 1 : -1;
|
||||
y = -shift * clientHeight * 0.9;
|
||||
break;
|
||||
case 'PageUp':
|
||||
y = -clientHeight * 0.9;
|
||||
break;
|
||||
case 'PageDown':
|
||||
y = clientHeight * 0.9;
|
||||
break;
|
||||
case 'Home':
|
||||
if (overflowing == document.body && document.scrollingElement)
|
||||
overflowing = document.scrollingElement;
|
||||
y = -overflowing.scrollTop;
|
||||
break;
|
||||
case 'End':
|
||||
var scroll = overflowing.scrollHeight - overflowing.scrollTop;
|
||||
var scrollRemaining = scroll - clientHeight;
|
||||
y = (scrollRemaining > 0) ? scrollRemaining + 10 : 0;
|
||||
break;
|
||||
case 'ArrowLeft':
|
||||
x = -options.arrowScroll;
|
||||
break;
|
||||
case 'ArrowRight':
|
||||
x = options.arrowScroll;
|
||||
break;
|
||||
default:
|
||||
return true; // a key we don't care about
|
||||
}
|
||||
|
||||
scrollArray(overflowing, x, y);
|
||||
event.preventDefault();
|
||||
scheduleClearCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* Mousedown event only for updating activeElement
|
||||
*/
|
||||
function mousedown(event) {
|
||||
activeElement = getEventTargetDeep(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the deepest event target even through shadow DOM.
|
||||
* @param {Object} event
|
||||
* @return {Element}
|
||||
*/
|
||||
function getEventTargetDeep(event) {
|
||||
return event.composedPath ? event.composedPath()[0] : event.target;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************
|
||||
* OVERFLOW
|
||||
***********************************************/
|
||||
|
||||
var uniqueID = (function () {
|
||||
var i = 0;
|
||||
return function (el) {
|
||||
return el.uniqueID || (el.uniqueID = i++);
|
||||
};
|
||||
})();
|
||||
|
||||
var cacheX = {}; // cleared out after a scrolling session
|
||||
var cacheY = {}; // cleared out after a scrolling session
|
||||
var clearCacheTimer;
|
||||
var smoothBehaviorForElement = {};
|
||||
|
||||
//setInterval(function () { cache = {}; }, 10 * 1000);
|
||||
|
||||
function scheduleClearCache() {
|
||||
clearTimeout(clearCacheTimer);
|
||||
clearCacheTimer = setInterval(function () {
|
||||
cacheX = cacheY = smoothBehaviorForElement = {};
|
||||
}, 1*1000);
|
||||
}
|
||||
|
||||
function setCache(elems, overflowing, x) {
|
||||
var cache = x ? cacheX : cacheY;
|
||||
for (var i = elems.length; i--;)
|
||||
cache[uniqueID(elems[i])] = overflowing;
|
||||
return overflowing;
|
||||
}
|
||||
|
||||
function getCache(el, x) {
|
||||
return (x ? cacheX : cacheY)[uniqueID(el)];
|
||||
}
|
||||
|
||||
// (body) (root)
|
||||
// | hidden | visible | scroll | auto |
|
||||
// hidden | no | no | YES | YES |
|
||||
// visible | no | YES | YES | YES |
|
||||
// scroll | no | YES | YES | YES |
|
||||
// auto | no | YES | YES | YES |
|
||||
|
||||
function overflowingAncestor(el) {
|
||||
var elems = [];
|
||||
var body = document.body;
|
||||
var rootScrollHeight = root.scrollHeight;
|
||||
while (el) {
|
||||
var cached = getCache(el, false);
|
||||
if (cached) {
|
||||
return setCache(elems, cached);
|
||||
}
|
||||
elems.push(el);
|
||||
if (rootScrollHeight === el.scrollHeight) {
|
||||
var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);
|
||||
var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);
|
||||
if (isFrame && isContentOverflowing(root) ||
|
||||
!isFrame && isOverflowCSS) {
|
||||
return setCache(elems, getScrollRoot());
|
||||
}
|
||||
} else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {
|
||||
return setCache(elems, el);
|
||||
}
|
||||
// Support shadow DOM
|
||||
el = el.parentElement || (el.getRootNode && el.getRootNode().host);
|
||||
}
|
||||
}
|
||||
|
||||
function isContentOverflowing(el) {
|
||||
return (el.clientHeight + 10 < el.scrollHeight);
|
||||
}
|
||||
|
||||
// typically for <body> and <html>
|
||||
function overflowNotHidden(el) {
|
||||
var overflow = getComputedStyle(el, '').getPropertyValue('overflow-y');
|
||||
return (overflow !== 'hidden');
|
||||
}
|
||||
|
||||
// for all other elements
|
||||
function overflowAutoOrScroll(el) {
|
||||
var overflow = getComputedStyle(el, '').getPropertyValue('overflow-y');
|
||||
return (overflow === 'scroll' || overflow === 'auto');
|
||||
}
|
||||
|
||||
// for all other elements
|
||||
function isScrollBehaviorSmooth(el) {
|
||||
var id = uniqueID(el);
|
||||
if (smoothBehaviorForElement[id] == null) {
|
||||
var scrollBehavior = getComputedStyle(el, '')['scroll-behavior'];
|
||||
smoothBehaviorForElement[id] = ('smooth' == scrollBehavior);
|
||||
}
|
||||
return smoothBehaviorForElement[id];
|
||||
}
|
||||
|
||||
|
||||
/***********************************************
|
||||
* HELPERS
|
||||
***********************************************/
|
||||
|
||||
function addEvent(type, fn, arg) {
|
||||
window.addEventListener(type, fn, arg || false);
|
||||
}
|
||||
|
||||
function removeEvent(type, fn, arg) {
|
||||
window.removeEventListener(type, fn, arg || false);
|
||||
}
|
||||
|
||||
function isNodeName(el, tag) {
|
||||
return el && (el.nodeName||'').toLowerCase() === tag.toLowerCase();
|
||||
}
|
||||
|
||||
function directionCheck(x, y) {
|
||||
x = (x > 0) ? 1 : -1;
|
||||
y = (y > 0) ? 1 : -1;
|
||||
if (direction.x !== x || direction.y !== y) {
|
||||
direction.x = x;
|
||||
direction.y = y;
|
||||
que = [];
|
||||
lastScroll = 0;
|
||||
}
|
||||
}
|
||||
|
||||
try { // #46 Safari throws in private browsing for localStorage
|
||||
if (localStorage.SS_deltaBuffer) {
|
||||
deltaBuffer = localStorage.SS_deltaBuffer.split(',');
|
||||
}
|
||||
} catch (e) { }
|
||||
|
||||
function isTouchpad(deltaY) {
|
||||
if (!deltaY) return;
|
||||
if (!deltaBuffer.length) {
|
||||
deltaBuffer = [deltaY, deltaY, deltaY];
|
||||
}
|
||||
deltaY = Math.abs(deltaY);
|
||||
deltaBuffer.push(deltaY);
|
||||
deltaBuffer.shift();
|
||||
clearTimeout(deltaBufferTimer);
|
||||
deltaBufferTimer = setTimeout(function () {
|
||||
try { // #46 Safari throws in private browsing for localStorage
|
||||
localStorage.SS_deltaBuffer = deltaBuffer.join(',');
|
||||
} catch (e) { }
|
||||
}, 1000);
|
||||
var dpiScaledWheelDelta = deltaY > 120 && allDeltasDivisableBy(deltaY); // win64
|
||||
var tp = !allDeltasDivisableBy(120) && !allDeltasDivisableBy(100) && !dpiScaledWheelDelta;
|
||||
if (deltaY < 50) return true;
|
||||
return tp;
|
||||
}
|
||||
|
||||
function isDivisible(n, divisor) {
|
||||
return (Math.floor(n / divisor) == n / divisor);
|
||||
}
|
||||
|
||||
function allDeltasDivisableBy(divisor) {
|
||||
return (isDivisible(deltaBuffer[0], divisor) &&
|
||||
isDivisible(deltaBuffer[1], divisor) &&
|
||||
isDivisible(deltaBuffer[2], divisor));
|
||||
}
|
||||
|
||||
function isInsideYoutubeVideo(event) {
|
||||
var elem = getEventTargetDeep(event);
|
||||
var isControl = false;
|
||||
if (document.URL.indexOf ('www.youtube.com/watch') != -1) {
|
||||
do {
|
||||
isControl = (elem.classList &&
|
||||
elem.classList.contains('html5-video-controls'));
|
||||
if (isControl) break;
|
||||
} while ((elem = elem.parentNode));
|
||||
}
|
||||
return isControl;
|
||||
}
|
||||
|
||||
var requestFrame = (function () {
|
||||
return (window.requestAnimationFrame ||
|
||||
window.webkitRequestAnimationFrame ||
|
||||
window.mozRequestAnimationFrame ||
|
||||
function (callback, element, delay) {
|
||||
window.setTimeout(callback, delay || (1000/60));
|
||||
});
|
||||
})();
|
||||
|
||||
var MutationObserver = (window.MutationObserver ||
|
||||
window.WebKitMutationObserver ||
|
||||
window.MozMutationObserver);
|
||||
|
||||
var getScrollRoot = (function() {
|
||||
var SCROLL_ROOT = document.scrollingElement;
|
||||
return function() {
|
||||
if (!SCROLL_ROOT) {
|
||||
var dummy = document.createElement('div');
|
||||
dummy.style.cssText = 'height:10000px;width:1px;';
|
||||
document.body.appendChild(dummy);
|
||||
var bodyScrollTop = document.body.scrollTop;
|
||||
var docElScrollTop = document.documentElement.scrollTop;
|
||||
window.scrollBy(0, 3);
|
||||
if (document.body.scrollTop != bodyScrollTop)
|
||||
(SCROLL_ROOT = document.body);
|
||||
else
|
||||
(SCROLL_ROOT = document.documentElement);
|
||||
window.scrollBy(0, -3);
|
||||
document.body.removeChild(dummy);
|
||||
}
|
||||
return SCROLL_ROOT;
|
||||
};
|
||||
})();
|
||||
|
||||
|
||||
/***********************************************
|
||||
* PULSE (by Michael Herf)
|
||||
***********************************************/
|
||||
|
||||
/**
|
||||
* Viscous fluid with a pulse for part and decay for the rest.
|
||||
* - Applies a fixed force over an interval (a damped acceleration), and
|
||||
* - Lets the exponential bleed away the velocity over a longer interval
|
||||
* - Michael Herf, http://stereopsis.com/stopping/
|
||||
*/
|
||||
function pulse_(x) {
|
||||
var val, start, expx;
|
||||
// test
|
||||
x = x * options.pulseScale;
|
||||
if (x < 1) { // acceleartion
|
||||
val = x - (1 - Math.exp(-x));
|
||||
} else { // tail
|
||||
// the previous animation ended here:
|
||||
start = Math.exp(-1);
|
||||
// simple viscous drag
|
||||
x -= 1;
|
||||
expx = 1 - Math.exp(-x);
|
||||
val = start + (expx * (1 - start));
|
||||
}
|
||||
return val * options.pulseNormalize;
|
||||
}
|
||||
|
||||
function pulse(x) {
|
||||
if (x >= 1) return 1;
|
||||
if (x <= 0) return 0;
|
||||
|
||||
if (options.pulseNormalize == 1) {
|
||||
options.pulseNormalize /= pulse_(1);
|
||||
}
|
||||
return pulse_(x);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************
|
||||
* FIRST RUN
|
||||
***********************************************/
|
||||
|
||||
var userAgent = window.navigator.userAgent;
|
||||
var isEdge = /Edge/.test(userAgent); // thank you MS
|
||||
var isChrome = /chrome/i.test(userAgent) && !isEdge;
|
||||
var isSafari = /safari/i.test(userAgent) && !isEdge;
|
||||
var isMobile = /mobile/i.test(userAgent);
|
||||
var isIEWin7 = /Windows NT 6.1/i.test(userAgent) && /rv:11/i.test(userAgent);
|
||||
var isOldSafari = isSafari && (/Version\/8/i.test(userAgent) || /Version\/9/i.test(userAgent));
|
||||
var isEnabledForBrowser = (isChrome || isSafari || isIEWin7) && !isMobile;
|
||||
|
||||
var supportsPassive = false;
|
||||
try {
|
||||
window.addEventListener("test", null, Object.defineProperty({}, 'passive', {
|
||||
get: function () {
|
||||
supportsPassive = true;
|
||||
}
|
||||
}));
|
||||
} catch(e) {}
|
||||
|
||||
var wheelOpt = supportsPassive ? { passive: false } : false;
|
||||
var wheelEvent = 'onwheel' in document.createElement('div') ? 'wheel' : 'mousewheel';
|
||||
|
||||
if (wheelEvent && isEnabledForBrowser) {
|
||||
addEvent(wheelEvent, wheel, wheelOpt);
|
||||
addEvent('mousedown', mousedown);
|
||||
addEvent('load', init);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************
|
||||
* PUBLIC INTERFACE
|
||||
***********************************************/
|
||||
|
||||
function SmoothScroll(optionsToSet) {
|
||||
for (var key in optionsToSet)
|
||||
if (defaultOptions.hasOwnProperty(key))
|
||||
options[key] = optionsToSet[key];
|
||||
}
|
||||
SmoothScroll.destroy = cleanup;
|
||||
|
||||
if (window.SmoothScrollOptions) // async API
|
||||
SmoothScroll(window.SmoothScrollOptions);
|
||||
|
||||
if (typeof define === 'function' && define.amd)
|
||||
define(function() {
|
||||
return SmoothScroll;
|
||||
});
|
||||
else if ('object' == typeof exports)
|
||||
module.exports = SmoothScroll;
|
||||
else
|
||||
window.SmoothScroll = SmoothScroll;
|
||||
|
||||
})();
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
/*!
|
||||
* SplitText 3.13.0
|
||||
* https://gsap.com
|
||||
*
|
||||
* @license Copyright 2025, GreenSock. All rights reserved. Subject to the terms at https://gsap.com/standard-license.
|
||||
* @author: Jack Doyle
|
||||
*/
|
||||
|
||||
(function(B,A){typeof exports=="object"&&typeof module!="undefined"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(B=typeof globalThis!="undefined"?globalThis:B||self,A(B.window=B.window||{}))})(this,function(B){"use strict";let A,_,G,re=()=>G||U.register(window.gsap),V=typeof Intl!="undefined"?new Intl.Segmenter:0,P=e=>typeof e=="string"?P(document.querySelectorAll(e)):"length"in e?Array.from(e):[e],X=e=>P(e).filter(t=>t instanceof HTMLElement),J=[],K=function(){},oe=/\s+/g,Y=new RegExp("\\p{RI}\\p{RI}|\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?(\\u{200D}\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?)*|.","gu"),Z={left:0,top:0,width:0,height:0},ee=(e,t)=>{if(t){let s=new Set(e.join("").match(t)||J),i=e.length,o,c,n,a;if(s.size)for(;--i>-1;){c=e[i];for(n of s)if(n.startsWith(c)&&n.length>c.length){for(o=0,a=c;n.startsWith(a+=e[i+ ++o])&&a.length<n.length;);if(o&&a.length===n.length){e[i]=n,e.splice(i+1,o);break}}}}return e},te=e=>window.getComputedStyle(e).display==="inline"&&(e.style.display="inline-block"),z=(e,t,s)=>t.insertBefore(typeof e=="string"?document.createTextNode(e):e,s),Q=(e,t,s)=>{let i=t[e+"sClass"]||"",{tag:o="div",aria:c="auto",propIndex:n=!1}=t,a=e==="line"?"block":"inline-block",h=i.indexOf("++")>-1,b=x=>{let g=document.createElement(o),C=s.length+1;return i&&(g.className=i+(h?" "+i+C:"")),n&&g.style.setProperty("--"+e,C+""),c!=="none"&&g.setAttribute("aria-hidden","true"),o!=="span"&&(g.style.position="relative",g.style.display=a),g.textContent=x,s.push(g),g};return h&&(i=i.replace("++","")),b.collection=s,b},ae=(e,t,s,i)=>{let o=Q("line",s,i),c=window.getComputedStyle(e).textAlign||"left";return(n,a)=>{let h=o("");for(h.style.textAlign=c,e.insertBefore(h,t[n]);n<a;n++)h.appendChild(t[n]);h.normalize()}},ie=(e,t,s,i,o,c,n,a,h,b)=>{var x;let g=Array.from(e.childNodes),C=0,{wordDelimiter:R,reduceWhiteSpace:L=!0,prepareText:$}=t,q=e.getBoundingClientRect(),j=q,D=!L&&window.getComputedStyle(e).whiteSpace.substring(0,3)==="pre",E=0,v=s.collection,r,f,H,l,m,y,I,d,u,W,S,O,T,F,w,p,k,N;for(typeof R=="object"?(H=R.delimiter||R,f=R.replaceWith||""):f=R===""?"":R||" ",r=f!==" ";C<g.length;C++)if(l=g[C],l.nodeType===3){for(w=l.textContent||"",L?w=w.replace(oe," "):D&&(w=w.replace(/\n/g,f+`
|
||||
`)),$&&(w=$(w,e)),l.textContent=w,m=f||H?w.split(H||f):w.match(a)||J,k=m[m.length-1],d=r?k.slice(-1)===" ":!k,k||m.pop(),j=q,I=r?m[0].charAt(0)===" ":!m[0],I&&z(" ",e,l),m[0]||m.shift(),ee(m,h),c&&b||(l.textContent=""),u=1;u<=m.length;u++)if(p=m[u-1],!L&&D&&p.charAt(0)===`
|
||||
`&&((x=l.previousSibling)==null||x.remove(),z(document.createElement("br"),e,l),p=p.slice(1)),!L&&p==="")z(f,e,l);else if(p===" ")e.insertBefore(document.createTextNode(" "),l);else{if(r&&p.charAt(0)===" "&&z(" ",e,l),E&&u===1&&!I&&v.indexOf(E.parentNode)>-1?(y=v[v.length-1],y.appendChild(document.createTextNode(i?"":p))):(y=s(i?"":p),z(y,e,l),E&&u===1&&!I&&y.insertBefore(E,y.firstChild)),i)for(S=V?ee([...V.segment(p)].map(M=>M.segment),h):p.match(a)||J,N=0;N<S.length;N++)y.appendChild(S[N]===" "?document.createTextNode(" "):i(S[N]));if(c&&b){if(w=l.textContent=w.substring(p.length+1,w.length),W=y.getBoundingClientRect(),W.top>j.top&&W.left<=j.left){for(O=e.cloneNode(),T=e.childNodes[0];T&&T!==y;)F=T,T=T.nextSibling,O.appendChild(F);e.parentNode.insertBefore(O,e),o&&te(O)}j=W}(u<m.length||d)&&z(u>=m.length?" ":r&&p.slice(-1)===" "?" "+f:f,e,l)}e.removeChild(l),E=0}else l.nodeType===1&&(n&&n.indexOf(l)>-1?(v.indexOf(l.previousSibling)>-1&&v[v.length-1].appendChild(l),E=l):(ie(l,t,s,i,o,c,n,a,h,!0),E=0),o&&te(l))};const ne=class se{constructor(t,s){this.isSplit=!1,re(),this.elements=X(t),this.chars=[],this.words=[],this.lines=[],this.masks=[],this.vars=s,this._split=()=>this.isSplit&&this.split(this.vars);let i=[],o,c=()=>{let n=i.length,a;for(;n--;){a=i[n];let h=a.element.offsetWidth;if(h!==a.width){a.width=h,this._split();return}}};this._data={orig:i,obs:typeof ResizeObserver!="undefined"&&new ResizeObserver(()=>{clearTimeout(o),o=setTimeout(c,200)})},K(this),this.split(s)}split(t){this.isSplit&&this.revert(),this.vars=t=t||this.vars||{};let{type:s="chars,words,lines",aria:i="auto",deepSlice:o=!0,smartWrap:c,onSplit:n,autoSplit:a=!1,specialChars:h,mask:b}=this.vars,x=s.indexOf("lines")>-1,g=s.indexOf("chars")>-1,C=s.indexOf("words")>-1,R=g&&!C&&!x,L=h&&("push"in h?new RegExp("(?:"+h.join("|")+")","gu"):h),$=L?new RegExp(L.source+"|"+Y.source,"gu"):Y,q=!!t.ignore&&X(t.ignore),{orig:j,animTime:D,obs:E}=this._data,v;return(g||C||x)&&(this.elements.forEach((r,f)=>{j[f]={element:r,html:r.innerHTML,ariaL:r.getAttribute("aria-label"),ariaH:r.getAttribute("aria-hidden")},i==="auto"?r.setAttribute("aria-label",(r.textContent||"").trim()):i==="hidden"&&r.setAttribute("aria-hidden","true");let H=[],l=[],m=[],y=g?Q("char",t,H):null,I=Q("word",t,l),d,u,W,S;if(ie(r,t,I,y,R,o&&(x||R),q,$,L,!1),x){let O=P(r.childNodes),T=ae(r,O,t,m),F,w=[],p=0,k=O.map(M=>M.nodeType===1?M.getBoundingClientRect():Z),N=Z;for(d=0;d<O.length;d++)F=O[d],F.nodeType===1&&(F.nodeName==="BR"?(w.push(F),T(p,d+1),p=d+1,N=k[p]):(d&&k[d].top>N.top&&k[d].left<=N.left&&(T(p,d),p=d),N=k[d]));p<d&&T(p,d),w.forEach(M=>{var le;return(le=M.parentNode)==null?void 0:le.removeChild(M)})}if(!C){for(d=0;d<l.length;d++)if(u=l[d],g||!u.nextSibling||u.nextSibling.nodeType!==3)if(c&&!x){for(W=document.createElement("span"),W.style.whiteSpace="nowrap";u.firstChild;)W.appendChild(u.firstChild);u.replaceWith(W)}else u.replaceWith(...u.childNodes);else S=u.nextSibling,S&&S.nodeType===3&&(S.textContent=(u.textContent||"")+(S.textContent||""),u.remove());l.length=0,r.normalize()}this.lines.push(...m),this.words.push(...l),this.chars.push(...H)}),b&&this[b]&&this.masks.push(...this[b].map(r=>{let f=r.cloneNode();return r.replaceWith(f),f.appendChild(r),r.className&&(f.className=r.className.replace(/(\b\w+\b)/g,"$1-mask")),f.style.overflow="clip",f}))),this.isSplit=!0,_&&(a?_.addEventListener("loadingdone",this._split):_.status==="loading"&&console.warn("SplitText called before fonts loaded")),(v=n&&n(this))&&v.totalTime&&(this._data.anim=D?v.totalTime(D):v),x&&a&&this.elements.forEach((r,f)=>{j[f].width=r.offsetWidth,E&&E.observe(r)}),this}revert(){var t,s;let{orig:i,anim:o,obs:c}=this._data;return c&&c.disconnect(),i.forEach(({element:n,html:a,ariaL:h,ariaH:b})=>{n.innerHTML=a,h?n.setAttribute("aria-label",h):n.removeAttribute("aria-label"),b?n.setAttribute("aria-hidden",b):n.removeAttribute("aria-hidden")}),this.chars.length=this.words.length=this.lines.length=i.length=this.masks.length=0,this.isSplit=!1,_==null||_.removeEventListener("loadingdone",this._split),o&&(this._data.animTime=o.totalTime(),o.revert()),(s=(t=this.vars).onRevert)==null||s.call(t,this),this}static create(t,s){return new se(t,s)}static register(t){A=A||t||window.gsap,A&&(P=A.utils.toArray,K=A.core.context||K),!G&&window.innerWidth>0&&(_=document.fonts,G=!0)}};ne.version="3.13.0";let U=ne;B.SplitText=U,B.default=U,Object.defineProperty(B,"__esModule",{value:!0})});
|
||||
Vendored
+6
File diff suppressed because one or more lines are too long
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"name": "codeigniter4/framework",
|
||||
"description": "The CodeIgniter framework v4",
|
||||
"license": "MIT",
|
||||
"type": "project",
|
||||
"homepage": "https://codeigniter.com",
|
||||
"support": {
|
||||
"forum": "https://forum.codeigniter.com/",
|
||||
"source": "https://github.com/codeigniter4/CodeIgniter4",
|
||||
"slack": "https://codeigniterchat.slack.com"
|
||||
},
|
||||
"require": {
|
||||
"php": "^8.1",
|
||||
"ext-intl": "*",
|
||||
"ext-mbstring": "*",
|
||||
"laminas/laminas-escaper": "^2.13",
|
||||
"psr/log": "^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"codeigniter/coding-standard": "^1.7",
|
||||
"fakerphp/faker": "^1.9",
|
||||
"friendsofphp/php-cs-fixer": "^3.47.1",
|
||||
"kint-php/kint": "^5.0.4",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"nexusphp/cs-config": "^3.6",
|
||||
"phpunit/phpunit": "^10.5.16",
|
||||
"predis/predis": "^1.1 || ^2.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-curl": "If you use CURLRequest class",
|
||||
"ext-dom": "If you use TestResponse",
|
||||
"ext-exif": "If you run Image class tests",
|
||||
"ext-fileinfo": "Improves mime type detection for files",
|
||||
"ext-gd": "If you use Image class GDHandler",
|
||||
"ext-imagick": "If you use Image class ImageMagickHandler",
|
||||
"ext-libxml": "If you use TestResponse",
|
||||
"ext-memcache": "If you use Cache class MemcachedHandler with Memcache",
|
||||
"ext-memcached": "If you use Cache class MemcachedHandler with Memcached",
|
||||
"ext-mysqli": "If you use MySQL",
|
||||
"ext-oci8": "If you use Oracle Database",
|
||||
"ext-pgsql": "If you use PostgreSQL",
|
||||
"ext-readline": "Improves CLI::input() usability",
|
||||
"ext-redis": "If you use Cache class RedisHandler",
|
||||
"ext-simplexml": "If you format XML",
|
||||
"ext-sodium": "If you use Encryption SodiumHandler",
|
||||
"ext-sqlite3": "If you use SQLite3",
|
||||
"ext-sqlsrv": "If you use SQL Server",
|
||||
"ext-xdebug": "If you use CIUnitTestCase::assertHeaderEmitted()"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"CodeIgniter\\": "system/"
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"**/Database/Migrations/**"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true
|
||||
},
|
||||
"scripts": {
|
||||
"test": "phpunit"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
"use strict";
|
||||
|
||||
|
||||
/* ====== Define JS Constants ====== */
|
||||
const sidebarToggler = document.getElementById('docs-sidebar-toggler');
|
||||
const sidebar = document.getElementById('docs-sidebar');
|
||||
const sidebarLinks = document.querySelectorAll('#docs-sidebar .scrollto');
|
||||
|
||||
|
||||
|
||||
/* ===== Responsive Sidebar ====== */
|
||||
|
||||
window.onload=function()
|
||||
{
|
||||
responsiveSidebar();
|
||||
};
|
||||
|
||||
window.onresize=function()
|
||||
{
|
||||
responsiveSidebar();
|
||||
};
|
||||
|
||||
|
||||
function responsiveSidebar() {
|
||||
let w = window.innerWidth;
|
||||
if(w >= 1200) {
|
||||
// if larger
|
||||
sidebar.classList.remove('sidebar-hidden');
|
||||
sidebar.classList.add('sidebar-visible');
|
||||
|
||||
} else {
|
||||
// if smaller
|
||||
sidebar.classList.remove('sidebar-visible');
|
||||
sidebar.classList.add('sidebar-hidden');
|
||||
}
|
||||
};
|
||||
|
||||
sidebarToggler.addEventListener('click', () => {
|
||||
if (sidebar.classList.contains('sidebar-visible')) {
|
||||
sidebar.classList.remove('sidebar-visible');
|
||||
sidebar.classList.add('sidebar-hidden');
|
||||
|
||||
} else {
|
||||
sidebar.classList.remove('sidebar-hidden');
|
||||
sidebar.classList.add('sidebar-visible');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/* ===== Smooth scrolling ====== */
|
||||
/* Note: You need to include smoothscroll.min.js (smooth scroll behavior polyfill) on the page to cover some browsers */
|
||||
/* Ref: https://github.com/iamdustan/smoothscroll */
|
||||
|
||||
sidebarLinks.forEach((sidebarLink) => {
|
||||
|
||||
sidebarLink.addEventListener('click', (e) => {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var target = sidebarLink.getAttribute("href").replace('#', '');
|
||||
|
||||
//console.log(target);
|
||||
|
||||
document.getElementById(target).scrollIntoView({ behavior: 'smooth' });
|
||||
|
||||
|
||||
//Collapse sidebar after clicking
|
||||
if (sidebar.classList.contains('sidebar-visible') && window.innerWidth < 1200){
|
||||
|
||||
sidebar.classList.remove('sidebar-visible');
|
||||
sidebar.classList.add('sidebar-hidden');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
/* ===== Gumshoe SrollSpy ===== */
|
||||
/* Ref: https://github.com/cferdinandi/gumshoe */
|
||||
// Initialize Gumshoe
|
||||
var spy = new Gumshoe('#docs-nav a', {
|
||||
offset: 69, //sticky header height
|
||||
});
|
||||
|
||||
|
||||
/* ====== SimpleLightbox Plugin ======= */
|
||||
/* Ref: https://github.com/andreknieriem/simplelightbox */
|
||||
|
||||
var lightbox = new SimpleLightbox('.simplelightbox-gallery a', {/* options */});
|
||||
hljs.initHighlighting();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,431 @@
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var $window = $(window);
|
||||
var $body = $('body');
|
||||
|
||||
/* Preloader Effect */
|
||||
$window.on('load', function(){
|
||||
$(".preloader").fadeOut(600);
|
||||
});
|
||||
|
||||
/* Sticky Header */
|
||||
if($('.active-sticky-header').length){
|
||||
$window.on('resize', function(){
|
||||
setHeaderHeight();
|
||||
});
|
||||
|
||||
function setHeaderHeight(){
|
||||
$("header.active-sticky-header").css("height", $('header.active-sticky-header .header-sticky').outerHeight());
|
||||
}
|
||||
|
||||
$window.on("scroll", function() {
|
||||
var fromTop = $(window).scrollTop();
|
||||
setHeaderHeight();
|
||||
var headerHeight = $('header.active-sticky-header .header-sticky').outerHeight()
|
||||
$("header.active-sticky-header .header-sticky").toggleClass("hide", (fromTop > headerHeight + 100));
|
||||
$("header.active-sticky-header .header-sticky").toggleClass("active", (fromTop > 600));
|
||||
});
|
||||
}
|
||||
|
||||
/* Slick Menu JS */
|
||||
$('#menu').slicknav({
|
||||
label : '',
|
||||
prependTo : '.responsive-menu'
|
||||
});
|
||||
|
||||
if($("a[href='#top']").length){
|
||||
$(document).on("click", "a[href='#top']", function() {
|
||||
$("html, body").animate({ scrollTop: 0 }, "slow");
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
/* testimonial Slider JS */
|
||||
if ($('.testimonial-slider').length) {
|
||||
const testimonial_slider = new Swiper('.testimonial-slider .swiper', {
|
||||
slidesPerView : 1,
|
||||
speed: 1000,
|
||||
spaceBetween: 30,
|
||||
loop: true,
|
||||
autoplay: {
|
||||
delay: 5000,
|
||||
},
|
||||
pagination: {
|
||||
el: '.testimonial-pagination',
|
||||
clickable: true,
|
||||
},
|
||||
breakpoints: {
|
||||
768:{
|
||||
slidesPerView: 2,
|
||||
},
|
||||
991:{
|
||||
slidesPerView: 2,
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if ($('.testimonial-slider-silver').length) {
|
||||
const testimonial_slider_silver = new Swiper('.testimonial-slider-silver .swiper', {
|
||||
slidesPerView : 1,
|
||||
speed: 1000,
|
||||
spaceBetween: 30,
|
||||
loop: true,
|
||||
autoplay: {
|
||||
delay: 5000,
|
||||
},
|
||||
pagination: {
|
||||
el: '.testimonial-pagination',
|
||||
clickable: true,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.testimonial-button-next-silver',
|
||||
prevEl: '.testimonial-button-prev-silver',
|
||||
},
|
||||
breakpoints: {
|
||||
768:{
|
||||
slidesPerView: 1,
|
||||
},
|
||||
991:{
|
||||
slidesPerView: 1,
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* Skill Bar */
|
||||
if ($('.skills-progress-bar').length) {
|
||||
$('.skills-progress-bar').waypoint(function() {
|
||||
$('.skillbar').each(function() {
|
||||
$(this).find('.count-bar').animate({
|
||||
width:$(this).attr('data-percent')
|
||||
},2000);
|
||||
});
|
||||
},{
|
||||
offset: '70%'
|
||||
});
|
||||
}
|
||||
|
||||
/* Youtube Background Video JS */
|
||||
if ($('#herovideo').length) {
|
||||
var myPlayer = $("#herovideo").YTPlayer();
|
||||
}
|
||||
|
||||
/* Init Counter */
|
||||
if ($('.counter').length) {
|
||||
$('.counter').counterUp({ delay: 6, time: 3000 });
|
||||
}
|
||||
|
||||
/* Image Reveal Animation */
|
||||
if ($('.reveal').length) {
|
||||
gsap.registerPlugin(ScrollTrigger);
|
||||
let revealContainers = document.querySelectorAll(".reveal");
|
||||
revealContainers.forEach((container) => {
|
||||
let image = container.querySelector("img");
|
||||
let tl = gsap.timeline({
|
||||
scrollTrigger: {
|
||||
trigger: container,
|
||||
toggleActions: "play none none none"
|
||||
}
|
||||
});
|
||||
tl.set(container, {
|
||||
autoAlpha: 1
|
||||
});
|
||||
tl.from(container, 1, {
|
||||
xPercent: -100,
|
||||
ease: Power2.out
|
||||
});
|
||||
tl.from(image, 1, {
|
||||
xPercent: 100,
|
||||
scale: 1,
|
||||
delay: -1,
|
||||
ease: Power2.out
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/* Text Effect Animation */
|
||||
function initHeadingAnimation() {
|
||||
|
||||
if($('.text-effect').length) {
|
||||
var textheading = $(".text-effect");
|
||||
|
||||
if(textheading.length === 0) return; gsap.registerPlugin(SplitText); textheading.each(function(index, el) {
|
||||
|
||||
el.split = new SplitText(el, {
|
||||
type: "lines,words,chars",
|
||||
linesClass: "split-line"
|
||||
});
|
||||
|
||||
if( $(el).hasClass('text-effect') ){
|
||||
gsap.set(el.split.chars, {
|
||||
opacity: .3,
|
||||
x: "-7",
|
||||
});
|
||||
}
|
||||
el.anim = gsap.to(el.split.chars, {
|
||||
scrollTrigger: {
|
||||
trigger: el,
|
||||
start: "top 92%",
|
||||
end: "top 60%",
|
||||
markers: false,
|
||||
scrub: 1,
|
||||
},
|
||||
|
||||
x: "0",
|
||||
y: "0",
|
||||
opacity: 1,
|
||||
duration: .7,
|
||||
stagger: 0.2,
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
if ($('.text-anime-style-1').length) {
|
||||
let staggerAmount = 0.05,
|
||||
translateXValue = 0,
|
||||
delayValue = 0.5,
|
||||
animatedTextElements = document.querySelectorAll('.text-anime-style-1');
|
||||
|
||||
animatedTextElements.forEach((element) => {
|
||||
let animationSplitText = new SplitText(element, { type: "chars, words" });
|
||||
gsap.from(animationSplitText.words, {
|
||||
duration: 1,
|
||||
delay: delayValue,
|
||||
x: 20,
|
||||
autoAlpha: 0,
|
||||
stagger: staggerAmount,
|
||||
scrollTrigger: { trigger: element, start: "top 85%" },
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if ($('.text-anime-style-2').length) {
|
||||
let staggerAmount = 0.03,
|
||||
translateXValue = 20,
|
||||
delayValue = 0.1,
|
||||
easeType = "power2.out",
|
||||
animatedTextElements = document.querySelectorAll('.text-anime-style-2');
|
||||
|
||||
animatedTextElements.forEach((element) => {
|
||||
let animationSplitText = new SplitText(element, { type: "chars, words" });
|
||||
gsap.from(animationSplitText.chars, {
|
||||
duration: 1,
|
||||
delay: delayValue,
|
||||
x: translateXValue,
|
||||
autoAlpha: 0,
|
||||
stagger: staggerAmount,
|
||||
ease: easeType,
|
||||
scrollTrigger: { trigger: element, start: "top 85%"},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if ($('.text-anime-style-3').length) {
|
||||
let animatedTextElements = document.querySelectorAll('.text-anime-style-3');
|
||||
|
||||
animatedTextElements.forEach((element) => {
|
||||
//Reset if needed
|
||||
if (element.animation) {
|
||||
element.animation.progress(1).kill();
|
||||
element.split.revert();
|
||||
}
|
||||
|
||||
element.split = new SplitText(element, {
|
||||
type: "lines,words,chars",
|
||||
linesClass: "split-line",
|
||||
});
|
||||
gsap.set(element, { perspective: 400 });
|
||||
|
||||
gsap.set(element.split.chars, {
|
||||
opacity: 0,
|
||||
x: "50",
|
||||
});
|
||||
|
||||
element.animation = gsap.to(element.split.chars, {
|
||||
scrollTrigger: { trigger: element, start: "top 90%" },
|
||||
x: "0",
|
||||
y: "0",
|
||||
rotateX: "0",
|
||||
opacity: 1,
|
||||
duration: 1,
|
||||
ease: Back.easeOut,
|
||||
stagger: 0.02,
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (document.fonts && document.fonts.ready) {
|
||||
document.fonts.ready.then(() => {
|
||||
initHeadingAnimation();
|
||||
});
|
||||
} else {
|
||||
window.addEventListener("load", initHeadingAnimation);
|
||||
}
|
||||
|
||||
/* Parallaxie js */
|
||||
var $parallaxie = $('.parallaxie');
|
||||
if($parallaxie.length && ($window.width() > 1024))
|
||||
{
|
||||
if ($window.width() > 768) {
|
||||
$parallaxie.parallaxie({
|
||||
speed: 0.55,
|
||||
offset: 0,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* Zoom Gallery screenshot */
|
||||
$('.gallery-items').magnificPopup({
|
||||
delegate: 'a',
|
||||
type: 'image',
|
||||
closeOnContentClick: false,
|
||||
closeBtnInside: false,
|
||||
mainClass: 'mfp-with-zoom',
|
||||
image: {
|
||||
verticalFit: true,
|
||||
},
|
||||
gallery: {
|
||||
enabled: true
|
||||
},
|
||||
zoom: {
|
||||
enabled: true,
|
||||
duration: 300, // don't foget to change the duration also in CSS
|
||||
opener: function(element) {
|
||||
return element.find('img');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/* Contact form validation */
|
||||
var $contactform = $("#contactForm");
|
||||
$contactform.validator({focus: false}).on("submit", function (event) {
|
||||
if (!event.isDefaultPrevented()) {
|
||||
event.preventDefault();
|
||||
submitForm();
|
||||
}
|
||||
});
|
||||
|
||||
function submitForm(){
|
||||
/* Ajax call to submit form */
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "form-process.php",
|
||||
data: $contactform.serialize(),
|
||||
success : function(text){
|
||||
if (text === "success"){
|
||||
formSuccess();
|
||||
} else {
|
||||
submitMSG(false,text);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function formSuccess(){
|
||||
$contactform[0].reset();
|
||||
submitMSG(true, "Message Sent Successfully!")
|
||||
}
|
||||
|
||||
function submitMSG(valid, msg){
|
||||
if(valid){
|
||||
var msgClasses = "h4 text-success";
|
||||
} else {
|
||||
var msgClasses = "h4 text-danger";
|
||||
}
|
||||
$("#msgSubmit").removeClass().addClass(msgClasses).text(msg);
|
||||
}
|
||||
/* Contact form validation end */
|
||||
|
||||
/* Animated Wow Js */
|
||||
new WOW().init();
|
||||
|
||||
/* Popup Video */
|
||||
if ($('.popup-video').length) {
|
||||
$('.popup-video').magnificPopup({
|
||||
type: 'iframe',
|
||||
mainClass: 'mfp-fade',
|
||||
removalDelay: 160,
|
||||
preloader: false,
|
||||
fixedContentPos: true
|
||||
});
|
||||
}
|
||||
|
||||
/* Projects Item (filtering) Start */
|
||||
$window.on( "load", function(){
|
||||
if( $(".project-item-list").length ) {
|
||||
|
||||
/* Init Isotope */
|
||||
var $menuitem = $(".project-item-list").isotope({
|
||||
itemSelector: ".project-item-box",
|
||||
layoutMode: "masonry",
|
||||
masonry: {
|
||||
// use outer width of grid-sizer for columnWidth
|
||||
columnWidth: 1,
|
||||
}
|
||||
});
|
||||
|
||||
/* Filter items on click */
|
||||
var $menudisesnav = $(".project-nav li a");
|
||||
$menudisesnav.on('click', function (e) {
|
||||
|
||||
var filterValue = $(this).attr('data-filter');
|
||||
$menuitem.isotope({
|
||||
filter: filterValue
|
||||
});
|
||||
|
||||
$menudisesnav.removeClass("active-btn");
|
||||
$(this).addClass("active-btn");
|
||||
e.preventDefault();
|
||||
});
|
||||
$menuitem.isotope({ filter: ".first" });
|
||||
}
|
||||
});
|
||||
/* Projects Item (filtering) End */
|
||||
|
||||
/* Service Item List Start */
|
||||
var $services_item_list = $('.services-item-list');
|
||||
if ($services_item_list.length) {
|
||||
var $service_item = $services_item_list.find('.service-item');
|
||||
|
||||
if ($service_item.length) {
|
||||
$service_item.on({
|
||||
mouseenter: function () {
|
||||
if (!$(this).hasClass('active')) {
|
||||
$service_item.removeClass('active');
|
||||
$(this).addClass('active');
|
||||
}
|
||||
},
|
||||
mouseleave: function () {
|
||||
// Optional: Add logic for mouse leave if needed
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/* Service Item List End */
|
||||
|
||||
/* Service Item List gold Start */
|
||||
var $services_item_list_gold = $('.services-item-list-gold');
|
||||
if ($services_item_list_gold.length) {
|
||||
var $service_item_gold = $services_item_list_gold.find('.service-item-gold');
|
||||
|
||||
if ($service_item_gold.length) {
|
||||
$service_item_gold.on({
|
||||
mouseenter: function () {
|
||||
if (!$(this).hasClass('active')) {
|
||||
$service_item_gold.removeClass('active');
|
||||
$(this).addClass('active');
|
||||
}
|
||||
},
|
||||
mouseleave: function () {
|
||||
// Optional: Add logic for mouse leave if needed
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/* Service Item List gold End */
|
||||
|
||||
})(jQuery);
|
||||
Vendored
+11
File diff suppressed because one or more lines are too long
Vendored
+2
File diff suppressed because one or more lines are too long
Vendored
+12
File diff suppressed because one or more lines are too long
Vendored
+2
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* jquery.counterup.js 1.0
|
||||
*
|
||||
* Copyright 2013, Benjamin Intal http://gambit.ph @bfintal
|
||||
* Released under the GPL v2 License
|
||||
*
|
||||
* Date: Nov 26, 2013
|
||||
*/!function(t){"use strict";t.fn.counterUp=function(e){var n=t.extend({time:400,delay:10},e);return this.each(function(){var e=t(this),u=n;e.waypoint({handler:function(){!function(){var t=[],n=u.time/u.delay,a=e.text(),r=/[0-9]+,[0-9]+/.test(a);a=a.replace(/,/g,"");/^[0-9]+$/.test(a);for(var o=/^[0-9]+\.[0-9]+$/.test(a),c=o?(a.split(".")[1]||[]).length:0,s=n;s>=1;s--){var i=parseInt(a/n*s);if(o&&(i=parseFloat(a/n*s).toFixed(c)),r)for(;/(\d+)(\d{3})/.test(i.toString());)i=i.toString().replace(/(\d+)(\d{3})/,"$1,$2");t.unshift(i)}e.data("counterup-nums",t),e.text("0");e.data("counterup-func",function(){e.text(e.data("counterup-nums").shift()),e.data("counterup-nums").length?setTimeout(e.data("counterup-func"),u.delay):(e.data("counterup-nums"),e.data("counterup-nums",null),e.data("counterup-func",null))}),setTimeout(e.data("counterup-func"),u.delay)}(),this.destroy()},offset:"100%"})})}}(jQuery);
|
||||
File diff suppressed because one or more lines are too long
+9
File diff suppressed because one or more lines are too long
@@ -0,0 +1,590 @@
|
||||
/*!
|
||||
* SlickNav Responsive Mobile Menu v1.0.10
|
||||
* (c) 2016 Josh Cope
|
||||
* licensed under MIT
|
||||
*/
|
||||
;(function ($, document, window) {
|
||||
var
|
||||
// default settings object.
|
||||
defaults = {
|
||||
label: 'MENU',
|
||||
duplicate: true,
|
||||
duration: 200,
|
||||
easingOpen: 'swing',
|
||||
easingClose: 'swing',
|
||||
closedSymbol: '►',
|
||||
openedSymbol: '▼',
|
||||
prependTo: 'body',
|
||||
appendTo: '',
|
||||
parentTag: 'a',
|
||||
closeOnClick: false,
|
||||
allowParentLinks: false,
|
||||
nestedParentLinks: true,
|
||||
showChildren: false,
|
||||
removeIds: true,
|
||||
removeClasses: false,
|
||||
removeStyles: false,
|
||||
brand: '',
|
||||
animations: 'jquery',
|
||||
init: function () {},
|
||||
beforeOpen: function () {},
|
||||
beforeClose: function () {},
|
||||
afterOpen: function () {},
|
||||
afterClose: function () {}
|
||||
},
|
||||
mobileMenu = 'slicknav',
|
||||
prefix = 'slicknav';
|
||||
|
||||
Keyboard = {
|
||||
DOWN: 40,
|
||||
ENTER: 13,
|
||||
ESCAPE: 27,
|
||||
LEFT: 37,
|
||||
RIGHT: 39,
|
||||
SPACE: 32,
|
||||
TAB: 9,
|
||||
UP: 38,
|
||||
};
|
||||
|
||||
function Plugin(element, options) {
|
||||
this.element = element;
|
||||
|
||||
// jQuery has an extend method which merges the contents of two or
|
||||
// more objects, storing the result in the first object. The first object
|
||||
// is generally empty as we don't want to alter the default options for
|
||||
// future instances of the plugin
|
||||
this.settings = $.extend({}, defaults, options);
|
||||
|
||||
// Don't remove IDs by default if duplicate is false
|
||||
if (!this.settings.duplicate && !options.hasOwnProperty("removeIds")) {
|
||||
this.settings.removeIds = false;
|
||||
}
|
||||
|
||||
this._defaults = defaults;
|
||||
this._name = mobileMenu;
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
Plugin.prototype.init = function () {
|
||||
var $this = this,
|
||||
menu = $(this.element),
|
||||
settings = this.settings,
|
||||
iconClass,
|
||||
menuBar;
|
||||
|
||||
// clone menu if needed
|
||||
if (settings.duplicate) {
|
||||
$this.mobileNav = menu.clone();
|
||||
} else {
|
||||
$this.mobileNav = menu;
|
||||
}
|
||||
|
||||
// remove IDs if set
|
||||
if (settings.removeIds) {
|
||||
$this.mobileNav.removeAttr('id');
|
||||
$this.mobileNav.find('*').each(function (i, e) {
|
||||
$(e).removeAttr('id');
|
||||
});
|
||||
}
|
||||
|
||||
// remove classes if set
|
||||
if (settings.removeClasses) {
|
||||
$this.mobileNav.removeAttr('class');
|
||||
$this.mobileNav.find('*').each(function (i, e) {
|
||||
$(e).removeAttr('class');
|
||||
});
|
||||
}
|
||||
|
||||
// remove styles if set
|
||||
if (settings.removeStyles) {
|
||||
$this.mobileNav.removeAttr('style');
|
||||
$this.mobileNav.find('*').each(function (i, e) {
|
||||
$(e).removeAttr('style');
|
||||
});
|
||||
}
|
||||
|
||||
// styling class for the button
|
||||
iconClass = prefix + '_icon';
|
||||
|
||||
if (settings.label === '') {
|
||||
iconClass += ' ' + prefix + '_no-text';
|
||||
}
|
||||
|
||||
if (settings.parentTag === 'a') {
|
||||
settings.parentTag = 'a href="#"';
|
||||
}
|
||||
|
||||
// create menu bar
|
||||
$this.mobileNav.attr('class', prefix + '_nav');
|
||||
menuBar = $('<div class="' + prefix + '_menu"></div>');
|
||||
if (settings.brand !== '') {
|
||||
var brand = $('<div class="' + prefix + '_brand">'+settings.brand+'</div>');
|
||||
$(menuBar).append(brand);
|
||||
}
|
||||
$this.btn = $(
|
||||
['<' + settings.parentTag + ' aria-haspopup="true" role="button" tabindex="0" class="' + prefix + '_btn ' + prefix + '_collapsed">',
|
||||
'<span class="' + prefix + '_menutxt">' + settings.label + '</span>',
|
||||
'<span class="' + iconClass + '">',
|
||||
'<span class="' + prefix + '_icon-bar"></span>',
|
||||
'<span class="' + prefix + '_icon-bar"></span>',
|
||||
'<span class="' + prefix + '_icon-bar"></span>',
|
||||
'</span>',
|
||||
'</' + settings.parentTag + '>'
|
||||
].join('')
|
||||
);
|
||||
$('.navbar-toggle').append($this.btn);
|
||||
if(settings.appendTo !== '') {
|
||||
$(settings.appendTo).append(menuBar);
|
||||
} else {
|
||||
$(settings.prependTo).prepend(menuBar);
|
||||
}
|
||||
menuBar.append($this.mobileNav);
|
||||
|
||||
// iterate over structure adding additional structure
|
||||
var items = $this.mobileNav.find('li');
|
||||
$(items).each(function () {
|
||||
var item = $(this),
|
||||
data = {};
|
||||
data.children = item.children('ul').attr('role', 'menu');
|
||||
item.data('menu', data);
|
||||
|
||||
// if a list item has a nested menu
|
||||
if (data.children.length > 0) {
|
||||
|
||||
// select all text before the child menu
|
||||
// check for anchors
|
||||
|
||||
var a = item.contents(),
|
||||
containsAnchor = false,
|
||||
nodes = [];
|
||||
|
||||
$(a).each(function () {
|
||||
if (!$(this).is('ul')) {
|
||||
nodes.push(this);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
if($(this).is("a")) {
|
||||
containsAnchor = true;
|
||||
}
|
||||
});
|
||||
|
||||
var wrapElement = $(
|
||||
'<' + settings.parentTag + ' role="menuitem" aria-haspopup="true" tabindex="-1" class="' + prefix + '_item"/>'
|
||||
);
|
||||
|
||||
// wrap item text with tag and add classes unless we are separating parent links
|
||||
if ((!settings.allowParentLinks || settings.nestedParentLinks) || !containsAnchor) {
|
||||
var $wrap = $(nodes).wrapAll(wrapElement).parent();
|
||||
$wrap.addClass(prefix+'_row');
|
||||
} else
|
||||
$(nodes).wrapAll('<span class="'+prefix+'_parent-link '+prefix+'_row"/>').parent();
|
||||
|
||||
if (!settings.showChildren) {
|
||||
item.addClass(prefix+'_collapsed');
|
||||
} else {
|
||||
item.addClass(prefix+'_open');
|
||||
}
|
||||
|
||||
item.addClass(prefix+'_parent');
|
||||
|
||||
// create parent arrow. wrap with link if parent links and separating
|
||||
var arrowElement = $('<span class="'+prefix+'_arrow">'+(settings.showChildren?settings.openedSymbol:settings.closedSymbol)+'</span>');
|
||||
|
||||
if (settings.allowParentLinks && !settings.nestedParentLinks && containsAnchor)
|
||||
arrowElement = arrowElement.wrap(wrapElement).parent();
|
||||
|
||||
//append arrow
|
||||
$(nodes).last().after(arrowElement);
|
||||
|
||||
|
||||
} else if ( item.children().length === 0) {
|
||||
item.addClass(prefix+'_txtnode');
|
||||
}
|
||||
|
||||
// accessibility for links
|
||||
item.children('a').attr('role', 'menuitem').on("click", function(event){
|
||||
//Ensure that it's not a parent
|
||||
if (settings.closeOnClick && !$(event.target).parent().closest('li').hasClass(prefix+'_parent')) {
|
||||
//Emulate menu close if set
|
||||
$($this.btn).trigger('click');
|
||||
}
|
||||
});
|
||||
|
||||
//also close on click if parent links are set
|
||||
if (settings.closeOnClick && settings.allowParentLinks) {
|
||||
|
||||
item.children('a').children('a').on("click", function(event){
|
||||
//Emulate menu close
|
||||
$($this.btn).trigger('click');
|
||||
});
|
||||
|
||||
item.find('.'+prefix+'_parent-link a:not(.'+prefix+'_item)').on("click", function(event){
|
||||
//Emulate menu close
|
||||
$($this.btn).trigger('click');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// structure is in place, now hide appropriate items
|
||||
$(items).each(function () {
|
||||
var data = $(this).data('menu');
|
||||
if (!settings.showChildren){
|
||||
$this._visibilityToggle(data.children, null, false, null, true);
|
||||
}
|
||||
});
|
||||
|
||||
// finally toggle entire menu
|
||||
$this._visibilityToggle($this.mobileNav, null, false, 'init', true);
|
||||
|
||||
// accessibility for menu button
|
||||
$this.mobileNav.attr('role','menu');
|
||||
|
||||
// outline prevention when using mouse
|
||||
$(document).on( "mousedown", function() {
|
||||
$this._outlines(false);
|
||||
});
|
||||
|
||||
$(document).on( "keyup", function() {
|
||||
$this._outlines(true);
|
||||
});
|
||||
|
||||
// menu button click
|
||||
$($this.btn).on("click", function(e){
|
||||
e.preventDefault();
|
||||
$this._menuToggle();
|
||||
});
|
||||
|
||||
// click on menu parent
|
||||
$this.mobileNav.on('click', '.' + prefix + '_item', function (e) {
|
||||
e.preventDefault();
|
||||
$this._itemClick($(this));
|
||||
});
|
||||
|
||||
// check for keyboard events on menu button and menu parents
|
||||
$($this.btn).on("keydown", function(e){
|
||||
var ev = e || event;
|
||||
|
||||
switch(ev.keyCode) {
|
||||
case Keyboard.ENTER:
|
||||
case Keyboard.SPACE:
|
||||
case Keyboard.DOWN:
|
||||
e.preventDefault();
|
||||
if (ev.keyCode !== Keyboard.DOWN || !$($this.btn).hasClass(prefix+'_open')){
|
||||
$this._menuToggle();
|
||||
}
|
||||
|
||||
$($this.btn).next().find('[role="menuitem"]').first().trigger( "focus" );
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
$this.mobileNav.on('keydown', '.'+prefix+'_item', function(e) {
|
||||
var ev = e || event;
|
||||
|
||||
switch(ev.keyCode) {
|
||||
case Keyboard.ENTER:
|
||||
e.preventDefault();
|
||||
$this._itemClick($(e.target));
|
||||
break;
|
||||
case Keyboard.RIGHT:
|
||||
e.preventDefault();
|
||||
if ($(e.target).parent().hasClass(prefix+'_collapsed')) {
|
||||
$this._itemClick($(e.target));
|
||||
}
|
||||
$(e.target).next().find('[role="menuitem"]').first().trigger( "focus" );
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
$this.mobileNav.on('keydown', '[role="menuitem"]', function(e) {
|
||||
var ev = e || event;
|
||||
|
||||
switch(ev.keyCode){
|
||||
case Keyboard.DOWN:
|
||||
e.preventDefault();
|
||||
var allItems = $(e.target).parent().parent().children().children('[role="menuitem"]:visible');
|
||||
var idx = allItems.index( e.target );
|
||||
var nextIdx = idx + 1;
|
||||
if (allItems.length <= nextIdx) {
|
||||
nextIdx = 0;
|
||||
}
|
||||
var next = allItems.eq( nextIdx );
|
||||
next.trigger( "focus" );
|
||||
break;
|
||||
case Keyboard.UP:
|
||||
e.preventDefault();
|
||||
var allItems = $(e.target).parent().parent().children().children('[role="menuitem"]:visible');
|
||||
var idx = allItems.index( e.target );
|
||||
var next = allItems.eq( idx - 1 );
|
||||
next.trigger( "focus" );
|
||||
break;
|
||||
case Keyboard.LEFT:
|
||||
e.preventDefault();
|
||||
if ($(e.target).parent().parent().parent().hasClass(prefix+'_open')) {
|
||||
var parent = $(e.target).parent().parent().prev();
|
||||
parent.trigger( "focus" );
|
||||
$this._itemClick(parent);
|
||||
} else if ($(e.target).parent().parent().hasClass(prefix+'_nav')){
|
||||
$this._menuToggle();
|
||||
$($this.btn).trigger( "focus" );
|
||||
}
|
||||
break;
|
||||
case Keyboard.ESCAPE:
|
||||
e.preventDefault();
|
||||
$this._menuToggle();
|
||||
$($this.btn).trigger( "focus" );
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
// allow links clickable within parent tags if set
|
||||
if (settings.allowParentLinks && settings.nestedParentLinks) {
|
||||
$('.'+prefix+'_item a').on("click", function(e){
|
||||
e.stopImmediatePropagation();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//toggle menu
|
||||
Plugin.prototype._menuToggle = function (el) {
|
||||
var $this = this;
|
||||
var btn = $this.btn;
|
||||
var mobileNav = $this.mobileNav;
|
||||
|
||||
if (btn.hasClass(prefix+'_collapsed')) {
|
||||
btn.removeClass(prefix+'_collapsed');
|
||||
btn.addClass(prefix+'_open');
|
||||
} else {
|
||||
btn.removeClass(prefix+'_open');
|
||||
btn.addClass(prefix+'_collapsed');
|
||||
}
|
||||
btn.addClass(prefix+'_animating');
|
||||
$this._visibilityToggle(mobileNav, btn.parent(), true, btn);
|
||||
};
|
||||
|
||||
// toggle clicked items
|
||||
Plugin.prototype._itemClick = function (el) {
|
||||
var $this = this;
|
||||
var settings = $this.settings;
|
||||
var data = el.data('menu');
|
||||
if (!data) {
|
||||
data = {};
|
||||
data.arrow = el.children('.'+prefix+'_arrow');
|
||||
data.ul = el.next('ul');
|
||||
data.parent = el.parent();
|
||||
//Separated parent link structure
|
||||
if (data.parent.hasClass(prefix+'_parent-link')) {
|
||||
data.parent = el.parent().parent();
|
||||
data.ul = el.parent().next('ul');
|
||||
}
|
||||
el.data('menu', data);
|
||||
}
|
||||
if (data.parent.hasClass(prefix+'_collapsed')) {
|
||||
data.arrow.html(settings.openedSymbol);
|
||||
data.parent.removeClass(prefix+'_collapsed');
|
||||
data.parent.addClass(prefix+'_open');
|
||||
data.parent.addClass(prefix+'_animating');
|
||||
$this._visibilityToggle(data.ul, data.parent, true, el);
|
||||
} else {
|
||||
data.arrow.html(settings.closedSymbol);
|
||||
data.parent.addClass(prefix+'_collapsed');
|
||||
data.parent.removeClass(prefix+'_open');
|
||||
data.parent.addClass(prefix+'_animating');
|
||||
$this._visibilityToggle(data.ul, data.parent, true, el);
|
||||
}
|
||||
};
|
||||
|
||||
// toggle actual visibility and accessibility tags
|
||||
Plugin.prototype._visibilityToggle = function(el, parent, animate, trigger, init) {
|
||||
var $this = this;
|
||||
var settings = $this.settings;
|
||||
var items = $this._getActionItems(el);
|
||||
var duration = 0;
|
||||
if (animate) {
|
||||
duration = settings.duration;
|
||||
}
|
||||
|
||||
function afterOpen(trigger, parent) {
|
||||
$(trigger).removeClass(prefix+'_animating');
|
||||
$(parent).removeClass(prefix+'_animating');
|
||||
|
||||
//Fire afterOpen callback
|
||||
if (!init) {
|
||||
settings.afterOpen(trigger);
|
||||
}
|
||||
}
|
||||
|
||||
function afterClose(trigger, parent) {
|
||||
el.attr('aria-hidden','true');
|
||||
items.attr('tabindex', '-1');
|
||||
$this._setVisAttr(el, true);
|
||||
el.hide(); //jQuery 1.7 bug fix
|
||||
|
||||
$(trigger).removeClass(prefix+'_animating');
|
||||
$(parent).removeClass(prefix+'_animating');
|
||||
|
||||
//Fire init or afterClose callback
|
||||
if (!init){
|
||||
settings.afterClose(trigger);
|
||||
} else if (trigger === 'init'){
|
||||
settings.init();
|
||||
}
|
||||
}
|
||||
|
||||
if (el.hasClass(prefix+'_hidden')) {
|
||||
el.removeClass(prefix+'_hidden');
|
||||
//Fire beforeOpen callback
|
||||
if (!init) {
|
||||
settings.beforeOpen(trigger);
|
||||
}
|
||||
if (settings.animations === 'jquery') {
|
||||
el.stop(true,true).slideDown(duration, settings.easingOpen, function(){
|
||||
afterOpen(trigger, parent);
|
||||
});
|
||||
} else if(settings.animations === 'velocity') {
|
||||
el.velocity("finish").velocity("slideDown", {
|
||||
duration: duration,
|
||||
easing: settings.easingOpen,
|
||||
complete: function() {
|
||||
afterOpen(trigger, parent);
|
||||
}
|
||||
});
|
||||
}
|
||||
el.attr('aria-hidden','false');
|
||||
items.attr('tabindex', '0');
|
||||
$this._setVisAttr(el, false);
|
||||
} else {
|
||||
el.addClass(prefix+'_hidden');
|
||||
|
||||
//Fire init or beforeClose callback
|
||||
if (!init){
|
||||
settings.beforeClose(trigger);
|
||||
}
|
||||
|
||||
if (settings.animations === 'jquery') {
|
||||
el.stop(true,true).slideUp(duration, this.settings.easingClose, function() {
|
||||
afterClose(trigger, parent)
|
||||
});
|
||||
} else if (settings.animations === 'velocity') {
|
||||
|
||||
el.velocity("finish").velocity("slideUp", {
|
||||
duration: duration,
|
||||
easing: settings.easingClose,
|
||||
complete: function() {
|
||||
afterClose(trigger, parent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// set attributes of element and children based on visibility
|
||||
Plugin.prototype._setVisAttr = function(el, hidden) {
|
||||
var $this = this;
|
||||
|
||||
// select all parents that aren't hidden
|
||||
var nonHidden = el.children('li').children('ul').not('.'+prefix+'_hidden');
|
||||
|
||||
// iterate over all items setting appropriate tags
|
||||
if (!hidden) {
|
||||
nonHidden.each(function(){
|
||||
var ul = $(this);
|
||||
ul.attr('aria-hidden','false');
|
||||
var items = $this._getActionItems(ul);
|
||||
items.attr('tabindex', '0');
|
||||
$this._setVisAttr(ul, hidden);
|
||||
});
|
||||
} else {
|
||||
nonHidden.each(function(){
|
||||
var ul = $(this);
|
||||
ul.attr('aria-hidden','true');
|
||||
var items = $this._getActionItems(ul);
|
||||
items.attr('tabindex', '-1');
|
||||
$this._setVisAttr(ul, hidden);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// get all 1st level items that are clickable
|
||||
Plugin.prototype._getActionItems = function(el) {
|
||||
var data = el.data("menu");
|
||||
if (!data) {
|
||||
data = {};
|
||||
var items = el.children('li');
|
||||
var anchors = items.find('a');
|
||||
data.links = anchors.add(items.find('.'+prefix+'_item'));
|
||||
el.data('menu', data);
|
||||
}
|
||||
return data.links;
|
||||
};
|
||||
|
||||
Plugin.prototype._outlines = function(state) {
|
||||
if (!state) {
|
||||
$('.'+prefix+'_item, .'+prefix+'_btn').css('outline','none');
|
||||
} else {
|
||||
$('.'+prefix+'_item, .'+prefix+'_btn').css('outline','');
|
||||
}
|
||||
};
|
||||
|
||||
Plugin.prototype.toggle = function(){
|
||||
var $this = this;
|
||||
$this._menuToggle();
|
||||
};
|
||||
|
||||
Plugin.prototype.open = function(){
|
||||
var $this = this;
|
||||
if ($this.btn.hasClass(prefix+'_collapsed')) {
|
||||
$this._menuToggle();
|
||||
}
|
||||
};
|
||||
|
||||
Plugin.prototype.close = function(){
|
||||
var $this = this;
|
||||
if ($this.btn.hasClass(prefix+'_open')) {
|
||||
$this._menuToggle();
|
||||
}
|
||||
};
|
||||
|
||||
$.fn[mobileMenu] = function ( options ) {
|
||||
var args = arguments;
|
||||
|
||||
// Is the first parameter an object (options), or was omitted, instantiate a new instance
|
||||
if (options === undefined || typeof options === 'object') {
|
||||
return this.each(function () {
|
||||
|
||||
// Only allow the plugin to be instantiated once due to methods
|
||||
if (!$.data(this, 'plugin_' + mobileMenu)) {
|
||||
|
||||
// if it has no instance, create a new one, pass options to our plugin constructor,
|
||||
// and store the plugin instance in the elements jQuery data object.
|
||||
$.data(this, 'plugin_' + mobileMenu, new Plugin( this, options ));
|
||||
}
|
||||
});
|
||||
|
||||
// If is a string and doesn't start with an underscore or 'init' function, treat this as a call to a public method.
|
||||
} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
|
||||
|
||||
// Cache the method call to make it possible to return a value
|
||||
var returns;
|
||||
|
||||
this.each(function () {
|
||||
var instance = $.data(this, 'plugin_' + mobileMenu);
|
||||
|
||||
// Tests that there's already a plugin-instance and checks that the requested public method exists
|
||||
if (instance instanceof Plugin && typeof instance[options] === 'function') {
|
||||
|
||||
// Call the method of our plugin instance, and pass it the supplied arguments.
|
||||
returns = instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
|
||||
}
|
||||
});
|
||||
|
||||
// If the earlier cached method gives a value back return the value, otherwise return this to preserve chainability.
|
||||
return returns !== undefined ? returns : this;
|
||||
}
|
||||
};
|
||||
}(jQuery, document, window));
|
||||
+7
File diff suppressed because one or more lines are too long
@@ -0,0 +1,127 @@
|
||||
class Cursor {
|
||||
constructor(options) {
|
||||
this.options = $.extend(true, {
|
||||
container: "body",
|
||||
speed: 0.7,
|
||||
ease: "expo.out",
|
||||
visibleTimeout: 300
|
||||
}, options);
|
||||
this.body = $(this.options.container);
|
||||
this.el = $('<div class="cb-cursor"></div>');
|
||||
this.text = $('<div class="cb-cursor-text"></div>');
|
||||
this.init();
|
||||
}
|
||||
|
||||
init() {
|
||||
this.el.append(this.text);
|
||||
this.body.append(this.el);
|
||||
this.bind();
|
||||
this.move(-window.innerWidth, -window.innerHeight, 0);
|
||||
}
|
||||
|
||||
bind() {
|
||||
const self = this;
|
||||
|
||||
this.body.on('mouseleave', () => {
|
||||
self.hide();
|
||||
}).on('mouseenter', () => {
|
||||
self.show();
|
||||
}).on('mousemove', (e) => {
|
||||
this.pos = {
|
||||
x: this.stick ? this.stick.x - ((this.stick.x - e.clientX) * 0.15) : e.clientX,
|
||||
y: this.stick ? this.stick.y - ((this.stick.y - e.clientY) * 0.15) : e.clientY
|
||||
};
|
||||
this.update();
|
||||
}).on('mousedown', () => {
|
||||
self.setState('-active');
|
||||
}).on('mouseup', () => {
|
||||
self.removeState('-active');
|
||||
}).on('mouseenter', 'a,input,textarea,button', () => {
|
||||
self.setState('-pointer');
|
||||
}).on('mouseleave', 'a,input,textarea,button', () => {
|
||||
self.removeState('-pointer');
|
||||
}).on('mouseenter', 'iframe', () => {
|
||||
self.hide();
|
||||
}).on('mouseleave', 'iframe', () => {
|
||||
self.show();
|
||||
}).on('mouseenter', '[data-cursor]', function () {
|
||||
self.setState(this.dataset.cursor);
|
||||
}).on('mouseleave', '[data-cursor]', function () {
|
||||
self.removeState(this.dataset.cursor);
|
||||
}).on('mouseenter', '[data-cursor-text]', function () {
|
||||
self.setText(this.dataset.cursorText);
|
||||
}).on('mouseleave', '[data-cursor-text]', function () {
|
||||
self.removeText();
|
||||
}).on('mouseenter', '[data-cursor-stick]', function () {
|
||||
self.setStick(this.dataset.cursorStick);
|
||||
}).on('mouseleave', '[data-cursor-stick]', function () {
|
||||
self.removeStick();
|
||||
});
|
||||
}
|
||||
|
||||
setState(state) {
|
||||
this.el.addClass(state);
|
||||
}
|
||||
|
||||
removeState(state) {
|
||||
this.el.removeClass(state);
|
||||
}
|
||||
|
||||
toggleState(state) {
|
||||
this.el.toggleClass(state);
|
||||
}
|
||||
|
||||
setText(text) {
|
||||
this.text.html(text);
|
||||
this.el.addClass('-text');
|
||||
}
|
||||
|
||||
removeText() {
|
||||
this.el.removeClass('-text');
|
||||
}
|
||||
|
||||
setStick(el) {
|
||||
const target = $(el);
|
||||
const bound = target.get(0).getBoundingClientRect();
|
||||
this.stick = {
|
||||
y: bound.top + (target.height() / 2),
|
||||
x: bound.left + (target.width() / 2)
|
||||
};
|
||||
this.move(this.stick.x, this.stick.y, 5);
|
||||
}
|
||||
|
||||
removeStick() {
|
||||
this.stick = false;
|
||||
}
|
||||
|
||||
update() {
|
||||
this.move();
|
||||
this.show();
|
||||
}
|
||||
|
||||
move(x, y, duration) {
|
||||
gsap.to(this.el, {
|
||||
x: x || this.pos.x,
|
||||
y: y || this.pos.y,
|
||||
force3D: true,
|
||||
overwrite: true,
|
||||
ease: this.options.ease,
|
||||
duration: this.visible ? (duration || this.options.speed) : 0
|
||||
});
|
||||
}
|
||||
|
||||
show() {
|
||||
if (this.visible) return;
|
||||
clearInterval(this.visibleInt);
|
||||
this.el.addClass('-visible');
|
||||
this.visibleInt = setTimeout(() => this.visible = true);
|
||||
}
|
||||
|
||||
hide() {
|
||||
clearInterval(this.visibleInt);
|
||||
this.el.removeClass('-visible');
|
||||
this.visibleInt = setTimeout(() => this.visible = false, this.options.visibleTimeout);
|
||||
}
|
||||
}
|
||||
// Init cursor
|
||||
const cursor = new Cursor();
|
||||
@@ -0,0 +1,55 @@
|
||||
/*! Copyright (c) 2016 THE ULTRASOFT (http://theultrasoft.com)
|
||||
* Licensed under the MIT License (LICENSE.txt).
|
||||
*
|
||||
* Project: Parallaxie
|
||||
* Version: 0.5
|
||||
*
|
||||
* Requires: jQuery 1.9+
|
||||
*/
|
||||
|
||||
(function( $ ){
|
||||
"use strict";
|
||||
$.fn.parallaxie = function( options ){
|
||||
|
||||
var options = $.extend({
|
||||
speed: 0.2,
|
||||
repeat: 'no-repeat',
|
||||
size: 'cover',
|
||||
pos_x: 'center',
|
||||
offset: 0,
|
||||
}, options );
|
||||
|
||||
this.each(function(){
|
||||
|
||||
var $el = $(this);
|
||||
var local_options = $el.data('parallaxie');
|
||||
if( typeof local_options !== 'object' ) local_options = {};
|
||||
local_options = $.extend( {}, options, local_options );
|
||||
|
||||
var image_url = $el.data('image');
|
||||
if( typeof image_url === 'undefined' ){
|
||||
image_url = $el.css('background-image');
|
||||
if( !image_url ) return;
|
||||
|
||||
// APPLY DEFAULT CSS
|
||||
var pos_y = local_options.offset + ($el.offset().top - $(window).scrollTop()) * (1 - local_options.speed );
|
||||
$el.css({
|
||||
'background-image': image_url,
|
||||
'background-size': local_options.size,
|
||||
'background-repeat': local_options.repeat,
|
||||
'background-attachment': 'fixed',
|
||||
'background-position': local_options.pos_x + ' ' + pos_y + 'px',
|
||||
});
|
||||
|
||||
$(window).scroll( function(){
|
||||
//var pos_y = - ( $(window).scrollTop() - $el.offset().top ) * ( 1 + local_options.speed ) - ( $el.offset().top * local_options.speed );
|
||||
var pos_y = local_options.offset + ($el.offset().top - $(window).scrollTop()) * (1 - local_options.speed );
|
||||
$el.data( 'pos_y', pos_y );
|
||||
$el.css( 'background-position', local_options.pos_x + ' ' + pos_y + 'px' );
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
return this;
|
||||
};
|
||||
}( jQuery ));
|
||||
+13
File diff suppressed because one or more lines are too long
Vendored
+9
File diff suppressed because one or more lines are too long
Vendored
+3
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
|
||||
/*! gumshoejs v5.1.2 | (c) 2019 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/gumshoe */
|
||||
Element.prototype.closest||(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(t){var e=this;if(!document.documentElement.contains(this))return null;do{if(e.matches(t))return e;e=e.parentElement}while(null!==e);return null}),(function(){if("function"==typeof window.CustomEvent)return!1;function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}t.prototype=window.Event.prototype,window.CustomEvent=t})(),(function(t,e){"function"==typeof define&&define.amd?define([],(function(){return e(t)})):"object"==typeof exports?module.exports=e(t):t.Gumshoe=e(t)})("undefined"!=typeof global?global:"undefined"!=typeof window?window:this,(function(t){"use strict";var e={navClass:"active",contentClass:"active",nested:!1,nestedClass:"active",offset:0,reflow:!1,events:!0},n=function(t,e,n){if(n.settings.events){var o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e.dispatchEvent(o)}},o=function(t){var e=0;if(t.offsetParent)for(;t;)e+=t.offsetTop,t=t.offsetParent;return e>=0?e:0},s=function(t){t&&t.sort((function(t,e){return o(t.content)<o(e.content)?-1:1}))},r=function(e,n,o){var s=e.getBoundingClientRect(),r=(function(t){return"function"==typeof t.offset?parseFloat(t.offset()):parseFloat(t.offset)})(n);return o?parseInt(s.bottom,10)<(t.innerHeight||document.documentElement.clientHeight):parseInt(s.top,10)<=r},c=function(){return t.innerHeight+t.pageYOffset>=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},i=function(t,e){var n=t[t.length-1];if(function(t,e){return!(!c()||!r(t.content,e,!0))}(n,e))return n;for(var o=t.length-1;o>=0;o--)if(r(t[o].content,e))return t[o]},l=function(t,e){if(e.nested&&t.parentNode){var n=t.parentNode.closest("li");n&&(n.classList.remove(e.nestedClass),l(n,e))}},a=function(t,e){if(t){var o=t.nav.closest("li");o&&(o.classList.remove(e.navClass),t.content.classList.remove(e.contentClass),l(o,e),n("gumshoeDeactivate",o,{link:t.nav,content:t.content,settings:e}))}},u=function(t,e){if(e.nested){var n=t.parentNode.closest("li");n&&(n.classList.add(e.nestedClass),u(n,e))}};return function(o,r){var c,l,f,d,m,v={};v.setup=function(){c=document.querySelectorAll(o),l=[],Array.prototype.forEach.call(c,(function(t){var e=document.getElementById(decodeURIComponent(t.hash.substr(1)));e&&l.push({nav:t,content:e})})),s(l)},v.detect=function(){var t=i(l,m);t?f&&t.content===f.content||(a(f,m),(function(t,e){if(t){var o=t.nav.closest("li");o&&(o.classList.add(e.navClass),t.content.classList.add(e.contentClass),u(o,e),n("gumshoeActivate",o,{link:t.nav,content:t.content,settings:e}))}})(t,m),f=t):f&&(a(f,m),f=null)};var p=function(e){d&&t.cancelAnimationFrame(d),d=t.requestAnimationFrame(v.detect)},h=function(e){d&&t.cancelAnimationFrame(d),d=t.requestAnimationFrame((function(){s(l),v.detect()}))};v.destroy=function(){f&&a(f,m),t.removeEventListener("scroll",p,!1),m.reflow&&t.removeEventListener("resize",h,!1),l=null,c=null,f=null,d=null,m=null};return m=(function(){var t={};return Array.prototype.forEach.call(arguments,(function(e){for(var n in e){if(!e.hasOwnProperty(n))return;t[n]=e[n]}})),t})(e,r||{}),v.setup(),v.detect(),t.addEventListener("scroll",p,!1),m.reflow&&t.addEventListener("resize",h,!1),v}}));
|
||||
Vendored
+5
File diff suppressed because one or more lines are too long
@@ -0,0 +1,230 @@
|
||||
/*!
|
||||
By André Rinas, www.andrerinas.de
|
||||
Documentation, www.simplelightbox.de
|
||||
Available for use under the MIT License
|
||||
Version 2.10.3
|
||||
*/
|
||||
body.hidden-scroll {
|
||||
overflow: hidden; }
|
||||
|
||||
.sl-overlay {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
display: none;
|
||||
z-index: 1035; }
|
||||
|
||||
.sl-wrapper {
|
||||
z-index: 1040;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
position: fixed; }
|
||||
.sl-wrapper * {
|
||||
box-sizing: border-box; }
|
||||
.sl-wrapper button {
|
||||
border: 0 none;
|
||||
background: transparent;
|
||||
font-size: 28px;
|
||||
padding: 0;
|
||||
cursor: pointer; }
|
||||
.sl-wrapper button:hover {
|
||||
opacity: 0.7; }
|
||||
.sl-wrapper .sl-close {
|
||||
display: none;
|
||||
position: fixed;
|
||||
right: 30px;
|
||||
top: 30px;
|
||||
z-index: 10060;
|
||||
margin-top: -14px;
|
||||
margin-right: -14px;
|
||||
height: 44px;
|
||||
width: 44px;
|
||||
line-height: 44px;
|
||||
font-family: Arial, Baskerville, monospace;
|
||||
color: #000;
|
||||
font-size: 3rem; }
|
||||
.sl-wrapper .sl-counter {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 30px;
|
||||
left: 30px;
|
||||
z-index: 1060;
|
||||
color: #000;
|
||||
font-size: 1rem; }
|
||||
.sl-wrapper .sl-navigation {
|
||||
width: 100%;
|
||||
display: none; }
|
||||
.sl-wrapper .sl-navigation button {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
margin-top: -22px;
|
||||
height: 44px;
|
||||
width: 22px;
|
||||
line-height: 44px;
|
||||
text-align: center;
|
||||
display: block;
|
||||
z-index: 10060;
|
||||
font-family: Arial, Baskerville, monospace;
|
||||
color: #000; }
|
||||
.sl-wrapper .sl-navigation button.sl-next {
|
||||
right: 5px;
|
||||
font-size: 2rem; }
|
||||
.sl-wrapper .sl-navigation button.sl-prev {
|
||||
left: 5px;
|
||||
font-size: 2rem; }
|
||||
@media (min-width: 35.5em) {
|
||||
.sl-wrapper .sl-navigation button {
|
||||
width: 44px; }
|
||||
.sl-wrapper .sl-navigation button.sl-next {
|
||||
right: 10px;
|
||||
font-size: 3rem; }
|
||||
.sl-wrapper .sl-navigation button.sl-prev {
|
||||
left: 10px;
|
||||
font-size: 3rem; } }
|
||||
@media (min-width: 50em) {
|
||||
.sl-wrapper .sl-navigation button {
|
||||
width: 44px; }
|
||||
.sl-wrapper .sl-navigation button.sl-next {
|
||||
right: 20px;
|
||||
font-size: 3rem; }
|
||||
.sl-wrapper .sl-navigation button.sl-prev {
|
||||
left: 20px;
|
||||
font-size: 3rem; } }
|
||||
.sl-wrapper.sl-dir-rtl .sl-navigation {
|
||||
direction: ltr; }
|
||||
.sl-wrapper .sl-image {
|
||||
position: fixed;
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
z-index: 10000; }
|
||||
.sl-wrapper .sl-image img {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
border: 0 none;
|
||||
width: 100%;
|
||||
height: auto; }
|
||||
@media (min-width: 35.5em) {
|
||||
.sl-wrapper .sl-image img {
|
||||
border: 0 none; } }
|
||||
@media (min-width: 50em) {
|
||||
.sl-wrapper .sl-image img {
|
||||
border: 0 none; } }
|
||||
.sl-wrapper .sl-image iframe {
|
||||
background: #000;
|
||||
border: 0 none; }
|
||||
@media (min-width: 35.5em) {
|
||||
.sl-wrapper .sl-image iframe {
|
||||
border: 0 none; } }
|
||||
@media (min-width: 50em) {
|
||||
.sl-wrapper .sl-image iframe {
|
||||
border: 0 none; } }
|
||||
.sl-wrapper .sl-image .sl-caption {
|
||||
display: none;
|
||||
padding: 10px;
|
||||
color: #fff;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
font-size: 1rem;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0; }
|
||||
.sl-wrapper .sl-image .sl-caption.pos-top {
|
||||
bottom: auto;
|
||||
top: 0; }
|
||||
.sl-wrapper .sl-image .sl-caption.pos-outside {
|
||||
bottom: auto; }
|
||||
.sl-wrapper .sl-image .sl-download {
|
||||
display: none;
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
right: 5px;
|
||||
color: #000;
|
||||
z-index: 1060; }
|
||||
|
||||
.sl-spinner {
|
||||
display: none;
|
||||
border: 5px solid #333;
|
||||
border-radius: 40px;
|
||||
height: 40px;
|
||||
left: 50%;
|
||||
margin: -20px 0 0 -20px;
|
||||
opacity: 0;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
width: 40px;
|
||||
z-index: 1007;
|
||||
-webkit-animation: pulsate 1s ease-out infinite;
|
||||
-moz-animation: pulsate 1s ease-out infinite;
|
||||
-ms-animation: pulsate 1s ease-out infinite;
|
||||
-o-animation: pulsate 1s ease-out infinite;
|
||||
animation: pulsate 1s ease-out infinite; }
|
||||
|
||||
.sl-scrollbar-measure {
|
||||
position: absolute;
|
||||
top: -9999px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
overflow: scroll; }
|
||||
|
||||
.sl-transition {
|
||||
transition: -moz-transform ease 200ms;
|
||||
transition: -ms-transform ease 200ms;
|
||||
transition: -o-transform ease 200ms;
|
||||
transition: -webkit-transform ease 200ms;
|
||||
transition: transform ease 200ms; }
|
||||
|
||||
@-webkit-keyframes pulsate {
|
||||
0% {
|
||||
transform: scale(0.1);
|
||||
opacity: 0.0; }
|
||||
50% {
|
||||
opacity: 1; }
|
||||
100% {
|
||||
transform: scale(1.2);
|
||||
opacity: 0; } }
|
||||
|
||||
@keyframes pulsate {
|
||||
0% {
|
||||
transform: scale(0.1);
|
||||
opacity: 0.0; }
|
||||
50% {
|
||||
opacity: 1; }
|
||||
100% {
|
||||
transform: scale(1.2);
|
||||
opacity: 0; } }
|
||||
|
||||
@-moz-keyframes pulsate {
|
||||
0% {
|
||||
transform: scale(0.1);
|
||||
opacity: 0.0; }
|
||||
50% {
|
||||
opacity: 1; }
|
||||
100% {
|
||||
transform: scale(1.2);
|
||||
opacity: 0; } }
|
||||
|
||||
@-o-keyframes pulsate {
|
||||
0% {
|
||||
transform: scale(0.1);
|
||||
opacity: 0.0; }
|
||||
50% {
|
||||
opacity: 1; }
|
||||
100% {
|
||||
transform: scale(1.2);
|
||||
opacity: 0; } }
|
||||
|
||||
@-ms-keyframes pulsate {
|
||||
0% {
|
||||
transform: scale(0.1);
|
||||
opacity: 0.0; }
|
||||
50% {
|
||||
opacity: 1; }
|
||||
100% {
|
||||
transform: scale(1.2);
|
||||
opacity: 0; } }
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
By André Rinas, www.andrerinas.de
|
||||
Documentation, www.simplelightbox.de
|
||||
Available for use under the MIT License
|
||||
Version 2.10.3
|
||||
*/
|
||||
body.hidden-scroll{overflow:hidden}.sl-overlay{position:fixed;left:0;right:0;top:0;bottom:0;background:#fff;display:none;z-index:1035}.sl-wrapper{z-index:1040;width:100%;height:100%;left:0;top:0;position:fixed}.sl-wrapper *{box-sizing:border-box}.sl-wrapper button{border:0 none;background:transparent;font-size:28px;padding:0;cursor:pointer}.sl-wrapper button:hover{opacity:0.7}.sl-wrapper .sl-close{display:none;position:fixed;right:30px;top:30px;z-index:10060;margin-top:-14px;margin-right:-14px;height:44px;width:44px;line-height:44px;font-family:Arial,Baskerville,monospace;color:#000;font-size:3rem}.sl-wrapper .sl-counter{display:none;position:fixed;top:30px;left:30px;z-index:1060;color:#000;font-size:1rem}.sl-wrapper .sl-navigation{width:100%;display:none}.sl-wrapper .sl-navigation button{position:fixed;top:50%;margin-top:-22px;height:44px;width:22px;line-height:44px;text-align:center;display:block;z-index:10060;font-family:Arial,Baskerville,monospace;color:#000}.sl-wrapper .sl-navigation button.sl-next{right:5px;font-size:2rem}.sl-wrapper .sl-navigation button.sl-prev{left:5px;font-size:2rem}@media (min-width: 35.5em){.sl-wrapper .sl-navigation button{width:44px}.sl-wrapper .sl-navigation button.sl-next{right:10px;font-size:3rem}.sl-wrapper .sl-navigation button.sl-prev{left:10px;font-size:3rem}}@media (min-width: 50em){.sl-wrapper .sl-navigation button{width:44px}.sl-wrapper .sl-navigation button.sl-next{right:20px;font-size:3rem}.sl-wrapper .sl-navigation button.sl-prev{left:20px;font-size:3rem}}.sl-wrapper.sl-dir-rtl .sl-navigation{direction:ltr}.sl-wrapper .sl-image{position:fixed;-ms-touch-action:none;touch-action:none;z-index:10000}.sl-wrapper .sl-image img{margin:0;padding:0;display:block;border:0 none;width:100%;height:auto}@media (min-width: 35.5em){.sl-wrapper .sl-image img{border:0 none}}@media (min-width: 50em){.sl-wrapper .sl-image img{border:0 none}}.sl-wrapper .sl-image iframe{background:#000;border:0 none}@media (min-width: 35.5em){.sl-wrapper .sl-image iframe{border:0 none}}@media (min-width: 50em){.sl-wrapper .sl-image iframe{border:0 none}}.sl-wrapper .sl-image .sl-caption{display:none;padding:10px;color:#fff;background:rgba(0,0,0,0.8);font-size:1rem;position:absolute;bottom:0;left:0;right:0}.sl-wrapper .sl-image .sl-caption.pos-top{bottom:auto;top:0}.sl-wrapper .sl-image .sl-caption.pos-outside{bottom:auto}.sl-wrapper .sl-image .sl-download{display:none;position:absolute;bottom:5px;right:5px;color:#000;z-index:1060}.sl-spinner{display:none;border:5px solid #333;border-radius:40px;height:40px;left:50%;margin:-20px 0 0 -20px;opacity:0;position:fixed;top:50%;width:40px;z-index:1007;-webkit-animation:pulsate 1s ease-out infinite;-moz-animation:pulsate 1s ease-out infinite;-ms-animation:pulsate 1s ease-out infinite;-o-animation:pulsate 1s ease-out infinite;animation:pulsate 1s ease-out infinite}.sl-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.sl-transition{transition:-moz-transform ease 200ms;transition:-ms-transform ease 200ms;transition:-o-transform ease 200ms;transition:-webkit-transform ease 200ms;transition:transform ease 200ms}@-webkit-keyframes pulsate{0%{transform:scale(0.1);opacity:0.0}50%{opacity:1}100%{transform:scale(1.2);opacity:0}}@keyframes pulsate{0%{transform:scale(0.1);opacity:0.0}50%{opacity:1}100%{transform:scale(1.2);opacity:0}}@-moz-keyframes pulsate{0%{transform:scale(0.1);opacity:0.0}50%{opacity:1}100%{transform:scale(1.2);opacity:0}}@-o-keyframes pulsate{0%{transform:scale(0.1);opacity:0.0}50%{opacity:1}100%{transform:scale(1.2);opacity:0}}@-ms-keyframes pulsate{0%{transform:scale(0.1);opacity:0.0}50%{opacity:1}100%{transform:scale(1.2);opacity:0}}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
+1
@@ -0,0 +1 @@
|
||||
!function(){"use strict";function o(){var o=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==o.__forceSmoothScrollPolyfill__)){var l,e=o.HTMLElement||o.Element,r=468,i={scroll:o.scroll||o.scrollTo,scrollBy:o.scrollBy,elementScroll:e.prototype.scroll||n,scrollIntoView:e.prototype.scrollIntoView},s=o.performance&&o.performance.now?o.performance.now.bind(o.performance):Date.now,c=(l=o.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(l)?1:0);o.scroll=o.scrollTo=function(){void 0!==arguments[0]&&(!0!==f(arguments[0])?h.call(o,t.body,void 0!==arguments[0].left?~~arguments[0].left:o.scrollX||o.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:o.scrollY||o.pageYOffset):i.scroll.call(o,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:o.scrollX||o.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:o.scrollY||o.pageYOffset))},o.scrollBy=function(){void 0!==arguments[0]&&(f(arguments[0])?i.scrollBy.call(o,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(o,t.body,~~arguments[0].left+(o.scrollX||o.pageXOffset),~~arguments[0].top+(o.scrollY||o.pageYOffset)))},e.prototype.scroll=e.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==f(arguments[0])){var o=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===o?this.scrollLeft:~~o,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},e.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==f(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},e.prototype.scrollIntoView=function(){if(!0!==f(arguments[0])){var l=function(o){for(;o!==t.body&&!1===(e=p(l=o,"Y")&&a(l,"Y"),r=p(l,"X")&&a(l,"X"),e||r);)o=o.parentNode||o.host;var l,e,r;return o}(this),e=l.getBoundingClientRect(),r=this.getBoundingClientRect();l!==t.body?(h.call(this,l,l.scrollLeft+r.left-e.left,l.scrollTop+r.top-e.top),"fixed"!==o.getComputedStyle(l).position&&o.scrollBy({left:e.left,top:e.top,behavior:"smooth"})):o.scrollBy({left:r.left,top:r.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function n(o,t){this.scrollLeft=o,this.scrollTop=t}function f(o){if(null===o||"object"!=typeof o||void 0===o.behavior||"auto"===o.behavior||"instant"===o.behavior)return!0;if("object"==typeof o&&"smooth"===o.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+o.behavior+" is not a valid value for enumeration ScrollBehavior.")}function p(o,t){return"Y"===t?o.clientHeight+c<o.scrollHeight:"X"===t?o.clientWidth+c<o.scrollWidth:void 0}function a(t,l){var e=o.getComputedStyle(t,null)["overflow"+l];return"auto"===e||"scroll"===e}function d(t){var l,e,i,c,n=(s()-t.startTime)/r;c=n=n>1?1:n,l=.5*(1-Math.cos(Math.PI*c)),e=t.startX+(t.x-t.startX)*l,i=t.startY+(t.y-t.startY)*l,t.method.call(t.scrollable,e,i),e===t.x&&i===t.y||o.requestAnimationFrame(d.bind(o,t))}function h(l,e,r){var c,f,p,a,h=s();l===t.body?(c=o,f=o.scrollX||o.pageXOffset,p=o.scrollY||o.pageYOffset,a=i.scroll):(c=l,f=l.scrollLeft,p=l.scrollTop,a=n),d({scrollable:c,method:a,startTime:h,startX:f,startY:p,x:e,y:r})}}"object"==typeof exports&&"undefined"!=typeof module?module.exports={polyfill:o}:o()}();
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user