first commit
This commit is contained in:
234
wp-content/themes/hello-elementor/assets/css/custom.css
Normal file
234
wp-content/themes/hello-elementor/assets/css/custom.css
Normal file
@@ -0,0 +1,234 @@
|
||||
#home-hero-box {
|
||||
margin-top: -77px;
|
||||
}
|
||||
|
||||
#home-hero .elementor-swiper:hover .elementor-swiper-button {
|
||||
left: 20px;
|
||||
opacity: 1;
|
||||
}
|
||||
#home-hero .elementor-swiper .swiper-slide .swiper-slide-inner {
|
||||
max-width: var(--content-width);
|
||||
}
|
||||
#home-hero .elementor-swiper .elementor-swiper-button {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 100%;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
left: -50px;
|
||||
opacity: 0;
|
||||
right: auto;
|
||||
transition-delay: 0.1s;
|
||||
transition-timing-function: ease-in-out;
|
||||
transition-duration: 0.5s;
|
||||
transition-property: all;
|
||||
transform-origin: bottom;
|
||||
transform-style: preserve-3d;
|
||||
}
|
||||
#home-hero .elementor-swiper .elementor-swiper-button::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
opacity: 0;
|
||||
transform: translate(-50%, -50%);
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
transition: all 300ms ease-in-out;
|
||||
border-radius: 100%;
|
||||
}
|
||||
#home-hero .elementor-swiper .elementor-swiper-button:hover::before {
|
||||
opacity: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#home-hero .elementor-swiper .elementor-swiper-button:hover svg {
|
||||
fill: #000;
|
||||
}
|
||||
#home-hero .elementor-swiper .elementor-swiper-button.elementor-swiper-button-prev {
|
||||
top: calc(50% + 40px);
|
||||
}
|
||||
#home-hero .elementor-swiper .elementor-swiper-button.elementor-swiper-button-next {
|
||||
top: calc(50% - 40px);
|
||||
}
|
||||
#home-hero .elementor-swiper .elementor-swiper-button svg {
|
||||
z-index: 1;
|
||||
transition: all 300ms ease-in-out;
|
||||
}
|
||||
|
||||
.btn-1 {
|
||||
height: 55px;
|
||||
}
|
||||
.btn-1 .elementor-button-wrapper .elementor-button {
|
||||
padding: 20px 40px;
|
||||
border-radius: 0;
|
||||
}
|
||||
.btn-1 .elementor-button-wrapper .elementor-button .elementor-button-text {
|
||||
font-weight: 700;
|
||||
}
|
||||
.btn-2 {
|
||||
height: 55px;
|
||||
}
|
||||
.btn-2 .elementor-button-wrapper .elementor-button {
|
||||
padding: 10px 10px 10px 20px;
|
||||
border-radius: 0;
|
||||
box-shadow: 0 0 0 2px #eaeaea;
|
||||
background: #fff;
|
||||
}
|
||||
.btn-2 .elementor-button-wrapper .elementor-button:hover {
|
||||
background: #fd5523;
|
||||
box-shadow: 0 0 0 2px #fd5523;
|
||||
}
|
||||
.btn-2 .elementor-button-wrapper .elementor-button:hover .elementor-button-content-wrapper .elementor-button-text {
|
||||
color: #fff;
|
||||
}
|
||||
.btn-2 .elementor-button-wrapper .elementor-button:hover .elementor-button-content-wrapper .elementor-button-icon {
|
||||
color: #fd5523;
|
||||
background: #fff;
|
||||
}
|
||||
.btn-2 .elementor-button-wrapper .elementor-button .elementor-button-content-wrapper {
|
||||
align-items: center;
|
||||
-moz-column-gap: 15px;
|
||||
column-gap: 15px;
|
||||
}
|
||||
.btn-2 .elementor-button-wrapper .elementor-button .elementor-button-content-wrapper .elementor-button-text {
|
||||
color: #fd5523;
|
||||
font-weight: 700;
|
||||
}
|
||||
.btn-2 .elementor-button-wrapper .elementor-button .elementor-button-content-wrapper .elementor-button-icon {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #fd5523;
|
||||
}
|
||||
.btn-3 {
|
||||
height: 55px;
|
||||
}
|
||||
.btn-3 .elementor-button-wrapper .elementor-button {
|
||||
padding: 10px 10px 10px 20px;
|
||||
border-radius: 0;
|
||||
background: #fff;
|
||||
}
|
||||
.btn-3 .elementor-button-wrapper .elementor-button:hover {
|
||||
background: #062e39;
|
||||
}
|
||||
.btn-3 .elementor-button-wrapper .elementor-button:hover .elementor-button-content-wrapper .elementor-button-text {
|
||||
color: #fff;
|
||||
}
|
||||
.btn-3 .elementor-button-wrapper .elementor-button:hover .elementor-button-content-wrapper .elementor-button-icon {
|
||||
color: #062e39;
|
||||
background: #fd5523;
|
||||
}
|
||||
.btn-3 .elementor-button-wrapper .elementor-button .elementor-button-content-wrapper {
|
||||
align-items: center;
|
||||
-moz-column-gap: 15px;
|
||||
column-gap: 15px;
|
||||
}
|
||||
.btn-3 .elementor-button-wrapper .elementor-button .elementor-button-content-wrapper .elementor-button-text {
|
||||
color: #fd5523;
|
||||
font-weight: 700;
|
||||
}
|
||||
.btn-3 .elementor-button-wrapper .elementor-button .elementor-button-content-wrapper .elementor-button-icon {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #fd5523;
|
||||
}
|
||||
|
||||
.carousel-box-1 .swiper.swiper-initialized {
|
||||
overflow: initial;
|
||||
}
|
||||
.carousel-box-1 .swiper-slide {
|
||||
overflow: initial;
|
||||
}
|
||||
.carousel-box-1 .swiper-pagination .swiper-pagination-bullet {
|
||||
position: relative;
|
||||
}
|
||||
.carousel-box-1 .swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 100%;
|
||||
border: 1px solid #fd5523;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.price-tile .elementor-price-table .elementor-price-table__header {
|
||||
position: relative;
|
||||
border-bottom: 2px solid #eaeaea;
|
||||
}
|
||||
.price-tile .elementor-price-table .elementor-price-table__features-list .elementor-price-table__feature-inner {
|
||||
margin: 0 !important;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.price-tile .elementor-price-table .elementor-price-table__features-list .elementor-price-table__feature-inner svg {
|
||||
padding: 5px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 100%;
|
||||
}
|
||||
.price-tile .elementor-price-table .elementor-price-table__price {
|
||||
justify-content: flex-start;
|
||||
align-items: flex-end;
|
||||
}
|
||||
.price-tile .elementor-price-table .elementor-price-table__price .elementor-price-table__period {
|
||||
width: -moz-fit-content;
|
||||
width: fit-content;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.price-tile .elementor-price-table .elementor-price-table__price .elementor-price-table__period::before {
|
||||
content: "/";
|
||||
}
|
||||
.price-tile .elementor-price-table .btn-1 {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.hp-contact-list .elementor-icon-list-items li .elementor-icon-list-icon svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 6px;
|
||||
background: #fd5523;
|
||||
border-radius: 100%;
|
||||
}
|
||||
.hp-contact-list .elementor-icon-list-items li:not(:last-child) {
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
}
|
||||
|
||||
.ph-iton-tile {
|
||||
margin-top: -55px;
|
||||
transform: translateY(55px);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.ph-iton-tile:hover {
|
||||
transform: translateY(-20px);
|
||||
}
|
||||
.ph-iton-tile:hover .elementor-widget-button {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
.ph-iton-tile .elementor-icon {
|
||||
background: #fff;
|
||||
border-radius: 100px;
|
||||
padding: 0 30px;
|
||||
}
|
||||
.ph-iton-tile .elementor-widget-button {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: all 0.3s ease;
|
||||
height: auto;
|
||||
padding-bottom: 20px;
|
||||
}/*# sourceMappingURL=custom.css.map */
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["custom.scss","custom.css"],"names":[],"mappings":"AAAA;EACC,iBAAA;ACCD;;ADKG;EACC,UAAA;EACA,UAAA;ACFJ;ADMG;EACC,+BAAA;ACJJ;ADQE;EACC,WAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,mBAAA;EACA,oCAAA;EACA,WAAA;EACA,UAAA;EACA,WAAA;EACA,sBAAA;EACA,uCAAA;EACA,yBAAA;EACA,wBAAA;EACA,wBAAA;EACA,4BAAA;ACNH;ADQG;EACC,WAAA;EACA,kBAAA;EACA,QAAA;EACA,SAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,gCAAA;EACA,oCAAA;EACA,iCAAA;EACA,mBAAA;ACNJ;ADSI;EACC,UAAA;EACA,WAAA;EACA,YAAA;ACPL;ADUI;EACC,UAAA;ACRL;ADYG;EACC,qBAAA;ACVJ;ADYG;EACC,qBAAA;ACVJ;ADaG;EACC,UAAA;EACA,iCAAA;ACXJ;;ADkBC;EACC,YAAA;ACfF;ADkBG;EACC,kBAAA;EACA,gBAAA;AChBJ;ADkBI;EACC,gBAAA;AChBL;ADqBC;EACC,YAAA;ACnBF;ADqBG;EACC,4BAAA;EACA,gBAAA;EACA,6BAAA;EACA,gBAAA;ACnBJ;ADqBI;EACC,mBAAA;EACA,6BAAA;ACnBL;ADsBM;EACC,WAAA;ACpBP;ADsBM;EACC,cAAA;EACA,gBAAA;ACpBP;ADwBI;EACC,mBAAA;EACA,qBAAA;OAAA,gBAAA;ACtBL;ADwBK;EACC,cAAA;EACA,gBAAA;ACtBN;ADwBK;EACC,WAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,mBAAA;ACtBN;AD4BC;EACC,YAAA;AC1BF;AD4BG;EACC,4BAAA;EACA,gBAAA;EACA,gBAAA;AC1BJ;AD4BI;EACC,mBAAA;AC1BL;AD6BM;EACC,WAAA;AC3BP;AD6BM;EACC,cAAA;EACA,mBAAA;AC3BP;AD+BI;EACC,mBAAA;EACA,qBAAA;OAAA,gBAAA;AC7BL;AD+BK;EACC,cAAA;EACA,gBAAA;AC7BN;AD+BK;EACC,WAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,mBAAA;AC7BN;;ADsCC;EACC,iBAAA;ACnCF;ADqCC;EACC,iBAAA;ACnCF;ADuCE;EACC,kBAAA;ACrCH;ADwCI;EACC,WAAA;EACA,kBAAA;EACA,QAAA;EACA,SAAA;EACA,WAAA;EACA,YAAA;EACA,mBAAA;EACA,yBAAA;EACA,gCAAA;ACtCL;;AD+CE;EACC,kBAAA;EACA,gCAAA;AC5CH;ADmDG;EACC,oBAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;ACjDJ;ADmDI;EACC,YAAA;EACA,mBAAA;EACA,mBAAA;ACjDL;ADsDE;EACC,2BAAA;EACA,qBAAA;ACpDH;ADsDG;EACC,uBAAA;EAAA,kBAAA;EACA,iBAAA;ACpDJ;ADsDI;EACC,YAAA;ACpDL;ADyDE;EACC,gBAAA;ACvDH;;ADgEI;EACC,WAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,YAAA;EACA,mBAAA;EACA,mBAAA;AC7DL;ADiEG;EACC,gCAAA;AC/DJ;;ADqEA;EACC,iBAAA;EACA,2BAAA;EACA,yBAAA;AClED;ADoEC;EACC,4BAAA;AClEF;ADoEE;EACC,UAAA;EACA,mBAAA;AClEH;ADqEC;EACC,gBAAA;EACA,oBAAA;EACA,eAAA;ACnEF;ADqEC;EACC,UAAA;EACA,kBAAA;EACA,yBAAA;EACA,YAAA;EACA,oBAAA;ACnEF","file":"custom.css"}
|
||||
300
wp-content/themes/hello-elementor/assets/css/custom.scss
Normal file
300
wp-content/themes/hello-elementor/assets/css/custom.scss
Normal file
@@ -0,0 +1,300 @@
|
||||
#home-hero-box {
|
||||
margin-top: -77px;
|
||||
}
|
||||
|
||||
#home-hero {
|
||||
.elementor-swiper {
|
||||
&:hover {
|
||||
.elementor-swiper-button {
|
||||
left: 20px;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
.swiper-slide {
|
||||
.swiper-slide-inner {
|
||||
max-width: var(--content-width);
|
||||
}
|
||||
}
|
||||
|
||||
.elementor-swiper-button {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 100%;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
left: -50px;
|
||||
opacity: 0;
|
||||
right: auto;
|
||||
transition-delay: 0.1s;
|
||||
transition-timing-function: ease-in-out;
|
||||
transition-duration: 0.5s;
|
||||
transition-property: all;
|
||||
transform-origin: bottom;
|
||||
transform-style: preserve-3d;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
opacity: 0;
|
||||
transform: translate(-50%, -50%);
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
transition: all 300ms ease-in-out;
|
||||
border-radius: 100%;
|
||||
}
|
||||
&:hover {
|
||||
&::before {
|
||||
opacity: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
svg {
|
||||
fill: #000;
|
||||
}
|
||||
}
|
||||
|
||||
&.elementor-swiper-button-prev {
|
||||
top: calc(50% + 40px);
|
||||
}
|
||||
&.elementor-swiper-button-next {
|
||||
top: calc(50% - 40px);
|
||||
}
|
||||
|
||||
svg {
|
||||
z-index: 1;
|
||||
transition: all 300ms ease-in-out;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
&-1 {
|
||||
height: 55px;
|
||||
|
||||
.elementor-button-wrapper {
|
||||
.elementor-button {
|
||||
padding: 20px 40px;
|
||||
border-radius: 0;
|
||||
|
||||
.elementor-button-text {
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&-2 {
|
||||
height: 55px;
|
||||
.elementor-button-wrapper {
|
||||
.elementor-button {
|
||||
padding: 10px 10px 10px 20px;
|
||||
border-radius: 0;
|
||||
box-shadow: 0 0 0 2px #eaeaea;
|
||||
background: #fff;
|
||||
|
||||
&:hover {
|
||||
background: #fd5523;
|
||||
box-shadow: 0 0 0 2px #fd5523;
|
||||
|
||||
.elementor-button-content-wrapper {
|
||||
.elementor-button-text {
|
||||
color: #fff;
|
||||
}
|
||||
.elementor-button-icon {
|
||||
color: #fd5523;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.elementor-button-content-wrapper {
|
||||
align-items: center;
|
||||
column-gap: 15px;
|
||||
|
||||
.elementor-button-text {
|
||||
color: #fd5523;
|
||||
font-weight: 700;
|
||||
}
|
||||
.elementor-button-icon {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #fd5523;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&-3 {
|
||||
height: 55px;
|
||||
.elementor-button-wrapper {
|
||||
.elementor-button {
|
||||
padding: 10px 10px 10px 20px;
|
||||
border-radius: 0;
|
||||
background: #fff;
|
||||
|
||||
&:hover {
|
||||
background: #062e39;
|
||||
|
||||
.elementor-button-content-wrapper {
|
||||
.elementor-button-text {
|
||||
color: #fff;
|
||||
}
|
||||
.elementor-button-icon {
|
||||
color: #062e39;
|
||||
background: #fd5523;
|
||||
}
|
||||
}
|
||||
}
|
||||
.elementor-button-content-wrapper {
|
||||
align-items: center;
|
||||
column-gap: 15px;
|
||||
|
||||
.elementor-button-text {
|
||||
color: #fd5523;
|
||||
font-weight: 700;
|
||||
}
|
||||
.elementor-button-icon {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #fd5523;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.carousel-box-1 {
|
||||
.swiper.swiper-initialized {
|
||||
overflow: initial;
|
||||
}
|
||||
.swiper-slide {
|
||||
overflow: initial;
|
||||
}
|
||||
|
||||
.swiper-pagination {
|
||||
.swiper-pagination-bullet {
|
||||
position: relative;
|
||||
|
||||
&.swiper-pagination-bullet-active {
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 100%;
|
||||
border: 1px solid #fd5523;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.price-tile {
|
||||
.elementor-price-table {
|
||||
.elementor-price-table__header {
|
||||
position: relative;
|
||||
border-bottom: 2px solid #eaeaea;
|
||||
|
||||
.elementor-price-table__heading {
|
||||
}
|
||||
}
|
||||
|
||||
.elementor-price-table__features-list {
|
||||
.elementor-price-table__feature-inner {
|
||||
margin: 0 !important;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
svg {
|
||||
padding: 5px;
|
||||
background: #f9f9f9;
|
||||
border-radius: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.elementor-price-table__price {
|
||||
justify-content: flex-start;
|
||||
align-items: flex-end;
|
||||
|
||||
.elementor-price-table__period {
|
||||
width: fit-content;
|
||||
margin-left: 10px;
|
||||
|
||||
&::before {
|
||||
content: '/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-1 {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hp-contact-list {
|
||||
.elementor-icon-list-items {
|
||||
li {
|
||||
.elementor-icon-list-icon {
|
||||
svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 6px;
|
||||
background: #fd5523;
|
||||
border-radius: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(:last-child) {
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ph-iton-tile {
|
||||
margin-top: -55px;
|
||||
transform: translateY(55px);
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-20px);
|
||||
|
||||
.elementor-widget-button {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
.elementor-icon {
|
||||
background: #fff;
|
||||
border-radius: 100px;
|
||||
padding: 0 30px;
|
||||
}
|
||||
.elementor-widget-button {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: all 0.3s ease;
|
||||
height: auto;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="23" height="24" fill="none" xmlns:v="https://vecta.io/nano"><path d="M11.5.45a11.26 11.26 0 0 0-5.796 1.564 11.64 11.64 0 0 0-4.14 4.14A11.26 11.26 0 0 0 0 11.95a11.26 11.26 0 0 0 1.564 5.796 11.64 11.64 0 0 0 4.14 4.14c1.779 1.043 3.711 1.564 5.796 1.564s4.017-.521 5.796-1.564a11.64 11.64 0 0 0 4.14-4.14C22.479 15.967 23 14.035 23 11.95s-.521-4.017-1.564-5.796a11.64 11.64 0 0 0-4.14-4.14A11.26 11.26 0 0 0 11.5.45zM8.625 16.734H6.716V7.166h1.909v9.568zm7.659 0h-5.75v-1.909h5.75v1.909zm0-3.818h-5.75v-1.932h5.75v1.932zm0-3.841h-5.75V7.166h5.75v1.909z" fill="#93003f"/></svg>
|
||||
|
After Width: | Height: | Size: 625 B |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 6.8 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 31 KiB |
53
wp-content/themes/hello-elementor/assets/js/custom.js
Normal file
53
wp-content/themes/hello-elementor/assets/js/custom.js
Normal file
@@ -0,0 +1,53 @@
|
||||
jQuery(function ($) {
|
||||
var headerNavBoxBg = $('<div class="header-nav-box-bg"></div>');
|
||||
headerNavBoxBg.css({
|
||||
'position': 'absolute',
|
||||
'top': '0',
|
||||
'left': '50%',
|
||||
'width': $('nav .header-nav-box > .e-con-inner > .elementor-element').width(),
|
||||
'height': '100%',
|
||||
'transform': 'translateX(-50%)',
|
||||
'background': '#fff',
|
||||
});
|
||||
|
||||
$('nav .header-nav-box > .e-con-inner').append(headerNavBoxBg)
|
||||
|
||||
$(window).on('scroll', function () {
|
||||
var $headerNavBox = $('nav .header-nav-box');
|
||||
|
||||
if ($headerNavBox.hasClass('elementor-sticky')) {
|
||||
var scrollTop = $(window).scrollTop();
|
||||
|
||||
var scrollThreshold = 100;
|
||||
|
||||
var stickyOffset = $headerNavBox.offset().top;
|
||||
var maxScrollDistance = 300;
|
||||
|
||||
if (scrollTop > scrollThreshold) {
|
||||
var scrollProgress = Math.min((scrollTop - scrollThreshold) / (maxScrollDistance - scrollThreshold), 1);
|
||||
console.log(scrollProgress);
|
||||
|
||||
var newWidth = (50 + scrollProgress * 50) + 'vw';
|
||||
|
||||
headerNavBoxBg.css({
|
||||
'width': newWidth,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if(scrollProgress == 1) {
|
||||
headerNavBoxBg.css({
|
||||
'box-shadow': '0px 10px 10px -4px rgba(0, 0, 0, 0.1)',
|
||||
});
|
||||
} else {
|
||||
headerNavBoxBg.css({
|
||||
'box-shadow': 'none',
|
||||
});
|
||||
}
|
||||
} else {
|
||||
headerNavBoxBg.css({
|
||||
'width': $('nav .header-nav-box > .e-con-inner > .elementor-element').width(),
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'wp-api', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices'), 'version' => '57b704063cdbc7579acb');
|
||||
@@ -0,0 +1 @@
|
||||
#hello-elementor-settings .components-placeholder{background:#f1f1f1}#hello-elementor-settings .hello_elementor__header{background-color:#fff;box-shadow:0 1px 0 hsla(0,0%,84%,.5),0 1px 2px #eee;margin-inline-start:-2em;padding:20px 10px}#hello-elementor-settings .hello_elementor__header .hello_elementor__container{margin:0 auto;max-width:750px}#hello-elementor-settings .hello_elementor__header .hello_elementor__container .hello_elementor__title{align-items:center;display:flex;justify-content:center}#hello-elementor-settings .hello_elementor__header .hello_elementor__container .hello_elementor__title .dashicon{color:#757575}#hello-elementor-settings .hello_elementor__main{margin-inline-end:auto;margin-inline-start:auto;max-width:750px}#hello-elementor-settings .hello_elementor__main .components-panel{background:none;border:none}#hello-elementor-settings .hello_elementor__main .components-panel__body{background:#fff;border:1px solid #e2e4e7;margin:1rem 0}#hello-elementor-settings .hello_elementor__main .components-notice{margin:0;margin-block-end:20px}#hello-elementor-settings .hello_elementor__main .components-notice .dashicon{color:#f0b849;padding-inline-end:10px}#hello-elementor-settings .hello_elementor__main .components-notice button{display:none}#hello-elementor-settings .hello_elementor__main .code-example{border-radius:4px;display:inline-block;font-size:10px;margin-block-end:.25rem}#hello-elementor-settings .hello_elementor__main .code-example+:not(.code-example){margin-block-start:1.25rem}#hello-elementor-settings .components-base-control__help{margin-block-start:.5rem}#hello-elementor-settings .hello_elementor__notices .components-snackbar{bottom:.5rem;position:fixed}#hello-elementor-settings .hello_elementor__action_links{margin-block-end:20px;margin-block-start:50px;text-align:center}#hello-elementor-settings .hello_elementor__action_links__title{font-weight:700}#hello-elementor-settings .hello_elementor__action_links__message{font-weight:400}
|
||||
428
wp-content/themes/hello-elementor/assets/js/hello-admin.js
Normal file
428
wp-content/themes/hello-elementor/assets/js/hello-admin.js
Normal file
@@ -0,0 +1,428 @@
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ 696:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.ActionLinks = void 0;
|
||||
const ActionLinks = ({
|
||||
image,
|
||||
alt,
|
||||
title,
|
||||
message,
|
||||
button,
|
||||
link
|
||||
}) => {
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__action_links"
|
||||
}, /*#__PURE__*/React.createElement("img", {
|
||||
src: image,
|
||||
alt: alt
|
||||
}), /*#__PURE__*/React.createElement("p", {
|
||||
className: "hello_elementor__action_links__title"
|
||||
}, title), /*#__PURE__*/React.createElement("p", {
|
||||
className: "hello_elementor__action_links__message"
|
||||
}, message), /*#__PURE__*/React.createElement("a", {
|
||||
className: "components-button is-secondary",
|
||||
href: link,
|
||||
target: "_blank",
|
||||
rel: "noreferrer"
|
||||
}, button));
|
||||
};
|
||||
exports.ActionLinks = ActionLinks;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 19:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(994);
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.SettingsPage = void 0;
|
||||
var _react = __webpack_require__(609);
|
||||
var _notices = __webpack_require__(692);
|
||||
var _data = __webpack_require__(143);
|
||||
var _i18n = __webpack_require__(723);
|
||||
var _api = _interopRequireDefault(__webpack_require__(863));
|
||||
var _components = __webpack_require__(427);
|
||||
var _settingsPanel = __webpack_require__(425);
|
||||
var _actionLinksPanel = __webpack_require__(442);
|
||||
const Notices = () => {
|
||||
const notices = (0, _data.useSelect)(select => select(_notices.store).getNotices().filter(notice => 'snackbar' === notice.type), []);
|
||||
const {
|
||||
removeNotice
|
||||
} = (0, _data.useDispatch)(_notices.store);
|
||||
return /*#__PURE__*/React.createElement(_components.SnackbarList, {
|
||||
className: "edit-site-notices",
|
||||
notices: notices,
|
||||
onRemove: removeNotice
|
||||
});
|
||||
};
|
||||
const SETTINGS = {
|
||||
DESCRIPTION_META_TAG: '_description_meta_tag',
|
||||
SKIP_LINK: '_skip_link',
|
||||
HEADER_FOOTER: '_header_footer',
|
||||
PAGE_TITLE: '_page_title',
|
||||
HELLO_STYLE: '_hello_style',
|
||||
HELLO_THEME: '_hello_theme'
|
||||
};
|
||||
const SettingsPage = () => {
|
||||
const [hasLoaded, setHasLoaded] = (0, _react.useState)(false);
|
||||
const [settingsData, setSettingsData] = (0, _react.useState)({});
|
||||
const settingsPrefix = 'hello_elementor_settings';
|
||||
|
||||
/**
|
||||
* Update settings data.
|
||||
*
|
||||
* @param {string} settingsName
|
||||
* @param {string} settingsValue
|
||||
*/
|
||||
const updateSettings = (settingsName, settingsValue) => {
|
||||
setSettingsData({
|
||||
...settingsData,
|
||||
[settingsName]: settingsValue
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Save settings to server.
|
||||
*/
|
||||
const saveSettings = () => {
|
||||
const data = {};
|
||||
Object.values(SETTINGS).forEach(value => data[`${settingsPrefix}${value}`] = settingsData[value] ? 'true' : '');
|
||||
const settings = new _api.default.models.Settings(data);
|
||||
settings.save();
|
||||
(0, _data.dispatch)('core/notices').createNotice('success', (0, _i18n.__)('Settings Saved', 'hello-elementor'), {
|
||||
type: 'snackbar',
|
||||
isDismissible: true
|
||||
});
|
||||
};
|
||||
(0, _react.useEffect)(() => {
|
||||
const fetchSettings = async () => {
|
||||
try {
|
||||
await _api.default.loadPromise;
|
||||
const settings = new _api.default.models.Settings();
|
||||
const response = await settings.fetch();
|
||||
const data = {};
|
||||
Object.values(SETTINGS).forEach(value => data[value] = response[`${settingsPrefix}${value}`]);
|
||||
setSettingsData(data);
|
||||
setHasLoaded(true);
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
if (hasLoaded) {
|
||||
return;
|
||||
}
|
||||
fetchSettings();
|
||||
}, [settingsData]);
|
||||
if (!hasLoaded) {
|
||||
return /*#__PURE__*/React.createElement(_components.Placeholder, null, /*#__PURE__*/React.createElement(_components.Spinner, null));
|
||||
}
|
||||
return /*#__PURE__*/React.createElement(_react.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__header"
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__container"
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__title"
|
||||
}, /*#__PURE__*/React.createElement("h1", null, (0, _i18n.__)('Hello Theme Settings', 'hello-elementor'))))), /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__main"
|
||||
}, /*#__PURE__*/React.createElement(_components.Panel, null, /*#__PURE__*/React.createElement(_settingsPanel.SettingsPanel, {
|
||||
SETTINGS,
|
||||
settingsData,
|
||||
updateSettings
|
||||
}), /*#__PURE__*/React.createElement(_components.Button, {
|
||||
isPrimary: true,
|
||||
onClick: saveSettings
|
||||
}, (0, _i18n.__)('Save Settings', 'hello-elementor'))), /*#__PURE__*/React.createElement(_actionLinksPanel.ActionLinksPanel, null)), /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__notices"
|
||||
}, /*#__PURE__*/React.createElement(Notices, null)));
|
||||
};
|
||||
exports.SettingsPage = SettingsPage;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 442:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.ActionLinksPanel = void 0;
|
||||
var _i18n = __webpack_require__(723);
|
||||
var _actionLinks = __webpack_require__(696);
|
||||
const actionLinks = {
|
||||
'install-elementor': {
|
||||
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
|
||||
alt: (0, _i18n.__)('Elementor', 'hello-elementor'),
|
||||
title: (0, _i18n.__)('Install Elementor', 'hello-elementor'),
|
||||
message: (0, _i18n.__)('Create cross-site header & footer using Elementor.', 'hello-elementor'),
|
||||
button: (0, _i18n.__)('Install Elementor', 'hello-elementor'),
|
||||
link: helloAdminData.actionLinkURL
|
||||
},
|
||||
'activate-elementor': {
|
||||
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
|
||||
alt: (0, _i18n.__)('Elementor', 'hello-elementor'),
|
||||
title: (0, _i18n.__)('Activate Elementor', 'hello-elementor'),
|
||||
message: (0, _i18n.__)('Create cross-site header & footer using Elementor.', 'hello-elementor'),
|
||||
button: (0, _i18n.__)('Activate Elementor', 'hello-elementor'),
|
||||
link: helloAdminData.actionLinkURL
|
||||
},
|
||||
'activate-header-footer-experiment': {
|
||||
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
|
||||
alt: (0, _i18n.__)('Elementor', 'hello-elementor'),
|
||||
title: (0, _i18n.__)('Style using Elementor', 'hello-elementor'),
|
||||
message: (0, _i18n.__)('Design your cross-site header & footer from Elementor’s "Site Settings" panel.', 'hello-elementor'),
|
||||
button: (0, _i18n.__)('Activate header & footer experiment', 'hello-elementor'),
|
||||
link: helloAdminData.actionLinkURL
|
||||
},
|
||||
'style-header-footer': {
|
||||
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
|
||||
alt: (0, _i18n.__)('Elementor', 'hello-elementor'),
|
||||
title: (0, _i18n.__)('Style cross-site header & footer', 'hello-elementor'),
|
||||
message: (0, _i18n.__)('Customize your cross-site header & footer from Elementor’s "Site Settings" panel.', 'hello-elementor'),
|
||||
button: (0, _i18n.__)('Start Designing', 'hello-elementor'),
|
||||
link: helloAdminData.actionLinkURL
|
||||
}
|
||||
};
|
||||
const ActionLinksPanel = () => {
|
||||
if (!helloAdminData.actionLinkType) {
|
||||
return;
|
||||
}
|
||||
return /*#__PURE__*/React.createElement(_actionLinks.ActionLinks, actionLinks[helloAdminData.actionLinkType]);
|
||||
};
|
||||
exports.ActionLinksPanel = ActionLinksPanel;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 425:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.SettingsPanel = void 0;
|
||||
var _i18n = __webpack_require__(723);
|
||||
var _components = __webpack_require__(427);
|
||||
const SettingsPanel = ({
|
||||
SETTINGS,
|
||||
settingsData,
|
||||
updateSettings
|
||||
}) => {
|
||||
const protocol = window.location.protocol || 'https:';
|
||||
const hostname = window.location.hostname || 'example.com';
|
||||
const prefix = protocol + '//' + hostname;
|
||||
return /*#__PURE__*/React.createElement(_components.PanelBody, {
|
||||
title: (0, _i18n.__)('Hello Theme Settings', 'hello-elementor')
|
||||
}, /*#__PURE__*/React.createElement(_components.Notice, {
|
||||
status: "warning",
|
||||
isDismissible: "false"
|
||||
}, /*#__PURE__*/React.createElement(_components.Dashicon, {
|
||||
icon: "flag"
|
||||
}), (0, _i18n.__)('Be cautious, disabling some of the following options may break your website.', 'hello-elementor')), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Disable description meta tag', 'hello-elementor'),
|
||||
help: (0, _i18n.__)('Remove the description meta tag in singular content pages that contain an excerpt.', 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.DESCRIPTION_META_TAG] || false,
|
||||
onChange: value => updateSettings(SETTINGS.DESCRIPTION_META_TAG, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <meta name=\"description\" content=\"...\" /> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Disable skip link', 'hello-elementor'),
|
||||
help: (0, _i18n.__)('Remove the "Skip to content" link used by screen-readers and users navigating with a keyboard.', 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.SKIP_LINK] || false,
|
||||
onChange: value => updateSettings(SETTINGS.SKIP_LINK, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <a class=\"skip-link screen-reader-text\" href=\"#content\"> Skip to content </a> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Disable cross-site header & footer', 'hello-elementor'),
|
||||
help: (0, _i18n.__)('Remove the header & footer sections from all pages, and their CSS/JS files.', 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.HEADER_FOOTER] || false,
|
||||
onChange: value => updateSettings(SETTINGS.HEADER_FOOTER, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <header id=\"site-header\" class=\"site-header\"> ... </header> "), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <footer id=\"site-footer\" class=\"site-footer\"> ... </footer> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Disable page title', 'hello-elementor'),
|
||||
help: (0, _i18n.__)('Remove the section above the content that contains the main heading of the page.', 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.PAGE_TITLE] || false,
|
||||
onChange: value => updateSettings(SETTINGS.PAGE_TITLE, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <div class=\"page-header\"> <h1 class=\"entry-title\"> Post title </h1> </div> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Unregister Hello style.css', 'hello-elementor'),
|
||||
help: (0, _i18n.__)("Disable Hello theme's style.css file which contains CSS reset rules for unified cross-browser view.", 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.HELLO_STYLE] || false,
|
||||
onChange: value => updateSettings(SETTINGS.HELLO_STYLE, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <link rel=\"stylesheet\" href=\"", prefix, "/wp-content/themes/hello-elementor/style.min.css\" /> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Unregister Hello theme.css', 'hello-elementor'),
|
||||
help: (0, _i18n.__)("Disable Hello theme's theme.css file which contains CSS rules that style WordPress elements.", 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.HELLO_THEME] || false,
|
||||
onChange: value => updateSettings(SETTINGS.HELLO_THEME, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <link rel=\"stylesheet\" href=\"", prefix, "/wp-content/themes/hello-elementor/theme.min.css\" /> "));
|
||||
};
|
||||
exports.SettingsPanel = SettingsPanel;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 374:
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 609:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["React"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 863:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["api"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 427:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["components"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 143:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["data"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 87:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["element"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 723:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["i18n"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 692:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["notices"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 994:
|
||||
/***/ ((module) => {
|
||||
|
||||
function _interopRequireDefault(e) {
|
||||
return e && e.__esModule ? e : {
|
||||
"default": e
|
||||
};
|
||||
}
|
||||
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
var __webpack_exports__ = {};
|
||||
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
||||
(() => {
|
||||
"use strict";
|
||||
|
||||
|
||||
__webpack_require__(374);
|
||||
var _element = __webpack_require__(87);
|
||||
var _settingsPage = __webpack_require__(19);
|
||||
const App = () => {
|
||||
return /*#__PURE__*/React.createElement(_settingsPage.SettingsPage, null);
|
||||
};
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const rootElement = document.getElementById('hello-elementor-settings');
|
||||
if (rootElement) {
|
||||
(0, _element.render)( /*#__PURE__*/React.createElement(App, null), rootElement);
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'wp-api', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices'), 'version' => '57b704063cdbc7579acb');
|
||||
1
wp-content/themes/hello-elementor/assets/js/hello-admin.min.css
vendored
Normal file
1
wp-content/themes/hello-elementor/assets/js/hello-admin.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
#hello-elementor-settings .components-placeholder{background:#f1f1f1}#hello-elementor-settings .hello_elementor__header{background-color:#fff;box-shadow:0 1px 0 hsla(0,0%,84%,.5),0 1px 2px #eee;margin-inline-start:-2em;padding:20px 10px}#hello-elementor-settings .hello_elementor__header .hello_elementor__container{margin:0 auto;max-width:750px}#hello-elementor-settings .hello_elementor__header .hello_elementor__container .hello_elementor__title{align-items:center;display:flex;justify-content:center}#hello-elementor-settings .hello_elementor__header .hello_elementor__container .hello_elementor__title .dashicon{color:#757575}#hello-elementor-settings .hello_elementor__main{margin-inline-end:auto;margin-inline-start:auto;max-width:750px}#hello-elementor-settings .hello_elementor__main .components-panel{background:none;border:none}#hello-elementor-settings .hello_elementor__main .components-panel__body{background:#fff;border:1px solid #e2e4e7;margin:1rem 0}#hello-elementor-settings .hello_elementor__main .components-notice{margin:0;margin-block-end:20px}#hello-elementor-settings .hello_elementor__main .components-notice .dashicon{color:#f0b849;padding-inline-end:10px}#hello-elementor-settings .hello_elementor__main .components-notice button{display:none}#hello-elementor-settings .hello_elementor__main .code-example{border-radius:4px;display:inline-block;font-size:10px;margin-block-end:.25rem}#hello-elementor-settings .hello_elementor__main .code-example+:not(.code-example){margin-block-start:1.25rem}#hello-elementor-settings .components-base-control__help{margin-block-start:.5rem}#hello-elementor-settings .hello_elementor__notices .components-snackbar{bottom:.5rem;position:fixed}#hello-elementor-settings .hello_elementor__action_links{margin-block-end:20px;margin-block-start:50px;text-align:center}#hello-elementor-settings .hello_elementor__action_links__title{font-weight:700}#hello-elementor-settings .hello_elementor__action_links__message{font-weight:400}
|
||||
428
wp-content/themes/hello-elementor/assets/js/hello-admin.min.js
vendored
Normal file
428
wp-content/themes/hello-elementor/assets/js/hello-admin.min.js
vendored
Normal file
@@ -0,0 +1,428 @@
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ 696:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.ActionLinks = void 0;
|
||||
const ActionLinks = ({
|
||||
image,
|
||||
alt,
|
||||
title,
|
||||
message,
|
||||
button,
|
||||
link
|
||||
}) => {
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__action_links"
|
||||
}, /*#__PURE__*/React.createElement("img", {
|
||||
src: image,
|
||||
alt: alt
|
||||
}), /*#__PURE__*/React.createElement("p", {
|
||||
className: "hello_elementor__action_links__title"
|
||||
}, title), /*#__PURE__*/React.createElement("p", {
|
||||
className: "hello_elementor__action_links__message"
|
||||
}, message), /*#__PURE__*/React.createElement("a", {
|
||||
className: "components-button is-secondary",
|
||||
href: link,
|
||||
target: "_blank",
|
||||
rel: "noreferrer"
|
||||
}, button));
|
||||
};
|
||||
exports.ActionLinks = ActionLinks;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 19:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(994);
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.SettingsPage = void 0;
|
||||
var _react = __webpack_require__(609);
|
||||
var _notices = __webpack_require__(692);
|
||||
var _data = __webpack_require__(143);
|
||||
var _i18n = __webpack_require__(723);
|
||||
var _api = _interopRequireDefault(__webpack_require__(863));
|
||||
var _components = __webpack_require__(427);
|
||||
var _settingsPanel = __webpack_require__(425);
|
||||
var _actionLinksPanel = __webpack_require__(442);
|
||||
const Notices = () => {
|
||||
const notices = (0, _data.useSelect)(select => select(_notices.store).getNotices().filter(notice => 'snackbar' === notice.type), []);
|
||||
const {
|
||||
removeNotice
|
||||
} = (0, _data.useDispatch)(_notices.store);
|
||||
return /*#__PURE__*/React.createElement(_components.SnackbarList, {
|
||||
className: "edit-site-notices",
|
||||
notices: notices,
|
||||
onRemove: removeNotice
|
||||
});
|
||||
};
|
||||
const SETTINGS = {
|
||||
DESCRIPTION_META_TAG: '_description_meta_tag',
|
||||
SKIP_LINK: '_skip_link',
|
||||
HEADER_FOOTER: '_header_footer',
|
||||
PAGE_TITLE: '_page_title',
|
||||
HELLO_STYLE: '_hello_style',
|
||||
HELLO_THEME: '_hello_theme'
|
||||
};
|
||||
const SettingsPage = () => {
|
||||
const [hasLoaded, setHasLoaded] = (0, _react.useState)(false);
|
||||
const [settingsData, setSettingsData] = (0, _react.useState)({});
|
||||
const settingsPrefix = 'hello_elementor_settings';
|
||||
|
||||
/**
|
||||
* Update settings data.
|
||||
*
|
||||
* @param {string} settingsName
|
||||
* @param {string} settingsValue
|
||||
*/
|
||||
const updateSettings = (settingsName, settingsValue) => {
|
||||
setSettingsData({
|
||||
...settingsData,
|
||||
[settingsName]: settingsValue
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Save settings to server.
|
||||
*/
|
||||
const saveSettings = () => {
|
||||
const data = {};
|
||||
Object.values(SETTINGS).forEach(value => data[`${settingsPrefix}${value}`] = settingsData[value] ? 'true' : '');
|
||||
const settings = new _api.default.models.Settings(data);
|
||||
settings.save();
|
||||
(0, _data.dispatch)('core/notices').createNotice('success', (0, _i18n.__)('Settings Saved', 'hello-elementor'), {
|
||||
type: 'snackbar',
|
||||
isDismissible: true
|
||||
});
|
||||
};
|
||||
(0, _react.useEffect)(() => {
|
||||
const fetchSettings = async () => {
|
||||
try {
|
||||
await _api.default.loadPromise;
|
||||
const settings = new _api.default.models.Settings();
|
||||
const response = await settings.fetch();
|
||||
const data = {};
|
||||
Object.values(SETTINGS).forEach(value => data[value] = response[`${settingsPrefix}${value}`]);
|
||||
setSettingsData(data);
|
||||
setHasLoaded(true);
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
if (hasLoaded) {
|
||||
return;
|
||||
}
|
||||
fetchSettings();
|
||||
}, [settingsData]);
|
||||
if (!hasLoaded) {
|
||||
return /*#__PURE__*/React.createElement(_components.Placeholder, null, /*#__PURE__*/React.createElement(_components.Spinner, null));
|
||||
}
|
||||
return /*#__PURE__*/React.createElement(_react.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__header"
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__container"
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__title"
|
||||
}, /*#__PURE__*/React.createElement("h1", null, (0, _i18n.__)('Hello Theme Settings', 'hello-elementor'))))), /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__main"
|
||||
}, /*#__PURE__*/React.createElement(_components.Panel, null, /*#__PURE__*/React.createElement(_settingsPanel.SettingsPanel, {
|
||||
SETTINGS,
|
||||
settingsData,
|
||||
updateSettings
|
||||
}), /*#__PURE__*/React.createElement(_components.Button, {
|
||||
isPrimary: true,
|
||||
onClick: saveSettings
|
||||
}, (0, _i18n.__)('Save Settings', 'hello-elementor'))), /*#__PURE__*/React.createElement(_actionLinksPanel.ActionLinksPanel, null)), /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__notices"
|
||||
}, /*#__PURE__*/React.createElement(Notices, null)));
|
||||
};
|
||||
exports.SettingsPage = SettingsPage;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 442:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.ActionLinksPanel = void 0;
|
||||
var _i18n = __webpack_require__(723);
|
||||
var _actionLinks = __webpack_require__(696);
|
||||
const actionLinks = {
|
||||
'install-elementor': {
|
||||
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
|
||||
alt: (0, _i18n.__)('Elementor', 'hello-elementor'),
|
||||
title: (0, _i18n.__)('Install Elementor', 'hello-elementor'),
|
||||
message: (0, _i18n.__)('Create cross-site header & footer using Elementor.', 'hello-elementor'),
|
||||
button: (0, _i18n.__)('Install Elementor', 'hello-elementor'),
|
||||
link: helloAdminData.actionLinkURL
|
||||
},
|
||||
'activate-elementor': {
|
||||
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
|
||||
alt: (0, _i18n.__)('Elementor', 'hello-elementor'),
|
||||
title: (0, _i18n.__)('Activate Elementor', 'hello-elementor'),
|
||||
message: (0, _i18n.__)('Create cross-site header & footer using Elementor.', 'hello-elementor'),
|
||||
button: (0, _i18n.__)('Activate Elementor', 'hello-elementor'),
|
||||
link: helloAdminData.actionLinkURL
|
||||
},
|
||||
'activate-header-footer-experiment': {
|
||||
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
|
||||
alt: (0, _i18n.__)('Elementor', 'hello-elementor'),
|
||||
title: (0, _i18n.__)('Style using Elementor', 'hello-elementor'),
|
||||
message: (0, _i18n.__)('Design your cross-site header & footer from Elementor’s "Site Settings" panel.', 'hello-elementor'),
|
||||
button: (0, _i18n.__)('Activate header & footer experiment', 'hello-elementor'),
|
||||
link: helloAdminData.actionLinkURL
|
||||
},
|
||||
'style-header-footer': {
|
||||
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
|
||||
alt: (0, _i18n.__)('Elementor', 'hello-elementor'),
|
||||
title: (0, _i18n.__)('Style cross-site header & footer', 'hello-elementor'),
|
||||
message: (0, _i18n.__)('Customize your cross-site header & footer from Elementor’s "Site Settings" panel.', 'hello-elementor'),
|
||||
button: (0, _i18n.__)('Start Designing', 'hello-elementor'),
|
||||
link: helloAdminData.actionLinkURL
|
||||
}
|
||||
};
|
||||
const ActionLinksPanel = () => {
|
||||
if (!helloAdminData.actionLinkType) {
|
||||
return;
|
||||
}
|
||||
return /*#__PURE__*/React.createElement(_actionLinks.ActionLinks, actionLinks[helloAdminData.actionLinkType]);
|
||||
};
|
||||
exports.ActionLinksPanel = ActionLinksPanel;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 425:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.SettingsPanel = void 0;
|
||||
var _i18n = __webpack_require__(723);
|
||||
var _components = __webpack_require__(427);
|
||||
const SettingsPanel = ({
|
||||
SETTINGS,
|
||||
settingsData,
|
||||
updateSettings
|
||||
}) => {
|
||||
const protocol = window.location.protocol || 'https:';
|
||||
const hostname = window.location.hostname || 'example.com';
|
||||
const prefix = protocol + '//' + hostname;
|
||||
return /*#__PURE__*/React.createElement(_components.PanelBody, {
|
||||
title: (0, _i18n.__)('Hello Theme Settings', 'hello-elementor')
|
||||
}, /*#__PURE__*/React.createElement(_components.Notice, {
|
||||
status: "warning",
|
||||
isDismissible: "false"
|
||||
}, /*#__PURE__*/React.createElement(_components.Dashicon, {
|
||||
icon: "flag"
|
||||
}), (0, _i18n.__)('Be cautious, disabling some of the following options may break your website.', 'hello-elementor')), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Disable description meta tag', 'hello-elementor'),
|
||||
help: (0, _i18n.__)('Remove the description meta tag in singular content pages that contain an excerpt.', 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.DESCRIPTION_META_TAG] || false,
|
||||
onChange: value => updateSettings(SETTINGS.DESCRIPTION_META_TAG, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <meta name=\"description\" content=\"...\" /> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Disable skip link', 'hello-elementor'),
|
||||
help: (0, _i18n.__)('Remove the "Skip to content" link used by screen-readers and users navigating with a keyboard.', 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.SKIP_LINK] || false,
|
||||
onChange: value => updateSettings(SETTINGS.SKIP_LINK, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <a class=\"skip-link screen-reader-text\" href=\"#content\"> Skip to content </a> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Disable cross-site header & footer', 'hello-elementor'),
|
||||
help: (0, _i18n.__)('Remove the header & footer sections from all pages, and their CSS/JS files.', 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.HEADER_FOOTER] || false,
|
||||
onChange: value => updateSettings(SETTINGS.HEADER_FOOTER, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <header id=\"site-header\" class=\"site-header\"> ... </header> "), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <footer id=\"site-footer\" class=\"site-footer\"> ... </footer> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Disable page title', 'hello-elementor'),
|
||||
help: (0, _i18n.__)('Remove the section above the content that contains the main heading of the page.', 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.PAGE_TITLE] || false,
|
||||
onChange: value => updateSettings(SETTINGS.PAGE_TITLE, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <div class=\"page-header\"> <h1 class=\"entry-title\"> Post title </h1> </div> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Unregister Hello style.css', 'hello-elementor'),
|
||||
help: (0, _i18n.__)("Disable Hello theme's style.css file which contains CSS reset rules for unified cross-browser view.", 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.HELLO_STYLE] || false,
|
||||
onChange: value => updateSettings(SETTINGS.HELLO_STYLE, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <link rel=\"stylesheet\" href=\"", prefix, "/wp-content/themes/hello-elementor/style.min.css\" /> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Unregister Hello theme.css', 'hello-elementor'),
|
||||
help: (0, _i18n.__)("Disable Hello theme's theme.css file which contains CSS rules that style WordPress elements.", 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.HELLO_THEME] || false,
|
||||
onChange: value => updateSettings(SETTINGS.HELLO_THEME, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <link rel=\"stylesheet\" href=\"", prefix, "/wp-content/themes/hello-elementor/theme.min.css\" /> "));
|
||||
};
|
||||
exports.SettingsPanel = SettingsPanel;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 374:
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 609:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["React"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 863:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["api"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 427:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["components"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 143:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["data"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 87:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["element"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 723:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["i18n"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 692:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["notices"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 994:
|
||||
/***/ ((module) => {
|
||||
|
||||
function _interopRequireDefault(e) {
|
||||
return e && e.__esModule ? e : {
|
||||
"default": e
|
||||
};
|
||||
}
|
||||
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
var __webpack_exports__ = {};
|
||||
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
||||
(() => {
|
||||
"use strict";
|
||||
|
||||
|
||||
__webpack_require__(374);
|
||||
var _element = __webpack_require__(87);
|
||||
var _settingsPage = __webpack_require__(19);
|
||||
const App = () => {
|
||||
return /*#__PURE__*/React.createElement(_settingsPage.SettingsPage, null);
|
||||
};
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const rootElement = document.getElementById('hello-elementor-settings');
|
||||
if (rootElement) {
|
||||
(0, _element.render)( /*#__PURE__*/React.createElement(App, null), rootElement);
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => 'b4d297e7938fe5a0c932');
|
||||
389
wp-content/themes/hello-elementor/assets/js/hello-editor.js
Normal file
389
wp-content/themes/hello-elementor/assets/js/hello-editor.js
Normal file
@@ -0,0 +1,389 @@
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ 706:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(994);
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports["default"] = void 0;
|
||||
var _defineProperty2 = _interopRequireDefault(__webpack_require__(693));
|
||||
var _controlsHook = _interopRequireDefault(__webpack_require__(239));
|
||||
class _default extends $e.modules.ComponentBase {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
(0, _defineProperty2.default)(this, "pages", {});
|
||||
}
|
||||
getNamespace() {
|
||||
return 'hello-elementor';
|
||||
}
|
||||
defaultHooks() {
|
||||
return this.importHooks({
|
||||
ControlsHook: _controlsHook.default
|
||||
});
|
||||
}
|
||||
}
|
||||
exports["default"] = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 239:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports["default"] = void 0;
|
||||
class ControlsHook extends $e.modules.hookUI.After {
|
||||
getCommand() {
|
||||
// Command to listen.
|
||||
return 'document/elements/settings';
|
||||
}
|
||||
getId() {
|
||||
// Unique id for the hook.
|
||||
return 'hello-elementor-editor-controls-handler';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Hello Elementor Theme Controls
|
||||
*
|
||||
* Returns an object in which the keys are control IDs, and the values are the selectors of the elements that need
|
||||
* to be targeted in the apply() method.
|
||||
*
|
||||
* Example return value:
|
||||
* {
|
||||
* hello_elementor_show_logo: '.site-header .site-header-logo',
|
||||
* hello_elementor_show_menu: '.site-header .site-header-menu',
|
||||
* }
|
||||
*/
|
||||
getHelloThemeControls() {
|
||||
return {
|
||||
hello_header_logo_display: {
|
||||
selector: '.site-header .site-logo, .site-header .site-title',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_header_logo_display);
|
||||
}
|
||||
},
|
||||
hello_header_menu_display: {
|
||||
selector: '.site-header .site-navigation, .site-header .site-navigation-toggle-holder',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_header_menu_display);
|
||||
}
|
||||
},
|
||||
hello_header_tagline_display: {
|
||||
selector: '.site-header .site-description',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_header_tagline_display);
|
||||
}
|
||||
},
|
||||
hello_header_logo_type: {
|
||||
selector: '.site-header .site-branding',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'show-',
|
||||
inputOptions = args.container.controls.hello_header_logo_type.options,
|
||||
inputValue = args.settings.hello_header_logo_type;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_header_layout: {
|
||||
selector: '.site-header',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'header-',
|
||||
inputOptions = args.container.controls.hello_header_layout.options,
|
||||
inputValue = args.settings.hello_header_layout;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_header_width: {
|
||||
selector: '.site-header',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'header-',
|
||||
inputOptions = args.container.controls.hello_header_width.options,
|
||||
inputValue = args.settings.hello_header_width;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_header_menu_layout: {
|
||||
selector: '.site-header',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'menu-layout-',
|
||||
inputOptions = args.container.controls.hello_header_menu_layout.options,
|
||||
inputValue = args.settings.hello_header_menu_layout;
|
||||
|
||||
// No matter what, close the mobile menu
|
||||
$element.find('.site-navigation-toggle-holder').removeClass('elementor-active');
|
||||
$element.find('.site-navigation-dropdown').removeClass('show');
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_header_menu_dropdown: {
|
||||
selector: '.site-header',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'menu-dropdown-',
|
||||
inputOptions = args.container.controls.hello_header_menu_dropdown.options,
|
||||
inputValue = args.settings.hello_header_menu_dropdown;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_logo_display: {
|
||||
selector: '.site-footer .site-logo, .site-footer .site-title',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_footer_logo_display);
|
||||
}
|
||||
},
|
||||
hello_footer_tagline_display: {
|
||||
selector: '.site-footer .site-description',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_footer_tagline_display);
|
||||
}
|
||||
},
|
||||
hello_footer_menu_display: {
|
||||
selector: '.site-footer .site-navigation',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_footer_menu_display);
|
||||
}
|
||||
},
|
||||
hello_footer_copyright_display: {
|
||||
selector: '.site-footer .copyright',
|
||||
callback: ($element, args) => {
|
||||
const $footerContainer = $element.closest('#site-footer'),
|
||||
inputValue = args.settings.hello_footer_copyright_display;
|
||||
this.toggleShowHideClass($element, inputValue);
|
||||
$footerContainer.toggleClass('footer-has-copyright', 'yes' === inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_logo_type: {
|
||||
selector: '.site-footer .site-branding',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'show-',
|
||||
inputOptions = args.container.controls.hello_footer_logo_type.options,
|
||||
inputValue = args.settings.hello_footer_logo_type;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_layout: {
|
||||
selector: '.site-footer',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'footer-',
|
||||
inputOptions = args.container.controls.hello_footer_layout.options,
|
||||
inputValue = args.settings.hello_footer_layout;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_width: {
|
||||
selector: '.site-footer',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'footer-',
|
||||
inputOptions = args.container.controls.hello_footer_width.options,
|
||||
inputValue = args.settings.hello_footer_width;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_copyright_text: {
|
||||
selector: '.site-footer .copyright',
|
||||
callback: ($element, args) => {
|
||||
const inputValue = args.settings.hello_footer_copyright_text;
|
||||
$element.find('p').text(inputValue);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle show and hide classes on containers
|
||||
*
|
||||
* This will remove the .show and .hide clases from the element, then apply the new class
|
||||
*
|
||||
* @param {jQuery} element
|
||||
* @param {string} inputValue
|
||||
*/
|
||||
toggleShowHideClass(element, inputValue) {
|
||||
element.removeClass('hide').removeClass('show').addClass(inputValue ? 'show' : 'hide');
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle layout classes on containers
|
||||
*
|
||||
* This will cleanly set classes onto which ever container we want to target, removing the old classes and adding the new one
|
||||
*
|
||||
* @param {jQuery} element
|
||||
* @param {string} classPrefix
|
||||
* @param {Object} inputOptions
|
||||
* @param {string} inputValue
|
||||
*
|
||||
*/
|
||||
toggleLayoutClass(element, classPrefix, inputOptions, inputValue) {
|
||||
// Loop through the possible classes and remove the one that's not in use
|
||||
Object.entries(inputOptions).forEach(([key]) => {
|
||||
element.removeClass(classPrefix + key);
|
||||
});
|
||||
|
||||
// Append the class which we want to use onto the element
|
||||
if ('' !== inputValue) {
|
||||
element.addClass(classPrefix + inputValue);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the conditions under which the hook will run.
|
||||
*
|
||||
* @param {Object} args
|
||||
*/
|
||||
getConditions(args) {
|
||||
const isKit = 'kit' === elementor.documents.getCurrent().config.type,
|
||||
changedControls = Object.keys(args.settings),
|
||||
isSingleSetting = 1 === changedControls.length;
|
||||
|
||||
// If the document is not a kit, or there are no changed settings, or there is more than one single changed
|
||||
// setting, don't run the hook.
|
||||
if (!isKit || !args.settings || !isSingleSetting) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the changed control is in the list of theme controls, return true to run the hook.
|
||||
// Otherwise, return false so the hook doesn't run.
|
||||
return !!Object.keys(this.getHelloThemeControls()).includes(changedControls[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* The hook logic.
|
||||
*
|
||||
* @param {Object} args
|
||||
*/
|
||||
apply(args) {
|
||||
const allThemeControls = this.getHelloThemeControls(),
|
||||
// Extract the control ID from the passed args
|
||||
controlId = Object.keys(args.settings)[0],
|
||||
controlConfig = allThemeControls[controlId],
|
||||
// Find the element that needs to be targeted by the control.
|
||||
$element = elementor.$previewContents.find(controlConfig.selector);
|
||||
controlConfig.callback($element, args);
|
||||
}
|
||||
}
|
||||
exports["default"] = ControlsHook;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 693:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var toPropertyKey = __webpack_require__(736);
|
||||
function _defineProperty(e, r, t) {
|
||||
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
||||
value: t,
|
||||
enumerable: !0,
|
||||
configurable: !0,
|
||||
writable: !0
|
||||
}) : e[r] = t, e;
|
||||
}
|
||||
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 994:
|
||||
/***/ ((module) => {
|
||||
|
||||
function _interopRequireDefault(e) {
|
||||
return e && e.__esModule ? e : {
|
||||
"default": e
|
||||
};
|
||||
}
|
||||
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 45:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var _typeof = (__webpack_require__(738)["default"]);
|
||||
function toPrimitive(t, r) {
|
||||
if ("object" != _typeof(t) || !t) return t;
|
||||
var e = t[Symbol.toPrimitive];
|
||||
if (void 0 !== e) {
|
||||
var i = e.call(t, r || "default");
|
||||
if ("object" != _typeof(i)) return i;
|
||||
throw new TypeError("@@toPrimitive must return a primitive value.");
|
||||
}
|
||||
return ("string" === r ? String : Number)(t);
|
||||
}
|
||||
module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 736:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var _typeof = (__webpack_require__(738)["default"]);
|
||||
var toPrimitive = __webpack_require__(45);
|
||||
function toPropertyKey(t) {
|
||||
var i = toPrimitive(t, "string");
|
||||
return "symbol" == _typeof(i) ? i : i + "";
|
||||
}
|
||||
module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 738:
|
||||
/***/ ((module) => {
|
||||
|
||||
function _typeof(o) {
|
||||
"@babel/helpers - typeof";
|
||||
|
||||
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
||||
return typeof o;
|
||||
} : function (o) {
|
||||
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
||||
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
|
||||
}
|
||||
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/************************************************************************/
|
||||
var __webpack_exports__ = {};
|
||||
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
||||
(() => {
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(994);
|
||||
var _component = _interopRequireDefault(__webpack_require__(706));
|
||||
$e.components.register(new _component.default());
|
||||
})();
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => 'b4d297e7938fe5a0c932');
|
||||
389
wp-content/themes/hello-elementor/assets/js/hello-editor.min.js
vendored
Normal file
389
wp-content/themes/hello-elementor/assets/js/hello-editor.min.js
vendored
Normal file
@@ -0,0 +1,389 @@
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ 706:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(994);
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports["default"] = void 0;
|
||||
var _defineProperty2 = _interopRequireDefault(__webpack_require__(693));
|
||||
var _controlsHook = _interopRequireDefault(__webpack_require__(239));
|
||||
class _default extends $e.modules.ComponentBase {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
(0, _defineProperty2.default)(this, "pages", {});
|
||||
}
|
||||
getNamespace() {
|
||||
return 'hello-elementor';
|
||||
}
|
||||
defaultHooks() {
|
||||
return this.importHooks({
|
||||
ControlsHook: _controlsHook.default
|
||||
});
|
||||
}
|
||||
}
|
||||
exports["default"] = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 239:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports["default"] = void 0;
|
||||
class ControlsHook extends $e.modules.hookUI.After {
|
||||
getCommand() {
|
||||
// Command to listen.
|
||||
return 'document/elements/settings';
|
||||
}
|
||||
getId() {
|
||||
// Unique id for the hook.
|
||||
return 'hello-elementor-editor-controls-handler';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Hello Elementor Theme Controls
|
||||
*
|
||||
* Returns an object in which the keys are control IDs, and the values are the selectors of the elements that need
|
||||
* to be targeted in the apply() method.
|
||||
*
|
||||
* Example return value:
|
||||
* {
|
||||
* hello_elementor_show_logo: '.site-header .site-header-logo',
|
||||
* hello_elementor_show_menu: '.site-header .site-header-menu',
|
||||
* }
|
||||
*/
|
||||
getHelloThemeControls() {
|
||||
return {
|
||||
hello_header_logo_display: {
|
||||
selector: '.site-header .site-logo, .site-header .site-title',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_header_logo_display);
|
||||
}
|
||||
},
|
||||
hello_header_menu_display: {
|
||||
selector: '.site-header .site-navigation, .site-header .site-navigation-toggle-holder',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_header_menu_display);
|
||||
}
|
||||
},
|
||||
hello_header_tagline_display: {
|
||||
selector: '.site-header .site-description',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_header_tagline_display);
|
||||
}
|
||||
},
|
||||
hello_header_logo_type: {
|
||||
selector: '.site-header .site-branding',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'show-',
|
||||
inputOptions = args.container.controls.hello_header_logo_type.options,
|
||||
inputValue = args.settings.hello_header_logo_type;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_header_layout: {
|
||||
selector: '.site-header',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'header-',
|
||||
inputOptions = args.container.controls.hello_header_layout.options,
|
||||
inputValue = args.settings.hello_header_layout;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_header_width: {
|
||||
selector: '.site-header',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'header-',
|
||||
inputOptions = args.container.controls.hello_header_width.options,
|
||||
inputValue = args.settings.hello_header_width;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_header_menu_layout: {
|
||||
selector: '.site-header',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'menu-layout-',
|
||||
inputOptions = args.container.controls.hello_header_menu_layout.options,
|
||||
inputValue = args.settings.hello_header_menu_layout;
|
||||
|
||||
// No matter what, close the mobile menu
|
||||
$element.find('.site-navigation-toggle-holder').removeClass('elementor-active');
|
||||
$element.find('.site-navigation-dropdown').removeClass('show');
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_header_menu_dropdown: {
|
||||
selector: '.site-header',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'menu-dropdown-',
|
||||
inputOptions = args.container.controls.hello_header_menu_dropdown.options,
|
||||
inputValue = args.settings.hello_header_menu_dropdown;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_logo_display: {
|
||||
selector: '.site-footer .site-logo, .site-footer .site-title',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_footer_logo_display);
|
||||
}
|
||||
},
|
||||
hello_footer_tagline_display: {
|
||||
selector: '.site-footer .site-description',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_footer_tagline_display);
|
||||
}
|
||||
},
|
||||
hello_footer_menu_display: {
|
||||
selector: '.site-footer .site-navigation',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_footer_menu_display);
|
||||
}
|
||||
},
|
||||
hello_footer_copyright_display: {
|
||||
selector: '.site-footer .copyright',
|
||||
callback: ($element, args) => {
|
||||
const $footerContainer = $element.closest('#site-footer'),
|
||||
inputValue = args.settings.hello_footer_copyright_display;
|
||||
this.toggleShowHideClass($element, inputValue);
|
||||
$footerContainer.toggleClass('footer-has-copyright', 'yes' === inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_logo_type: {
|
||||
selector: '.site-footer .site-branding',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'show-',
|
||||
inputOptions = args.container.controls.hello_footer_logo_type.options,
|
||||
inputValue = args.settings.hello_footer_logo_type;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_layout: {
|
||||
selector: '.site-footer',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'footer-',
|
||||
inputOptions = args.container.controls.hello_footer_layout.options,
|
||||
inputValue = args.settings.hello_footer_layout;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_width: {
|
||||
selector: '.site-footer',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'footer-',
|
||||
inputOptions = args.container.controls.hello_footer_width.options,
|
||||
inputValue = args.settings.hello_footer_width;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_copyright_text: {
|
||||
selector: '.site-footer .copyright',
|
||||
callback: ($element, args) => {
|
||||
const inputValue = args.settings.hello_footer_copyright_text;
|
||||
$element.find('p').text(inputValue);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle show and hide classes on containers
|
||||
*
|
||||
* This will remove the .show and .hide clases from the element, then apply the new class
|
||||
*
|
||||
* @param {jQuery} element
|
||||
* @param {string} inputValue
|
||||
*/
|
||||
toggleShowHideClass(element, inputValue) {
|
||||
element.removeClass('hide').removeClass('show').addClass(inputValue ? 'show' : 'hide');
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle layout classes on containers
|
||||
*
|
||||
* This will cleanly set classes onto which ever container we want to target, removing the old classes and adding the new one
|
||||
*
|
||||
* @param {jQuery} element
|
||||
* @param {string} classPrefix
|
||||
* @param {Object} inputOptions
|
||||
* @param {string} inputValue
|
||||
*
|
||||
*/
|
||||
toggleLayoutClass(element, classPrefix, inputOptions, inputValue) {
|
||||
// Loop through the possible classes and remove the one that's not in use
|
||||
Object.entries(inputOptions).forEach(([key]) => {
|
||||
element.removeClass(classPrefix + key);
|
||||
});
|
||||
|
||||
// Append the class which we want to use onto the element
|
||||
if ('' !== inputValue) {
|
||||
element.addClass(classPrefix + inputValue);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the conditions under which the hook will run.
|
||||
*
|
||||
* @param {Object} args
|
||||
*/
|
||||
getConditions(args) {
|
||||
const isKit = 'kit' === elementor.documents.getCurrent().config.type,
|
||||
changedControls = Object.keys(args.settings),
|
||||
isSingleSetting = 1 === changedControls.length;
|
||||
|
||||
// If the document is not a kit, or there are no changed settings, or there is more than one single changed
|
||||
// setting, don't run the hook.
|
||||
if (!isKit || !args.settings || !isSingleSetting) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the changed control is in the list of theme controls, return true to run the hook.
|
||||
// Otherwise, return false so the hook doesn't run.
|
||||
return !!Object.keys(this.getHelloThemeControls()).includes(changedControls[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* The hook logic.
|
||||
*
|
||||
* @param {Object} args
|
||||
*/
|
||||
apply(args) {
|
||||
const allThemeControls = this.getHelloThemeControls(),
|
||||
// Extract the control ID from the passed args
|
||||
controlId = Object.keys(args.settings)[0],
|
||||
controlConfig = allThemeControls[controlId],
|
||||
// Find the element that needs to be targeted by the control.
|
||||
$element = elementor.$previewContents.find(controlConfig.selector);
|
||||
controlConfig.callback($element, args);
|
||||
}
|
||||
}
|
||||
exports["default"] = ControlsHook;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 693:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var toPropertyKey = __webpack_require__(736);
|
||||
function _defineProperty(e, r, t) {
|
||||
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
||||
value: t,
|
||||
enumerable: !0,
|
||||
configurable: !0,
|
||||
writable: !0
|
||||
}) : e[r] = t, e;
|
||||
}
|
||||
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 994:
|
||||
/***/ ((module) => {
|
||||
|
||||
function _interopRequireDefault(e) {
|
||||
return e && e.__esModule ? e : {
|
||||
"default": e
|
||||
};
|
||||
}
|
||||
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 45:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var _typeof = (__webpack_require__(738)["default"]);
|
||||
function toPrimitive(t, r) {
|
||||
if ("object" != _typeof(t) || !t) return t;
|
||||
var e = t[Symbol.toPrimitive];
|
||||
if (void 0 !== e) {
|
||||
var i = e.call(t, r || "default");
|
||||
if ("object" != _typeof(i)) return i;
|
||||
throw new TypeError("@@toPrimitive must return a primitive value.");
|
||||
}
|
||||
return ("string" === r ? String : Number)(t);
|
||||
}
|
||||
module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 736:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var _typeof = (__webpack_require__(738)["default"]);
|
||||
var toPrimitive = __webpack_require__(45);
|
||||
function toPropertyKey(t) {
|
||||
var i = toPrimitive(t, "string");
|
||||
return "symbol" == _typeof(i) ? i : i + "";
|
||||
}
|
||||
module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 738:
|
||||
/***/ ((module) => {
|
||||
|
||||
function _typeof(o) {
|
||||
"@babel/helpers - typeof";
|
||||
|
||||
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
||||
return typeof o;
|
||||
} : function (o) {
|
||||
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
||||
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
|
||||
}
|
||||
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/************************************************************************/
|
||||
var __webpack_exports__ = {};
|
||||
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
||||
(() => {
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(994);
|
||||
var _component = _interopRequireDefault(__webpack_require__(706));
|
||||
$e.components.register(new _component.default());
|
||||
})();
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '2f03dc39ec58b53d53c8');
|
||||
@@ -0,0 +1,69 @@
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
var __webpack_exports__ = {};
|
||||
|
||||
|
||||
class elementorHelloThemeHandler {
|
||||
constructor() {
|
||||
this.initSettings();
|
||||
this.initElements();
|
||||
this.bindEvents();
|
||||
}
|
||||
initSettings() {
|
||||
this.settings = {
|
||||
selectors: {
|
||||
menuToggle: '.site-header .site-navigation-toggle',
|
||||
menuToggleHolder: '.site-header .site-navigation-toggle-holder',
|
||||
dropdownMenu: '.site-header .site-navigation-dropdown'
|
||||
}
|
||||
};
|
||||
}
|
||||
initElements() {
|
||||
this.elements = {
|
||||
window,
|
||||
menuToggle: document.querySelector(this.settings.selectors.menuToggle),
|
||||
menuToggleHolder: document.querySelector(this.settings.selectors.menuToggleHolder),
|
||||
dropdownMenu: document.querySelector(this.settings.selectors.dropdownMenu)
|
||||
};
|
||||
}
|
||||
bindEvents() {
|
||||
var _this$elements$menuTo;
|
||||
if (!this.elements.menuToggleHolder || (_this$elements$menuTo = this.elements.menuToggleHolder) !== null && _this$elements$menuTo !== void 0 && _this$elements$menuTo.classList.contains('hide')) {
|
||||
return;
|
||||
}
|
||||
this.elements.menuToggle.addEventListener('click', () => this.handleMenuToggle());
|
||||
this.elements.dropdownMenu.querySelectorAll('.menu-item-has-children > a').forEach(anchorElement => anchorElement.addEventListener('click', event => this.handleMenuChildren(event)));
|
||||
}
|
||||
closeMenuItems() {
|
||||
this.elements.menuToggleHolder.classList.remove('elementor-active');
|
||||
this.elements.window.removeEventListener('resize', () => this.closeMenuItems());
|
||||
}
|
||||
handleMenuToggle() {
|
||||
const isDropdownVisible = !this.elements.menuToggleHolder.classList.contains('elementor-active');
|
||||
this.elements.menuToggle.setAttribute('aria-expanded', isDropdownVisible);
|
||||
this.elements.dropdownMenu.setAttribute('aria-hidden', !isDropdownVisible);
|
||||
this.elements.dropdownMenu.inert = !isDropdownVisible;
|
||||
this.elements.menuToggleHolder.classList.toggle('elementor-active', isDropdownVisible);
|
||||
|
||||
// Always close all sub active items.
|
||||
this.elements.dropdownMenu.querySelectorAll('.elementor-active').forEach(item => item.classList.remove('elementor-active'));
|
||||
if (isDropdownVisible) {
|
||||
this.elements.window.addEventListener('resize', () => this.closeMenuItems());
|
||||
} else {
|
||||
this.elements.window.removeEventListener('resize', () => this.closeMenuItems());
|
||||
}
|
||||
}
|
||||
handleMenuChildren(event) {
|
||||
const anchor = event.currentTarget;
|
||||
const parentLi = anchor.parentElement;
|
||||
if (!(parentLi !== null && parentLi !== void 0 && parentLi.classList)) {
|
||||
return;
|
||||
}
|
||||
parentLi.classList.toggle('elementor-active');
|
||||
}
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
new elementorHelloThemeHandler();
|
||||
});
|
||||
/******/ })()
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '2f03dc39ec58b53d53c8');
|
||||
69
wp-content/themes/hello-elementor/assets/js/hello-frontend.min.js
vendored
Normal file
69
wp-content/themes/hello-elementor/assets/js/hello-frontend.min.js
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
var __webpack_exports__ = {};
|
||||
|
||||
|
||||
class elementorHelloThemeHandler {
|
||||
constructor() {
|
||||
this.initSettings();
|
||||
this.initElements();
|
||||
this.bindEvents();
|
||||
}
|
||||
initSettings() {
|
||||
this.settings = {
|
||||
selectors: {
|
||||
menuToggle: '.site-header .site-navigation-toggle',
|
||||
menuToggleHolder: '.site-header .site-navigation-toggle-holder',
|
||||
dropdownMenu: '.site-header .site-navigation-dropdown'
|
||||
}
|
||||
};
|
||||
}
|
||||
initElements() {
|
||||
this.elements = {
|
||||
window,
|
||||
menuToggle: document.querySelector(this.settings.selectors.menuToggle),
|
||||
menuToggleHolder: document.querySelector(this.settings.selectors.menuToggleHolder),
|
||||
dropdownMenu: document.querySelector(this.settings.selectors.dropdownMenu)
|
||||
};
|
||||
}
|
||||
bindEvents() {
|
||||
var _this$elements$menuTo;
|
||||
if (!this.elements.menuToggleHolder || (_this$elements$menuTo = this.elements.menuToggleHolder) !== null && _this$elements$menuTo !== void 0 && _this$elements$menuTo.classList.contains('hide')) {
|
||||
return;
|
||||
}
|
||||
this.elements.menuToggle.addEventListener('click', () => this.handleMenuToggle());
|
||||
this.elements.dropdownMenu.querySelectorAll('.menu-item-has-children > a').forEach(anchorElement => anchorElement.addEventListener('click', event => this.handleMenuChildren(event)));
|
||||
}
|
||||
closeMenuItems() {
|
||||
this.elements.menuToggleHolder.classList.remove('elementor-active');
|
||||
this.elements.window.removeEventListener('resize', () => this.closeMenuItems());
|
||||
}
|
||||
handleMenuToggle() {
|
||||
const isDropdownVisible = !this.elements.menuToggleHolder.classList.contains('elementor-active');
|
||||
this.elements.menuToggle.setAttribute('aria-expanded', isDropdownVisible);
|
||||
this.elements.dropdownMenu.setAttribute('aria-hidden', !isDropdownVisible);
|
||||
this.elements.dropdownMenu.inert = !isDropdownVisible;
|
||||
this.elements.menuToggleHolder.classList.toggle('elementor-active', isDropdownVisible);
|
||||
|
||||
// Always close all sub active items.
|
||||
this.elements.dropdownMenu.querySelectorAll('.elementor-active').forEach(item => item.classList.remove('elementor-active'));
|
||||
if (isDropdownVisible) {
|
||||
this.elements.window.addEventListener('resize', () => this.closeMenuItems());
|
||||
} else {
|
||||
this.elements.window.removeEventListener('resize', () => this.closeMenuItems());
|
||||
}
|
||||
}
|
||||
handleMenuChildren(event) {
|
||||
const anchor = event.currentTarget;
|
||||
const parentLi = anchor.parentElement;
|
||||
if (!(parentLi !== null && parentLi !== void 0 && parentLi.classList)) {
|
||||
return;
|
||||
}
|
||||
parentLi.classList.toggle('elementor-active');
|
||||
}
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
new elementorHelloThemeHandler();
|
||||
});
|
||||
/******/ })()
|
||||
;
|
||||
Reference in New Issue
Block a user