init commit
5
assets/css/jquery-ui.css
vendored
Normal file
60
assets/css/mt-admin-styles.css
Normal file
@ -0,0 +1,60 @@
|
||||
.mt-meta-options-wrap .ui-button {
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
background: 0 0;
|
||||
height: auto;
|
||||
box-shadow: none
|
||||
}
|
||||
|
||||
.mt-meta-options-wrap .ui-button-text {
|
||||
padding: 0
|
||||
}
|
||||
|
||||
.mt-meta-options-wrap img {
|
||||
box-sizing: border-box;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
padding: 1px;
|
||||
border: 4px solid transparent
|
||||
}
|
||||
|
||||
.mt-meta-options-wrap img:focus,
|
||||
.mt-meta-options-wrap img:hover {
|
||||
border-color: #ddd
|
||||
}
|
||||
|
||||
.mt-meta-options-wrap .ui-state-active img {
|
||||
border-color: #00a0d2
|
||||
}
|
||||
|
||||
.mt-clearfix:after,
|
||||
.mt-clearfix:before {
|
||||
content: '';
|
||||
display: table
|
||||
}
|
||||
|
||||
.mt-clearfix:after {
|
||||
clear: both
|
||||
}
|
||||
|
||||
.widget-content .attachment-media-view {
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
margin: 1em 0
|
||||
}
|
||||
|
||||
.widget-content .placeholder {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
cursor: default;
|
||||
border: 1px dashed #b4b9be;
|
||||
box-sizing: border-box;
|
||||
padding: 9px 0;
|
||||
line-height: 20px
|
||||
}
|
||||
|
||||
.widget-content .actions {
|
||||
margin-top: 8px
|
||||
}
|
391
assets/css/mt-customizer-styles.css
Normal file
@ -0,0 +1,391 @@
|
||||
/**
|
||||
* Customizer styles
|
||||
*
|
||||
*/
|
||||
.customize-control-mt-toggle label {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.customize-control-mt-toggle label .customize-control-title {
|
||||
width: calc(100% - 55px);
|
||||
}
|
||||
|
||||
.customize-control-mt-toggle label .description {
|
||||
order: 99;
|
||||
}
|
||||
|
||||
.customize-control-mt-toggle input[type=checkbox] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.customize-control-mt-toggle .switch {
|
||||
border: 1px solid rgba(0, 0, 0, .1);
|
||||
display: inline-block;
|
||||
width: 35px;
|
||||
height: 12px;
|
||||
border-radius: 8px;
|
||||
background: #ccc;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transition: background 350ms ease;
|
||||
}
|
||||
|
||||
.customize-control-mt-toggle .switch:after,
|
||||
.customize-control-mt-toggle .switch:before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: -3px;
|
||||
transition: all 350ms cubic-bezier(0, .95, .38, .98), background 150ms ease;
|
||||
}
|
||||
|
||||
.customize-control-mt-toggle .switch:before {
|
||||
background: rgba(0, 0, 0, .2);
|
||||
transform: translate3d(0, -50%, 0) scale(0);
|
||||
}
|
||||
|
||||
.customize-control-mt-toggle .switch:after {
|
||||
background: #999;
|
||||
border: 1px solid rgba(0, 0, 0, .1);
|
||||
transform: translate3d(0, -50%, 0);
|
||||
}
|
||||
|
||||
.customize-control-mt-toggle .switch:active:before {
|
||||
transform: translate3d(0, -50%, 0) scale(3);
|
||||
}
|
||||
|
||||
.customize-control-mt-toggle input:checked+.switch {
|
||||
background: rgba(52, 152, 222, .3);
|
||||
}
|
||||
|
||||
.customize-control-mt-toggle input:checked+.switch:before {
|
||||
background: rgba(52, 152, 222, .075);
|
||||
transform: translate3d(100%, -50%, 0) scale(1);
|
||||
}
|
||||
|
||||
.customize-control-mt-toggle input:checked+.switch:after {
|
||||
background: #3498de;
|
||||
transform: translate3d(100%, -50%, 0);
|
||||
}
|
||||
|
||||
.customize-control-mt-toggle input:checked+.switch:active:before {
|
||||
background: rgba(52, 152, 222, .075);
|
||||
transform: translate3d(100%, -50%, 0) scale(3);
|
||||
}
|
||||
|
||||
.customize-control-mt-radio-image>.image {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.customize-control-mt-radio-image label {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.customize-control-mt-radio-image label .image-label {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(255, 255, 255, .7);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.customize-control-mt-radio-image label .image-label .inner {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
padding: .5em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.customize-control-mt-radio-image label:hover .image-label {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.customize-control-mt-radio-image input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.customize-control-mt-radio-image input img {
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.customize-control-mt-radio-image input:checked+label img {
|
||||
-webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, .25);
|
||||
box-shadow: 0 0 5px 2px rgba(0, 0, 0, .25);
|
||||
border: 1px solid #3498db;
|
||||
}
|
||||
|
||||
.customize-control-mt-radio-image input+label .image-clickable {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input img {
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input:checked+label img {
|
||||
-webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, .25);
|
||||
box-shadow: 0 0 5px 2px rgba(0, 0, 0, .25);
|
||||
border: 1px solid #3498db;
|
||||
}
|
||||
|
||||
.customize-control-mt-radio-image input+label .image-clickable {
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
background: 0 0;
|
||||
}
|
||||
|
||||
.customize-control-mt-radio-image input+label .image-clickable,
|
||||
.customize-control-mt-radio-image input:checked+label img {
|
||||
box-sizing: border-box;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
padding: 2px;
|
||||
border: 3px solid transparent;
|
||||
}
|
||||
|
||||
.customize-control-mt-radio-image input+label .image-clickable:focus,
|
||||
.customize-control-mt-radio-image input+label .image-clickable:hover {
|
||||
border-color: #ddd;
|
||||
}
|
||||
|
||||
.customize-control-mt-radio-image input:checked+label img {
|
||||
border-color: #00a0d2;
|
||||
display: block
|
||||
}
|
||||
|
||||
.customize-control-mt-radio-image .image label {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.customize-control-mt-radio-image input:checked+label img {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.customize-control-mt-radio-image>.image {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mt-clearfix:after,
|
||||
.mt-clearfix:before {
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
|
||||
.mt-clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.mt-repeater-field-control {
|
||||
background: #fff;
|
||||
margin-bottom: 12px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mt-repeater-footer {
|
||||
margin-top: 15px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.mt-repeater-field-control:first-child .mt-repeater-footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mt-repeater-field-title {
|
||||
padding: 13px 15px;
|
||||
line-height: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin: 0;
|
||||
font-size: 1em;
|
||||
border: 1px solid #e5e5e5;
|
||||
cursor: move;
|
||||
position: relative;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.mt-repeater-field-title:after {
|
||||
content: "\f142";
|
||||
font: 400 20px/1 dashicons;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: 1px 2px 1px 0;
|
||||
margin-top: 10px;
|
||||
margin-right: 10px;
|
||||
-webkit-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mt-repeater-field-control.expanded .mt-repeater-field-title:after {
|
||||
content: "\f140"
|
||||
}
|
||||
|
||||
.mt-repeater-fields {
|
||||
padding: 0 10px 10px;
|
||||
border-top: none;
|
||||
line-height: 16px;
|
||||
border: 1px solid #e5e5e5;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mt-repeater-fields .customize-control-title {
|
||||
margin-top: 10px
|
||||
}
|
||||
|
||||
.mt-repeater-field-control.expanded .mt-repeater-fields {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mt-reapeater-add-control-field {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.mt-reapeater-add-add-control-field:before {
|
||||
content: "\f132";
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
left: -2px;
|
||||
top: -1px;
|
||||
font: 400 18px/1 dashicons;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.mt-repeater-type-icon {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mt-repeater-selected-icon {
|
||||
background: #f6f6f6;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
text-align: center;
|
||||
border: 1px solid #eee;
|
||||
position: relative;
|
||||
margin-right: 45px;
|
||||
cursor: pointer;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.mt-repeater-selected-icon span {
|
||||
position: absolute;
|
||||
background: #f6f6f6;
|
||||
right: -45px;
|
||||
top: -1px;
|
||||
height: 45px;
|
||||
width: 45px;
|
||||
border: 1px solid #eee;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.mt-repeater-selected-icon i {
|
||||
margin-top: 3%;
|
||||
}
|
||||
|
||||
.mt-repeater-selected-icon span i {
|
||||
margin-top: 24%;
|
||||
}
|
||||
|
||||
.mt-repeater-icon-list {
|
||||
height: 215px;
|
||||
overflow-y: scroll;
|
||||
font-size: 18px;
|
||||
border: 1px solid #eee;
|
||||
border-right: 0;
|
||||
border-top: 0;
|
||||
padding-bottom: 4%;
|
||||
display: none;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
}
|
||||
|
||||
.mt-repeater-icon-list li {
|
||||
float: left;
|
||||
margin: 4% 3% 0;
|
||||
height: 40px;
|
||||
width: 16%;
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.mt-repeater-icon-list li:hover {
|
||||
background: #333;
|
||||
border: 1px solid #333;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mt-repeater-icon-list li.icon-active {
|
||||
background: #0073aa;
|
||||
border: 1px solid #0073aa;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.customize-control-mt-repeater .mt-limit-msg {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.customize-control-mt-repeater span.mt-limit-msg:nth-of-type(2) {
|
||||
display: block;
|
||||
background: #fff;
|
||||
padding: 10px 15px;
|
||||
margin: 10px 0 10px;
|
||||
border-left: 3px solid #ffb900;
|
||||
}
|
||||
|
||||
.customize-control textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/**---------------------------------------------
|
||||
Upsell section
|
||||
---------------------------------------------*/
|
||||
|
||||
#customize-controls .control-section-mt-upsell .accordion-section-title:hover,
|
||||
#customize-controls .control-section-mt-upsell .accordion-section-title:focus {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.control-section-mt-upsell .accordion-section-title .button {
|
||||
margin-top: -4px;
|
||||
font-weight: 700;
|
||||
margin-left: 8px;
|
||||
background: #00d2ff;
|
||||
background: -webkit-linear-gradient(to right, #3a7bd5, #00d2ff);
|
||||
background: linear-gradient(to right, #3a7bd5, #00d2ff);
|
||||
color: #fff;
|
||||
border:none;
|
||||
}
|
||||
|
||||
.control-section-mt-upsell .accordion-section-title .button:hover {
|
||||
background: #1FA3E8;
|
||||
background:linear-gradient(#1FA3E8,#1FA3E8);
|
||||
}
|
558
assets/css/mt-editor-style.css
Normal file
@ -0,0 +1,558 @@
|
||||
body {
|
||||
color: #363b40
|
||||
}
|
||||
|
||||
body,
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
|
||||
font-size: 16px;
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.66
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-family: Catamaran, helvetica, arial, sans-serif;
|
||||
color: #16181a;
|
||||
font-weight: 700;
|
||||
clear: both;
|
||||
line-height: 1.4;
|
||||
margin: 0 0 .75em;
|
||||
padding: 1.5em 0 0
|
||||
}
|
||||
|
||||
h1:first-child,
|
||||
h2:first-child,
|
||||
h3:first-child,
|
||||
h4:first-child,
|
||||
h5:first-child,
|
||||
h6:first-child {
|
||||
padding-top: 0
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 24px;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 300
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #666;
|
||||
font-size: 20px;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 300
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #333;
|
||||
font-size: 18px;
|
||||
font-size: 1.125rem;
|
||||
font-weight: 300
|
||||
}
|
||||
|
||||
h4 {
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
font-size: 1rem;
|
||||
font-weight: 800
|
||||
}
|
||||
|
||||
h5 {
|
||||
color: #767676;
|
||||
font-size: 13px;
|
||||
font-size: .8125rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: .15em;
|
||||
text-transform: uppercase
|
||||
}
|
||||
|
||||
h6 {
|
||||
color: #333;
|
||||
font-size: 15px;
|
||||
font-size: .9375rem;
|
||||
font-weight: 800
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 0 1.5em;
|
||||
padding: 0
|
||||
}
|
||||
|
||||
cite,
|
||||
dfn,
|
||||
em,
|
||||
i {
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
blockquote {
|
||||
color: #666;
|
||||
font-size: 18px;
|
||||
font-size: 1.125rem;
|
||||
font-style: italic;
|
||||
line-height: 1.7;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
padding: 20px 40px;
|
||||
background: #fff9f5;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
blockquote.alignleft,
|
||||
blockquote.alignright {
|
||||
font-size: 14px;
|
||||
font-size: .875rem;
|
||||
width: 34%
|
||||
}
|
||||
|
||||
blockquote cite {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding: 0 20px;
|
||||
font-size: 14px;
|
||||
margin-top: 20px
|
||||
}
|
||||
|
||||
blockquote cite::before {
|
||||
content: "";
|
||||
background-color: #363b40;
|
||||
width: 10px;
|
||||
height: 1px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 0
|
||||
}
|
||||
|
||||
address {
|
||||
margin: 0 0 1.5em
|
||||
}
|
||||
|
||||
pre {
|
||||
background: #eee;
|
||||
font-family: "Courier 10 Pitch", Courier, monospace;
|
||||
font-size: 15px;
|
||||
font-size: .9375rem;
|
||||
line-height: 1.6;
|
||||
margin-bottom: 1.6em;
|
||||
max-width: 100%;
|
||||
overflow: auto;
|
||||
padding: 1.6em
|
||||
}
|
||||
|
||||
code,
|
||||
kbd,
|
||||
tt,
|
||||
var {
|
||||
font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
|
||||
font-size: 15px;
|
||||
font-size: .9375rem
|
||||
}
|
||||
|
||||
abbr,
|
||||
acronym {
|
||||
border-bottom: 1px dotted #666;
|
||||
cursor: help
|
||||
}
|
||||
|
||||
ins,
|
||||
mark {
|
||||
background: #eee;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
big {
|
||||
font-size: 125%
|
||||
}
|
||||
|
||||
blockquote,
|
||||
q {
|
||||
quotes: """"
|
||||
}
|
||||
|
||||
blockquote:after,
|
||||
blockquote:before,
|
||||
q:after,
|
||||
q:before {
|
||||
content: ""
|
||||
}
|
||||
|
||||
html[lang=th] h1,
|
||||
html[lang=th] h2,
|
||||
html[lang=th] h3,
|
||||
html[lang=th] h4,
|
||||
html[lang=th] h5,
|
||||
html[lang=th] h6 {
|
||||
letter-spacing: 0;
|
||||
line-height: 1.65
|
||||
}
|
||||
|
||||
html[lang=th] body,
|
||||
html[lang=th] button,
|
||||
html[lang=th] input,
|
||||
html[lang=th] select,
|
||||
html[lang=th] textarea {
|
||||
line-height: 1.8
|
||||
}
|
||||
|
||||
hr {
|
||||
background-color: #bbb;
|
||||
border: 0;
|
||||
height: 1px;
|
||||
margin-bottom: 1.5em
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
margin: 0 0 1.5em;
|
||||
padding: 0
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: disc
|
||||
}
|
||||
|
||||
ol {
|
||||
counter-reset: item
|
||||
}
|
||||
|
||||
ol li {
|
||||
display: block;
|
||||
position: relative
|
||||
}
|
||||
|
||||
ol li:before {
|
||||
content: counter(item);
|
||||
counter-increment: item;
|
||||
font-weight: 800;
|
||||
left: -1.5em;
|
||||
position: absolute
|
||||
}
|
||||
|
||||
li>ol,
|
||||
li>ul {
|
||||
margin-bottom: 0;
|
||||
margin-left: 1.5em
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700
|
||||
}
|
||||
|
||||
dd {
|
||||
margin: 0 1.5em 1.5em
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
margin: 0 0 1.5em;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
thead th {
|
||||
border-bottom: 2px solid #bbb;
|
||||
padding-bottom: .5em
|
||||
}
|
||||
|
||||
th {
|
||||
padding: .4em;
|
||||
text-align: left
|
||||
}
|
||||
|
||||
tr {
|
||||
border-bottom: 1px solid #eee
|
||||
}
|
||||
|
||||
td {
|
||||
padding: .4em
|
||||
}
|
||||
|
||||
td:first-child,
|
||||
th:first-child {
|
||||
padding-left: 0
|
||||
}
|
||||
|
||||
td:last-child,
|
||||
th:last-child {
|
||||
padding-right: 0
|
||||
}
|
||||
|
||||
a {
|
||||
-webkit-box-shadow: inset 0 -1px 0 rgba(15, 15, 15, 1);
|
||||
box-shadow: inset 0 -1px 0 rgba(15, 15, 15, 1);
|
||||
color: #222;
|
||||
text-decoration: none;
|
||||
-webkit-transition: color 80ms ease-in, -webkit-box-shadow 130ms ease-in-out;
|
||||
transition: color 80ms ease-in, -webkit-box-shadow 130ms ease-in-out;
|
||||
transition: color 80ms ease-in, box-shadow 130ms ease-in-out;
|
||||
transition: color 80ms ease-in, box-shadow 130ms ease-in-out, -webkit-box-shadow 130ms ease-in-out
|
||||
}
|
||||
|
||||
a:focus {
|
||||
outline: thin dotted
|
||||
}
|
||||
|
||||
a:focus,
|
||||
a:hover {
|
||||
color: #000;
|
||||
-webkit-box-shadow: inset 0 0 0 transparent, 0 3px 0 rgba(0, 0, 0, 1);
|
||||
box-shadow: inset 0 0 0 transparent, 0 3px 0 rgba(0, 0, 0, 1)
|
||||
}
|
||||
|
||||
a img {
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 0 0 6px #fff;
|
||||
box-shadow: 0 0 0 6px #fff
|
||||
}
|
||||
|
||||
img {
|
||||
height: auto;
|
||||
width: inherit;
|
||||
max-width: 100%
|
||||
}
|
||||
|
||||
embed,
|
||||
iframe,
|
||||
object {
|
||||
margin-bottom: 1.5em;
|
||||
max-width: 100%
|
||||
}
|
||||
|
||||
.wp-caption {
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
font-size: .8125rem;
|
||||
font-style: italic;
|
||||
margin-bottom: 1.5em;
|
||||
max-width: 100%
|
||||
}
|
||||
|
||||
.wp-caption img[class*=wp-image-] {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto
|
||||
}
|
||||
|
||||
.wp-caption .wp-caption-text {
|
||||
margin: .8075em 0
|
||||
}
|
||||
|
||||
.gallery {
|
||||
margin-bottom: 1.5em
|
||||
}
|
||||
|
||||
.gallery-item {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.gallery-item a,
|
||||
.gallery-item a:focus,
|
||||
.gallery-item a:hover {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
background: 0 0;
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
.gallery-columns-2 .gallery-item {
|
||||
max-width: 50%
|
||||
}
|
||||
|
||||
.gallery-columns-3 .gallery-item {
|
||||
max-width: 33.33%
|
||||
}
|
||||
|
||||
.gallery-columns-4 .gallery-item {
|
||||
max-width: 25%
|
||||
}
|
||||
|
||||
.gallery-columns-5 .gallery-item {
|
||||
max-width: 20%
|
||||
}
|
||||
|
||||
.gallery-columns-6 .gallery-item {
|
||||
max-width: 16.66%
|
||||
}
|
||||
|
||||
.gallery-columns-7 .gallery-item {
|
||||
max-width: 14.28%
|
||||
}
|
||||
|
||||
.gallery-columns-8 .gallery-item {
|
||||
max-width: 12.5%
|
||||
}
|
||||
|
||||
.gallery-columns-9 .gallery-item {
|
||||
max-width: 11.11%
|
||||
}
|
||||
|
||||
.gallery-caption {
|
||||
display: block
|
||||
}
|
||||
|
||||
.mejs-container {
|
||||
margin-bottom: 1.5em
|
||||
}
|
||||
|
||||
.mejs-controls a.mejs-horizontal-volume-slider,
|
||||
.mejs-controls a.mejs-horizontal-volume-slider:focus,
|
||||
.mejs-controls a.mejs-horizontal-volume-slider:hover {
|
||||
background: 0 0;
|
||||
border: 0
|
||||
}
|
||||
|
||||
.wp-playlist-light {
|
||||
border-color: #eee;
|
||||
color: #222
|
||||
}
|
||||
|
||||
.wp-playlist-light .wp-playlist-current-item .wp-playlist-item-album {
|
||||
color: #333
|
||||
}
|
||||
|
||||
.wp-playlist-light .wp-playlist-current-item .wp-playlist-item-artist {
|
||||
color: #767676
|
||||
}
|
||||
|
||||
.wp-playlist-light .wp-playlist-item {
|
||||
border-bottom: 1px dotted #eee;
|
||||
-webkit-transition: background-color .2s ease-in-out, border-color .2s ease-in-out, color .3s ease-in-out;
|
||||
transition: background-color .2s ease-in-out, border-color .2s ease-in-out, color .3s ease-in-out
|
||||
}
|
||||
|
||||
.wp-playlist-light .wp-playlist-item:focus,
|
||||
.wp-playlist-light .wp-playlist-item:hover {
|
||||
border-bottom-color: transparent;
|
||||
background-color: #767676;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.wp-playlist-light .wp-playlist-item:focus a,
|
||||
.wp-playlist-light .wp-playlist-item:hover a,
|
||||
.wp-playlist-light a.wp-playlist-caption:hover {
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.wp-playlist-dark {
|
||||
background: #222;
|
||||
border-color: #333
|
||||
}
|
||||
|
||||
.wp-playlist-dark .mejs-container .mejs-controls {
|
||||
background-color: #333
|
||||
}
|
||||
|
||||
.wp-playlist-dark .wp-playlist-caption {
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.wp-playlist-dark .wp-playlist-current-item .wp-playlist-item-album {
|
||||
color: #eee
|
||||
}
|
||||
|
||||
.wp-playlist-dark .wp-playlist-current-item .wp-playlist-item-artist {
|
||||
color: #aaa
|
||||
}
|
||||
|
||||
.wp-playlist-dark .wp-playlist-playing {
|
||||
background-color: #333
|
||||
}
|
||||
|
||||
.wp-playlist-dark .wp-playlist-item {
|
||||
border-bottom: 1px dotted #555;
|
||||
-webkit-transition: background-color .2s ease-in-out, border-color .2s ease-in-out, color .3s ease-in-out;
|
||||
transition: background-color .2s ease-in-out, border-color .2s ease-in-out, color .3s ease-in-out
|
||||
}
|
||||
|
||||
.wp-playlist-dark .wp-playlist-item:focus,
|
||||
.wp-playlist-dark .wp-playlist-item:hover {
|
||||
border-bottom-color: transparent;
|
||||
background-color: #aaa;
|
||||
color: #222
|
||||
}
|
||||
|
||||
.wp-playlist-dark .wp-playlist-item:focus a,
|
||||
.wp-playlist-dark .wp-playlist-item:hover a,
|
||||
.wp-playlist-dark a.wp-playlist-caption:hover {
|
||||
color: #222
|
||||
}
|
||||
|
||||
.wp-playlist {
|
||||
padding: .625em .625em .3125em
|
||||
}
|
||||
|
||||
.wp-playlist-current-item .wp-playlist-item-title {
|
||||
font-weight: 700
|
||||
}
|
||||
|
||||
.wp-playlist-current-item .wp-playlist-item-album {
|
||||
font-style: normal
|
||||
}
|
||||
|
||||
.wp-playlist-current-item .wp-playlist-item-artist {
|
||||
font-size: 10px;
|
||||
font-size: .625rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: .1818em;
|
||||
text-transform: uppercase
|
||||
}
|
||||
|
||||
.wp-playlist-item {
|
||||
padding: 0 .3125em;
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.wp-playlist-item:last-of-type {
|
||||
border-bottom: none
|
||||
}
|
||||
|
||||
.wp-playlist-item a {
|
||||
padding: .3125em 0;
|
||||
border-bottom: none
|
||||
}
|
||||
|
||||
.wp-playlist-item a,
|
||||
.wp-playlist-item a:focus,
|
||||
.wp-playlist-item a:hover {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
background: 0 0
|
||||
}
|
||||
|
||||
.wp-playlist-item-length {
|
||||
top: 5px
|
||||
}
|
||||
|
||||
.rtl th {
|
||||
text-align: right
|
||||
}
|
||||
|
||||
.rtl ol {
|
||||
counter-reset: item
|
||||
}
|
||||
|
||||
.rtl ol li:before {
|
||||
left: auto;
|
||||
right: -1.5em
|
||||
}
|
||||
|
||||
.rtl li>ol,
|
||||
.rtl li>ul {
|
||||
margin-left: 0;
|
||||
margin-right: 1.5em
|
||||
}
|
||||
|
||||
.rtl .mejs-offscreen {
|
||||
right: -10000px
|
||||
}
|
56
assets/css/mt-preloader.css
Normal file
@ -0,0 +1,56 @@
|
||||
#preloader-background {
|
||||
background: #fff none repeat scroll 0 0;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 99999
|
||||
}
|
||||
|
||||
#preloader-background .preloader-wrapper {
|
||||
left: 50%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
-moz-transform: translate(-50%, -50%);
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
-o-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%)
|
||||
}
|
||||
|
||||
.sk-spinner-pulse {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin: 40px auto;
|
||||
background-color: #333;
|
||||
border-radius: 100%;
|
||||
-webkit-animation: sk-pulseScaleOut 1s infinite ease-in-out;
|
||||
animation: sk-pulseScaleOut 1s infinite ease-in-out
|
||||
}
|
||||
|
||||
@-webkit-keyframes sk-pulseScaleOut {
|
||||
0% {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0)
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
opacity: 0
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes sk-pulseScaleOut {
|
||||
0% {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0)
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
opacity: 0
|
||||
}
|
||||
}
|
722
assets/css/mt-responsive.css
Normal file
@ -0,0 +1,722 @@
|
||||
@media (max-width:1400px) {
|
||||
|
||||
.mt-container,
|
||||
.site-layout--boxed #page {
|
||||
width: 1200px
|
||||
}
|
||||
|
||||
.top-featured-post-wrap .entry-header .entry-title {
|
||||
font-size: 16px
|
||||
}
|
||||
|
||||
.entry-title {
|
||||
font-size: 18px
|
||||
}
|
||||
|
||||
#colophon .widget .widget-title,
|
||||
#secondary .widget .widget-title,
|
||||
.mt-related-post-title {
|
||||
font-size: 17px
|
||||
}
|
||||
|
||||
.single article .post-thumbnail {
|
||||
margin-bottom: 0
|
||||
}
|
||||
|
||||
.single .mt-related-posts-wrapper .entry-title {
|
||||
font-size: 19px
|
||||
}
|
||||
|
||||
.mt-form-close {
|
||||
font-size: 50px
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:1200px) {
|
||||
|
||||
.mt-container,
|
||||
.site-layout--boxed #page {
|
||||
width: auto;
|
||||
margin: 0 2%
|
||||
}
|
||||
|
||||
.site-layout--boxed .mt-container {
|
||||
padding: 0 10px
|
||||
}
|
||||
|
||||
#top-header {
|
||||
position: relative
|
||||
}
|
||||
|
||||
.mt-follow-title {
|
||||
display: none
|
||||
}
|
||||
|
||||
.tags-wrapper {
|
||||
margin: 0;
|
||||
background: #212121;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
padding: 4px;
|
||||
-webkit-transform: translateY(-50%);
|
||||
-ms-transform: translateY(-50%);
|
||||
-o-transform: translateY(-50%);
|
||||
transform: translateY(-50%);
|
||||
-webkit-transition: all .8s;
|
||||
-o-transition: all .8s;
|
||||
transition: all .8s;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.trending-wrapper:hover .tags-wrapper {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
left: 30%
|
||||
}
|
||||
|
||||
.top-featured-post-wrap .post-thumbnail .post-number {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 21px;
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
.top-featured-post-wrap .post-thumbnail {
|
||||
width: 30%
|
||||
}
|
||||
|
||||
.top-featured-post-wrap .mt-post-content {
|
||||
width: 66%
|
||||
}
|
||||
|
||||
.top-featured-post-wrap .entry-header .entry-title {
|
||||
font-size: 14px
|
||||
}
|
||||
|
||||
.posted-on a::before {
|
||||
width: 18px;
|
||||
right: -24px
|
||||
}
|
||||
|
||||
.posted-on a {
|
||||
margin-right: 28px
|
||||
}
|
||||
|
||||
#mt-scrollup {
|
||||
right: 10px
|
||||
}
|
||||
|
||||
#colophon .widget .widget-title,
|
||||
#secondary .widget .widget-title,
|
||||
.mt-related-post-title {
|
||||
font-size: 14px
|
||||
}
|
||||
|
||||
#colophon .widget .widget-title::before,
|
||||
#secondary .widget .widget-title::before,
|
||||
.features-post-title::before,
|
||||
.mt-related-post-title::before {
|
||||
height: 2px;
|
||||
top: 7px
|
||||
}
|
||||
|
||||
.custom-header .entry-title,
|
||||
.custom-header .page-title {
|
||||
font-size: 32px
|
||||
}
|
||||
|
||||
.single .entry-title {
|
||||
font-size: 25px
|
||||
}
|
||||
|
||||
.single.post-cat,
|
||||
.single.post-cats-list {
|
||||
margin-bottom: 0
|
||||
}
|
||||
|
||||
.mt-menu-search .mt-form-wrap .search-form .search-field {
|
||||
height: 54px;
|
||||
font-size: 20px
|
||||
}
|
||||
|
||||
.error-num {
|
||||
font-size: 70px;
|
||||
line-height: 90px
|
||||
}
|
||||
|
||||
.error-num span {
|
||||
font-size: 36px
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 28px
|
||||
}
|
||||
|
||||
#footer-menu li a {
|
||||
padding: 0 10px
|
||||
}
|
||||
|
||||
.widget {
|
||||
padding: 14px
|
||||
}
|
||||
|
||||
.custom-header {
|
||||
padding: 54px 0
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:979px) {
|
||||
.top-header-nav {
|
||||
float: none;
|
||||
display: block;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.site-branding {
|
||||
float: none;
|
||||
text-align: center;
|
||||
display: block;
|
||||
margin-bottom: 20px;
|
||||
margin-top: 0
|
||||
}
|
||||
|
||||
.logo-ads-wrap {
|
||||
padding: 20px 0 30px
|
||||
}
|
||||
|
||||
.menu-toggle {
|
||||
display: block
|
||||
}
|
||||
|
||||
.mt-social-menu-wrapper {
|
||||
position: relative
|
||||
}
|
||||
|
||||
.header-widget-wrapper {
|
||||
text-align: center;
|
||||
float: none
|
||||
}
|
||||
|
||||
#site-navigation {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 90%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background: #0B0B0B;
|
||||
float: none;
|
||||
z-index: 9999
|
||||
}
|
||||
|
||||
#site-navigation .mt-container {
|
||||
border: none;
|
||||
padding: 0
|
||||
}
|
||||
|
||||
#site-navigation ul {
|
||||
display: block
|
||||
}
|
||||
|
||||
#masthead #site-navigation ul li {
|
||||
border-bottom: none;
|
||||
display: block
|
||||
}
|
||||
|
||||
#site-navigation ul#primary-menu>li.menu-item-has-children>a,
|
||||
#site-navigation #primary-menu ul>li.page_item_has_children>a {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
#site-navigation ul li .sub-menu li a,
|
||||
#site-navigation ul li .children li a {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.trending-wrapper .wrap-label {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
float: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#site-navigation ul li a,
|
||||
.is-sticky #site-navigation ul li a {
|
||||
line-height: 44px;
|
||||
padding: 0;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.3);
|
||||
}
|
||||
|
||||
#site-navigation ul li a::after {
|
||||
display: none
|
||||
}
|
||||
|
||||
#site-navigation ul li .children,
|
||||
#site-navigation ul li .sub-menu {
|
||||
position: static;
|
||||
min-width: 100%;
|
||||
opacity: 1;
|
||||
top: 0;
|
||||
left: 0;
|
||||
visibility: visible;
|
||||
display: none;
|
||||
background: 0 0;
|
||||
-webkit-transition: none;
|
||||
-moz-transition: none;
|
||||
-ms-transition: none;
|
||||
-o-transition: none;
|
||||
box-shadow: none;
|
||||
transform: scaley(1);
|
||||
-webkit-transform: scaley(1);
|
||||
-ms-transform: scaley(1);
|
||||
transform-origin: 0 0;
|
||||
-webkit-transform-origin: 0 0;
|
||||
-ms-transform-origin: 0 0
|
||||
}
|
||||
|
||||
#site-navigation ul>li:hover>.children,
|
||||
#site-navigation ul>li:hover>.sub-menu {
|
||||
top: 0
|
||||
}
|
||||
|
||||
#site-navigation ul li a.sub-toggle,
|
||||
#site-navigation ul li a.sub-toggle:hover {
|
||||
background: #fff none repeat scroll 0 0;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
display: block !important;
|
||||
height: 24px;
|
||||
line-height: 25px;
|
||||
position: absolute !important;
|
||||
right: 15px;
|
||||
text-align: center;
|
||||
top: 12px;
|
||||
width: 24px;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
#site-navigation ul li .sub-menu li a.sub-toggle,
|
||||
#site-navigation ul li .children li a.sub-toggle {
|
||||
padding: 0;
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
#site-navigation ul>li.current-menu-ancestor .sub-toggle,
|
||||
#site-navigation ul>li.current-menu-item .sub-toggle,
|
||||
#site-navigation ul>li:hover>.sub-toggle {
|
||||
background: #666
|
||||
}
|
||||
|
||||
#site-navigation li.current-menu-item>.sub-toggle {
|
||||
background: #fff none repeat scroll 0 0
|
||||
}
|
||||
|
||||
#site-navigation li.current-menu-item>.sub-toggle i {
|
||||
color: #d40234
|
||||
}
|
||||
|
||||
#site-navigation li.menu-item-has-children>a::after,
|
||||
#site-navigation li.page_item_has_children>a::after {
|
||||
display: none
|
||||
}
|
||||
|
||||
#site-navigation ul.children li,
|
||||
#site-navigation ul.sub-menu li {
|
||||
text-align: center
|
||||
}
|
||||
|
||||
#site-navigation .menu-item-description,
|
||||
#site-navigation .menu-item-description::after,
|
||||
#site-navigation li.menu-item-has-children>a::before,
|
||||
#site-navigation li.page_item_has_children>a::before {
|
||||
display: none
|
||||
}
|
||||
|
||||
.mt-archive--block-grid-style article,
|
||||
.mt-archive--masonry-style #mt-masonry article {
|
||||
width: 97%
|
||||
}
|
||||
|
||||
.no-sidebar.mt-archive--block-grid-style article,
|
||||
.no-sidebar.mt-archive--masonry-style #mt-masonry article {
|
||||
width: 47%
|
||||
}
|
||||
|
||||
#bottom-footer {
|
||||
font-size: 12px;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
#footer-navigation {
|
||||
float: none;
|
||||
width: 100%;
|
||||
display: block;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.navigation.pagination .nav-links .page-numbers.current,
|
||||
.navigation.pagination .nav-links a.page-numbers,
|
||||
.navigation.pagination .nav-links a.page-numbers:hover {
|
||||
padding: 8px 12px
|
||||
}
|
||||
|
||||
.bttn,
|
||||
.navigation .nav-links a,
|
||||
button,
|
||||
input[type=button],
|
||||
input[type=reset],
|
||||
input[type=submit] {
|
||||
padding: 10px;
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
.mt-author-bio {
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
.single .mt-related-posts-wrapper .entry-title {
|
||||
font-size: 15px
|
||||
}
|
||||
|
||||
input[type=email],
|
||||
input[type=password],
|
||||
input[type=search],
|
||||
input[type=text],
|
||||
input[type=url] {
|
||||
height: 28px
|
||||
}
|
||||
|
||||
#respond,
|
||||
.widget_archive a,
|
||||
.widget_categories a,
|
||||
.widget_meta a,
|
||||
.widget_nav_menu li a,
|
||||
.widget_pages li a,
|
||||
.widget_recent_comments li,
|
||||
.widget_recent_entries a,
|
||||
.widget_rss li {
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
.error-404.not-found {
|
||||
width: 80%
|
||||
}
|
||||
|
||||
.entry-content {
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
.entry-meta a {
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
.posted-on a::before {
|
||||
width: 14px;
|
||||
right: -20px;
|
||||
top: 8px
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:839px) {
|
||||
|
||||
.front-slider-block,
|
||||
.top-featured-post-main-wrapper {
|
||||
width: 100%;
|
||||
float: none
|
||||
}
|
||||
|
||||
.front-slider-wrapper {
|
||||
margin: 0 0 40px 0
|
||||
}
|
||||
|
||||
.front-slider-block {
|
||||
width: 100%;
|
||||
float: none;
|
||||
margin-bottom: 40px
|
||||
}
|
||||
|
||||
.top-featured-post-wrap {
|
||||
overflow: auto;
|
||||
margin-right: -3%
|
||||
}
|
||||
|
||||
.top-featured-post-wrap .mt-single-post-wrap {
|
||||
width: 47%;
|
||||
float: left;
|
||||
margin-bottom: 3%;
|
||||
margin-right: 3%
|
||||
}
|
||||
|
||||
#top-footer.footer-column-four .mt-footer-widget {
|
||||
width: 47%
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:768px) {
|
||||
.entry-meta {
|
||||
line-height: 1.5
|
||||
}
|
||||
|
||||
.entry-meta a {
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
.entry-header {
|
||||
margin-top: 5px
|
||||
}
|
||||
|
||||
.posted-on a::before {
|
||||
width: 11px;
|
||||
right: -16px
|
||||
}
|
||||
|
||||
.posted-on a {
|
||||
margin-right: 16px
|
||||
}
|
||||
|
||||
#primary,
|
||||
#secondary,
|
||||
.home.blog #primary,
|
||||
.home.blog #secondary {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.right-sidebar #primary .thumb-cat-wrap .wp-post-image {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.mt-menu-search .mt-form-wrap .search-form .search-submit {
|
||||
padding: 16px 46px
|
||||
}
|
||||
|
||||
.mt-menu-search .mt-form-wrap .search-form .search-field {
|
||||
height: 48px;
|
||||
font-size: 18px
|
||||
}
|
||||
|
||||
.mt-form-close {
|
||||
font-size: 40px
|
||||
}
|
||||
|
||||
.trending-wrapper {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
margin-bottom: 10px
|
||||
}
|
||||
|
||||
.error-num {
|
||||
font-size: 50px;
|
||||
line-height: 70px
|
||||
}
|
||||
|
||||
.error-num span {
|
||||
font-size: 30px
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 20px
|
||||
}
|
||||
|
||||
.error404 h1 {
|
||||
font-size: 20px
|
||||
}
|
||||
|
||||
.error404 .page-content {
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
.error404 #primary {
|
||||
padding: 20px 0
|
||||
}
|
||||
|
||||
.slider-post-wrap {
|
||||
height: 450px
|
||||
}
|
||||
|
||||
.mt-live-link {
|
||||
float: none;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:600px) {
|
||||
.logged-in #page {
|
||||
padding-top: 40px;
|
||||
}
|
||||
|
||||
body.logged-in {
|
||||
margin-top: -50px;
|
||||
}
|
||||
|
||||
.logged-in .is-sticky .mt-social-menu-wrapper {
|
||||
top: 0 !important;
|
||||
}
|
||||
|
||||
.top-featured-post-wrap {
|
||||
margin-right: 0
|
||||
}
|
||||
|
||||
.top-featured-post-wrap .mt-single-post-wrap {
|
||||
width: 100%;
|
||||
margin-right: 0
|
||||
}
|
||||
|
||||
.archive-grid-post-wrapper,
|
||||
.mt-archive--masonry-style .sophia-after-dark-content-masonry {
|
||||
margin-left: 0
|
||||
}
|
||||
|
||||
.mt-archive--block-grid-style article,
|
||||
.mt-archive--masonry-style #mt-masonry article,
|
||||
.no-sidebar.mt-archive--block-grid-style article,
|
||||
.no-sidebar.mt-archive--masonry-style #mt-masonry article {
|
||||
width: 100%;
|
||||
margin-left: 0
|
||||
}
|
||||
|
||||
.single .entry-title {
|
||||
font-size: 18px
|
||||
}
|
||||
|
||||
.breadcrumbs .trail-items {
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
.custom-header {
|
||||
padding: 28px 0
|
||||
}
|
||||
|
||||
.mt-related-posts-wrapper {
|
||||
margin-left: 0
|
||||
}
|
||||
|
||||
.mt-related-posts-wrapper article {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.mt-related-posts-wrapper .post-cats-list a {
|
||||
margin-top: 10px
|
||||
}
|
||||
|
||||
.head-tags-links a {
|
||||
display: block
|
||||
}
|
||||
|
||||
.tags-wrapper {
|
||||
position: static;
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
transform: translate(0);
|
||||
}
|
||||
|
||||
.tags-wrapper a {
|
||||
display: inline-block;
|
||||
padding: 10px 0 5px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
font-size: 14px
|
||||
}
|
||||
|
||||
.custom-header .entry-title,
|
||||
.custom-header .page-title {
|
||||
font-size: 28px
|
||||
}
|
||||
|
||||
#top-footer.footer-column-three .mt-footer-widget {
|
||||
width: 97%
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:480px) {
|
||||
.mt-social-icon-wrap li {
|
||||
margin-right: 8px
|
||||
}
|
||||
|
||||
.menu-toggle {
|
||||
padding: 9px 0
|
||||
}
|
||||
|
||||
.single .post-info-wrap {
|
||||
margin-top: 10px
|
||||
}
|
||||
|
||||
.mt-social-wrapper {
|
||||
margin: 12px 0 12px
|
||||
}
|
||||
|
||||
.mt-search-icon {
|
||||
font-size: 14px;
|
||||
margin: 12px 0 12px 8px
|
||||
}
|
||||
|
||||
.single .post-cat,
|
||||
.single .post-cats-list {
|
||||
margin-bottom: 0
|
||||
}
|
||||
|
||||
.single .mt-author-box .mt-author-info .mt-author-name {
|
||||
font-size: 18px
|
||||
}
|
||||
|
||||
.mt-author-bio {
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
.mt-author-meta {
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
.comment-form-cookies-consent label {
|
||||
margin-left: 0
|
||||
}
|
||||
|
||||
.custom-header .entry-title,
|
||||
.custom-header .page-title {
|
||||
font-size: 18px
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
.search-no-results #primary .search-submit {
|
||||
margin-top: 18px;
|
||||
font-size: 18px
|
||||
}
|
||||
|
||||
.error404 #primary {
|
||||
padding: 0
|
||||
}
|
||||
|
||||
.error-404.not-found {
|
||||
width: 100%;
|
||||
padding: 18px 0 18px 0
|
||||
}
|
||||
|
||||
.error404 .page-title {
|
||||
font-size: 16px
|
||||
}
|
||||
|
||||
.slider-post-wrap {
|
||||
height: 360px
|
||||
}
|
||||
|
||||
.front-slider-block .post-info-wrap .entry-title {
|
||||
font-size: 20px
|
||||
}
|
||||
|
||||
#top-footer.footer-column-four .mt-footer-widget,
|
||||
#top-footer.footer-column-two .mt-footer-widget {
|
||||
width: 97%
|
||||
}
|
||||
}
|
BIN
assets/images/archive-block-grid.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/images/archive-classic.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
assets/images/archive-masonry.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
assets/images/boxed-layout.png
Normal file
After Width: | Height: | Size: 1011 B |
BIN
assets/images/default-layout.jpg
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
assets/images/default-sidebar.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/images/footer-1.png
Normal file
After Width: | Height: | Size: 1002 B |
BIN
assets/images/footer-2.png
Normal file
After Width: | Height: | Size: 1007 B |
BIN
assets/images/footer-3.png
Normal file
After Width: | Height: | Size: 1004 B |
BIN
assets/images/footer-4.png
Normal file
After Width: | Height: | Size: 1010 B |
BIN
assets/images/full-width.png
Normal file
After Width: | Height: | Size: 993 B |
BIN
assets/images/left-sidebar.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
assets/images/no-sidebar-center.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
assets/images/no-sidebar.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
assets/images/post-layout-1.jpg
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
assets/images/post-layout-2.jpg
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
assets/images/right-sidebar.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
42
assets/js/customizer.js
Normal file
@ -0,0 +1,42 @@
|
||||
/**
|
||||
* File customizer.js.
|
||||
*
|
||||
* Theme Customizer enhancements for a better user experience.
|
||||
*
|
||||
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
|
||||
*/
|
||||
|
||||
( function( $ ) {
|
||||
|
||||
// Site title and description.
|
||||
wp.customize( 'blogname', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( '.site-title a' ).text( to );
|
||||
} );
|
||||
} );
|
||||
wp.customize( 'blogdescription', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( '.site-description' ).text( to );
|
||||
} );
|
||||
} );
|
||||
|
||||
// Header text color.
|
||||
wp.customize( 'header_textcolor', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
if ( 'blank' === to ) {
|
||||
$( '.site-title, .site-description' ).css( {
|
||||
'clip': 'rect(1px, 1px, 1px, 1px)',
|
||||
'position': 'absolute'
|
||||
} );
|
||||
} else {
|
||||
$( '.site-title, .site-description' ).css( {
|
||||
'clip': 'auto',
|
||||
'position': 'relative'
|
||||
} );
|
||||
$( '.site-title a, .site-description' ).css( {
|
||||
'color': to
|
||||
} );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
} )( jQuery );
|
73
assets/js/mt-admin-scripts.js
Normal file
@ -0,0 +1,73 @@
|
||||
/**
|
||||
* Image up-loader functions
|
||||
*/
|
||||
var mtSelector;
|
||||
function upload_media_image(mtSelector){
|
||||
// ADD IMAGE LINK
|
||||
jQuery('body').on( 'click', mtSelector , function( event ){
|
||||
event.preventDefault();
|
||||
|
||||
var imgContainer = jQuery(this).closest('.attachment-media-view').find( '.thumbnail-image'),
|
||||
placeholder = jQuery(this).closest('.attachment-media-view').find( '.placeholder'),
|
||||
imgIdInput = jQuery(this).siblings('.upload-id');
|
||||
|
||||
// Create a new media frame
|
||||
frame = wp.media({
|
||||
title: 'Select or Upload Image',
|
||||
button: {
|
||||
text: 'Use Image'
|
||||
},
|
||||
multiple: false // Set to true to allow multiple files to be selected
|
||||
});
|
||||
|
||||
// When an image is selected in the media frame...
|
||||
frame.on( 'select', function() {
|
||||
|
||||
// Get media attachment details from the frame state
|
||||
var attachment = frame.state().get('selection').first().toJSON();
|
||||
|
||||
// Send the attachment URL to our custom image input field.
|
||||
imgContainer.html( '<img src="'+attachment.url+'" style="max-width:100%;"/>' );
|
||||
placeholder.addClass('hidden');
|
||||
imgIdInput.val( attachment.url ).trigger('change');
|
||||
});
|
||||
|
||||
// Finally, open the modal on click
|
||||
frame.open();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function delete_media_image(mtSelector){
|
||||
// DELETE IMAGE LINK
|
||||
jQuery('body').on( 'click', mtSelector, function( event ){
|
||||
|
||||
event.preventDefault();
|
||||
var imgContainer = jQuery(this).closest('.attachment-media-view').find( '.thumbnail-image'),
|
||||
placeholder = jQuery(this).closest('.attachment-media-view').find( '.placeholder'),
|
||||
imgIdInput = jQuery(this).siblings('.upload-id');
|
||||
|
||||
// Clear out the preview image
|
||||
imgContainer.find('img').remove();
|
||||
placeholder.removeClass('hidden');
|
||||
|
||||
// Delete the image id from the hidden input
|
||||
imgIdInput.val( '' ).trigger('change');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
jQuery(document).ready(function($){
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Radio Image control in metabox
|
||||
*/
|
||||
$( '.mt-meta-options-wrap .buttonset' ).buttonset();
|
||||
|
||||
/**
|
||||
* Image up-loader
|
||||
*/
|
||||
upload_media_image('.mt-upload-button');
|
||||
delete_media_image('.mt-delete-button');
|
||||
});
|
52
assets/js/mt-combine-scripts.js
Normal file
199
assets/js/mt-custom-scripts.js
Normal file
@ -0,0 +1,199 @@
|
||||
jQuery(document).ready(function($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Sophia After Dark Preloader
|
||||
*/
|
||||
if($('#preloader-background').length > 0) {
|
||||
setTimeout(function(){$('#preloader-background').hide();}, 600);
|
||||
}
|
||||
|
||||
var grid = document.querySelector(
|
||||
'.sophia-after-dark-content-masonry'
|
||||
),
|
||||
masonry;
|
||||
|
||||
if (
|
||||
grid &&
|
||||
typeof Masonry !== undefined &&
|
||||
typeof imagesLoaded !== undefined
|
||||
) {
|
||||
imagesLoaded( grid, function( instance ) {
|
||||
masonry = new Masonry( grid, {
|
||||
itemSelector: '.hentry'
|
||||
} );
|
||||
} );
|
||||
}
|
||||
|
||||
/**
|
||||
* Header Search script
|
||||
*/
|
||||
$('.mt-menu-search .mt-search-icon').click(function() {
|
||||
$('.mt-form-wrap').toggleClass('search-activate');
|
||||
$('.mt-form-wrap .search-field').focus();
|
||||
var element = document.querySelector( '.mt-form-wrap.search-activate' );
|
||||
if( element ) {
|
||||
$(document).on('keydown', function(e) {
|
||||
var focusable = element.querySelectorAll( 'input, button, [href], select, textarea, [tabindex]:not([tabindex="-1"])');
|
||||
var firstFocusable = focusable[0];
|
||||
var lastFocusable = focusable[focusable.length - 1];
|
||||
sophia_after_dark_focus_trap( firstFocusable, lastFocusable, e );
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Focus trap in popup.
|
||||
*/
|
||||
var KEYCODE_TAB = 9;
|
||||
function sophia_after_dark_focus_trap( firstFocusable, lastFocusable, e ) {
|
||||
if (e.key === 'Tab' || e.keyCode === KEYCODE_TAB) {
|
||||
if ( e.shiftKey ) /* shift + tab */ {
|
||||
if (document.activeElement === firstFocusable) {
|
||||
lastFocusable.focus();
|
||||
e.preventDefault();
|
||||
}
|
||||
} else /* tab */ {
|
||||
if ( document.activeElement === lastFocusable ) {
|
||||
firstFocusable.focus();
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('.mt-form-wrap .mt-form-close').click(function() {
|
||||
$('.mt-form-wrap').toggleClass('search-activate');
|
||||
$(this).parents('.mt-menu-search').find('.mt-search-icon a').focus();
|
||||
});
|
||||
|
||||
/**
|
||||
* Close popups on escape key.
|
||||
*/
|
||||
$( document ).on( 'keydown', function( event ) {
|
||||
if ( event.keyCode === 27 ) {
|
||||
event.preventDefault();
|
||||
//$( '.primary-menu-wrap' ).removeClass( 'menu-active' );
|
||||
$( '.mt-menu-search .mt-form-wrap' ).removeClass( 'search-activate' );
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Settings about WOW animation
|
||||
*/
|
||||
var wowOption = sophia_after_darkObject.wow_effect;
|
||||
if( wowOption === 'on' ) {
|
||||
new WOW().init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Settings about sticky menu
|
||||
*/
|
||||
var stickyOption = sophia_after_darkObject.menu_sticky;
|
||||
if( stickyOption === 'on' ) {
|
||||
var windowWidth = $( window ).width();
|
||||
if( windowWidth < 500 ) {
|
||||
var wpAdminBar = 0;
|
||||
} else {
|
||||
var wpAdminBar = $('#wpadminbar');
|
||||
}
|
||||
if ( wpAdminBar.length ) {
|
||||
$(".mt-social-menu-wrapper").sticky({topSpacing:wpAdminBar.height()});
|
||||
} else {
|
||||
$(".mt-social-menu-wrapper").sticky({topSpacing:0});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Scroll To Top
|
||||
*/
|
||||
$(window).scroll(function() {
|
||||
if ($(this).scrollTop() > 1000) {
|
||||
$('#mt-scrollup').fadeIn('slow');
|
||||
} else {
|
||||
$('#mt-scrollup').fadeOut('slow');
|
||||
}
|
||||
});
|
||||
$('#mt-scrollup').click(function() {
|
||||
$("html, body").animate({
|
||||
scrollTop: 0
|
||||
}, 600);
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* Slider scripts
|
||||
*/
|
||||
$('.front-slider').lightSlider({
|
||||
pager: false,
|
||||
auto: false,
|
||||
loop: true,
|
||||
item: 1,
|
||||
controls: true,
|
||||
slideMargin:0,
|
||||
rtl:true,
|
||||
nextHtml: '<span class="icon-prev"><i class="fa fa-angle-left"></i></span>',
|
||||
prevHtml: '<span class="icon-next"><i class="fa fa-angle-right"></i></span>',
|
||||
|
||||
onSliderLoad: function() {
|
||||
$('.front-slider').removeClass('cS-hidden');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Slider scripts
|
||||
*/
|
||||
$('.mt-gallery-slider').lightSlider({
|
||||
pager: false,
|
||||
auto: false,
|
||||
loop: true,
|
||||
item: 1,
|
||||
controls: true,
|
||||
});
|
||||
|
||||
/**
|
||||
* Responsive menu
|
||||
*/
|
||||
|
||||
$('.mt-social-menu-wrapper .menu-toggle').click(function(event) {
|
||||
$('.mt-social-menu-wrapper #site-navigation').toggleClass( 'isActive' ).slideToggle('slow');
|
||||
var element = document.querySelector( '.mt-header-menu-wrap' );
|
||||
if( element ) {
|
||||
$(document).on('keydown', function(e) {
|
||||
if( element.querySelectorAll( '.mt-social-menu-wrapper #site-navigation.isActive' ).length === 1 ) {
|
||||
var focusable = element.querySelectorAll( 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
||||
var firstFocusable = focusable[0];
|
||||
var lastFocusable = focusable[focusable.length - 1];
|
||||
sophia_after_dark_focus_trap( firstFocusable, lastFocusable, e );
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* responsive sub menu toggle
|
||||
*/
|
||||
$('<a href="javascript:void(0);" class="sub-toggle"><i class="fa fa-angle-right"></i></a>').insertAfter('#site-navigation .menu-item-has-children>a, #site-navigation .page_item_has_children>a');
|
||||
|
||||
$('#site-navigation .sub-toggle').click(function() {
|
||||
$(this).parent('.menu-item-has-children').children('ul.sub-menu').first().slideToggle('1000');
|
||||
jQuery(this).parent('.page_item_has_children').children('ul.children').first().slideToggle('1000');
|
||||
$(this).children('.fa-angle-right').first().toggleClass('fa-angle-down');
|
||||
});
|
||||
|
||||
/**
|
||||
* Slider Section dynamic height script
|
||||
*/
|
||||
$(window).on('load', function() {
|
||||
if ($(window).width() > 839) {
|
||||
$(".front-slider-wrapper").each(function() {
|
||||
var imageHeight = $(this).height();
|
||||
$(this).find(".slider-post-wrap").css('height', imageHeight);
|
||||
$(this).find(".front-slider ").css('height', imageHeight);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
222
assets/js/mt-customizer-controls.js
Normal file
@ -0,0 +1,222 @@
|
||||
( function( api ) {
|
||||
|
||||
api.sectionConstructor['mt-upsell'] = api.Section.extend( {
|
||||
|
||||
// No events for this type of section.
|
||||
attachEvents: function () {},
|
||||
|
||||
// Always make the section active.
|
||||
isContextuallyActive: function () {
|
||||
return true;
|
||||
}
|
||||
} );
|
||||
|
||||
} )( wp.customize );
|
||||
|
||||
wp.customize.controlConstructor['mt-toggle'] = wp.customize.Control.extend({
|
||||
ready: function(){
|
||||
'use strict';
|
||||
|
||||
var control = this,
|
||||
checkboxValue = control.setting._value;
|
||||
|
||||
// Toggle checkbox
|
||||
// Save the value
|
||||
this.container.on( 'change', 'input', function() {
|
||||
checkboxValue = ( jQuery( this ).is( ':checked' ) ) ? true : false;
|
||||
control.setting.set( checkboxValue );
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
jQuery(document).ready(function($) {
|
||||
|
||||
"use strict";
|
||||
/**
|
||||
* Function for repeater field
|
||||
*/
|
||||
function sophia_after_dark_refresh_repeater_values(){
|
||||
$(".mt-repeater-field-control-wrap").each(function(){
|
||||
|
||||
var values = [];
|
||||
var $this = $(this);
|
||||
|
||||
$this.find(".mt-repeater-field-control").each(function(){
|
||||
var valueToPush = {};
|
||||
|
||||
$(this).find('[data-name]').each(function(){
|
||||
|
||||
var dataName = $(this).attr('data-name');
|
||||
var dataValue = $(this).val();
|
||||
valueToPush[dataName] = dataValue;
|
||||
});
|
||||
|
||||
values.push(valueToPush);
|
||||
});
|
||||
|
||||
$this.next('.mt-repeater-collector').val(JSON.stringify(values)).trigger('change');
|
||||
});
|
||||
}
|
||||
|
||||
$('#customize-theme-controls').on('click','.mt-repeater-field-title',function(){
|
||||
$(this).next().slideToggle();
|
||||
$(this).closest('.mt-repeater-field-control').toggleClass('expanded');
|
||||
});
|
||||
|
||||
$('#customize-theme-controls').on('click', '.mt-repeater-field-close', function(){
|
||||
$(this).closest('.mt-repeater-fields').slideUp();;
|
||||
$(this).closest('.mt-repeater-field-control').toggleClass('expanded');
|
||||
});
|
||||
|
||||
$("body").on("click",'.mt-repeater-add-control-field', function(){
|
||||
|
||||
var fLimit = $(this).parent().find('.field-limit').val();
|
||||
var fCount = $(this).parent().find('.field-count').val();
|
||||
if( fCount < fLimit ) {
|
||||
fCount++;
|
||||
$(this).parent().find('.field-count').val(fCount);
|
||||
} else {
|
||||
$(this).before('<span class="mt-limit-msg"><em>Only '+fLimit+' repeater field will be permitted.</em></span>');
|
||||
return;
|
||||
}
|
||||
|
||||
var $this = $(this).parent();
|
||||
if(typeof $this != 'undefined') {
|
||||
|
||||
var field = $this.find(".mt-repeater-field-control:first").clone();
|
||||
if(typeof field != 'undefined'){
|
||||
|
||||
field.find("input[type='text'][data-name]").each(function(){
|
||||
var defaultValue = $(this).attr('data-default');
|
||||
$(this).val(defaultValue);
|
||||
});
|
||||
|
||||
field.find("textarea[data-name]").each(function(){
|
||||
var defaultValue = $(this).attr('data-default');
|
||||
$(this).val(defaultValue);
|
||||
});
|
||||
|
||||
field.find("select[data-name]").each(function(){
|
||||
var defaultValue = $(this).attr('data-default');
|
||||
$(this).val(defaultValue);
|
||||
});
|
||||
|
||||
field.find(".attachment-media-view").each(function(){
|
||||
var defaultValue = $(this).find('input[data-name]').attr('data-default');
|
||||
$(this).find('input[data-name]').val(defaultValue);
|
||||
if(defaultValue){
|
||||
$(this).find(".thumbnail-image").html('<img src="'+defaultValue+'"/>').prev('.placeholder').addClass('hidden');
|
||||
}else{
|
||||
$(this).find(".thumbnail-image").html('').prev('.placeholder').removeClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
field.find(".mt-repeater-icon-list").each(function(){
|
||||
var defaultValue = $(this).next('input[data-name]').attr('data-default');
|
||||
$(this).next('input[data-name]').val(defaultValue);
|
||||
$(this).prev('.mt-repeater-selected-icon').children('i').attr('class','').addClass(defaultValue);
|
||||
|
||||
$(this).find('li').each(function(){
|
||||
var icon_class = $(this).find('i').attr('class');
|
||||
if(defaultValue == icon_class ){
|
||||
$(this).addClass('icon-active');
|
||||
}else{
|
||||
$(this).removeClass('icon-active');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
field.find('.mt-repeater-fields').show();
|
||||
$this.find('.mt-repeater-field-control-wrap').append(field);
|
||||
field.addClass('expanded').find('.mt-repeater-fields').show();
|
||||
$('.accordion-section-content').animate({ scrollTop: $this.height() }, 1000);
|
||||
sophia_after_dark_refresh_repeater_values();
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#customize-theme-controls").on("click", ".mt-repeater-field-remove",function(){
|
||||
if( typeof $(this).parent() != 'undefined'){
|
||||
$(this).closest('.mt-repeater-field-control').slideUp('normal', function(){
|
||||
$(this).remove();
|
||||
sophia_after_dark_refresh_repeater_values();
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#customize-theme-controls").on('keyup change', '[data-name]',function(){
|
||||
sophia_after_dark_refresh_repeater_values();
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* Drag and drop to change order
|
||||
*/
|
||||
$(".mt-repeater-field-control-wrap").sortable({
|
||||
orientation: "vertical",
|
||||
update: function( event, ui ) {
|
||||
sophia_after_dark_refresh_repeater_values();
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Image upload
|
||||
*/
|
||||
var mtFrame;
|
||||
|
||||
//Add image
|
||||
$('.customize-control-mt-repeater').on( 'click', '.mt-upload-button', function( event ){
|
||||
event.preventDefault();
|
||||
|
||||
var imgContainer = $(this).closest('.mt-fields-wrap').find( '.thumbnail-image'),
|
||||
placeholder = $(this).closest('.mt-fields-wrap').find( '.placeholder'),
|
||||
imgIdInput = $(this).siblings('.upload-id');
|
||||
|
||||
mtFrame = wp.media({
|
||||
title: 'Select or Upload Image',
|
||||
button: {
|
||||
text: 'Use Image'
|
||||
},
|
||||
multiple: false // Set to true to allow multiple files to be selected
|
||||
});
|
||||
|
||||
mtFrame.on( 'select', function() {
|
||||
var attachment = frame.state().get('selection').first().toJSON();
|
||||
imgContainer.html( '<img src="'+attachment.url+'" style="max-width:100%;"/>' );
|
||||
placeholder.addClass('hidden');
|
||||
imgIdInput.val( attachment.url ).trigger('change');
|
||||
});
|
||||
|
||||
mtFrame.open();
|
||||
});
|
||||
|
||||
// DELETE IMAGE LINK
|
||||
$('.customize-control-mt-repeater').on( 'click', '.mt-delete-button', function( event ){
|
||||
event.preventDefault();
|
||||
var imgContainer = $(this).closest('.mt-fields-wrap').find( '.thumbnail-image'),
|
||||
placeholder = $(this).closest('.mt-fields-wrap').find( '.placeholder'),
|
||||
imgIdInput = $(this).siblings('.upload-id');
|
||||
imgContainer.find('img').remove();
|
||||
placeholder.removeClass('hidden');
|
||||
imgIdInput.val( '' ).trigger('change');
|
||||
});
|
||||
|
||||
/**
|
||||
* Repeater icon selector
|
||||
*/
|
||||
$('body').on('click', '.mt-repeater-icon-list li', function(){
|
||||
var icon_class = $(this).find('i').attr('class');
|
||||
$(this).addClass('icon-active').siblings().removeClass('icon-active');
|
||||
$(this).parent('.mt-repeater-icon-list').prev('.mt-repeater-selected-icon').children('i').attr('class','').addClass(icon_class);
|
||||
$(this).parent('.mt-repeater-icon-list').next('input').val(icon_class).trigger('change');
|
||||
sophia_after_dark_refresh_repeater_values();
|
||||
});
|
||||
|
||||
$('body').on('click', '.mt-repeater-selected-icon', function(){
|
||||
$(this).next().slideToggle();
|
||||
});
|
||||
});
|
82
assets/js/navigation.js
Normal file
@ -0,0 +1,82 @@
|
||||
/**
|
||||
* File navigation.js.
|
||||
*
|
||||
* Handles toggling the navigation menu for small screens and enables TAB key
|
||||
* navigation support for dropdown menus.
|
||||
*/
|
||||
( function() {
|
||||
var container, button, menu, links, i, len;
|
||||
|
||||
container = document.getElementById( 'site-navigation' );
|
||||
if ( ! container ) {
|
||||
return;
|
||||
}
|
||||
|
||||
menu = container.getElementsByTagName( 'ul' )[0];
|
||||
menu.setAttribute( 'aria-expanded', 'false' );
|
||||
if ( -1 === menu.className.indexOf( 'nav-menu' ) ) {
|
||||
menu.className += ' nav-menu';
|
||||
}
|
||||
|
||||
// Get all the link elements within the menu.
|
||||
links = menu.getElementsByTagName( 'a' );
|
||||
|
||||
// Each time a menu link is focused or blurred, toggle focus.
|
||||
for ( i = 0, len = links.length; i < len; i++ ) {
|
||||
links[i].addEventListener( 'focus', toggleFocus, true );
|
||||
links[i].addEventListener( 'blur', toggleFocus, true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets or removes .focus class on an element.
|
||||
*/
|
||||
function toggleFocus() {
|
||||
var self = this;
|
||||
|
||||
// Move up through the ancestors of the current link until we hit .nav-menu.
|
||||
while ( -1 === self.className.indexOf( 'nav-menu' ) ) {
|
||||
|
||||
// On li elements toggle the class .focus.
|
||||
if ( 'li' === self.tagName.toLowerCase() ) {
|
||||
if ( -1 !== self.className.indexOf( 'focus' ) ) {
|
||||
self.className = self.className.replace( ' focus', '' );
|
||||
} else {
|
||||
self.className += ' focus';
|
||||
}
|
||||
}
|
||||
|
||||
self = self.parentElement;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles `focus` class to allow submenu access on tablets.
|
||||
*/
|
||||
( function( container ) {
|
||||
var touchStartFn, i,
|
||||
parentLink = container.querySelectorAll( '.menu-item-has-children > a, .page_item_has_children > a' );
|
||||
|
||||
if ( 'ontouchstart' in window ) {
|
||||
touchStartFn = function( e ) {
|
||||
var menuItem = this.parentNode, i;
|
||||
|
||||
if ( ! menuItem.classList.contains( 'focus' ) ) {
|
||||
e.preventDefault();
|
||||
for ( i = 0; i < menuItem.parentNode.children.length; ++i ) {
|
||||
if ( menuItem === menuItem.parentNode.children[i] ) {
|
||||
continue;
|
||||
}
|
||||
menuItem.parentNode.children[i].classList.remove( 'focus' );
|
||||
}
|
||||
menuItem.classList.add( 'focus' );
|
||||
} else {
|
||||
menuItem.classList.remove( 'focus' );
|
||||
}
|
||||
};
|
||||
|
||||
for ( i = 0; i < parentLink.length; ++i ) {
|
||||
parentLink[i].addEventListener( 'touchstart', touchStartFn, false );
|
||||
}
|
||||
}
|
||||
}( container ) );
|
||||
} )();
|
31
assets/js/skip-link-focus-fix.js
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* File skip-link-focus-fix.js.
|
||||
*
|
||||
* Helps with accessibility for keyboard only users.
|
||||
*
|
||||
* Learn more: https://git.io/vWdr2
|
||||
*/
|
||||
( function() {
|
||||
var isIe = /(trident|msie)/i.test( navigator.userAgent );
|
||||
|
||||
if ( isIe && document.getElementById && window.addEventListener ) {
|
||||
window.addEventListener( 'hashchange', function() {
|
||||
var id = location.hash.substring( 1 ),
|
||||
element;
|
||||
|
||||
if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
element = document.getElementById( id );
|
||||
|
||||
if ( element ) {
|
||||
if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
|
||||
element.tabIndex = -1;
|
||||
}
|
||||
|
||||
element.focus();
|
||||
}
|
||||
}, false );
|
||||
}
|
||||
} )();
|
22
assets/library/animate/LICENSE
Normal file
@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Daniel Eden
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
3146
assets/library/animate/animate.css
vendored
Normal file
9
assets/library/animate/animate.min.css
vendored
Normal file
496
assets/library/imagesloaded/imagesloaded.pkgd.js
Normal file
@ -0,0 +1,496 @@
|
||||
/*!
|
||||
* imagesLoaded PACKAGED v4.1.4
|
||||
* JavaScript is all like "You images are done yet or what?"
|
||||
* MIT License
|
||||
*/
|
||||
|
||||
/**
|
||||
* EvEmitter v1.1.0
|
||||
* Lil' event emitter
|
||||
* MIT License
|
||||
*/
|
||||
|
||||
/* jshint unused: true, undef: true, strict: true */
|
||||
|
||||
( function( global, factory ) {
|
||||
// universal module definition
|
||||
/* jshint strict: false */ /* globals define, module, window */
|
||||
if ( typeof define == 'function' && define.amd ) {
|
||||
// AMD - RequireJS
|
||||
define( 'ev-emitter/ev-emitter',factory );
|
||||
} else if ( typeof module == 'object' && module.exports ) {
|
||||
// CommonJS - Browserify, Webpack
|
||||
module.exports = factory();
|
||||
} else {
|
||||
// Browser globals
|
||||
global.EvEmitter = factory();
|
||||
}
|
||||
|
||||
}( typeof window != 'undefined' ? window : this, function() {
|
||||
|
||||
|
||||
|
||||
function EvEmitter() {}
|
||||
|
||||
var proto = EvEmitter.prototype;
|
||||
|
||||
proto.on = function( eventName, listener ) {
|
||||
if ( !eventName || !listener ) {
|
||||
return;
|
||||
}
|
||||
// set events hash
|
||||
var events = this._events = this._events || {};
|
||||
// set listeners array
|
||||
var listeners = events[ eventName ] = events[ eventName ] || [];
|
||||
// only add once
|
||||
if ( listeners.indexOf( listener ) == -1 ) {
|
||||
listeners.push( listener );
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
proto.once = function( eventName, listener ) {
|
||||
if ( !eventName || !listener ) {
|
||||
return;
|
||||
}
|
||||
// add event
|
||||
this.on( eventName, listener );
|
||||
// set once flag
|
||||
// set onceEvents hash
|
||||
var onceEvents = this._onceEvents = this._onceEvents || {};
|
||||
// set onceListeners object
|
||||
var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};
|
||||
// set flag
|
||||
onceListeners[ listener ] = true;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
proto.off = function( eventName, listener ) {
|
||||
var listeners = this._events && this._events[ eventName ];
|
||||
if ( !listeners || !listeners.length ) {
|
||||
return;
|
||||
}
|
||||
var index = listeners.indexOf( listener );
|
||||
if ( index != -1 ) {
|
||||
listeners.splice( index, 1 );
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
proto.emitEvent = function( eventName, args ) {
|
||||
var listeners = this._events && this._events[ eventName ];
|
||||
if ( !listeners || !listeners.length ) {
|
||||
return;
|
||||
}
|
||||
// copy over to avoid interference if .off() in listener
|
||||
listeners = listeners.slice(0);
|
||||
args = args || [];
|
||||
// once stuff
|
||||
var onceListeners = this._onceEvents && this._onceEvents[ eventName ];
|
||||
|
||||
for ( var i=0; i < listeners.length; i++ ) {
|
||||
var listener = listeners[i]
|
||||
var isOnce = onceListeners && onceListeners[ listener ];
|
||||
if ( isOnce ) {
|
||||
// remove listener
|
||||
// remove before trigger to prevent recursion
|
||||
this.off( eventName, listener );
|
||||
// unset once flag
|
||||
delete onceListeners[ listener ];
|
||||
}
|
||||
// trigger listener
|
||||
listener.apply( this, args );
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
proto.allOff = function() {
|
||||
delete this._events;
|
||||
delete this._onceEvents;
|
||||
};
|
||||
|
||||
return EvEmitter;
|
||||
|
||||
}));
|
||||
|
||||
/*!
|
||||
* imagesLoaded v4.1.4
|
||||
* JavaScript is all like "You images are done yet or what?"
|
||||
* MIT License
|
||||
*/
|
||||
|
||||
( function( window, factory ) { 'use strict';
|
||||
// universal module definition
|
||||
|
||||
/*global define: false, module: false, require: false */
|
||||
|
||||
if ( typeof define == 'function' && define.amd ) {
|
||||
// AMD
|
||||
define( [
|
||||
'ev-emitter/ev-emitter'
|
||||
], function( EvEmitter ) {
|
||||
return factory( window, EvEmitter );
|
||||
});
|
||||
} else if ( typeof module == 'object' && module.exports ) {
|
||||
// CommonJS
|
||||
module.exports = factory(
|
||||
window,
|
||||
require('ev-emitter')
|
||||
);
|
||||
} else {
|
||||
// browser global
|
||||
window.imagesLoaded = factory(
|
||||
window,
|
||||
window.EvEmitter
|
||||
);
|
||||
}
|
||||
|
||||
})( typeof window !== 'undefined' ? window : this,
|
||||
|
||||
// -------------------------- factory -------------------------- //
|
||||
|
||||
function factory( window, EvEmitter ) {
|
||||
|
||||
|
||||
|
||||
var $ = window.jQuery;
|
||||
var console = window.console;
|
||||
|
||||
// -------------------------- helpers -------------------------- //
|
||||
|
||||
// extend objects
|
||||
function extend( a, b ) {
|
||||
for ( var prop in b ) {
|
||||
a[ prop ] = b[ prop ];
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
var arraySlice = Array.prototype.slice;
|
||||
|
||||
// turn element or nodeList into an array
|
||||
function makeArray( obj ) {
|
||||
if ( Array.isArray( obj ) ) {
|
||||
// use object if already an array
|
||||
return obj;
|
||||
}
|
||||
|
||||
var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
|
||||
if ( isArrayLike ) {
|
||||
// convert nodeList to array
|
||||
return arraySlice.call( obj );
|
||||
}
|
||||
|
||||
// array of single index
|
||||
return [ obj ];
|
||||
}
|
||||
|
||||
// -------------------------- imagesLoaded -------------------------- //
|
||||
|
||||
/**
|
||||
* @param {Array, Element, NodeList, String} elem
|
||||
* @param {Object or Function} options - if function, use as callback
|
||||
* @param {Function} onAlways - callback function
|
||||
*/
|
||||
function ImagesLoaded( elem, options, onAlways ) {
|
||||
// coerce ImagesLoaded() without new, to be new ImagesLoaded()
|
||||
if ( !( this instanceof ImagesLoaded ) ) {
|
||||
return new ImagesLoaded( elem, options, onAlways );
|
||||
}
|
||||
// use elem as selector string
|
||||
var queryElem = elem;
|
||||
if ( typeof elem == 'string' ) {
|
||||
queryElem = document.querySelectorAll( elem );
|
||||
}
|
||||
// bail if bad element
|
||||
if ( !queryElem ) {
|
||||
console.error( 'Bad element for imagesLoaded ' + ( queryElem || elem ) );
|
||||
return;
|
||||
}
|
||||
|
||||
this.elements = makeArray( queryElem );
|
||||
this.options = extend( {}, this.options );
|
||||
// shift arguments if no options set
|
||||
if ( typeof options == 'function' ) {
|
||||
onAlways = options;
|
||||
} else {
|
||||
extend( this.options, options );
|
||||
}
|
||||
|
||||
if ( onAlways ) {
|
||||
this.on( 'always', onAlways );
|
||||
}
|
||||
|
||||
this.getImages();
|
||||
|
||||
if ( $ ) {
|
||||
// add jQuery Deferred object
|
||||
this.jqDeferred = new $.Deferred();
|
||||
}
|
||||
|
||||
// HACK check async to allow time to bind listeners
|
||||
setTimeout( this.check.bind( this ) );
|
||||
}
|
||||
|
||||
ImagesLoaded.prototype = Object.create( EvEmitter.prototype );
|
||||
|
||||
ImagesLoaded.prototype.options = {};
|
||||
|
||||
ImagesLoaded.prototype.getImages = function() {
|
||||
this.images = [];
|
||||
|
||||
// filter & find items if we have an item selector
|
||||
this.elements.forEach( this.addElementImages, this );
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Node} element
|
||||
*/
|
||||
ImagesLoaded.prototype.addElementImages = function( elem ) {
|
||||
// filter siblings
|
||||
if ( elem.nodeName == 'IMG' ) {
|
||||
this.addImage( elem );
|
||||
}
|
||||
// get background image on element
|
||||
if ( this.options.background === true ) {
|
||||
this.addElementBackgroundImages( elem );
|
||||
}
|
||||
|
||||
// find children
|
||||
// no non-element nodes, #143
|
||||
var nodeType = elem.nodeType;
|
||||
if ( !nodeType || !elementNodeTypes[ nodeType ] ) {
|
||||
return;
|
||||
}
|
||||
var childImgs = elem.querySelectorAll('img');
|
||||
// concat childElems to filterFound array
|
||||
for ( var i=0; i < childImgs.length; i++ ) {
|
||||
var img = childImgs[i];
|
||||
this.addImage( img );
|
||||
}
|
||||
|
||||
// get child background images
|
||||
if ( typeof this.options.background == 'string' ) {
|
||||
var children = elem.querySelectorAll( this.options.background );
|
||||
for ( i=0; i < children.length; i++ ) {
|
||||
var child = children[i];
|
||||
this.addElementBackgroundImages( child );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var elementNodeTypes = {
|
||||
1: true,
|
||||
9: true,
|
||||
11: true
|
||||
};
|
||||
|
||||
ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) {
|
||||
var style = getComputedStyle( elem );
|
||||
if ( !style ) {
|
||||
// Firefox returns null if in a hidden iframe https://bugzil.la/548397
|
||||
return;
|
||||
}
|
||||
// get url inside url("...")
|
||||
var reURL = /url\((['"])?(.*?)\1\)/gi;
|
||||
var matches = reURL.exec( style.backgroundImage );
|
||||
while ( matches !== null ) {
|
||||
var url = matches && matches[2];
|
||||
if ( url ) {
|
||||
this.addBackground( url, elem );
|
||||
}
|
||||
matches = reURL.exec( style.backgroundImage );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Image} img
|
||||
*/
|
||||
ImagesLoaded.prototype.addImage = function( img ) {
|
||||
var loadingImage = new LoadingImage( img );
|
||||
this.images.push( loadingImage );
|
||||
};
|
||||
|
||||
ImagesLoaded.prototype.addBackground = function( url, elem ) {
|
||||
var background = new Background( url, elem );
|
||||
this.images.push( background );
|
||||
};
|
||||
|
||||
ImagesLoaded.prototype.check = function() {
|
||||
var _this = this;
|
||||
this.progressedCount = 0;
|
||||
this.hasAnyBroken = false;
|
||||
// complete if no images
|
||||
if ( !this.images.length ) {
|
||||
this.complete();
|
||||
return;
|
||||
}
|
||||
|
||||
function onProgress( image, elem, message ) {
|
||||
// HACK - Chrome triggers event before object properties have changed. #83
|
||||
setTimeout( function() {
|
||||
_this.progress( image, elem, message );
|
||||
});
|
||||
}
|
||||
|
||||
this.images.forEach( function( loadingImage ) {
|
||||
loadingImage.once( 'progress', onProgress );
|
||||
loadingImage.check();
|
||||
});
|
||||
};
|
||||
|
||||
ImagesLoaded.prototype.progress = function( image, elem, message ) {
|
||||
this.progressedCount++;
|
||||
this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;
|
||||
// progress event
|
||||
this.emitEvent( 'progress', [ this, image, elem ] );
|
||||
if ( this.jqDeferred && this.jqDeferred.notify ) {
|
||||
this.jqDeferred.notify( this, image );
|
||||
}
|
||||
// check if completed
|
||||
if ( this.progressedCount == this.images.length ) {
|
||||
this.complete();
|
||||
}
|
||||
|
||||
if ( this.options.debug && console ) {
|
||||
console.log( 'progress: ' + message, image, elem );
|
||||
}
|
||||
};
|
||||
|
||||
ImagesLoaded.prototype.complete = function() {
|
||||
var eventName = this.hasAnyBroken ? 'fail' : 'done';
|
||||
this.isComplete = true;
|
||||
this.emitEvent( eventName, [ this ] );
|
||||
this.emitEvent( 'always', [ this ] );
|
||||
if ( this.jqDeferred ) {
|
||||
var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';
|
||||
this.jqDeferred[ jqMethod ]( this );
|
||||
}
|
||||
};
|
||||
|
||||
// -------------------------- -------------------------- //
|
||||
|
||||
function LoadingImage( img ) {
|
||||
this.img = img;
|
||||
}
|
||||
|
||||
LoadingImage.prototype = Object.create( EvEmitter.prototype );
|
||||
|
||||
LoadingImage.prototype.check = function() {
|
||||
// If complete is true and browser supports natural sizes,
|
||||
// try to check for image status manually.
|
||||
var isComplete = this.getIsImageComplete();
|
||||
if ( isComplete ) {
|
||||
// report based on naturalWidth
|
||||
this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
|
||||
return;
|
||||
}
|
||||
|
||||
// If none of the checks above matched, simulate loading on detached element.
|
||||
this.proxyImage = new Image();
|
||||
this.proxyImage.addEventListener( 'load', this );
|
||||
this.proxyImage.addEventListener( 'error', this );
|
||||
// bind to image as well for Firefox. #191
|
||||
this.img.addEventListener( 'load', this );
|
||||
this.img.addEventListener( 'error', this );
|
||||
this.proxyImage.src = this.img.src;
|
||||
};
|
||||
|
||||
LoadingImage.prototype.getIsImageComplete = function() {
|
||||
// check for non-zero, non-undefined naturalWidth
|
||||
// fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671
|
||||
return this.img.complete && this.img.naturalWidth;
|
||||
};
|
||||
|
||||
LoadingImage.prototype.confirm = function( isLoaded, message ) {
|
||||
this.isLoaded = isLoaded;
|
||||
this.emitEvent( 'progress', [ this, this.img, message ] );
|
||||
};
|
||||
|
||||
// ----- events ----- //
|
||||
|
||||
// trigger specified handler for event type
|
||||
LoadingImage.prototype.handleEvent = function( event ) {
|
||||
var method = 'on' + event.type;
|
||||
if ( this[ method ] ) {
|
||||
this[ method ]( event );
|
||||
}
|
||||
};
|
||||
|
||||
LoadingImage.prototype.onload = function() {
|
||||
this.confirm( true, 'onload' );
|
||||
this.unbindEvents();
|
||||
};
|
||||
|
||||
LoadingImage.prototype.onerror = function() {
|
||||
this.confirm( false, 'onerror' );
|
||||
this.unbindEvents();
|
||||
};
|
||||
|
||||
LoadingImage.prototype.unbindEvents = function() {
|
||||
this.proxyImage.removeEventListener( 'load', this );
|
||||
this.proxyImage.removeEventListener( 'error', this );
|
||||
this.img.removeEventListener( 'load', this );
|
||||
this.img.removeEventListener( 'error', this );
|
||||
};
|
||||
|
||||
// -------------------------- Background -------------------------- //
|
||||
|
||||
function Background( url, element ) {
|
||||
this.url = url;
|
||||
this.element = element;
|
||||
this.img = new Image();
|
||||
}
|
||||
|
||||
// inherit LoadingImage prototype
|
||||
Background.prototype = Object.create( LoadingImage.prototype );
|
||||
|
||||
Background.prototype.check = function() {
|
||||
this.img.addEventListener( 'load', this );
|
||||
this.img.addEventListener( 'error', this );
|
||||
this.img.src = this.url;
|
||||
// check if image is already complete
|
||||
var isComplete = this.getIsImageComplete();
|
||||
if ( isComplete ) {
|
||||
this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
|
||||
this.unbindEvents();
|
||||
}
|
||||
};
|
||||
|
||||
Background.prototype.unbindEvents = function() {
|
||||
this.img.removeEventListener( 'load', this );
|
||||
this.img.removeEventListener( 'error', this );
|
||||
};
|
||||
|
||||
Background.prototype.confirm = function( isLoaded, message ) {
|
||||
this.isLoaded = isLoaded;
|
||||
this.emitEvent( 'progress', [ this, this.element, message ] );
|
||||
};
|
||||
|
||||
// -------------------------- jQuery -------------------------- //
|
||||
|
||||
ImagesLoaded.makeJQueryPlugin = function( jQuery ) {
|
||||
jQuery = jQuery || window.jQuery;
|
||||
if ( !jQuery ) {
|
||||
return;
|
||||
}
|
||||
// set local variable
|
||||
$ = jQuery;
|
||||
// $().imagesLoaded()
|
||||
$.fn.imagesLoaded = function( options, callback ) {
|
||||
var instance = new ImagesLoaded( this, options, callback );
|
||||
return instance.jqDeferred.promise( $(this) );
|
||||
};
|
||||
};
|
||||
// try making plugin
|
||||
ImagesLoaded.makeJQueryPlugin();
|
||||
|
||||
// -------------------------- -------------------------- //
|
||||
|
||||
return ImagesLoaded;
|
||||
|
||||
});
|
7
assets/library/imagesloaded/imagesloaded.pkgd.min.js
vendored
Normal file
395
assets/library/lightslider/css/lightslider.css
Normal file
@ -0,0 +1,395 @@
|
||||
/*! lightslider - v1.1.6 - 2016-10-25
|
||||
* https://github.com/sachinchoolur/lightslider
|
||||
* Copyright (c) 2016 Sachin N; Licensed MIT */
|
||||
/*! lightslider - v1.1.3 - 2015-04-14
|
||||
* https://github.com/sachinchoolur/lightslider
|
||||
* Copyright (c) 2015 Sachin N; Licensed MIT */
|
||||
/** /!!! core css Should not edit !!!/**/
|
||||
|
||||
.lSSlideOuter {
|
||||
overflow: hidden;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none
|
||||
}
|
||||
.lightSlider:before, .lightSlider:after {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
.lightSlider {
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
}
|
||||
.lSSlideWrapper {
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.lSSlideWrapper > .lightSlider:after {
|
||||
clear: both;
|
||||
}
|
||||
.lSSlideWrapper .lSSlide {
|
||||
-webkit-transform: translate(0px, 0px);
|
||||
-ms-transform: translate(0px, 0px);
|
||||
transform: translate(0px, 0px);
|
||||
-webkit-transition: all 1s;
|
||||
-webkit-transition-property: -webkit-transform,height;
|
||||
-moz-transition-property: -moz-transform,height;
|
||||
transition-property: transform,height;
|
||||
-webkit-transition-duration: inherit !important;
|
||||
transition-duration: inherit !important;
|
||||
-webkit-transition-timing-function: inherit !important;
|
||||
transition-timing-function: inherit !important;
|
||||
}
|
||||
.lSSlideWrapper .lSFade {
|
||||
position: relative;
|
||||
}
|
||||
.lSSlideWrapper .lSFade > * {
|
||||
position: absolute !important;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9;
|
||||
margin-right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.lSSlideWrapper.usingCss .lSFade > * {
|
||||
opacity: 0;
|
||||
-webkit-transition-delay: 0s;
|
||||
transition-delay: 0s;
|
||||
-webkit-transition-duration: inherit !important;
|
||||
transition-duration: inherit !important;
|
||||
-webkit-transition-property: opacity;
|
||||
transition-property: opacity;
|
||||
-webkit-transition-timing-function: inherit !important;
|
||||
transition-timing-function: inherit !important;
|
||||
}
|
||||
.lSSlideWrapper .lSFade > *.active {
|
||||
z-index: 10;
|
||||
}
|
||||
.lSSlideWrapper.usingCss .lSFade > *.active {
|
||||
opacity: 1;
|
||||
}
|
||||
/** /!!! End of core css Should not edit !!!/**/
|
||||
|
||||
/* Pager */
|
||||
.lSSlideOuter .lSPager.lSpg {
|
||||
margin: 10px 0 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
.lSSlideOuter .lSPager.lSpg > li {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
padding: 0 5px;
|
||||
}
|
||||
.lSSlideOuter .lSPager.lSpg > li a {
|
||||
background-color: #222222;
|
||||
border-radius: 30px;
|
||||
display: inline-block;
|
||||
height: 8px;
|
||||
overflow: hidden;
|
||||
text-indent: -999em;
|
||||
width: 8px;
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
-webkit-transition: all 0.5s linear 0s;
|
||||
transition: all 0.5s linear 0s;
|
||||
}
|
||||
.lSSlideOuter .lSPager.lSpg > li:hover a, .lSSlideOuter .lSPager.lSpg > li.active a {
|
||||
background-color: #428bca;
|
||||
}
|
||||
.lSSlideOuter .media {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.lSSlideOuter .media.active {
|
||||
opacity: 1;
|
||||
}
|
||||
/* End of pager */
|
||||
|
||||
/** Gallery */
|
||||
.lSSlideOuter .lSPager.lSGallery {
|
||||
list-style: none outside none;
|
||||
padding-left: 0;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
transform: translate3d(0px, 0px, 0px);
|
||||
-moz-transform: translate3d(0px, 0px, 0px);
|
||||
-ms-transform: translate3d(0px, 0px, 0px);
|
||||
-webkit-transform: translate3d(0px, 0px, 0px);
|
||||
-o-transform: translate3d(0px, 0px, 0px);
|
||||
-webkit-transition-property: -webkit-transform;
|
||||
-moz-transition-property: -moz-transform;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.lSSlideOuter .lSPager.lSGallery li {
|
||||
overflow: hidden;
|
||||
-webkit-transition: border-radius 0.12s linear 0s 0.35s linear 0s;
|
||||
transition: border-radius 0.12s linear 0s 0.35s linear 0s;
|
||||
}
|
||||
.lSSlideOuter .lSPager.lSGallery li.active, .lSSlideOuter .lSPager.lSGallery li:hover {
|
||||
border-radius: 5px;
|
||||
}
|
||||
.lSSlideOuter .lSPager.lSGallery img {
|
||||
display: block;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
.lSSlideOuter .lSPager.lSGallery:before, .lSSlideOuter .lSPager.lSGallery:after {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
.lSSlideOuter .lSPager.lSGallery:after {
|
||||
clear: both;
|
||||
}
|
||||
/* End of Gallery*/
|
||||
|
||||
/* slider actions */
|
||||
.lSAction > a {
|
||||
width: 32px;
|
||||
display: block;
|
||||
top: 50%;
|
||||
height: 32px;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
background-image: url('../img/controls.png');
|
||||
z-index: 99;
|
||||
margin-top: -16px;
|
||||
opacity: 0.5;
|
||||
-webkit-transition: opacity 0.35s linear 0s;
|
||||
transition: opacity 0.35s linear 0s;
|
||||
}
|
||||
.lSAction > a:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
.lSAction > .lSPrev {
|
||||
background-position: 0 0;
|
||||
left: 10px;
|
||||
}
|
||||
.lSAction > .lSNext {
|
||||
background-position: -32px 0;
|
||||
right: 10px;
|
||||
}
|
||||
.lSAction > a.disabled {
|
||||
pointer-events: none;
|
||||
}
|
||||
.cS-hidden {
|
||||
height: 1px;
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
/* vertical */
|
||||
.lSSlideOuter.vertical {
|
||||
position: relative;
|
||||
}
|
||||
.lSSlideOuter.vertical.noPager {
|
||||
padding-right: 0px !important;
|
||||
}
|
||||
.lSSlideOuter.vertical .lSGallery {
|
||||
position: absolute !important;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
.lSSlideOuter.vertical .lightSlider > * {
|
||||
width: 100% !important;
|
||||
max-width: none !important;
|
||||
}
|
||||
|
||||
/* vertical controlls */
|
||||
.lSSlideOuter.vertical .lSAction > a {
|
||||
left: 50%;
|
||||
margin-left: -14px;
|
||||
margin-top: 0;
|
||||
}
|
||||
.lSSlideOuter.vertical .lSAction > .lSNext {
|
||||
background-position: 31px -31px;
|
||||
bottom: 10px;
|
||||
top: auto;
|
||||
}
|
||||
.lSSlideOuter.vertical .lSAction > .lSPrev {
|
||||
background-position: 0 -31px;
|
||||
bottom: auto;
|
||||
top: 10px;
|
||||
}
|
||||
/* vertical */
|
||||
|
||||
|
||||
/* Rtl */
|
||||
.lSSlideOuter.lSrtl {
|
||||
direction: rtl;
|
||||
}
|
||||
.lSSlideOuter .lightSlider, .lSSlideOuter .lSPager {
|
||||
padding-left: 0;
|
||||
list-style: none outside none;
|
||||
}
|
||||
.lSSlideOuter.lSrtl .lightSlider, .lSSlideOuter.lSrtl .lSPager {
|
||||
padding-right: 0;
|
||||
}
|
||||
.lSSlideOuter .lightSlider > *, .lSSlideOuter .lSGallery li {
|
||||
float: left;
|
||||
}
|
||||
.lSSlideOuter.lSrtl .lightSlider > *, .lSSlideOuter.lSrtl .lSGallery li {
|
||||
float: right !important;
|
||||
}
|
||||
/* Rtl */
|
||||
|
||||
@-webkit-keyframes rightEnd {
|
||||
0% {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
left: -15px;
|
||||
}
|
||||
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@keyframes rightEnd {
|
||||
0% {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
left: -15px;
|
||||
}
|
||||
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes topEnd {
|
||||
0% {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
top: -15px;
|
||||
}
|
||||
|
||||
100% {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
@keyframes topEnd {
|
||||
0% {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
top: -15px;
|
||||
}
|
||||
|
||||
100% {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes leftEnd {
|
||||
0% {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
left: 15px;
|
||||
}
|
||||
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@keyframes leftEnd {
|
||||
0% {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
left: 15px;
|
||||
}
|
||||
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes bottomEnd {
|
||||
0% {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
bottom: -15px;
|
||||
}
|
||||
|
||||
100% {
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
@keyframes bottomEnd {
|
||||
0% {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
bottom: -15px;
|
||||
}
|
||||
|
||||
100% {
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
.lSSlideOuter .rightEnd {
|
||||
-webkit-animation: rightEnd 0.3s;
|
||||
animation: rightEnd 0.3s;
|
||||
position: relative;
|
||||
}
|
||||
.lSSlideOuter .leftEnd {
|
||||
-webkit-animation: leftEnd 0.3s;
|
||||
animation: leftEnd 0.3s;
|
||||
position: relative;
|
||||
}
|
||||
.lSSlideOuter.vertical .rightEnd {
|
||||
-webkit-animation: topEnd 0.3s;
|
||||
animation: topEnd 0.3s;
|
||||
position: relative;
|
||||
}
|
||||
.lSSlideOuter.vertical .leftEnd {
|
||||
-webkit-animation: bottomEnd 0.3s;
|
||||
animation: bottomEnd 0.3s;
|
||||
position: relative;
|
||||
}
|
||||
.lSSlideOuter.lSrtl .rightEnd {
|
||||
-webkit-animation: leftEnd 0.3s;
|
||||
animation: leftEnd 0.3s;
|
||||
position: relative;
|
||||
}
|
||||
.lSSlideOuter.lSrtl .leftEnd {
|
||||
-webkit-animation: rightEnd 0.3s;
|
||||
animation: rightEnd 0.3s;
|
||||
position: relative;
|
||||
}
|
||||
/*/ GRab cursor */
|
||||
.lightSlider.lsGrab > * {
|
||||
cursor: -webkit-grab;
|
||||
cursor: -moz-grab;
|
||||
cursor: -o-grab;
|
||||
cursor: -ms-grab;
|
||||
cursor: grab;
|
||||
}
|
||||
.lightSlider.lsGrabbing > * {
|
||||
cursor: move;
|
||||
cursor: -webkit-grabbing;
|
||||
cursor: -moz-grabbing;
|
||||
cursor: -o-grabbing;
|
||||
cursor: -ms-grabbing;
|
||||
cursor: grabbing;
|
||||
}
|
3
assets/library/lightslider/css/lightslider.min.css
vendored
Normal file
BIN
assets/library/lightslider/img/controls.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
1143
assets/library/lightslider/js/lightslider.js
Normal file
4
assets/library/lightslider/js/lightslider.min.js
vendored
Normal file
2502
assets/library/masonry/masonry.pkgd.js
Normal file
9
assets/library/masonry/masonry.pkgd.min.js
vendored
Normal file
223
assets/library/sticky/jquery.sticky.js
Normal file
@ -0,0 +1,223 @@
|
||||
/**
|
||||
* Sticky Plugin v1.0.2 for jQuery
|
||||
* =======================================
|
||||
*
|
||||
* Author: Anthony Garand
|
||||
*
|
||||
* Improvements by German M. Bravo (Kronuz) and Ruud Kamphuis (ruudk)
|
||||
* Improvements by Leonardo C. Daronco (daronco)
|
||||
* Created: 2/14/2011
|
||||
* Date: 16/04/2015
|
||||
* Website: http://labs.anthonygarand.com/sticky
|
||||
*
|
||||
* Description: Makes an element on the page stick on the screen as you scroll
|
||||
* It will only set the 'top' and 'position' of your element, you
|
||||
* might need to adjust the width in some cases.
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
var slice = Array.prototype.slice; // save ref to original slice()
|
||||
var splice = Array.prototype.splice; // save ref to original slice()
|
||||
|
||||
var defaults = {
|
||||
topSpacing: 0,
|
||||
bottomSpacing: 0,
|
||||
className: 'is-sticky',
|
||||
wrapperClassName: 'sticky-wrapper',
|
||||
center: false,
|
||||
getWidthFrom: '',
|
||||
widthFromWrapper: true, // works only when .getWidthFrom is empty
|
||||
responsiveWidth: false
|
||||
},
|
||||
$window = $(window),
|
||||
$document = $(document),
|
||||
sticked = [],
|
||||
windowHeight = $window.height(),
|
||||
scroller = function() {
|
||||
var scrollTop = $window.scrollTop(),
|
||||
documentHeight = $document.height(),
|
||||
dwh = documentHeight - windowHeight,
|
||||
extra = (scrollTop > dwh) ? dwh - scrollTop : 0;
|
||||
|
||||
for (var i = 0; i < sticked.length; i++) {
|
||||
var s = sticked[i],
|
||||
elementTop = s.stickyWrapper.offset().top,
|
||||
etse = elementTop - s.topSpacing - extra;
|
||||
|
||||
if (scrollTop <= etse) {
|
||||
if (s.currentTop !== null) {
|
||||
s.stickyElement
|
||||
.css({
|
||||
'width': '',
|
||||
'position': '',
|
||||
'top': ''
|
||||
});
|
||||
s.stickyElement.parent().removeClass(s.className);
|
||||
s.stickyElement.trigger('sticky-end', [s]);
|
||||
s.currentTop = null;
|
||||
}
|
||||
}
|
||||
else {
|
||||
var newTop = documentHeight - s.stickyElement.outerHeight()
|
||||
- s.topSpacing - s.bottomSpacing - scrollTop - extra;
|
||||
if (newTop < 0) {
|
||||
newTop = newTop + s.topSpacing;
|
||||
} else {
|
||||
newTop = s.topSpacing;
|
||||
}
|
||||
if (s.currentTop != newTop) {
|
||||
var newWidth;
|
||||
if ( s.getWidthFrom ) {
|
||||
newWidth = $(s.getWidthFrom).width() || null;
|
||||
}
|
||||
else if(s.widthFromWrapper) {
|
||||
newWidth = s.stickyWrapper.width();
|
||||
}
|
||||
if ( newWidth == null ) {
|
||||
newWidth = s.stickyElement.width();
|
||||
}
|
||||
s.stickyElement
|
||||
.css('width', newWidth)
|
||||
.css('position', 'fixed')
|
||||
.css('top', newTop);
|
||||
|
||||
s.stickyElement.parent().addClass(s.className);
|
||||
|
||||
if (s.currentTop === null) {
|
||||
s.stickyElement.trigger('sticky-start', [s]);
|
||||
} else {
|
||||
// sticky is started but it have to be repositioned
|
||||
s.stickyElement.trigger('sticky-update', [s]);
|
||||
}
|
||||
|
||||
if (s.currentTop === s.topSpacing && s.currentTop > newTop || s.currentTop === null && newTop < s.topSpacing) {
|
||||
// just reached bottom || just started to stick but bottom is already reached
|
||||
s.stickyElement.trigger('sticky-bottom-reached', [s]);
|
||||
} else if(s.currentTop !== null && newTop === s.topSpacing && s.currentTop < newTop) {
|
||||
// sticky is started && sticked at topSpacing && overflowing from top just finished
|
||||
s.stickyElement.trigger('sticky-bottom-unreached', [s]);
|
||||
}
|
||||
|
||||
s.currentTop = newTop;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
resizer = function() {
|
||||
windowHeight = $window.height();
|
||||
|
||||
for (var i = 0; i < sticked.length; i++) {
|
||||
var s = sticked[i];
|
||||
var newWidth = null;
|
||||
if ( s.getWidthFrom ) {
|
||||
if ( s.responsiveWidth === true ) {
|
||||
newWidth = $(s.getWidthFrom).width();
|
||||
}
|
||||
}
|
||||
else if(s.widthFromWrapper) {
|
||||
newWidth = s.stickyWrapper.width();
|
||||
}
|
||||
if ( newWidth != null ) {
|
||||
s.stickyElement.css('width', newWidth);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods = {
|
||||
init: function(options) {
|
||||
var o = $.extend({}, defaults, options);
|
||||
return this.each(function() {
|
||||
var stickyElement = $(this);
|
||||
|
||||
var stickyId = stickyElement.attr('id');
|
||||
var stickyHeight = stickyElement.outerHeight();
|
||||
var wrapperId = stickyId ? stickyId + '-' + defaults.wrapperClassName : defaults.wrapperClassName
|
||||
var wrapper = $('<div></div>')
|
||||
.attr('id', wrapperId)
|
||||
.addClass(o.wrapperClassName);
|
||||
|
||||
stickyElement.wrapAll(wrapper);
|
||||
|
||||
var stickyWrapper = stickyElement.parent();
|
||||
|
||||
if (o.center) {
|
||||
stickyWrapper.css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"});
|
||||
}
|
||||
|
||||
if (stickyElement.css("float") == "right") {
|
||||
stickyElement.css({"float":"none"}).parent().css({"float":"right"});
|
||||
}
|
||||
|
||||
stickyWrapper.css('height', stickyHeight);
|
||||
|
||||
o.stickyElement = stickyElement;
|
||||
o.stickyWrapper = stickyWrapper;
|
||||
o.currentTop = null;
|
||||
|
||||
sticked.push(o);
|
||||
});
|
||||
},
|
||||
update: scroller,
|
||||
unstick: function(options) {
|
||||
return this.each(function() {
|
||||
var that = this;
|
||||
var unstickyElement = $(that);
|
||||
|
||||
var removeIdx = -1;
|
||||
var i = sticked.length;
|
||||
while ( i-- > 0 )
|
||||
{
|
||||
if (sticked[i].stickyElement.get(0) === that)
|
||||
{
|
||||
splice.call(sticked,i,1);
|
||||
removeIdx = i;
|
||||
}
|
||||
}
|
||||
if(removeIdx != -1)
|
||||
{
|
||||
unstickyElement.unwrap();
|
||||
unstickyElement
|
||||
.css({
|
||||
'width': '',
|
||||
'position': '',
|
||||
'top': '',
|
||||
'float': ''
|
||||
})
|
||||
;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// should be more efficient than using $window.scroll(scroller) and $window.resize(resizer):
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener('scroll', scroller, false);
|
||||
window.addEventListener('resize', resizer, false);
|
||||
} else if (window.attachEvent) {
|
||||
window.attachEvent('onscroll', scroller);
|
||||
window.attachEvent('onresize', resizer);
|
||||
}
|
||||
|
||||
$.fn.sticky = function(method) {
|
||||
if (methods[method]) {
|
||||
return methods[method].apply(this, slice.call(arguments, 1));
|
||||
} else if (typeof method === 'object' || !method ) {
|
||||
return methods.init.apply( this, arguments );
|
||||
} else {
|
||||
$.error('Method ' + method + ' does not exist on jQuery.sticky');
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.unstick = function(method) {
|
||||
if (methods[method]) {
|
||||
return methods[method].apply(this, slice.call(arguments, 1));
|
||||
} else if (typeof method === 'object' || !method ) {
|
||||
return methods.unstick.apply( this, arguments );
|
||||
} else {
|
||||
$.error('Method ' + method + ' does not exist on jQuery.sticky');
|
||||
}
|
||||
|
||||
};
|
||||
$(function() {
|
||||
setTimeout(scroller, 0);
|
||||
});
|
||||
})(jQuery);
|
18
assets/library/sticky/jquery.sticky.min.js
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Sticky Plugin v1.0.2 for jQuery
|
||||
=======================================
|
||||
*
|
||||
* Author: Anthony Garand
|
||||
*
|
||||
* Improvements by German M. Bravo (Kronuz) and Ruud Kamphuis (ruudk)
|
||||
* Improvements by Leonardo C. Daronco (daronco)
|
||||
* Created: 2/14/2011
|
||||
* Date: 16/04/2015
|
||||
* Website: http://labs.anthonygarand.com/sticky
|
||||
*
|
||||
* Description: Makes an element on the page stick on the screen as you scroll
|
||||
* It will only set the 'top' and 'position' of your element, you
|
||||
* might need to adjust the width in some cases.
|
||||
*/
|
||||
|
||||
!function(t){var e=Array.prototype.slice,i=Array.prototype.splice,r={topSpacing:0,bottomSpacing:0,className:"is-sticky",wrapperClassName:"sticky-wrapper",center:!1,getWidthFrom:"",widthFromWrapper:!0,responsiveWidth:!1},n=t(window),s=t(document),o=[],c=n.height(),a=function(){for(var e=n.scrollTop(),i=s.height(),r=i-c,a=e>r?r-e:0,p=0;p<o.length;p++){var l=o[p];if(e<=l.stickyWrapper.offset().top-l.topSpacing-a)null!==l.currentTop&&(l.stickyElement.css({width:"",position:"",top:""}),l.stickyElement.parent().removeClass(l.className),l.stickyElement.trigger("sticky-end",[l]),l.currentTop=null);else{var d,h=i-l.stickyElement.outerHeight()-l.topSpacing-l.bottomSpacing-e-a;if(h<0?h+=l.topSpacing:h=l.topSpacing,l.currentTop!=h)l.getWidthFrom?d=t(l.getWidthFrom).width()||null:l.widthFromWrapper&&(d=l.stickyWrapper.width()),null==d&&(d=l.stickyElement.width()),l.stickyElement.css("width",d).css("position","fixed").css("top",h),l.stickyElement.parent().addClass(l.className),null===l.currentTop?l.stickyElement.trigger("sticky-start",[l]):l.stickyElement.trigger("sticky-update",[l]),l.currentTop===l.topSpacing&&l.currentTop>h||null===l.currentTop&&h<l.topSpacing?l.stickyElement.trigger("sticky-bottom-reached",[l]):null!==l.currentTop&&h===l.topSpacing&&l.currentTop<h&&l.stickyElement.trigger("sticky-bottom-unreached",[l]),l.currentTop=h}}},p=function(){c=n.height();for(var e=0;e<o.length;e++){var i=o[e],r=null;i.getWidthFrom?!0===i.responsiveWidth&&(r=t(i.getWidthFrom).width()):i.widthFromWrapper&&(r=i.stickyWrapper.width()),null!=r&&i.stickyElement.css("width",r)}},l={init:function(e){var i=t.extend({},r,e);return this.each(function(){var e=t(this),n=e.attr("id"),s=e.outerHeight(),c=n?n+"-"+r.wrapperClassName:r.wrapperClassName,a=t("<div></div>").attr("id",c).addClass(i.wrapperClassName);e.wrapAll(a);var p=e.parent();i.center&&p.css({width:e.outerWidth(),marginLeft:"auto",marginRight:"auto"}),"right"==e.css("float")&&e.css({float:"none"}).parent().css({float:"right"}),p.css("height",s),i.stickyElement=e,i.stickyWrapper=p,i.currentTop=null,o.push(i)})},update:a,unstick:function(e){return this.each(function(){for(var e=t(this),r=-1,n=o.length;n-- >0;)o[n].stickyElement.get(0)===this&&(i.call(o,n,1),r=n);-1!=r&&(e.unwrap(),e.css({width:"",position:"",top:"",float:""}))})}};window.addEventListener?(window.addEventListener("scroll",a,!1),window.addEventListener("resize",p,!1)):window.attachEvent&&(window.attachEvent("onscroll",a),window.attachEvent("onresize",p)),t.fn.sticky=function(i){return l[i]?l[i].apply(this,e.call(arguments,1)):"object"!=typeof i&&i?void t.error("Method "+i+" does not exist on jQuery.sticky"):l.init.apply(this,arguments)},t.fn.unstick=function(i){return l[i]?l[i].apply(this,e.call(arguments,1)):"object"!=typeof i&&i?void t.error("Method "+i+" does not exist on jQuery.sticky"):l.unstick.apply(this,arguments)},t(function(){setTimeout(a,0)})}(jQuery);
|
513
assets/library/wow/wow.js
Normal file
@ -0,0 +1,513 @@
|
||||
(function() {
|
||||
var MutationObserver, Util, WeakMap, getComputedStyle, getComputedStyleRX,
|
||||
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
||||
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
||||
|
||||
Util = (function() {
|
||||
function Util() {}
|
||||
|
||||
Util.prototype.extend = function(custom, defaults) {
|
||||
var key, value;
|
||||
for (key in defaults) {
|
||||
value = defaults[key];
|
||||
if (custom[key] == null) {
|
||||
custom[key] = value;
|
||||
}
|
||||
}
|
||||
return custom;
|
||||
};
|
||||
|
||||
Util.prototype.isMobile = function(agent) {
|
||||
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(agent);
|
||||
};
|
||||
|
||||
Util.prototype.createEvent = function(event, bubble, cancel, detail) {
|
||||
var customEvent;
|
||||
if (bubble == null) {
|
||||
bubble = false;
|
||||
}
|
||||
if (cancel == null) {
|
||||
cancel = false;
|
||||
}
|
||||
if (detail == null) {
|
||||
detail = null;
|
||||
}
|
||||
if (document.createEvent != null) {
|
||||
customEvent = document.createEvent('CustomEvent');
|
||||
customEvent.initCustomEvent(event, bubble, cancel, detail);
|
||||
} else if (document.createEventObject != null) {
|
||||
customEvent = document.createEventObject();
|
||||
customEvent.eventType = event;
|
||||
} else {
|
||||
customEvent.eventName = event;
|
||||
}
|
||||
return customEvent;
|
||||
};
|
||||
|
||||
Util.prototype.emitEvent = function(elem, event) {
|
||||
if (elem.dispatchEvent != null) {
|
||||
return elem.dispatchEvent(event);
|
||||
} else if (event in (elem != null)) {
|
||||
return elem[event]();
|
||||
} else if (("on" + event) in (elem != null)) {
|
||||
return elem["on" + event]();
|
||||
}
|
||||
};
|
||||
|
||||
Util.prototype.addEvent = function(elem, event, fn) {
|
||||
if (elem.addEventListener != null) {
|
||||
return elem.addEventListener(event, fn, false);
|
||||
} else if (elem.attachEvent != null) {
|
||||
return elem.attachEvent("on" + event, fn);
|
||||
} else {
|
||||
return elem[event] = fn;
|
||||
}
|
||||
};
|
||||
|
||||
Util.prototype.removeEvent = function(elem, event, fn) {
|
||||
if (elem.removeEventListener != null) {
|
||||
return elem.removeEventListener(event, fn, false);
|
||||
} else if (elem.detachEvent != null) {
|
||||
return elem.detachEvent("on" + event, fn);
|
||||
} else {
|
||||
return delete elem[event];
|
||||
}
|
||||
};
|
||||
|
||||
Util.prototype.innerHeight = function() {
|
||||
if ('innerHeight' in window) {
|
||||
return window.innerHeight;
|
||||
} else {
|
||||
return document.documentElement.clientHeight;
|
||||
}
|
||||
};
|
||||
|
||||
return Util;
|
||||
|
||||
})();
|
||||
|
||||
WeakMap = this.WeakMap || this.MozWeakMap || (WeakMap = (function() {
|
||||
function WeakMap() {
|
||||
this.keys = [];
|
||||
this.values = [];
|
||||
}
|
||||
|
||||
WeakMap.prototype.get = function(key) {
|
||||
var i, item, j, len, ref;
|
||||
ref = this.keys;
|
||||
for (i = j = 0, len = ref.length; j < len; i = ++j) {
|
||||
item = ref[i];
|
||||
if (item === key) {
|
||||
return this.values[i];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
WeakMap.prototype.set = function(key, value) {
|
||||
var i, item, j, len, ref;
|
||||
ref = this.keys;
|
||||
for (i = j = 0, len = ref.length; j < len; i = ++j) {
|
||||
item = ref[i];
|
||||
if (item === key) {
|
||||
this.values[i] = value;
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.keys.push(key);
|
||||
return this.values.push(value);
|
||||
};
|
||||
|
||||
return WeakMap;
|
||||
|
||||
})());
|
||||
|
||||
MutationObserver = this.MutationObserver || this.WebkitMutationObserver || this.MozMutationObserver || (MutationObserver = (function() {
|
||||
function MutationObserver() {
|
||||
if (typeof console !== "undefined" && console !== null) {
|
||||
console.warn('MutationObserver is not supported by your browser.');
|
||||
}
|
||||
if (typeof console !== "undefined" && console !== null) {
|
||||
console.warn('WOW.js cannot detect dom mutations, please call .sync() after loading new content.');
|
||||
}
|
||||
}
|
||||
|
||||
MutationObserver.notSupported = true;
|
||||
|
||||
MutationObserver.prototype.observe = function() {};
|
||||
|
||||
return MutationObserver;
|
||||
|
||||
})());
|
||||
|
||||
getComputedStyle = this.getComputedStyle || function(el, pseudo) {
|
||||
this.getPropertyValue = function(prop) {
|
||||
var ref;
|
||||
if (prop === 'float') {
|
||||
prop = 'styleFloat';
|
||||
}
|
||||
if (getComputedStyleRX.test(prop)) {
|
||||
prop.replace(getComputedStyleRX, function(_, _char) {
|
||||
return _char.toUpperCase();
|
||||
});
|
||||
}
|
||||
return ((ref = el.currentStyle) != null ? ref[prop] : void 0) || null;
|
||||
};
|
||||
return this;
|
||||
};
|
||||
|
||||
getComputedStyleRX = /(\-([a-z]){1})/g;
|
||||
|
||||
this.WOW = (function() {
|
||||
WOW.prototype.defaults = {
|
||||
boxClass: 'wow',
|
||||
animateClass: 'animated',
|
||||
offset: 0,
|
||||
mobile: true,
|
||||
live: true,
|
||||
callback: null,
|
||||
scrollContainer: null
|
||||
};
|
||||
|
||||
function WOW(options) {
|
||||
if (options == null) {
|
||||
options = {};
|
||||
}
|
||||
this.scrollCallback = bind(this.scrollCallback, this);
|
||||
this.scrollHandler = bind(this.scrollHandler, this);
|
||||
this.resetAnimation = bind(this.resetAnimation, this);
|
||||
this.start = bind(this.start, this);
|
||||
this.scrolled = true;
|
||||
this.config = this.util().extend(options, this.defaults);
|
||||
if (options.scrollContainer != null) {
|
||||
this.config.scrollContainer = document.querySelector(options.scrollContainer);
|
||||
}
|
||||
this.animationNameCache = new WeakMap();
|
||||
this.wowEvent = this.util().createEvent(this.config.boxClass);
|
||||
}
|
||||
|
||||
WOW.prototype.init = function() {
|
||||
var ref;
|
||||
this.element = window.document.documentElement;
|
||||
if ((ref = document.readyState) === "interactive" || ref === "complete") {
|
||||
this.start();
|
||||
} else {
|
||||
this.util().addEvent(document, 'DOMContentLoaded', this.start);
|
||||
}
|
||||
return this.finished = [];
|
||||
};
|
||||
|
||||
WOW.prototype.start = function() {
|
||||
var box, j, len, ref;
|
||||
this.stopped = false;
|
||||
this.boxes = (function() {
|
||||
var j, len, ref, results;
|
||||
ref = this.element.querySelectorAll("." + this.config.boxClass);
|
||||
results = [];
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
box = ref[j];
|
||||
results.push(box);
|
||||
}
|
||||
return results;
|
||||
}).call(this);
|
||||
this.all = (function() {
|
||||
var j, len, ref, results;
|
||||
ref = this.boxes;
|
||||
results = [];
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
box = ref[j];
|
||||
results.push(box);
|
||||
}
|
||||
return results;
|
||||
}).call(this);
|
||||
if (this.boxes.length) {
|
||||
if (this.disabled()) {
|
||||
this.resetStyle();
|
||||
} else {
|
||||
ref = this.boxes;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
box = ref[j];
|
||||
this.applyStyle(box, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!this.disabled()) {
|
||||
this.util().addEvent(this.config.scrollContainer || window, 'scroll', this.scrollHandler);
|
||||
this.util().addEvent(window, 'resize', this.scrollHandler);
|
||||
this.interval = setInterval(this.scrollCallback, 50);
|
||||
}
|
||||
if (this.config.live) {
|
||||
return new MutationObserver((function(_this) {
|
||||
return function(records) {
|
||||
var k, len1, node, record, results;
|
||||
results = [];
|
||||
for (k = 0, len1 = records.length; k < len1; k++) {
|
||||
record = records[k];
|
||||
results.push((function() {
|
||||
var l, len2, ref1, results1;
|
||||
ref1 = record.addedNodes || [];
|
||||
results1 = [];
|
||||
for (l = 0, len2 = ref1.length; l < len2; l++) {
|
||||
node = ref1[l];
|
||||
results1.push(this.doSync(node));
|
||||
}
|
||||
return results1;
|
||||
}).call(_this));
|
||||
}
|
||||
return results;
|
||||
};
|
||||
})(this)).observe(document.body, {
|
||||
childList: true,
|
||||
subtree: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
WOW.prototype.stop = function() {
|
||||
this.stopped = true;
|
||||
this.util().removeEvent(this.config.scrollContainer || window, 'scroll', this.scrollHandler);
|
||||
this.util().removeEvent(window, 'resize', this.scrollHandler);
|
||||
if (this.interval != null) {
|
||||
return clearInterval(this.interval);
|
||||
}
|
||||
};
|
||||
|
||||
WOW.prototype.sync = function(element) {
|
||||
if (MutationObserver.notSupported) {
|
||||
return this.doSync(this.element);
|
||||
}
|
||||
};
|
||||
|
||||
WOW.prototype.doSync = function(element) {
|
||||
var box, j, len, ref, results;
|
||||
if (element == null) {
|
||||
element = this.element;
|
||||
}
|
||||
if (element.nodeType !== 1) {
|
||||
return;
|
||||
}
|
||||
element = element.parentNode || element;
|
||||
ref = element.querySelectorAll("." + this.config.boxClass);
|
||||
results = [];
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
box = ref[j];
|
||||
if (indexOf.call(this.all, box) < 0) {
|
||||
this.boxes.push(box);
|
||||
this.all.push(box);
|
||||
if (this.stopped || this.disabled()) {
|
||||
this.resetStyle();
|
||||
} else {
|
||||
this.applyStyle(box, true);
|
||||
}
|
||||
results.push(this.scrolled = true);
|
||||
} else {
|
||||
results.push(void 0);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
WOW.prototype.show = function(box) {
|
||||
this.applyStyle(box);
|
||||
box.className = box.className + " " + this.config.animateClass;
|
||||
if (this.config.callback != null) {
|
||||
this.config.callback(box);
|
||||
}
|
||||
this.util().emitEvent(box, this.wowEvent);
|
||||
this.util().addEvent(box, 'animationend', this.resetAnimation);
|
||||
this.util().addEvent(box, 'oanimationend', this.resetAnimation);
|
||||
this.util().addEvent(box, 'webkitAnimationEnd', this.resetAnimation);
|
||||
this.util().addEvent(box, 'MSAnimationEnd', this.resetAnimation);
|
||||
return box;
|
||||
};
|
||||
|
||||
WOW.prototype.applyStyle = function(box, hidden) {
|
||||
var delay, duration, iteration;
|
||||
duration = box.getAttribute('data-wow-duration');
|
||||
delay = box.getAttribute('data-wow-delay');
|
||||
iteration = box.getAttribute('data-wow-iteration');
|
||||
return this.animate((function(_this) {
|
||||
return function() {
|
||||
return _this.customStyle(box, hidden, duration, delay, iteration);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
WOW.prototype.animate = (function() {
|
||||
if ('requestAnimationFrame' in window) {
|
||||
return function(callback) {
|
||||
return window.requestAnimationFrame(callback);
|
||||
};
|
||||
} else {
|
||||
return function(callback) {
|
||||
return callback();
|
||||
};
|
||||
}
|
||||
})();
|
||||
|
||||
WOW.prototype.resetStyle = function() {
|
||||
var box, j, len, ref, results;
|
||||
ref = this.boxes;
|
||||
results = [];
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
box = ref[j];
|
||||
results.push(box.style.visibility = 'visible');
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
WOW.prototype.resetAnimation = function(event) {
|
||||
var target;
|
||||
if (event.type.toLowerCase().indexOf('animationend') >= 0) {
|
||||
target = event.target || event.srcElement;
|
||||
return target.className = target.className.replace(this.config.animateClass, '').trim();
|
||||
}
|
||||
};
|
||||
|
||||
WOW.prototype.customStyle = function(box, hidden, duration, delay, iteration) {
|
||||
if (hidden) {
|
||||
this.cacheAnimationName(box);
|
||||
}
|
||||
box.style.visibility = hidden ? 'hidden' : 'visible';
|
||||
if (duration) {
|
||||
this.vendorSet(box.style, {
|
||||
animationDuration: duration
|
||||
});
|
||||
}
|
||||
if (delay) {
|
||||
this.vendorSet(box.style, {
|
||||
animationDelay: delay
|
||||
});
|
||||
}
|
||||
if (iteration) {
|
||||
this.vendorSet(box.style, {
|
||||
animationIterationCount: iteration
|
||||
});
|
||||
}
|
||||
this.vendorSet(box.style, {
|
||||
animationName: hidden ? 'none' : this.cachedAnimationName(box)
|
||||
});
|
||||
return box;
|
||||
};
|
||||
|
||||
WOW.prototype.vendors = ["moz", "webkit"];
|
||||
|
||||
WOW.prototype.vendorSet = function(elem, properties) {
|
||||
var name, results, value, vendor;
|
||||
results = [];
|
||||
for (name in properties) {
|
||||
value = properties[name];
|
||||
elem["" + name] = value;
|
||||
results.push((function() {
|
||||
var j, len, ref, results1;
|
||||
ref = this.vendors;
|
||||
results1 = [];
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
vendor = ref[j];
|
||||
results1.push(elem["" + vendor + (name.charAt(0).toUpperCase()) + (name.substr(1))] = value);
|
||||
}
|
||||
return results1;
|
||||
}).call(this));
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
WOW.prototype.vendorCSS = function(elem, property) {
|
||||
var j, len, ref, result, style, vendor;
|
||||
style = getComputedStyle(elem);
|
||||
result = style.getPropertyCSSValue(property);
|
||||
ref = this.vendors;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
vendor = ref[j];
|
||||
result = result || style.getPropertyCSSValue("-" + vendor + "-" + property);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
WOW.prototype.animationName = function(box) {
|
||||
var animationName, error;
|
||||
try {
|
||||
animationName = this.vendorCSS(box, 'animation-name').cssText;
|
||||
} catch (error) {
|
||||
animationName = getComputedStyle(box).getPropertyValue('animation-name');
|
||||
}
|
||||
if (animationName === 'none') {
|
||||
return '';
|
||||
} else {
|
||||
return animationName;
|
||||
}
|
||||
};
|
||||
|
||||
WOW.prototype.cacheAnimationName = function(box) {
|
||||
return this.animationNameCache.set(box, this.animationName(box));
|
||||
};
|
||||
|
||||
WOW.prototype.cachedAnimationName = function(box) {
|
||||
return this.animationNameCache.get(box);
|
||||
};
|
||||
|
||||
WOW.prototype.scrollHandler = function() {
|
||||
return this.scrolled = true;
|
||||
};
|
||||
|
||||
WOW.prototype.scrollCallback = function() {
|
||||
var box;
|
||||
if (this.scrolled) {
|
||||
this.scrolled = false;
|
||||
this.boxes = (function() {
|
||||
var j, len, ref, results;
|
||||
ref = this.boxes;
|
||||
results = [];
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
box = ref[j];
|
||||
if (!(box)) {
|
||||
continue;
|
||||
}
|
||||
if (this.isVisible(box)) {
|
||||
this.show(box);
|
||||
continue;
|
||||
}
|
||||
results.push(box);
|
||||
}
|
||||
return results;
|
||||
}).call(this);
|
||||
if (!(this.boxes.length || this.config.live)) {
|
||||
return this.stop();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
WOW.prototype.offsetTop = function(element) {
|
||||
var top;
|
||||
while (element.offsetTop === void 0) {
|
||||
element = element.parentNode;
|
||||
}
|
||||
top = element.offsetTop;
|
||||
while (element = element.offsetParent) {
|
||||
top += element.offsetTop;
|
||||
}
|
||||
return top;
|
||||
};
|
||||
|
||||
WOW.prototype.isVisible = function(box) {
|
||||
var bottom, offset, top, viewBottom, viewTop;
|
||||
offset = box.getAttribute('data-wow-offset') || this.config.offset;
|
||||
viewTop = (this.config.scrollContainer && this.config.scrollContainer.scrollTop) || window.pageYOffset;
|
||||
viewBottom = viewTop + Math.min(this.element.clientHeight, this.util().innerHeight()) - offset;
|
||||
top = this.offsetTop(box);
|
||||
bottom = top + box.clientHeight;
|
||||
return top <= viewBottom && bottom >= viewTop;
|
||||
};
|
||||
|
||||
WOW.prototype.util = function() {
|
||||
return this._util != null ? this._util : this._util = new Util();
|
||||
};
|
||||
|
||||
WOW.prototype.disabled = function() {
|
||||
return !this.config.mobile && this.util().isMobile(navigator.userAgent);
|
||||
};
|
||||
|
||||
return WOW;
|
||||
|
||||
})();
|
||||
|
||||
}).call(this);
|