Skip to content

Commit

Permalink
fix(ui): teaser image inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
RaneHyv committed Mar 4, 2024
1 parent 4497d51 commit fe09deb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
20 changes: 11 additions & 9 deletions frontend/src/components/blocks/Teaser/TeaserHeroTemplate.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Message } from 'semantic-ui-react';
import { defineMessages, useIntl } from 'react-intl';
import { MaybeWrap, UniversalLink } from '@plone/volto/components';
import imageBlockSVG from '@plone/volto/components/manage/Blocks/Image/block-image.svg';
import { flattenToAppURL, isInternalURL } from '@plone/volto/helpers';
import { getTeaserImageURL } from '@plone/volto/components/manage/Blocks/Teaser/utils';
import { MaybeWrap } from '@plone/volto/components';
import { UniversalLink } from '@plone/volto/components';
import cx from 'classnames';
import {
BodyClass,
flattenToAppURL,
isInternalURL,
} from '@plone/volto/helpers';
import config from '@plone/volto/registry';
import { BodyClass } from '@plone/volto/helpers';
import cx from 'classnames';
import PropTypes from 'prop-types';
import { defineMessages, useIntl } from 'react-intl';
import { Message } from 'semantic-ui-react';

const messages = defineMessages({
PleaseChooseContent: {
Expand Down Expand Up @@ -133,6 +134,7 @@ const TeaserHeroTemplate = (props) => {
{(href.hasPreviewImage || href.image_field || image) && (
<div className="image-wrapper">
<Image
className="teaser"
src={hasImageComponent ? href : defaultImageSrc}
alt=""
loading="lazy"
Expand Down
2 changes: 2 additions & 0 deletions frontend/theme/extras/blocks/teaser.less
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@
img {
width: 100%;
height: 100%;
}
img.teaser {
min-height: 500px;
max-height: 750px;
}
Expand Down

0 comments on commit fe09deb

Please sign in to comment.