get('use_modal', 0)) { echo JemOutput::lightbox(); $modal = 'lightbox'; } else { $modal = 'notmodal'; } $imagewidth = 'inherit'; if ($jemsettings->imagewidth != 0) { $imagewidth = $jemsettings->imagewidth .'px'; } $imagewidthstring = 'jem-imagewidth'; if (JemHelper::jemStringContains($params->get('moduleclass_sfx'), $imagewidthstring)) { $pageclass_sfx = $params->get('moduleclass_sfx'); $imagewidthpos = strpos($pageclass_sfx, $imagewidthstring); $spacepos = strpos($pageclass_sfx, ' ', $imagewidthpos); if ($spacepos === false) { $spacepos = strlen($pageclass_sfx); } $startpos = $imagewidthpos + strlen($imagewidthstring); $endpos = $spacepos - $startpos; $imagewidth = substr($pageclass_sfx, $startpos, $endpos); } $imageheight = 'auto'; $imageheigthstring = 'jem-imageheight'; if (JemHelper::jemStringContains($params->get('moduleclass_sfx'), $imageheigthstring)) { $pageclass_sfx = $params->get('moduleclass_sfx'); $imageheightpos = strpos($pageclass_sfx, $imageheigthstring); $spacepos = strpos($pageclass_sfx, ' ', $imageheightpos); if ($spacepos === false) { $spacepos = strlen($pageclass_sfx); } $startpos = $imageheightpos + strlen($imageheigthstring); $endpos = $spacepos - $startpos; $imageheight = substr($pageclass_sfx, $startpos, $endpos); } $document = Factory::getDocument(); $css = ' #jemmoduleteaser .jem-eventimg-teaser img { width: 100%; height: ' . $imageheight . '; } @media not print { @media only all and (max-width: 47.938rem) { #jemmoduleteaser .jem-eventimg-teaser img { width: ' . $imagewidth . '; height: ' . $imageheight . '; } } }'; $document->addStyleDeclaration($css); ?>