Create the code language badge by Liquid

It prevents the language badges from flashing
This commit is contained in:
Cotes Chung
2021-07-04 20:09:45 +08:00
parent 65dbea9d3b
commit 5f1e6e9350
6 changed files with 33 additions and 26 deletions

View File

@@ -25,7 +25,7 @@ $(function() {
const title = nextTag.prop('tagName') === 'EM' ? nextTag.text() : '';
const src = $(this).attr('data-src'); // created by lozad.js
$(this).wrap(`<a href="${src}" title="${title}" class="popup"></a>`);
$(this).wrap(`<a href="${src}" title="${title}" class="popup img-link"></a>`);
}
);
@@ -42,6 +42,4 @@ $(function() {
/* markup the image links */
$(`${IMG_SCOPE} a`).has("img").addClass('img-link');
});