From d53e64b0322db7ee84785dbf83dfd3271dd20093 Mon Sep 17 00:00:00 2001 From: Maxim Valyanskiy Date: Mon, 6 Jan 2025 22:57:19 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BE=D0=B3=D1=80=D0=B0=D0=BD=D0=B8=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B2=D1=8B=D1=81=D0=BE=D1=82=D1=8B?= =?UTF-8?q?=20=D0=B8=D0=B7=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B9=20=D0=B2=20=D0=BB=D0=B5=D0=BD=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/tags/image.tag | 9 ++++++--- src/main/webapp/WEB-INF/tags/news.tag | 2 +- src/main/webapp/sass/_common.scss | 2 -- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/WEB-INF/tags/image.tag b/src/main/webapp/WEB-INF/tags/image.tag index a073a944b..ce6f4d174 100644 --- a/src/main/webapp/WEB-INF/tags/image.tag +++ b/src/main/webapp/WEB-INF/tags/image.tag @@ -23,12 +23,15 @@ <%@ attribute name="showInfo" required="false" type="java.lang.Boolean" %> <%@ attribute name="enableEdit" required="false" type="java.lang.Boolean" %> <%@ attribute name="sizes" required="false" type="java.lang.String" %> +<%@ attribute name="heightLimit" required="false" type="java.lang.String" %> <%@ attribute name="enableSchema" required="false" type="java.lang.Boolean" %> + + -
+
- style="position: relative; padding-bottom: ${ 100.0 * image.mediumInfo.height / image.mediumInfo.width }%; padding-bottom: min(${ 100.0 * image.mediumInfo.height / image.mediumInfo.width }%, 90vh); margin: 0" + style="position: relative; padding-bottom: ${ 100.0 * image.mediumInfo.height / image.mediumInfo.width }%; padding-bottom: min(${ 100.0 * image.mediumInfo.height / image.mediumInfo.width }%, ${heightLimitValue}); margin: 0" itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject"> @@ -39,7 +42,7 @@ src="${image.mediumName}" alt="${title}" srcset="${image.srcset}" - sizes="${sizesValue}" style="position: absolute" + sizes="${sizesValue}" style="position: absolute; max-height: ${heightLimitValue}" ${image.loadingCode} ${image.mediumInfo.code}> diff --git a/src/main/webapp/WEB-INF/tags/news.tag b/src/main/webapp/WEB-INF/tags/news.tag index 65c783513..a458ed883 100644 --- a/src/main/webapp/WEB-INF/tags/news.tag +++ b/src/main/webapp/WEB-INF/tags/news.tag @@ -90,7 +90,7 @@ + preparedMessage="${preparedMessage}" showImage="true" heightLimit="50vh"/> diff --git a/src/main/webapp/sass/_common.scss b/src/main/webapp/sass/_common.scss index 21d24ae80..f8e2b593a 100644 --- a/src/main/webapp/sass/_common.scss +++ b/src/main/webapp/sass/_common.scss @@ -800,7 +800,6 @@ pre code .container:before, pre code .container:after { img.medium-image { width: auto; max-width: 100%; - max-height: 90vh; height: auto; image-orientation: none; left: 50%; @@ -809,7 +808,6 @@ img.medium-image { .medium-image-container { margin: 1em auto; - max-height: 90vh; } figure.medium-image {