优化懒加载
This commit is contained in:
parent
5bcda1aef8
commit
4850d1ac7f
|
@ -24,7 +24,6 @@
|
|||
<th:block th:each="group : ${photoFinder.groupBy()}">
|
||||
<div class="card" th:onclick="go([[${group.metadata.name}]])">
|
||||
<img class="card_cover"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
th:src="${isLazyload ? loadingImg : #annotations.get(group, 'cover')}"
|
||||
th:data-lazy-src="${ isLazyload ? #annotations.get(group, 'cover') : ''}"
|
||||
>
|
||||
|
@ -45,10 +44,8 @@
|
|||
<th:block th:each="group : ${photoFinder.groupBy()}">
|
||||
<figure class="gallery-group">
|
||||
<img class="gallery-group-img no-lightbox"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
th:src="${isLazyload ? loadingImg : #annotations.get(group, 'cover')}"
|
||||
th:data-lazy-src="${ isLazyload ? #annotations.get(group, 'cover') : ''}"
|
||||
|
||||
alt="Group Image Gallery">
|
||||
<figcaption>
|
||||
<div class="gallery-group-name">[[${group.spec.displayName}]]</div>
|
||||
|
|
|
@ -443,7 +443,10 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
window.lazyLoadInstance = new LazyLoad({
|
||||
elements_selector: 'img',
|
||||
threshold: 0,
|
||||
data_src: 'lazy-src'
|
||||
data_src: 'lazy-src',
|
||||
callback_error: (img) => {
|
||||
img.setAttribute("srcset", GLOBAL_CONFIG.lazyload.error);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -28,9 +28,10 @@
|
|||
|
||||
<div class="equipment-item-content-item" th:each="equipment : ${equipmentList}">
|
||||
<div class="equipment-item-content-item-cover">
|
||||
<img class="equipment-item-content-item-image entered loaded"
|
||||
<img class="equipment-item-content-item-image"
|
||||
th:alt="${equipment.name}"
|
||||
th:src="${equipment.img}">
|
||||
th:src="${isLazyload ? loadingImg : equipment.img}"
|
||||
th:data-lazy-src="${ isLazyload ? equipment.img : ''}">
|
||||
</div>
|
||||
<div class="equipment-item-content-item-info">
|
||||
<div class="equipment-item-content-item-name"
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
th:src="${isLazyload ? loadingImg : spec.cover}"
|
||||
th:data-lazy-src="${ isLazyload ? spec.cover : ''}"
|
||||
referrerpolicy="no-referrer" width="110"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
style="width:110px;margin:20px auto;">
|
||||
</div>
|
||||
<div class="bangumi-info">
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
<img th:with=" img = @{${linkOdd.spec.logo}}"
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
th:title="${linkOdd.spec.displayName}">
|
||||
</a>
|
||||
<a class="tags-group-icon" target="_blank" th:href="${linkEven.spec.url}"
|
||||
|
@ -35,7 +34,6 @@
|
|||
<img th:with="img = @{${linkEven.spec.logo}}"
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
th:title="${linkEven.spec.displayName}">
|
||||
</a>
|
||||
</div>
|
||||
|
@ -96,7 +94,7 @@
|
|||
<a class="img" target="_blank" th:href="${link.spec.url}" th:title="${link.spec.displayName}">
|
||||
<img class="flink-avatar" style="pointer-events: none;" th:alt="${link.spec.displayName}"
|
||||
th:with="img = @{${#strings.isEmpty(#annotations.get(link, 'siteshot')) ? link.spec.logo : #annotations.get(link,'siteshot') }}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}">
|
||||
</a>
|
||||
|
@ -105,7 +103,7 @@
|
|||
th:title="${link.spec.displayName}">
|
||||
<div class="site-card-avatar">
|
||||
<img class="flink-avatar cf-friends-avatar" th:alt="${link.spec.displayName}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : link.spec.logo}"
|
||||
th:data-lazy-src="${ isLazyload ? link.spec.logo : ''}">
|
||||
</div>
|
||||
|
@ -129,14 +127,14 @@
|
|||
<a class="cf-friends-link" rel="external nofollow" target="_blank" th:href="${link.spec.url}"
|
||||
th:title="${link.spec.displayName}">
|
||||
<img class="flink-avatar cf-friends-avatar" th:alt="${link.spec.displayName}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : link.spec.logo}"
|
||||
th:data-lazy-src="${ isLazyload ? link.spec.logo : ''}">
|
||||
<div class="flink-item-info">
|
||||
<span class="flink-item-name cf-friends-name" th:text="${link.spec.displayName}"></span>
|
||||
<span class="flink-item-desc" th:text="${link.spec.description}"
|
||||
th:title="${link.spec.description}"></span>
|
||||
<img th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
<img
|
||||
th:src="${isLazyload ? loadingImg : link.spec.logo}"
|
||||
th:data-lazy-src="${ isLazyload ? link.spec.logo : ''}">
|
||||
</div>
|
||||
|
@ -150,7 +148,7 @@
|
|||
<a class="cf-friends-link" rel="external nofollow" target="_blank" th:href="${link.spec.url}"
|
||||
th:title="${link.spec.displayName}">
|
||||
<img class="flink-avatar cf-friends-avatar"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : link.spec.logo}"
|
||||
th:data-lazy-src="${ isLazyload ? link.spec.logo : ''}"
|
||||
th:alt="${link.spec.displayName}">
|
||||
|
|
|
@ -195,7 +195,7 @@
|
|||
postUpdate: '2022-11-04 20:08:15',
|
||||
copyright: undefined,
|
||||
lightbox: 'fancybox',
|
||||
lazyload: {enable: [[${theme.config.other.vanillaLazyload.enable}]], error: "/themes/theme-hao/assets/images/404.gif"},
|
||||
lazyload: {enable: [[${theme.config.other.vanillaLazyload.enable}]], error: [[@{${theme.config.other.vanillaLazyload.errorImg}}]] },
|
||||
isFriendLinksInFooter: [[${theme.config.footer.footer_group.enable_footer_group}]],
|
||||
loadingBox: [[${theme.config.other.loadingBoxs.loadingBoxEnable}]],
|
||||
loadProgressBar: [[${theme.config.other.loadingBoxs.loadProgressBar}]],
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
theme.config.other.staticResource.use == 'cbd' ? 'https://cdn.cbd.int/hao-theme-static@' + theme.spec.version +'/templates/assets' :
|
||||
theme.config.other.staticResource.use == 'custom' ? theme.config.other.staticResource.cdn_link : #theme.assets('/')},
|
||||
theme_version = ${ theme.config.other.staticResource.use == 'local' ? '?v='+ theme.spec.version : ''},
|
||||
errorImg = @{${theme.config.other.vanillaLazyload.errorImg}},
|
||||
isLazyload = ${theme.config.other.vanillaLazyload.enable},
|
||||
loadingImg = ${theme.config.other.vanillaLazyload.loadingImg}">
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
<img class="post_bg"
|
||||
th:with='img = ${#strings.isEmpty(post.spec.cover) ? postRandomImg+","+post.spec.title : post.spec.cover}'
|
||||
th:alt="${post.spec.title}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+@{${errorImg}}+'\''"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
th:src="${isLazyload ? loadingImg : img}">
|
||||
</a>
|
||||
|
|
|
@ -18,7 +18,6 @@ containsTitle = ${#strings.contains(recommandPosts,post.spec.title)}">
|
|||
<a th:href="@{${recommandPost.status.permalink}}" th:title="${recommandPost.spec.title}">
|
||||
<img alt="cover" class="cover" id="preimg"
|
||||
th:with="img = ${#strings.isEmpty(recommandPost.spec.cover) ? theme.config.layout.postRandomImg : recommandPost.spec.cover}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}">
|
||||
<div class="content is-center">
|
||||
|
@ -39,7 +38,7 @@ containsTitle = ${#strings.contains(recommandPosts,post.spec.title)}">
|
|||
<a th:href="@{${recommandPost.status.permalink}}" th:title="${recommandPost.spec.title}">
|
||||
<img class="cover" alt="cover"
|
||||
th:with="img = ${#strings.isEmpty(recommandPost.spec.cover) ? theme.config.layout.postRandomImg : recommandPost.spec.cover}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}">
|
||||
<div class="content is-center">
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
rel="external nofollow noreferrer" target="_blank" th:title="${comic.title}" draggable="false">
|
||||
<div class="comic-item-cover"><img
|
||||
th:with="img = @{${comic.bg}}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
th:alt="${comic.title}"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<a th:each="link : ${group.links}"
|
||||
class="card-friend-item online-friend-link" th:href="${link.spec.url}" th:title="${link.spec.displayName}"
|
||||
target="_blank"><img class="no-lightbox card-friend-avatar"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : link.spec.logo}"
|
||||
th:data-lazy-src="${ isLazyload ? link.spec.logo : ''}"
|
||||
th:alt="${link.spec.displayName}">
|
||||
|
@ -36,7 +36,7 @@
|
|||
<a th:each="link : ${group.links}"
|
||||
class="card-friend-item offline-friend-link" th:href="${link.spec.url}" th:title="${link.spec.displayName}"
|
||||
target="_blank"><img class="no-lightbox card-friend-avatar"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : link.spec.logo}"
|
||||
th:data-lazy-src="${ isLazyload ? link.spec.logo : ''}"
|
||||
th:alt="${link.spec.displayName}">
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</div>
|
||||
<img class="avatar-img"
|
||||
th:with=" img = @{${#strings.isEmpty(site.logo) ? assets_link + '/images/hao-logo.jpg' : site.logo}}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}">
|
||||
</div>
|
||||
|
@ -146,13 +146,13 @@
|
|||
<div class="avatar-img-group">
|
||||
<img class="avatar-img" alt="avatar"
|
||||
th:with="img = @{${#strings.isEmpty(site.logo) ? assets_link + '/images/hao-logo.jpg' : site.logo}}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}">
|
||||
<div class="avatar-sticker">
|
||||
<img class="avatar-sticker-img" alt="avatar"
|
||||
th:with="img = @{${theme.config.sidebar.profile.stickerImg}}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}">
|
||||
</div>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<a class="thumbnail" th:href="@{${post.status.permalink}}" th:title="${post.spec.title}">
|
||||
<img th:alt="${post.spec.title}"
|
||||
th:with="img = ${#strings.isEmpty(post.spec.cover) ? postRandomImg+post.spec.title : post.spec.cover}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}">
|
||||
</a>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<div class="tags-group-icon" style="background:#989bf8">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/AfterEffect.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="AfterEffect">
|
||||
|
@ -29,7 +29,7 @@
|
|||
<div class="tags-group-icon" style="background:#fff">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/Sketch.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="Sketch">
|
||||
|
@ -39,7 +39,7 @@
|
|||
<div class="tags-group-icon" style="background:#57b6e6">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/Docker.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="Docker">
|
||||
|
@ -47,7 +47,7 @@
|
|||
<div class="tags-group-icon" style="background:#4082c3">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/Photoshop.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="Photoshop">
|
||||
|
@ -57,7 +57,7 @@
|
|||
<div class="tags-group-icon" style="background:#fff">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/FinalCutPro.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="FinalCutPro">
|
||||
|
@ -65,7 +65,7 @@
|
|||
<div class="tags-group-icon" style="background:#fff">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/Python.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="Python">
|
||||
|
@ -75,7 +75,7 @@
|
|||
<div class="tags-group-icon" style="background:#eb6840">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/Swift.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="Swift">
|
||||
|
@ -83,7 +83,7 @@
|
|||
<div class="tags-group-icon" style="background:#8f55ba">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/Principle.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="Principle">
|
||||
|
@ -93,7 +93,7 @@
|
|||
<div class="tags-group-icon" style="background:#f29e39">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/illustrator.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="illustrator">
|
||||
|
@ -101,7 +101,7 @@
|
|||
<div class="tags-group-icon" style="background:#2c51db">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/CSS3.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="CSS3">
|
||||
|
@ -111,7 +111,7 @@
|
|||
<div class="tags-group-icon" style="background:#f7cb4f">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/JS.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="JS">
|
||||
|
@ -119,7 +119,7 @@
|
|||
<div class="tags-group-icon" style="background:#e9572b">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/HTML.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="HTML">
|
||||
|
@ -129,7 +129,7 @@
|
|||
<div class="tags-group-icon" style="background:#df5b40">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/Git.webp'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="Git">
|
||||
|
@ -137,7 +137,7 @@
|
|||
<div class="tags-group-icon" style="background:#e65164">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/Apifox.webp'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="Apifox">
|
||||
|
@ -147,7 +147,7 @@
|
|||
<div class="tags-group-icon" style="background:#989bf8">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/AfterEffect.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="AfterEffect">
|
||||
|
@ -155,7 +155,7 @@
|
|||
<div class="tags-group-icon" style="background:#fff">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/Sketch.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="Sketch">
|
||||
|
@ -165,7 +165,7 @@
|
|||
<div class="tags-group-icon" style="background:#57b6e6">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/Docker.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="Docker">
|
||||
|
@ -173,7 +173,7 @@
|
|||
<div class="tags-group-icon" style="background:#4082c3">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/Photoshop.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="Photoshop">
|
||||
|
@ -183,7 +183,7 @@
|
|||
<div class="tags-group-icon" style="background:#fff">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/FinalCutPro.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="FinalCutPro">
|
||||
|
@ -191,7 +191,7 @@
|
|||
<div class="tags-group-icon" style="background:#fff">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/Python.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="Python">
|
||||
|
@ -201,7 +201,7 @@
|
|||
<div class="tags-group-icon" style="background:#eb6840">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/Swift.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="Swift">
|
||||
|
@ -209,7 +209,7 @@
|
|||
<div class="tags-group-icon" style="background:#8f55ba">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/Principle.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="Principle">
|
||||
|
@ -219,7 +219,7 @@
|
|||
<div class="tags-group-icon" style="background:#f29e39">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/illustrator.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="illustrator">
|
||||
|
@ -227,7 +227,7 @@
|
|||
<div class="tags-group-icon" style="background:#2c51db">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/CSS3.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="CSS3">
|
||||
|
@ -237,7 +237,7 @@
|
|||
<div class="tags-group-icon" style="background:#f7cb4f">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/JS.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="JS">
|
||||
|
@ -245,7 +245,7 @@
|
|||
<div class="tags-group-icon" style="background:#e9572b">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/HTML.png'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="HTML">
|
||||
|
@ -255,7 +255,7 @@
|
|||
<div class="tags-group-icon" style="background:#df5b40">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/Git.webp'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="Git">
|
||||
|
@ -263,7 +263,7 @@
|
|||
<div class="tags-group-icon" style="background:#e65164">
|
||||
<img
|
||||
th:with=" img = ${assets_link + '/images/icons/Apifox.webp'}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
title="Apifox">
|
||||
|
@ -282,7 +282,7 @@
|
|||
th:with="techOdd = ${techs.get(iterStat.index - 1)}">
|
||||
<img
|
||||
th:with=" img = @{${techOdd.url}}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
th:title="${techOdd.name}">
|
||||
|
@ -293,7 +293,7 @@
|
|||
th:with="techEven = ${tech}">
|
||||
<img
|
||||
th:with=" img = @{${techEven.url}}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
th:title="${techEven.name}">
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<img class="post_bg"
|
||||
th:with=' img = ${#strings.isEmpty(post.spec.cover) ? postRandomImg+","+post.spec.title : post.spec.cover}'
|
||||
th:alt="${post.spec.title}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
|||
<img class="post_bg"
|
||||
th:with='img = ${#strings.isEmpty(post.spec.cover) ? postRandomImg+","+post.spec.title : post.spec.cover}'
|
||||
th:alt="${post.spec.title}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}"
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
th:if="${momentItem.type.name == 'PHOTO'}"
|
||||
th:src="${isLazyload ? loadingImg : momentItem.url}"
|
||||
th:data-lazy-src="${ isLazyload ? momentItem.url : ''}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
title="瞬间配图">
|
||||
<div class="bber-content-noimg"></div>
|
||||
<div class="bber-content-noimg"></div>
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
<img alt="cover" id="preimg" class="nolazyload"
|
||||
th:with="img = ${#strings.isEmpty(postCursor.previous.spec.cover) ? theme.config.layout.postRandomImg : postCursor.previous.spec.cover}"
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}">
|
||||
<div class="pagination-info">
|
||||
<div class="label">上一篇</div>
|
||||
|
@ -139,7 +139,6 @@
|
|||
<img alt="cover" id="preimg" class="nolazyload"
|
||||
th:with="img = ${#strings.isEmpty(postCursor.next.spec.cover) ? theme.config.layout.postRandomImg : postCursor.next.spec.cover}"
|
||||
th:src="${isLazyload ? loadingImg : img}"
|
||||
th:attr="onerror='this.onerror=null;this.src=\''+${errorImg}+'\''"
|
||||
th:data-lazy-src="${ isLazyload ? img : ''}">
|
||||
<div class="pagination-info">
|
||||
<div class="label">下一篇</div>
|
||||
|
|
Loading…
Reference in New Issue