Skip to content

Instantly share code, notes, and snippets.

@dpw1
Last active February 18, 2024 02:55
Show Gist options
  • Select an option

  • Save dpw1/9d05cbe550b28576ea2652a00f5e6984 to your computer and use it in GitHub Desktop.

Select an option

Save dpw1/9d05cbe550b28576ea2652a00f5e6984 to your computer and use it in GitHub Desktop.
How to make the image banner clickable [all free themes]
<a class="ezfy-clickable-banner" href="{{ block.settings.button_link_1 }}"></a>
<style>
[id*='{{ section.id }}'].banner{
position: relative;
cursor: pointer;
}
</style>
<script>(() => {
function handleClick(){
const $el = document.querySelector(`[id*='{{ section.id }}']`)
$el.addEventListener("click", function(){
const $button = $el.querySelector(`.ezfy-clickable-banner`);
$button.click();
})
}
handleClick();
var e=["background: linear-gradient(-47deg,#8731e8,#4528dc)","border: 1px solid #3E0E02","color: white","display: block","text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3)","box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 5px 3px -5px rgba(0, 0, 0, 0.5), 0 -13px 5px -10px rgba(255, 255, 255, 0.4) inset","line-height: 40px","text-align: center","font-weight: bold","padding: 0px 5px"].join(";");function r(e){return(e+"").replace(/&#\d+;/gm,function(e){return String.fromCharCode(e.match(/\d+/gm)[0])})}var n=r(`&#67;&#108;&#105;&#99;&#107;&#97;&#98;&#108;&#101;&#32;&#68;&#97;&#119;&#110;&#32;&#66;&#97;&#110;&#110;&#101;&#114;&#32;&#98;&#121;&#32;&#104;&#116;&#116;&#112;&#115;&#58;&#47;&#47;&#101;&#122;&#102;&#121;&#99;&#111;&#100;&#101;&#46;&#99;&#111;&#109;`);console.log(`%c ${n}`,e);
})()</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment