adding an image-selected feature. uses are wip
This commit is contained in:
@@ -245,6 +245,7 @@ func (ch *CaddyHugo) serveMediaPage(w http.ResponseWriter, r *http.Request) (int
|
||||
<head><style>
|
||||
iframe { height: 100%; }
|
||||
.img { display: inline-block; text-align: center; max-width: 19.9vw; min-height: 120px;}
|
||||
.img.selected { background-color: light-blue; }
|
||||
.copy { cursor: pointer; }
|
||||
@media (max-width: 800px) {
|
||||
.img {
|
||||
@@ -290,6 +291,13 @@ func (ch *CaddyHugo) serveMediaPage(w http.ResponseWriter, r *http.Request) (int
|
||||
evt.target.previousSibling.select();
|
||||
document.execCommand("copy");
|
||||
}
|
||||
if (evt.target.tagName === "IMG") {
|
||||
var current = document.querySelector(".img.selected");
|
||||
if (current) {
|
||||
current.classList = "img";
|
||||
}
|
||||
evt.target.parentElement.classList = "img selected";
|
||||
}
|
||||
}
|
||||
document.querySelector('body').onmouseup = function (evt) {
|
||||
if (evt.target.tagName === "INPUT" && evt.target.type === "text") {
|
||||
|
||||
Reference in New Issue
Block a user