primo commit
This commit is contained in:
257
modules/mod_jem_banner/tmpl/responsive/default.php
Normal file
257
modules/mod_jem_banner/tmpl/responsive/default.php
Normal file
@ -0,0 +1,257 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @subpackage JEM Banner Module
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
$datemethod = (int)$params->get('datemethod', 1);
|
||||
$showcalendar = (int)$params->get('showcalendar', 1);
|
||||
$showflyer = (int)$params->get('showflyer', 1);
|
||||
$flyer_link_type = (int)$params->get('flyer_link_type', 0);
|
||||
$imagewidthmax = (int)$params->get('imagewidthmax', 0);
|
||||
|
||||
if ($flyer_link_type == 1) {
|
||||
echo JemOutput::lightbox();
|
||||
$modal = 'lightbox';
|
||||
} elseif ($flyer_link_type == 0) {
|
||||
$modal = 'notmodal';
|
||||
} else {
|
||||
$modal = '';
|
||||
}
|
||||
|
||||
/*
|
||||
$uri = Uri::getInstance();
|
||||
$module_name = 'mod_jem_banner';
|
||||
$css_path = JPATH_THEMES. '/'.$document->template.'/css/'.$module_name;
|
||||
if(file_exists($css_path.'/'.$module_name.'.css')) {
|
||||
unset($document->_styleSheets[$uri->base(true).'/modules/mod_jem_banner/tmpl/mod_jem_banner.css']);
|
||||
$document->addStylesheet($uri->base(true) . '/templates/'.$document->template.'/css/'. $module_name.'/'.$module_name.'.css');
|
||||
}*/
|
||||
|
||||
$banneralignment = "jem-vertical-banner";
|
||||
if (JemHelper::jemStringContains($params->get('moduleclass_sfx'), "jem-horizontal")){
|
||||
$banneralignment = "jem-horizontal-banner";
|
||||
}
|
||||
$imagewidth = '100%';
|
||||
$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();
|
||||
$additionalCSS = '';
|
||||
if (JemHelper::jemStringContains($params->get('moduleclass_sfx'), "jem-imagetop")) {
|
||||
$additionalCSS = 'order: -1;';
|
||||
}
|
||||
|
||||
$widthStyle = $imagewidthmax ? 'width:' . $imagewidthmax . 'px' : 'max-width:' . $imagewidth;
|
||||
$heightStyle = $imagewidthmax ? 'auto' : $imageheight;
|
||||
|
||||
$css = '
|
||||
#jemmodulebanner .jem-eventimg-banner {
|
||||
width: ' . $imagewidth . ';
|
||||
' . $additionalCSS . '
|
||||
}
|
||||
#jemmodulebanner .jem-eventimg-banner img {
|
||||
' . $widthStyle . ';
|
||||
height: ' . $heightStyle . ';
|
||||
}
|
||||
|
||||
@media not print {
|
||||
@media only all and (max-width: 47.938rem) {
|
||||
#jemmodulebanner .jem-eventimg-banner {
|
||||
}
|
||||
#jemmodulebanner .jem-eventimg-banner img {
|
||||
width: ' . $imagewidth . ';
|
||||
height: ' . $imageheight . ';
|
||||
}
|
||||
}
|
||||
}';
|
||||
$document->addStyleDeclaration($css);
|
||||
?>
|
||||
|
||||
<div class="jemmodulebanner<?php echo $params->get('moduleclass_sfx')?>" id="jemmodulebanner">
|
||||
<div class="eventset">
|
||||
<?php $i = count($list); ?>
|
||||
<?php if ($i > 0) : ?>
|
||||
<?php foreach ($list as $item) : ?>
|
||||
<div class="event_id<?php echo $item->eventid; ?>" itemprop="event" itemscope itemtype="https://schema.org/Event">
|
||||
<h2 class="event-title" itemprop="name">
|
||||
<?php if ($item->eventlink) : ?>
|
||||
<a href="<?php echo $item->eventlink; ?>" title="<?php echo $item->fulltitle; ?>" itemprop="url"><?php echo $item->title; ?></a>
|
||||
<?php else : ?>
|
||||
<?php echo $item->title; ?>
|
||||
<?php endif; ?>
|
||||
</h2>
|
||||
|
||||
<div class="jem-row-banner <?php echo $banneralignment; ?>">
|
||||
<?php if ($showcalendar == 1) :?>
|
||||
<?php if ($item->colorclass === "category" || $item->colorclass === "alpha"): ?>
|
||||
<div class="calendar<?php echo '-' . $item->colorclass; ?> jem-banner-calendar" title="<?php echo strip_tags($item->dateinfo); ?>">
|
||||
<div class="color-bar" style="background-color:<?php echo !empty($item->color) ? $item->color : 'rgb(128,128,128)'; ?>"></div>
|
||||
<div class="lower-background"></div>
|
||||
<div class="background-image"></div>
|
||||
<?php else: ?>
|
||||
<div class="calendar<?php echo '-'.$item->colorclass; ?> jem-banner-calendar"
|
||||
title="<?php echo strip_tags($item->dateinfo); ?>"
|
||||
<?php if (!empty($item->color)) : ?>
|
||||
style="background-color: <?php echo $item->color; ?>"
|
||||
<?php endif; ?>>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($item->color_is_dark)) : ?>
|
||||
<div class="monthbanner monthcolor-<?php echo !empty($item->color_is_dark) ? 'light' : 'dark'; ?>">
|
||||
<?php else : ?>
|
||||
<div class="monthbanner">
|
||||
<?php endif;
|
||||
echo $item->startdate['month']; ?>
|
||||
</div>
|
||||
<div class="daybanner">
|
||||
<?php echo $item->startdate['weekday']; ?>
|
||||
</div>
|
||||
<div class="daynumbanner">
|
||||
<?php echo $item->startdate['day']; ?>
|
||||
</div>
|
||||
<?php echo $item->dateschema; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="jem-event-details-banner jem-row-banner">
|
||||
<div class="jem-row-banner <?php echo $banneralignment; ?> jem-banner-datecat">
|
||||
<?php /* Datum und Zeitangabe:
|
||||
* showcalendar 1, datemethod 1 : date inside calendar image + time
|
||||
* showcalendar 1, datemethod 2 : date inside calendar image + relative date + time
|
||||
* showcalendar 0, datemethod 1 : no calendar image, date + time
|
||||
* showcalendar 0, datemethod 2 : no calendar image, relative date + time
|
||||
*/
|
||||
?>
|
||||
<?php /* when no calendar sheet is displayed */ ?>
|
||||
<?php if ($showcalendar == 0) : ?>
|
||||
<?php if ($item->date && $datemethod == 2) :?>
|
||||
<div class="date" title="<?php echo Text::_('COM_JEM_TABLE_DATE').': '.strip_tags($item->dateinfo); ?>">
|
||||
<?php echo $item->date; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($item->date && $datemethod == 1) :?>
|
||||
<div class="date" title="<?php echo Text::_('COM_JEM_TABLE_DATE').': '.strip_tags($item->dateinfo); ?>">
|
||||
<?php echo $item->date; ?>
|
||||
</div>
|
||||
<?php if ($item->time && $datemethod == 1) :?>
|
||||
<div class="time" title="<?php echo Text::_('COM_JEM_TABLE_DATE').': '.strip_tags($item->dateinfo); ?>">
|
||||
<?php echo $item->time; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php /* when calendar sheet is displayed */ ?>
|
||||
<?php else : ?>
|
||||
<?php /* if time difference should be displayed */ ?>
|
||||
<?php if ($item->date && $datemethod == 2) : ?>
|
||||
<div class="date" title="<?php echo Text::_('COM_JEM_TABLE_DATE').': '.strip_tags($item->dateinfo); ?>">
|
||||
<?php echo $item->date; ?>
|
||||
</div>
|
||||
<?php endif;
|
||||
|
||||
// if date is to be displayed
|
||||
if ($item->time && $datemethod == 1) :
|
||||
// only the time needs to be displayed (as the date is already displayed on the calendar page) ?>
|
||||
<div class="time" title="<?php echo Text::_('COM_JEM_TABLE_DATE').': '.strip_tags($item->dateinfo); ?>">
|
||||
<?php echo $item->time; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php /*venue*/ ?>
|
||||
<?php if (($params->get('showvenue', 1) == 1) && (!empty($item->venue))) :?>
|
||||
<div class="venue-title" title="<?php echo Text::_('COM_JEM_TABLE_LOCATION').': '.strip_tags($item->venue); ?>">
|
||||
<?php if ($item->venuelink) : ?>
|
||||
<a href="<?php echo $item->venuelink; ?>"><?php echo $item->venue; ?></a>
|
||||
<?php else : ?>
|
||||
<?php echo $item->venue; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif;
|
||||
|
||||
// category
|
||||
if (($params->get('showcategory', 1) == 1) && !empty($item->catname)) :?>
|
||||
<div class="category" title="<?php echo Text::_('COM_JEM_TABLE_CATEGORY').': '.strip_tags($item->catname); ?>">
|
||||
<?php echo $item->catname; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div itemprop="location" itemscope itemtype="https://schema.org/Place" style="display:none;">
|
||||
<meta itemprop="name" content="<?php echo $item->venue; ?>" />
|
||||
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress" style="display:none;">
|
||||
<meta itemprop="streetAddress" content="<?php echo $item->street; ?>" />
|
||||
<meta itemprop="addressLocality" content="<?php echo $item->city; ?>" />
|
||||
<meta itemprop="addressRegion" content="<?php echo $item->state; ?>" />
|
||||
<meta itemprop="postalCode" content="<?php echo $item->postalCode; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (($showflyer == 1) && !empty($item->eventimage)) : ?>
|
||||
<div class="jem-eventimg-banner">
|
||||
<?php $class = ($showcalendar == 1) ? 'image-preview' : 'image-preview2'; ?>
|
||||
<a href="<?php echo ($flyer_link_type == 2) ? $item->eventlink : $item->eventimageorig; ?>" class="flyermodal" rel="<?php echo $modal;?>"
|
||||
title="<?php echo ($flyer_link_type == 2) ? $item->fulltitle : Text::_('COM_JEM_CLICK_TO_ENLARGE'); ?> " data-title="<?php echo $item->title; ?>">
|
||||
<img class="<?php echo $class; ?>" src="<?php echo $item->eventimageorig; ?>" alt="<?php echo $item->title; ?>" itemprop="image" />
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('showdesc', 1) == 1) :?>
|
||||
<div class="desc" itemprop="description">
|
||||
<?php echo $item->eventdescription; ?>
|
||||
</div>
|
||||
<?php if (isset($item->link) && $item->readmore != 0 && $params->get('readmore')) : ?>
|
||||
<div class="jem-readmore-banner">
|
||||
<a href="<?php echo $item->link ?>" title="<?php echo Text::_('COM_JEM_EVENT_READ_MORE_TITLE'); ?>">
|
||||
<!--<button class="jem-btn btn">-->
|
||||
<?php echo Text::_('COM_JEM_EVENT_READ_MORE_TITLE'); ?>
|
||||
<!--</button>-->
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (--$i > 0) : /* no hr after last entry */ ?>
|
||||
<hr class="jem-hr">
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php else : ?>
|
||||
<?php echo Text::_('MOD_JEM_BANNER_NO_EVENTS'); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
1
modules/mod_jem_banner/tmpl/responsive/index.html
Normal file
1
modules/mod_jem_banner/tmpl/responsive/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
154
modules/mod_jem_banner/tmpl/responsive/mod_jem_banner.css
Normal file
154
modules/mod_jem_banner/tmpl/responsive/mod_jem_banner.css
Normal file
@ -0,0 +1,154 @@
|
||||
/*
|
||||
* @package JEM
|
||||
* @subpackage JEM Banner Module
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
/* Hoftix for SqueezeBox Modal overlay destroying images on mobile phones */
|
||||
#sbox-overlay {
|
||||
width: 100% !important;
|
||||
}
|
||||
#sbox-window {
|
||||
height: auto !important;
|
||||
}
|
||||
#sbox-content {
|
||||
height: auto !important;
|
||||
width: auto !important;
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
body.body-overlayed {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#jemmodulebanner .jem-row-banner {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
#jemmodulebanner .jem-horizontal-banner {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
#jemmodulebanner .jem-vertical-banner {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#jemmodulebanner .jem-event-details-banner {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
#jemmodulebanner .event-title,
|
||||
#jemmodulebanner .jem-banner-datecat {
|
||||
hyphens: auto;
|
||||
}
|
||||
|
||||
#jemmodulebanner .jem-banner-datecat {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
#jemmodulebanner .jem-banner-datecat > div {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#jemmodulebanner .jem-banner-datecat > div:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#jemmodulebanner .jem-eventimg-banner {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#jemmodulebanner .time, #jemmodulebanner .date {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#jemmodulebanner [class|="calendar"] {
|
||||
background-repeat: no-repeat;
|
||||
width: 81px;
|
||||
height: 85px;
|
||||
text-align: center;
|
||||
padding: 5px 1px 0 0;
|
||||
margin: 0 10px 10px 0;
|
||||
line-height: 24px;
|
||||
box-shadow: 3px 4px 4px -3px rgba(0, 0, 0, 0.3), -3px 4px 4px -3px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
#jemmodulebanner [class|="calendar"] .yearbanner,
|
||||
#jemmodulebanner [class|="calendar"] .monthbanner {
|
||||
font-size: 13px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
#jemmodulebanner [class|="calendar"] .monthbanner,
|
||||
#jemmodulebanner [class|="calendar"] .daybanner,
|
||||
#jemmodulebanner [class|="calendar"] .daynumbanner {
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
display: block;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#jemmodulebanner [class|="calendar"] .monthbanner {
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
#jemmodulebanner [class|="calendar"] .daybanner {
|
||||
font-size: 12px;
|
||||
min-height: 0.8rem;
|
||||
}
|
||||
|
||||
#jemmodulebanner [class|="calendar"] .daynumbanner {
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
@media print {
|
||||
#main a:link, #main a:visited {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
div#jem {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
div#jem h2 {
|
||||
border: none;
|
||||
}
|
||||
|
||||
div#jem .flyerimage {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
a[href]:after {
|
||||
content: none !important;
|
||||
}
|
||||
|
||||
div#jem .buttons {
|
||||
display: none;
|
||||
}
|
||||
|
||||
abbr[title]:after {
|
||||
content: none;
|
||||
}
|
||||
|
||||
.ir a:after,
|
||||
a[href^="javascript:"]:after,
|
||||
a[href^="#"]:after {
|
||||
content: none;
|
||||
}
|
||||
|
||||
a:link:after, a:visited:after {
|
||||
content: none;
|
||||
}
|
||||
|
||||
|
||||
div#jem .flyerimage {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @package JEM
|
||||
* @subpackage JEM Banner Module
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
/* This template uses images in any case, so keep this empty file to prevent legacy fallback. */
|
||||
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @package JEM
|
||||
* @subpackage JEM Banner Module
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
/* This template uses images in any case, so keep this empty file to prevent legacy fallback. */
|
||||
Reference in New Issue
Block a user