fix(photos): 解决图库分组中间有空格时,导致此分组图片不显示的 bug

#138
This commit is contained in:
lxy 2021-02-28 16:53:33 +08:00
parent 4c8bdf2f78
commit 712e01a2a3
2 changed files with 5 additions and 5 deletions

View File

@ -19,7 +19,7 @@
<@photoTag method="listTeams">
<#list teams as item>
<li>
<a href="javascript:void(0);" data-filter=".${((item.team)?length>0)?string((item.team),'默认')}">${((item.team)?length>0)?string((item.team),'默认')}</a>
<a href="javascript:void(0);" data-filter=".${((item.team)?length>0)?string((item.team),'默认')?replace(' ', '-')}">${((item.team)?length>0)?string((item.team),'默认')}</a>
</li>
</#list>
</@photoTag>
@ -28,7 +28,7 @@
<div class="gallery masonry-gallery">
<@photoTag method="list">
<#list photos as photo>
<div class="gallery-item justify-gallery-item ${((photo.team)?length>0)?string((photo.team),'默认')}">
<div class="gallery-item justify-gallery-item ${((photo.team)?length>0)?string((photo.team),'默认')?replace(' ', '-')}">
<a data-fancybox="gallery" href="${photo.url!}">
<#if settings.is_thumbnail!true>
<img src="${photo.thumbnail!}"/>

View File

@ -19,7 +19,7 @@
<@photoTag method="listTeams">
<#list teams as item>
<li>
<a href="javascript:void(0);" data-filter=".${((item.team)?length>0)?string((item.team),'默认')}">${((item.team)?length>0)?string((item.team),'默认')}</a>
<a href="javascript:void(0);" data-filter=".${((item.team)?length>0)?string((item.team),'默认')?replace(' ', '-')}">${((item.team)?length>0)?string((item.team),'默认')}</a>
</li>
</#list>
</@photoTag>
@ -53,9 +53,9 @@
<@photoTag method="list">
<#list photos as photo>
<#if settings.photos_style == "masonry">
<figure class="gallery-item col-${settings.masonry_column!'3'} ${((photo.team)?length>0)?string((photo.team),'默认')}">
<figure class="gallery-item col-${settings.masonry_column!'3'} ${((photo.team)?length>0)?string((photo.team),'默认')?replace(' ', '-')}">
<#else>
<figure class="gallery-item ${((photo.team)?length>0)?string((photo.team),'默认')}">
<figure class="gallery-item ${((photo.team)?length>0)?string((photo.team),'默认')?replace(' ', '-')}">
</#if>
<header class="gallery-icon">
<a data-fancybox="gallery" href="${photo.url!}">