<style>
/* start need to add to css in themes? */
.modal_iframe-on {
width: 100%;
}
/* end need to add to css in themes? */
.footer-cta { background: #29163a4f !important }
.gh-head-menu .nav {
gap: 24px;
}
.post-feed {
position: relative;
display: grid;
gap: 0 4vmin;
/*
grid-template-columns: repeat(6,1fr);
padding: max(4.8vmin,36px) 0 0;
*/
}
.article {
padding: 90px 0 0 !important;
}
.post-card-large {
display:flex;
text-align: center;
}
.post-card-large div.post-card-excerpt {
max-width: unset !important;
}
/*
.post-feed {
padding: 0;
}
*/
.gh-head-menu {
margin-left: -2.5vmin !important;
}
.gh-head-menu .nav li {
padding: 0 10px;
margin: 0 10px 0 0;
}
.footer-cta,
.gh-head-actions,
.read-more-wrap {
display: none;
}
div.data-elink {
width:100% !important;
}
.post-card-large .post-card-image {
position: absolute;
width: auto;
height: auto;
}
.post-card-title {
margin: 0 0 0.4em;
font-size: 2.4rem;
font-weight: 700;
}
h2.post-card-title,
.article-title {
color: #86719b !important;
text-shadow: 0 13.36px 8.896px #c4b59d, 0 -2px 1px #fff;
}
.article-title {
font-weight: 100;
}
span.tag-name,
.post-card-tags,
.post-card-primary-tag,
.article-tag a {
font-family: courier;
font-weight: 800;
background-color: #4e2b2b82;
color: transparent;
text-shadow: 2px 2px 3px rgb(255 255 255 / 50%);
-webkit-background-clip: text;
-moz-background-clip: text;
background-clip: text;
}
span.tag-name {
background-color: #4e2b2bd1;
font-family: unset;
font-weight: unset;
}
.post-card-excerpt,
.article-excerpt {
/* font-family: courier; */
/* background-color: #4e2b2b82; */
font-weight: 400;
background-color: #4e2b2b82;
background-color: #565656;
color: transparent;
text-shadow: 2px 2px 3px rgb(255 255 255 / 50%);
-webkit-background-clip: text;
-moz-background-clip: text;
background-clip: text;
}
.post-card-content {
border-radius: 4px;
box-sizing: border-box;
margin: 10px;
padding: 0;
}
.post-feed .no-image .post-card-content-link {
padding: unset;
background-color: #fff !important;
}
.post-feed .post-card-content .post-card-content-link:after {
z-index: 0;
}
.post-card-content .post-card-content-link:focus,
.post-card-content .post-card-content-link:hover {
border-width: 0;
}
.post-feed .post-card-content .post-card-content-link,
.post-card-content .post-card-content-link {
background-color: #fff !important;
border-radius: 3px;
border-width: 4px;
box-sizing: border-box;
color: var(--foreground-color);
display: inline-block;
padding: 15px !important;
position: relative;
text-decoration: none;
width: 100%;
border-radius: 5px;
box-shadow: 0 2px 6px -2px rgb(0 0 0 / 10%), 0 0 1px rgb(0 0 0 / 40%);
}
.post-feed .post-card-content .post-card-content-link:focus:after,
.post-feed .post-card-content .post-card-content-link:hover:after,
.post-card-content .post-card-content-link:focus:after,
.post-card-content .post-card-content-link:hover:after {
height: calc(100% + 6px);
left: -3px;
top: -3px;
width: calc(100% + 6px);
}
.post-card-content .post-card-content-link:after {
-webkit-animation: rotate 3s ease infinite alternate;
animation: rotate 3s ease infinite alternate;
background: linear-gradient(85deg,#fff 0,#000 80.21%);
/* background: linear-gradient(85deg,#ff00d9 0,#23b7ae 80.21%); */
background-size: 300% 300%;
border-radius: 6px;
content: "";
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: -1;
opacity: .15;
}
@keyframes rotate{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}
@-webkit-keyframes rotate{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}
.gh-head {
position: fixed !important;
padding: 1vmin 4vmin;
width: 100%;
color: #fff;
background-color: #29163aa6 !important;
z-index: 2;
}
.home-template .gh-head-logo {
display: block;
}
#gh-head .gh-head-brand {
justify-content: space-between !important;
}
.site-header-cover {
-o-object-fit: fill !important;
object-fit: fill !important;
object-position: top;
}
.has-cover .site-header-content {
min-height: 200px;
max-height: 340px;
}
.site-title, .gh-head-button {
display: none;
}
.post-card-meta {
margin-top: 0;
padding: 0 15px 15px;
}
/* Styling for CodePen Embeds */
.cp_embed_wrapper {
width: 100%;
}
.cp_embed_wrapper iframe {
margin: 0 auto!important;
height: 400px;
}
/* Styling for HTML Audio Element */
audio {
vertical-align: baseline;
border: 5px solid lightgray;
border-radius: 25px;
}
audio:focus {
outline: none;
}
/* FOR POST DEMO at https://ghost-o-matic.com/replicate-casper-top-navbar-at-top-of-site-header-image/ */
/* Replicate the navbar to appear */
.site-home-header .site-nav-logo {
display: block;
padding: 0;
}
/* Adjust the position of the site logo in the navbar to align vertically center */
a.site-nav-logo {
padding: 0;
}
/* Adjust the size of the site logo */
.site-nav-logo img {
height: 32px;
margin-top: 4px;
}
/* Prevent the site logo/title from appearing in the center of the header image */
.site-home-header .site-title {
display: none;
}
/* Make bookmark embeds white to stand out from page background */
.kg-bookmark-content {
background-color: #FFF;
}
/* FOR POST DEMO at https://ghost-o-matic.com/a-reading-progress-bar/ */
#progress-bar {
width: 0%;
position: fixed;
top: 64px;
left: 0;
height: 6px;
background: linear-gradient(to right, #ecd2fe, #feaaaa);
}
/* FOR POST DEMO at https://ghost-o-matic.com/make-anything-collapsible/ */
details {
width: 100%;
background-color: #eee;
padding:15px;
border-radius: 5px;
}
details p {
width: auto;
padding: 1em 0 0;
}
summary {
background-color: rgb(59,89,152, 0.5);
color:#fff;
padding: 0 0 0 15px;
margin:-5px;
cursor:pointer;
border-radius: 5px;
}
summary:hover, summary:focus {
background-color: rgb(0,172,237, 0.5);
}
summary > h3 {
display: inline;
}
/* Serve a light reading theme on mobile devices which currenty default to darkmode */
body,
main#site-main.site-main.outer,
h1.post-full-title,
section.post-full-content,
.post-feed,
.page-template .site-main,
.post-template .site-main {
color:#000;
background-color: #F5F2EF !important;
background-color: rgb(245 242 239) !important;
}
h2.post-card-title,
h4.author-name a,
.post-card-content a {
color:#000;
}
.post-full-content a {
color: #26a8ed;
}
.post-full-content em, .post-full-content strong {
color:#000;
}
/* Contain inserted images to page content width */
.post-full-content img, .post-full-content video {max-width: 100%}
/* Miscellaneous Undocumented */
.post-full-header {
padding-bottom: 20px;
}
.post-full-byline {
margin: 0;
}
.post-full-content a {
box-shadow: none;
}
.post-card-excerpt {
color: #3e4b50;
}
.static-avatar, a.author-avatar {
margin-left: -4px; /* Fix 2px Avatar glitch */
border: 2px solid #fff;
}
.post-full-content figcaption {
text-align: left;
}
.ddajaxsidepanel {
background: #0000007d !important;
border-left: none !important;
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
/* For Casper: Nudge the top nav menu items and sote logo altogether to vertically center */
/*
.site-nav-left {
padding-top: 12px;
}
*/
</style>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.19.0/themes/prism.min.css" />
<style>
.post-full-content pre {
padding: 20px !important;
border: none;
}
code[class*=language-], pre[class*=language-] {
color: #000;
background: #fff;
text-shadow: 0 1px #fff;
/* font-size: .7em; */
text-align: left;
white-space: pre-line;
word-spacing: normal;
word-wrap: break-word;
}
.post-full-content table td, .post-full-content table th {
white-space: normal;
}
.site-footer {
padding: 0
}
#open-searchbox {
/* position: absolute; */
width: 300px;
height: 20px;
top: 5em;
left: 50%;
margin-left: -150px;
margin-top: -10px;
text-align: center;
}
/**
* Search Overlay
*/
#search-overlay {
display: none;
z-index: 100;
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
overflow-x: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch; /* iOS smooth scrool */
background-color: var(--background-main);
font-size: 1rem;
}
#search-close-btn {
z-index: 100;
position: absolute;
top: 1em;
right: 1.5em;
width: 1.3em;
height: 1.3em;
padding: 0.5em;
cursor: pointer;
fill: var(--light-grey);
transition: all .3s ease;
}
#search-close-btn:hover {
fill: var(--medium-grey);
}
@media screen and (max-width:950px) {
#search-close-btn {
width: 1.2em;
height: 1.2em;
top: 5px;
right: 6px;
}
}
@media screen and (max-width:568px) {
#search-close-btn {
width: 1em;
height: 1em;
top: 5px;
right: 6px;
}
}
/**
* Search Bar (upper section)
*/
.search-bar-container {
position: relative;
width: 100%;
border-bottom: 1px solid var(--borders);
background-color: var(--background-alt);
overflow: hidden;
}
.search-bar-wrapper {
max-width: 700px;
margin: 1.5em auto;
padding: 0 1em;
}
@media screen and (max-width:950px) {
.search-bar-wrapper {
margin: 2.5em auto 1.5em auto;
}
}
.search-form {
display: flex;
justify-content: flex-end;
align-items: stretch;
border-bottom: 1px solid var(--light-grey);
}
#search-bar {
flex-grow: 1;
flex-shrink: 1;
width: 100px;
border: none;
font-size: 3em;
line-height: 1.5em;
color: var(--heavy-grey);
font-weight: 200;
background-color: transparent;
}
#search-bar:focus {
outline: none;
}
#search-bar::placeholder {
color: var(--light-grey);
opacity: 1;
font-weight: 200;
}
#search-bar::-webkit-input-placeholder {
color: var(--light-grey);
opacity: 1;
font-weight: 200;
}
#search-bar::-moz-placeholder {
color: var(--light-grey);
opacity: 1;
font-weight: 200;
}
.search-button {
flex-grow: 0;
position: relative;
width: 3.5em;
padding: 2px;
right: 0;
bottom: -0.2em;
border: none;
background-color: transparent;
cursor: pointer;
fill: var(--light-grey);
transition: all .3s ease;
}
.search-button:hover {
fill: var(--medium-grey);
}
#search-bar-items-found {
margin: 0.9em 0 0 0;
height: 0.9em;
font-size: 0.9em;
font-weight: 300;
line-height: 0.9em;
color: var(--medium-grey);
}
/**
* Search Results section
*/
#search-results {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
align-items: stretch;
margin: 0 auto;
padding: 0.5em 0 0.5em 0;
max-width: 900px;
}
@media screen and (max-width:950px) {
#search-results {
padding: 0.5em 2em 0.5em 2em;
}
}
@media screen and (max-width:568px) {
#search-results {
padding: 0.5em 0em 0.5em 0em;
}
}
.search-results-item {
flex-basis: calc(33% - (2 * 0.5em));
overflow: hidden;
margin: 0.5em;
border-radius: 5px;
background-color: var(--background-alt);
box-shadow: 0 0 1px rgba(0,0,0,.06),0 2px 6px rgba(0,0,0,.03);
transition: box-shadow 0.3s ease;
}
@media screen and (max-width:950px) {
.search-results-item {
flex-basis: calc(50% - (2 * 0.5em) - 2px);
}
}
@media screen and (max-width:568px) {
.search-results-item {
flex-basis: 100%;
margin: 0.5em 1em;
}
}
.search-results-item:hover {
box-shadow: 0px 0px 1px rgba(0,0,0,.12),1px 2px 7px rgba(0,0,0,.08);
}
.search-results-item:hover img {
filter: brightness(110%);
}
.search-results-item > a {
display: block;
height: 100%; /* fully clickable */
text-decoration: none;
border-radius: 4px;
}
.search-results-item img {
width: 100%;
height: 10em;
object-fit: cover;
filter: brightness(1);
transition: filter 0.3s ease;
}
.search-results-item section {
padding: 0.8em 0.8em 0.7em 0.8em;
}
.search-results-item header {
font-size: 0.65em;
color: var(--grey);
text-transform: uppercase;
}
.search-results-item .head-tags {
border: 1px solid var(--grey);
border-radius: 3px;
padding: 2.8px 4px 1px 5px;
}
.search-results-item .head-date {
margin-left: 0.5em;
}
.search-results-item h2 {
color: var(--heavy-grey);
margin: 0.5em 0 0 0;
font-size: 1.25em;
font-weight: 300;
line-height: 1.3em;
}
</style>
<style>
.ddajaxsidepanel{position:fixed;top:0;visibility:hidden;background:#0000007d;z-index:1000;border-color:#fff;border-left:none;-moz-box-shadow:-5px 0 5px #00000030;-webkit-box-shadow:-5px 0 5px #00000030;box-shadow:-5px 0 5px #00000030;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ddajaxsidepanel .panelhandle{width:24px;height:100%;position:absolute;left:-14px;top:40%;cursor:pointer;background-image: url("data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='23px' height='120px' viewBox='0 0 23 120' enable-background='new 0 0 23 120' xml:space='preserve'%3E%3Cimage id='image0' width='23' height='120' x='0' y='0' xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAB4CAQAAACzgaGkAAAABGdBTUEAALGPC/xhBQAAAAJiS0dE%0AAP+Hj8y/AAAAB3RJTUUH5AMCAQwPkWB5xQAAAoRJREFUWMPtmL2OEzEUhT//ZLMo5SbQoqWHNBQU%0ACBpehddCghIJCkqafQq0VURFw65EQ7EZ25fCd2xPshOyEgiK8chSxvPdM8eeicY6RngnVxzTFrw2%0A5q1cAYujCsBfscAy19M5YDAACALcNPANHixz5sAMh8Xiy+VA4pRIV9UXDezxeMACkPAEAoAWzHup%0ADJ/gcQrnAlvOcoEHsAWeYUpBIjalkdTjFXbqv9eOt+Ng1ZDDlZWJ+isBjkjCwxzLCRaDY4ZtcINF%0ASFhOSLiMg1Vtix2Y6ec1I+mYB4NX7bwuDoNB9B4eIWLxBLqMZ02jvaoLomNOx8sjzIN5OKtbBLSg%0Ab5ZSmYdduYvBqUx/OHx9EPke9RWr/mnVe9AUfLebffy49ifw3sbfUZ/wCZ/wCZ/wCb8LfsG3g7gf%0Anm7YcM4L7h1vZsMbvtzN+wXv+fF7M7Vdcskr1seuzBnwmU/8PIRfDwrO+M4Hvh5Sv94dGCCj3mEF%0ALHmMYTuOnxUUnrGkazbMe3iFH7KGZpc6ambFgqesSHvwrfgjnuBG5rODn7Pm/oHXdAd/Oaq7v6hH%0AtAmf8Amf8An/r3DR/s/MSLGw36sxn25xLaMzsDkGyocAESFpj4CUq4lYv3xC0nDIaHaSgagyaqYH%0AXVHNUYg0d0nFgQchaMZjdOZ9nJOIBLUXiOhnOJHoMFjNk/qpRi3pSHrFww2nbLEIkQ5XUhkhElV7%0AqxsKDxDxJN23SEmp+ql2JAYxWtSgL0NtSCd0BLbqvHivOxfXLFueaoZTxSkbqDQIGCEQCE0iWR5T%0Ap0jYiS/TML6s70NHxOEIjXosNvLz8O1eOq9/G18O2wOM8FHCyH+nbTOWPDe/ALVD/hNRTYHKAAAA%0AJXRFWHRkYXRlOmNyZWF0ZQAyMDIwLTAzLTAyVDAxOjEyOjE1KzAzOjAwvKCTlwAAACV0RVh0ZGF0%0AZTptb2RpZnkAMjAyMC0wMy0wMlQwMToxMjoxNSswMzowMM39KysAAAAASUVORK5CYII=' /%3E%3C/svg%3E");background-repeat:no-repeat}.ddajaxsidepanel .contentarea{height:100%;padding:10px;overflow:auto}table.sidepanelwrap td:not([align]),th:not([align]){text-align:center;vertical-align:middle}audio{vertical-align:baseline;border:5px solid #d3d3d3;border-radius:25px}audio:focus{outline:0}details{width:100%;background-color:#eee;padding:15px;border-radius:5px}details p{width:auto;padding:1em 0 0}summary{background-color:rgb(59,89,152,.5);color:#fff;padding:0 0 0 15px;margin:-5px;cursor:pointer;border-radius:5px}summary:focus,summary:hover{background-color:rgb(0,172,237,.5)}summary>h3{display:inline}.cp_embed_wrapper{width:100%}.cp_embed_wrapper iframe{margin:0 auto!important;height:400px}
div.ddajaxsidepanel iframe {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
border: 0 none;
}
</style>
<style>
details {
width: 100%;
background-color: #eee;
padding: 15px !important;
border-radius: 5px;
top:26px !important
}
</style>
<style>
div.otterframe{overflow:hidden;border-radius:10px;background-color:#f4f4f4;/*width:30em;*/width:100%;margin:auto;box-shadow:-1px 3px 15px -4px #77645b}div.otterframe iframe{height:500px;width:100%;border:0 none;margin:-90px 0 0!important}@media (max-width:767px){div.otterframe{width:100%;box-shadow:none}}
.ddajaxsidepanel,.ddottersidepanel{position:fixed;top:0;visibility:hidden;background:#0000007d;z-index:1000000;border-color:#fff;border-left:none;-moz-box-shadow:-5px 0 5px #00000030;-webkit-box-shadow:-5px 0 5px #00000030;box-shadow:-5px 0 5px #00000030;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}
div.ddajaxsidepanel iframe{width:100%;height:100%;margin:0;padding:0;/*background-color:#fff;*/border:0 none}
div.ddottersidepanel iframe{height:calc(100vh + 37px);width:100%;margin:-77px 0 0;padding:0;border:0 none;border-bottom:20px #fff inset}
.ddajaxsidepanel .panelhandle,.ddottersidepanel .panelhandle{width:24px;height:120px;position:absolute;left:-14px;top:35%;cursor:pointer;background-image: url("data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='23px' height='120px' viewBox='0 0 23 120' enable-background='new 0 0 23 120' xml:space='preserve'%3E%3Cimage id='image0' width='23' height='120' x='0' y='0' xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAB4CAQAAACzgaGkAAAABGdBTUEAALGPC/xhBQAAAAJiS0dE%0AAP+Hj8y/AAAAB3RJTUUH5AMCAQwPkWB5xQAAAoRJREFUWMPtmL2OEzEUhT//ZLMo5SbQoqWHNBQU%0ACBpehddCghIJCkqafQq0VURFw65EQ7EZ25fCd2xPshOyEgiK8chSxvPdM8eeicY6RngnVxzTFrw2%0A5q1cAYujCsBfscAy19M5YDAACALcNPANHixz5sAMh8Xiy+VA4pRIV9UXDezxeMACkPAEAoAWzHup%0ADJ/gcQrnAlvOcoEHsAWeYUpBIjalkdTjFXbqv9eOt+Ng1ZDDlZWJ+isBjkjCwxzLCRaDY4ZtcINF%0ASFhOSLiMg1Vtix2Y6ec1I+mYB4NX7bwuDoNB9B4eIWLxBLqMZ02jvaoLomNOx8sjzIN5OKtbBLSg%0Ab5ZSmYdduYvBqUx/OHx9EPke9RWr/mnVe9AUfLebffy49ifw3sbfUZ/wCZ/wCZ/wCb8LfsG3g7gf%0Anm7YcM4L7h1vZsMbvtzN+wXv+fF7M7Vdcskr1seuzBnwmU/8PIRfDwrO+M4Hvh5Sv94dGCCj3mEF%0ALHmMYTuOnxUUnrGkazbMe3iFH7KGZpc6ambFgqesSHvwrfgjnuBG5rODn7Pm/oHXdAd/Oaq7v6hH%0AtAmf8Amf8An/r3DR/s/MSLGw36sxn25xLaMzsDkGyocAESFpj4CUq4lYv3xC0nDIaHaSgagyaqYH%0AXVHNUYg0d0nFgQchaMZjdOZ9nJOIBLUXiOhnOJHoMFjNk/qpRi3pSHrFww2nbLEIkQ5XUhkhElV7%0AqxsKDxDxJN23SEmp+ql2JAYxWtSgL0NtSCd0BLbqvHivOxfXLFueaoZTxSkbqDQIGCEQCE0iWR5T%0Ap0jYiS/TML6s70NHxOEIjXosNvLz8O1eOq9/G18O2wOM8FHCyH+nbTOWPDe/ALVD/hNRTYHKAAAA%0AJXRFWHRkYXRlOmNyZWF0ZQAyMDIwLTAzLTAyVDAxOjEyOjE1KzAzOjAwvKCTlwAAACV0RVh0ZGF0%0AZTptb2RpZnkAMjAyMC0wMy0wMlQwMToxMjoxNSswMzowMM39KysAAAAASUVORK5CYII=' /%3E%3C/svg%3E");background-repeat:no-repeat}
.ddajaxsidepanel .contentarea,.ddottersidepanel .contentarea{height:100%;padding:10px}
</style>
<style>
/* For Dropdown Menus */
li.menu-item-has-children {
position: relative;
padding-right: 25px!important;
display: inline;
}
li.menu-item-has-children:hover ul.ghost-submenu {
visibility: visible!important;
opacity: 1!important;
top: 50px!important;
}
.menu-item-has-children svg {
position: absolute;
right: 0px;
top: 60%;
transform: translate(-0%, -50%) scale(1.1);
}
ul.ghost-submenu li {
list-style: none;
white-space: nowrap;
}
ul.ghost-submenu {
border-radius: 5px;
position: absolute;
visibility: hidden;
z-index: 1;
opacity: 0;
top: 30px;
transition: 0.3s;
box-shadow: 0 1px 5px 0 rgb(0 0 0 / 14%);
max-width: unset !important;
/* Edit below to adjust Dropdown Menu positioning and color */
left: 0;
margin-top: -15px;
padding: 5px 20px 10px 10px;
background: #fff;
color: #000;
}
</style>
<script>
// For Dropdown Menu
(function ($) {
"use strict";
function multiLevel(targetElement = "ul li", mLhasSubmenu = "mL-has-submenu", mLsubmenu = "mL-submenu") {
let mLparentDetecttext = "[-]";
let mLchildDetectText = "[--]";
let mLdomArrayElement = [];
let mLparentIndex = [];
let mLparentLen = 0;
// Find Dropdown parent element
$(`${targetElement} li`).each(function (index, element) {
if ($(this).text().includes(mLparentDetecttext)) {
mLparentIndex.push(index); // Make dropdown parent array index
mLparentLen++;
$(this).push(element);
if (!$(this).hasClass('menu-item-has-children')) {
$(this).addClass(mLhasSubmenu); // Add claas in dropdown element
}
$(this).append(`<ul class="${mLsubmenu}"></ul>`); // Append submenu element
}
});
let elIndex;
// Code last multilevel
let lastMlElementText = $(`.${mLhasSubmenu}`).last().text();
// console.log(lastMlElement);
// Using loop to reach dropdown parent element
for (let i = 0; i < mLparentLen; i++) {
elIndex = 0 // Initial elemet value
// Find subitem element
$(`${targetElement} li`).each(function (index, element) {
let mLsubitem = $(this).text().includes(mLchildDetectText); // Find subitem element
if (mLsubitem) {
if (elIndex + 1 >= mLparentIndex[i + 1] + 1) { // Each loop will be break
return false; //Stoped each loop
}
if (elIndex <= mLparentIndex[i + 1] || elIndex >= mLparentIndex[mLparentIndex.length - 1]) {
if (!mLparentIndex.includes(index)) { //Check if not index already insert
mLdomArrayElement.push(element); // Incert subitem element in dom array
mLparentIndex.push(index); // incert subitem index in indexPush array
}
}
}
elIndex++; // increase element index value
});
$(`.${mLhasSubmenu} ul.${mLsubmenu}:eq(${i})`).append(mLdomArrayElement); // Append related subitem dom element into submenu
mLdomArrayElement = []; // Make dom array element empty.
}
let lastMlElementIndex = 0; // Find subitem element
let lastChildIndex = 0, lastChildElementText;
$(`${targetElement} li`).each(function (index, element) {
let lastMlElement = $(this).text().includes(lastMlElementText); // Find subitem element
if (lastMlElement) {
if (!$(this).hasClass('mLlastPrentElement')) {
$(this).addClass('mLlastPrentElement');
lastChildElementText = $(this).parent().children('li').last().text();
lastMlElementIndex = index;
}
}
if ($(this).text().includes(lastChildElementText)) {
lastChildIndex = index;
}
if (lastMlElementIndex < index && lastMlElementIndex > 0) {
$(this).addClass('mLlastChildElements');
$(".mLlastPrentElement ul").append($(`.mLlastChildElements`));
if (lastChildIndex == index) {
return false;
}
}
});
remove_text(mLhasSubmenu, mLparentDetecttext);
remove_text('subitem', mLchildDetectText);
}
function remove_text(textClass, replacedText) {
const mLhasSubmenuEL = $(`.${textClass}`);
mLhasSubmenuEL.each(function () {
if ($(this).find("> a:first").text().includes(replacedText)) {
let textFull = $(this).find("> a:first").text(); // Find has child inner text
$(this).find("> a:first").text(textFull.replaceAll(replacedText, ""));
}
});
}
function megamenu(hasMegaMenuClasses = "menu-item-has-megamenu", col = 3, item_slice = 4, hasMegaMenuDetectText = "[has_megamenu]", submenuUlClasses = "ghost-submenu") {
let megaMenuEl = $(`.${hasMegaMenuClasses} li`);
$(`.${hasMegaMenuClasses} .${submenuUlClasses}`).addClass('row');
let titleText = [];
let titleIndex = 0;
megaMenuEl.each(function (index, element) {
if ($(this).text().includes("[title]")) {
titleIndex++;
$(this).addClass("megamenu-title");
titleText.push($(this).text())
$(".megamenu-title").empty();
}
});
for (let i = 0; i < megaMenuEl.length; i += item_slice) {
megaMenuEl.slice(i, i + item_slice).wrapAll(`<div class='col-md-${col}'></div>`);
// console.log(titleText[i]);
// console.log(titleText);
}
for (let i = 0; i < titleText.length; i++) {
$(`.${submenuUlClasses} > div:eq(${i})`).prepend(`<h6 class="megamenu-title-text text-danger">${titleText[i]}</h6>`);
$(".megamenu-title-text").text(titleText[i].replaceAll("[title]", ""));
}
remove_text(hasMegaMenuClasses, hasMegaMenuDetectText);
}
function ghost_dropdown(options) {
// Default options
let defultOptions = {
targetElement: "ul li",
hasChildrenClasses: "menu-item-has-children",
hasChildDetectText: "[has_child]",
hasChildrenIcon: "<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-caret-down' viewBox='0 0 16 16'><path d='M3.204 5h9.592L8 10.481 3.204 5zm-.753.659 4.796 5.48a1 1 0 0 0 1.506 0l4.796-5.48c.566-.647.106-1.659-.753-1.659H3.204a1 1 0 0 0-.753 1.659z'/></svg>",
hasMegaMenuDetectText: "[has_megamenu]",
hasMegaMenuClasses: "menu-item-has-megamenu",
submenuUlClasses: "ghost-submenu",
subitemDetectText: "[subitem]",
subitemLiClasses: "subitem"
}
//Marge defaultOptions
options = {
...defultOptions,
...options
}
// Target Element
let targetElement = options.targetElement;
//Default value
let hasChildrenClasses = options.hasChildrenClasses;
let hasChildDetectText = options.hasChildDetectText;
let hasMegaMenuClasses = options.hasMegaMenuClasses;
let hasMegaMenuDetectText = options.hasMegaMenuDetectText;
let hasChildrenIcon = options.hasChildrenIcon;
let submenuUlClasses = options.submenuUlClasses;
let subitemDetectText = options.subitemDetectText;
let subitemLiClasses = options.subitemLiClasses;
// Declare neccesary variable
let parentEl = $(targetElement);
let childEL = $(targetElement);
let parentLen = 0;
let domArrayElement = [];
let indexPush = [];
let elIndex = 0;
let parentIndex = [];
$(`${targetElement}`).parent().addClass('ghost-dropdown-menu');
let that;
// Find Dropdown parent element
parentEl.each(function (index, element) {
if ($(this).text().indexOf(hasChildDetectText) >= 0) {
parentIndex.push(index); // Make dropdown parent array index
parentLen++;
$(this).push(element);
$(this).addClass(hasChildrenClasses); // Add claas in dropdown element
$(this).append(`<ul class='${submenuUlClasses}'></ul>`); // Append submenu element
$(targetElement).css("opacity", "1");
}
if ($(this).text().includes(hasMegaMenuDetectText)) {
$(this).addClass(hasMegaMenuClasses);
that = $(this);
}
});
$(targetElement).css("opacity", "1");
$(`.${hasChildrenClasses}`).append(hasChildrenIcon);
if(!$(hasChildrenClasses).length){
$(targetElement).css("opacity", "1");
}
// Using loop to reach dropdown parent element
for (let i = 0; i < parentLen; i++) {
elIndex = 0 // Initial elemet value
// Find subitem element
childEL.each(function (index, element) {
let subitem = $(this).text().includes(subitemDetectText); // Find subitem element
if (subitem) {
if (elIndex >= parentIndex[i + 1]) { // Each loop will be break
return false; //Stoped each loop
}
if (elIndex <= parentIndex[i + 1] || elIndex >= parentIndex[parentIndex.length - 1]) {
if (!indexPush.includes(index)) { //Check if not index already insert
$(this).addClass(subitemLiClasses); // Add class in subitem element
let st = $(this).children().text(); // Find subitem inner text
$(this).children().text(st.replaceAll(subitemDetectText, "")); // Replace subitem inner text
domArrayElement.push(element); // Incert subitem element in dom array
indexPush.push(index); // incert subitem index in indexPush array
}
}
}
elIndex++; // increase element index value
});
$(`.${hasChildrenClasses} ul.${submenuUlClasses}:eq(${i})`).append(domArrayElement); // Append related subitem dom element into submenu
domArrayElement = []; // Make dom array element empty.
}
remove_text(hasChildrenClasses, hasChildDetectText);
if (options.multi_level) {
multiLevel();
}
if (options.mega_menu) {
megamenu(hasMegaMenuClasses, 3, 4, hasMegaMenuDetectText, submenuUlClasses);
}
}
$(document).ready(function () {
ghost_dropdown({
targetElement: "ul li",
hasChildrenClasses: "menu-item-has-children",
hasChildrenIcon: "<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-caret-down' viewBox='0 0 16 16'><path d='M3.204 5h9.592L8 10.481 3.204 5zm-.753.659 4.796 5.48a1 1 0 0 0 1.506 0l4.796-5.48c.566-.647.106-1.659-.753-1.659H3.204a1 1 0 0 0-.753 1.659z'/></svg>",
hasChildDetectText: "[has_child]",
submenuUlClasses: "ghost-submenu",
subitemDetectText: "[subitem]",
subitemLiClasses: "subitem",
multi_level: true,
mega_menu: true
});
});
}(jQuery));
</script>
<script src="https://microchic.dev/assets/js/iframeResizer.min.js"></script>
<script src="https://microchic.com/assets/js/ddajaxsidepanel.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.19.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/gmfmi/searchinghost-easy@latest/dist/searchinghost-easy-basic.js"></script>
<script>
new SearchinGhostEasy({
contentApiKey: 'c06877e4f60b700f73b0ff0835'
});
</script>
<script>
document.querySelectorAll('[data-ad-placeholder="ads-1"]').forEach((elem) => {
elem.innerHTML = "... your ad html ...";
});
</script>