Skip to content

Commit

Permalink
ссылки на оригиналы только для больших картинок
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcom committed Oct 7, 2023
1 parent 09ce6c3 commit ed7ebf0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/webapp/WEB-INF/tags/image.tag
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<%@ taglib prefix="l" uri="http://www.linux.org.ru" %>
<%@ tag pageEncoding="UTF-8"%>
<%--
~ Copyright 1998-2018 Linux.org.ru
~ Copyright 1998-2023 Linux.org.ru
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
Expand All @@ -28,7 +28,9 @@
<figure class="medium-image"
style="position: relative; padding-bottom: ${ 100.0 * image.mediumInfo.height / image.mediumInfo.width }%; margin: 0"
<c:if test="${enableSchema}">itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject"</c:if>>
<a href="${image.fullName}" itemprop="contentURL">
<c:if test="${image.fullInfo.width > 2000 || image.fullInfo.height > 2000}">
<a href="${image.fullName}" itemprop="contentURL">
</c:if>
<img
itemprop="thumbnail"
class="medium-image"
Expand All @@ -38,7 +40,9 @@
sizes="100vw" style="position: absolute"
${image.mediumInfo.code}>
<meta itemprop="caption" content="${preparedMessage.message.title}">
</a>
<c:if test="${image.fullInfo.width > 2000 || image.fullInfo.height > 2000}">
</a>
</c:if>
</figure>
<c:if test="${enableEdit && not preparedMessage.section.imagepost}">
<div>
Expand Down

0 comments on commit ed7ebf0

Please sign in to comment.