Skip to content

Commit fbaa52a

Browse files
fix: 为朋友列表中的图标添加 no-popup 类以防止弹出窗口
Signed-off-by: wangsimiao1 <wangsimiao1@xiaomi.com>
1 parent c959609 commit fbaa52a

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

_includes/refactor-content.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@
181181
{% assign _img_content = _img_content | slice: 0, _size | append: _class | append: '>' %}
182182

183183
{% else %}
184+
{% unless _class contains 'no-popup' %}
184185
<!-- create the image wrapper -->
185186
{% assign _wrapper_start = _final_src
186187
| default: _src
@@ -192,6 +193,7 @@
192193

193194
{% assign _img_content = _img_content | append: _wrapper_start %}
194195
{% assign _right = '></a' | append: _right %}
196+
{% endunless %}
195197
{% endif %}
196198
{% endif %}
197199

_tabs/friends.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ comments: true
2020
<div class="card h-100 post-preview card-clickable" onclick="window.open('{{ friend.url }}','_blank')">
2121
<div class="card-body d-flex align-items-center card-body-inner">
2222
{% if friend.icon and friend.icon != "" %}
23-
<img src="{{ friend.icon }}" alt="{{ friend.name }}" class="rounded-circle me-3 flex-shrink-0 avatar-cover" width="48" height="48" onerror="this.outerHTML='<i class=\'fas fa-globe fa-2x me-3 text-muted\'></i>';" />
23+
<img src="{{ friend.icon }}" alt="{{ friend.name }}" class="rounded-circle me-3 flex-shrink-0 avatar-cover no-popup" width="48" height="48" onerror="this.outerHTML='<i class=\'fas fa-globe fa-2x me-3 text-muted\'></i>';" />
2424
{% else %}
2525
<i class="fas fa-globe fa-2x me-3 text-muted"></i>
2626
{% endif %}

0 commit comments

Comments
 (0)