JSFiddle - React, Tailwind, and code Playground

by roadrash

HTML

<script src="http://highslide.com/highslide/highslide-full.js"></script>
<link rel="stylesheet" href="http://highslide.com/highslide/highslide.css">
<div class="highslide-gallery">
    <a href="http://highslide.com/images/gallery1.jpg" class="highslide sold" onclick="return hs.expand(this)">
        <img src="http://highslide.com/images/gallery1.thumb.jpg" alt="Caption text" />
    </a>
    <a href="http://highslide.com/images/gallery2.jpg" class="highslide" onclick="return hs.expand(this)">
        <img src="http://highslide.com/images/gallery2.thumb.jpg" alt="Caption text" />
    </a>
    <a href="http://highslide.com/images/gallery3.jpg" class="highslide sold" onclick="return hs.expand(this)">
        <img src="http://highslide.com/images/gallery3.thumb.jpg" alt="Caption text" />
    </a>
</div>

CSS

.highslide-heading a {
    position: absolute;
    margin: 0;
    padding: 5px;
    background: white;
    font-size: smaller;
    font-weight: normal;
    color: black;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid silver;
    border-radius: 5px;
}
.img-path {
    position: absolute;
    top: 10px;
    left: 15px;
}
.close-button {
    
    top: 10px;
    right: 15px;
}

/*.img-path {
    text-decoration: none; 
    font: menu;
    display: inline-block; 
    padding: 2px 8px;
    background: ButtonFace; 
    color: ButtonText;
    border-style: solid; 
    border-width: 2px;
    border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
}
.img-path:active {
    border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
}*/

JavaScript

// custom buttons in heading overlay

hs.graphicsDir = 'http://highslide.com/highslide/graphics/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.outlineType = 'drop-shadow';
hs.wrapperClassName = 'borderless';
hs.fadeInOut = true;
hs.captionEval = 'this.thumb.alt';
hs.dimmingOpacity = 0.75;
hs.showCredits = false;

// add custom buttons to the heading overlay
//create an empty heading overlay
hs.headingText = ' ';
// add buttons to the heading overlay
hs.Expander.prototype.onAfterGetHeading = function (sender) {
    imgPath = sender.content.src;
    if (sender.heading) {
        sender.heading.innerHTML +=
            '<a class="img-path" href="javascript:;" onclick="alert(imgPath); return false;" title="Get path of currant img">Get path of currant img</a><a class="close-button" href="javascript:;" onclick="return hs.close(this)" title="Close">Close</a>';
    }
};
// settings for the heading overlay
hs.headingOverlay = {
    position: 'top',
    width: '100%',
    hideOnMouseOut: false
};