1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Add image popup effect

This commit is contained in:
Cotes Chung
2021-04-21 23:17:34 +08:00
parent e8296fe2e4
commit 84bb4d0c4b
15 changed files with 124 additions and 74 deletions

View File

@@ -1,12 +0,0 @@
/*
* Create a more beautiful checkbox
*/
$(function() {
/* hide browser default checkbox */
$("input[type=checkbox]").addClass("unloaded");
/* create checked checkbox */
$("input[type=checkbox][checked]").before("<i class=\"fas fa-check-circle checked\"></i>");
/* create normal checkbox */
$("input[type=checkbox]:not([checked])").before("<i class=\"far fa-circle\"></i>");
});

View File

@@ -1,18 +0,0 @@
/*
* Copy current page url to clipboard.
*/
function copyLink(url) {
if (!url || 0 === url.length) {
url = window.location.href;
}
const $temp = $("<input>");
$("body").append($temp);
$temp.val(url).select();
document.execCommand("copy");
$temp.remove();
alert("Link copied successfully!");
}

View File

@@ -1,8 +0,0 @@
/*
* Find the image links and mark them
*/
$(function() {
const MARK = "img-link";
$("#main a").has("img").addClass(MARK);
});