moduli in home page opzione colori per lo slide
This commit is contained in:
@ -68,7 +68,7 @@ $isUnpublished = $this->item->state == ContentComponent::CONDITION_UNPUBLISH
|
||||
<?php endif; ?>
|
||||
|
||||
<?php // Content is generated by content plugin event "onContentAfterTitle" ?>
|
||||
<?php echo $this->item->event->afterDisplayTitle; ?>
|
||||
<?php //echo $this->item->event->afterDisplayTitle; ?>
|
||||
|
||||
<?php // @todo Not that elegant would be nice to group the params ?>
|
||||
<?php $useDefList = ($params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|
||||
@ -82,7 +82,7 @@ $isUnpublished = $this->item->state == ContentComponent::CONDITION_UNPUBLISH
|
||||
<?php endif; ?>
|
||||
|
||||
<?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
|
||||
<?php echo $this->item->event->beforeDisplayContent; ?>
|
||||
<?php //echo $this->item->event->beforeDisplayContent; ?>
|
||||
|
||||
<?php echo $this->item->introtext; ?>
|
||||
<?php
|
||||
@ -133,4 +133,4 @@ $isUnpublished = $this->item->state == ContentComponent::CONDITION_UNPUBLISH
|
||||
</div>
|
||||
|
||||
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
|
||||
<?php echo $this->item->event->afterDisplayContent; ?>
|
||||
<?php //echo $this->item->event->afterDisplayContent; ?>
|
||||
|
||||
@ -25,13 +25,13 @@ $countcat =0;
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container-jit pb-5">
|
||||
<div class="container-jit py-5 <?= isset($params['moduleclass_sfx']) ? $params['moduleclass_sfx'] : ''; ?>">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-3"><?php if ((bool) $module->showtitle) : ?><?php echo $module->title; ?> <?php endif; ?></div>
|
||||
<div class="col-9">
|
||||
<div class="col-4"><?php if ((bool) $module->showtitle) : ?><?php echo $module->title; ?> <?php endif; ?></div>
|
||||
<div class="col-8">
|
||||
<?php $items = $list; ?>
|
||||
<?php require ModuleHelper::getLayoutPath('mod_articles_category', $params->get('layout', 'default') . '_items'); ?>
|
||||
</div>
|
||||
@ -30,24 +30,13 @@ $baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/im
|
||||
<div class="row">
|
||||
<?php foreach ($items as $item) : ?>
|
||||
|
||||
<div class="col-12 col-lg-4 pb-3 mb-3">
|
||||
<div class="card card-bg card-icon rounded h-100">
|
||||
<div class="col-12 col-lg-6 pb-3 mb-3">
|
||||
<div class="card card-bg-border card-icon h-100">
|
||||
<div class="card-body">
|
||||
<svg class="icon icon-xs d-inline-block">
|
||||
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-file"></use>
|
||||
</svg>
|
||||
<div class="card-icon-content d-flex align-items-center">
|
||||
<div class="card-news-img me-3">
|
||||
|
||||
|
||||
<figure class="figure">
|
||||
<a href="<?php echo $item->link; ?>" itemprop="url" title="<?php echo $item->title; ?>">
|
||||
<?php if ((json_decode($item->images)->image_intro) ==''): ?>
|
||||
<img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid" alt="<?php echo $item->title; ?>">
|
||||
<?php else: ?>
|
||||
<img src="<?php echo json_decode($item->images)->image_intro; ?>" class="img-fluid" alt="<?php echo $item->title; ?>" />
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</figure>
|
||||
|
||||
</div>
|
||||
<a href="<?php echo $item->link; ?>" class="" data-focus-mouse="false">
|
||||
<div class="blogitem-header">
|
||||
<p class="mb-0 lh100">
|
||||
@ -24,35 +24,6 @@ $countcat =0;
|
||||
|
||||
?>
|
||||
|
||||
<div class="container mod-news pt-4 pb-5">
|
||||
<?php if ((bool) $module->showtitle) : ?>
|
||||
<div class="title-section pb-4">
|
||||
<h2><?php echo $module->title; ?></h2>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="row">
|
||||
<?php if ($grouped) : ?>
|
||||
<?php foreach ($list as $groupName => $items) : ?>
|
||||
<div class="col-12 col-lg-4">
|
||||
<div class="title-section">
|
||||
<h2><?php echo Text::_($groupName); ?></h2>
|
||||
</div>
|
||||
<?php require ModuleHelper::getLayoutPath('mod_articles_category', $params->get('layout', 'default') . '_gruppi');
|
||||
//print_r($list[$groupName][2]->category_route);
|
||||
//print_r($list);
|
||||
$m=0;
|
||||
foreach ($list[$groupName] as $link_group):
|
||||
if($m == 0): ?>
|
||||
<a href="<?php echo $link_group->category_route; ?>" title="Vai alla pagina <?php echo Text::_($groupName); ?>" class="view-all d-block py-3"><strong>Vedi tutti</strong></a>
|
||||
<?php
|
||||
endif;
|
||||
$m++;
|
||||
endforeach;?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php else : ?>
|
||||
<?php $items = $list; ?>
|
||||
<?php require ModuleHelper::getLayoutPath('mod_articles_category', $params->get('layout', 'default') . '_items'); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_articles_category
|
||||
*
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\Component\Content\Site\Helper\RouteHelper;
|
||||
|
||||
?>
|
||||
<?php foreach ($items as $item) : ?>
|
||||
<div class="card card-bg card-icon card-icon-main rounded mt-3">
|
||||
<div class="scheda-item">
|
||||
<?php
|
||||
$attributes = ['class' => 'mod-news-title ' . $item->active];
|
||||
$link = htmlspecialchars($item->link, ENT_COMPAT, 'UTF-8', false);
|
||||
$title = htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8', false);
|
||||
?>
|
||||
<h3 class="h6"><?php echo HTMLHelper::_('link', $link, $title, $attributes); ?></h3>
|
||||
<?php if ($params->get('show_introtext')) : ?>
|
||||
<p><?php echo $item->displayIntrotext; ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
@ -16,7 +16,7 @@ use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\Component\Content\Site\Helper\RouteHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
//print_r($items[0]->parent_title);
|
||||
//echo $items[0]->parent_id;
|
||||
@ -25,43 +25,84 @@ use Joomla\CMS\Uri\Uri;
|
||||
|
||||
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
|
||||
|
||||
$classemodulo = $params->get('header_class', []);
|
||||
|
||||
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
|
||||
|
||||
$wa->useStyle('swiper.css.styles', ['position' => 'before']);
|
||||
$wa->useScript('swiper.js.scripts');
|
||||
|
||||
|
||||
$wa->addInlineScript('
|
||||
window.addEventListener("DOMContentLoaded", function(){
|
||||
|
||||
var swiper = new Swiper(".carosello'. $module->id . '", {
|
||||
slidesPerView: 1,
|
||||
spaceBetween: 10,
|
||||
loop: true,
|
||||
navigation: {
|
||||
nextEl: ".swiper-button-next",
|
||||
prevEl: ".swiper-button-prev",
|
||||
},
|
||||
breakpoints: {
|
||||
|
||||
480: {
|
||||
spaceBetween: 10,
|
||||
slidesPerView: 2,
|
||||
},
|
||||
|
||||
768: {
|
||||
spaceBetween: 10,
|
||||
slidesPerView: 3,
|
||||
},
|
||||
|
||||
1200: {
|
||||
spaceBetween: 20,
|
||||
slidesPerView: 4,
|
||||
},
|
||||
|
||||
1524: {
|
||||
spaceBetween: 40,
|
||||
slidesPerView: 5,
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
', [], ['type' => 'text/javascript']);
|
||||
|
||||
|
||||
?>
|
||||
<div class="container-jit <?= !empty($classemodulo) ? $classemodulo : 'bg-rosso'; ?>">
|
||||
<?php if ((bool) $module->showtitle) : ?>
|
||||
|
||||
<?php foreach ($items as $item) : ?>
|
||||
|
||||
<div class="col-12 col-lg-4 pb-3 mb-3">
|
||||
<div class="card card-bg card-icon rounded h-100">
|
||||
<div class="card-body">
|
||||
<div class="card-icon-content d-flex align-items-center">
|
||||
<div class="card-news-img me-3">
|
||||
|
||||
|
||||
<figure class="figure">
|
||||
<?= $module->title; ?>
|
||||
<?php endif; ?>
|
||||
<div class="swiper carosello<?= $module->id; ?>">
|
||||
<div class="swiper-wrapper">
|
||||
<?php foreach ($items as $item) : ?>
|
||||
<div class="swiper-slide">
|
||||
<div class="swiper-content pt-3 pb-5">
|
||||
<figure class="primopiano-foto img-fit-cover">
|
||||
<a href="<?php echo $item->link; ?>" itemprop="url" title="<?php echo $item->title; ?>">
|
||||
<?php if ((json_decode($item->images)->image_intro) ==''): ?>
|
||||
<img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid" alt="<?php echo $item->title; ?>">
|
||||
<?php else: ?>
|
||||
<img src="<?php echo json_decode($item->images)->image_intro; ?>" class="img-fluid" alt="<?php echo $item->title; ?>" />
|
||||
<?php endif; ?>
|
||||
<?php if ((json_decode($item->images)->image_intro) ==''): ?>
|
||||
<img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid" alt="<?php echo $item->title; ?>">
|
||||
<?php else: ?>
|
||||
<img src="<?php echo json_decode($item->images)->image_intro; ?>" class="img-fluid" alt="<?php echo $item->title; ?>" />
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</figure>
|
||||
|
||||
</div>
|
||||
<a href="<?php echo $item->link; ?>" class="" data-focus-mouse="false">
|
||||
<div class="blogitem-header">
|
||||
<a href="<?php echo $item->link; ?>" class="" data-focus-mouse="false">
|
||||
<p class="mb-0 lh100">
|
||||
<strong><?php echo $item->title; ?></strong>
|
||||
</p>
|
||||
</div>
|
||||
<?php if ($params->get('show_introtext')) : ?>
|
||||
<small><?php echo $item->displayIntrotext; ?></small>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<?php if ($params->get('show_introtext')) : ?>
|
||||
<small><?php echo $item->displayIntrotext; ?></small>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="col-12 text-center">
|
||||
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($items[0]->parent_id, $items[0]->parent_language)); ?>" class="view-all" title="Vedi tutti"><strong>Vedi tutti</strong></a>
|
||||
</div>
|
||||
</div>
|
||||
@ -11,6 +11,10 @@
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Pcrt\Module\Highlights\Site\Helper\HighlightsHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
|
||||
|
||||
$elements = HighlightsHelper::getList($params);
|
||||
|
||||
@ -20,9 +24,7 @@ $sfondo = $params->get('sfondo', []);
|
||||
|
||||
$classemodulo = $params->get('header_class', []);
|
||||
|
||||
|
||||
|
||||
|
||||
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
|
||||
$wa->useStyle('swiper.css.styles', ['position' => 'before']);
|
||||
$wa->useScript('swiper.js.scripts');
|
||||
|
||||
@ -68,29 +70,21 @@ var swiper = new Swiper(".carosello'. $module->id . '", {
|
||||
|
||||
?>
|
||||
|
||||
<pre>
|
||||
<?php //var_dump($module); ?>
|
||||
</pre>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php if (!empty($elements)) : ?>
|
||||
<div class="container-jit <?= !empty($classemodulo) ? $classemodulo : 'bg-grigio'; ?>">
|
||||
<?= $module->title; ?>
|
||||
<div class="swiper carosellofeatured">
|
||||
<div class="swiper carosello<?= $module->id; ?>">
|
||||
<div class="swiper-wrapper">
|
||||
<?php foreach ($elements as $index => $element) : ?>
|
||||
<div class="swiper-slide">
|
||||
<div class="swiper-content pt-3 pb-5">
|
||||
|
||||
|
||||
<figure class="left primopiano-foto img-fit-cover">
|
||||
<a href="/news/natale-2024" itemprop="url" title="<?= $element->sottotitolo; ?>" class="" data-focus-mouse="false">
|
||||
<img src="<?= $element->immagine_main; ?>" alt="<?= $element->titolo; ?>" class="img-fluid" />
|
||||
</a>
|
||||
</figure>
|
||||
|
||||
<figure class="primopiano-foto img-fit-cover">
|
||||
<a href="/news/natale-2024" itemprop="url" title="<?= $element->sottotitolo; ?>" class="" data-focus-mouse="false">
|
||||
<img src="<?= $element->immagine_main; ?>" alt="<?= $element->titolo; ?>" class="img-fluid" />
|
||||
</a>
|
||||
</figure>
|
||||
<div><?php echo $element->titolo; ?></div>
|
||||
<div><?php echo $element->sottotitolo; ?></div>
|
||||
<div><?php echo $element->descrizione; ?></div>
|
||||
|
||||
@ -27,9 +27,6 @@ $sfondo = $params->get('sfondo', []);
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
|
||||
|
||||
|
||||
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
|
||||
|
||||
$wa->useStyle('swiper.css.styles', ['position' => 'before']);
|
||||
@ -54,7 +51,7 @@ var swiper = new Swiper(".sliderfull'. $module->id . '", {
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<pre><?php var_dump($elements); ?></pre>
|
||||
<?php if (!empty($elements)) : ?>
|
||||
<div class="<?= $params->get('moduleclass_sfx') ?>">
|
||||
<div class="position-relative">
|
||||
@ -62,71 +59,129 @@ var swiper = new Swiper(".sliderfull'. $module->id . '", {
|
||||
<div class="swiper-wrapper">
|
||||
<?php foreach ($elements as $index => $element) : ?>
|
||||
<div class="swiper-slide">
|
||||
<?php // Layout 50% test0 e 50% foto ?>
|
||||
<?php // Layout 50% testo e 50% foto ?>
|
||||
<?php if ($element->classe == 'larghezza50') : ?>
|
||||
<div class="swiper-content <?= $element->classe; ?>">
|
||||
<div class="wrap-slide">
|
||||
<div class="container-lg px-0">
|
||||
<div class="caption-slide">
|
||||
<p class="title-slider">
|
||||
<?= $element->titolo; ?>
|
||||
</p>
|
||||
<p class="text-slider">
|
||||
<?= $element->sottotitolo; ?>
|
||||
</p>
|
||||
<a href="<?= $element->link_pulsante; ?>" class="btn btn-slide" title="<?= $element->testo_pulsante; ?>"><?= $element->testo_pulsante; ?></a>
|
||||
|
||||
<?php if (!empty($element->immagine_secondaria)) : ?>
|
||||
<?php if (!empty($element->link_pdf)) : ?>
|
||||
<a href="<?= $element->link_pdf; ?>" title="Apri il pdf" target="_blank">
|
||||
<img src="<?= $element->immagine_secondaria; ?>" alt="locandina" class="img-caption" />
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<img src="<?= $element->immagine_secondaria; ?>" alt="locandina" class="img-caption" />
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($element->titolo)) : ?>
|
||||
<p class="title-slider">
|
||||
<?= $element->titolo; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($element->sottotitolo)) : ?>
|
||||
<p class="text-slider">
|
||||
<?= $element->sottotitolo; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($element->descrizione)) : ?>
|
||||
<div class="text-slider">
|
||||
<?= $element->descrizione; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($element->link_pulsante)) : ?>
|
||||
<a href="<?= $element->link_pulsante; ?>" class="btn btn-slide" title="<?= $element->testo_pulsante; ?>"><?= $element->testo_pulsante; ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row m-0 row50slide">
|
||||
<div class="col-12 col-lg-6 order-lg-1 order-2">
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 order-lg-1 order-2"></div>
|
||||
<div class="col-12 col-lg-6 order-lg-2 order-1 p-0">
|
||||
<div class="image-container" style="background-image: url(<?= $element->immagine_main; ?>)"></div>
|
||||
<?php if (!empty($element->immagine_main)) : ?>
|
||||
<div class="image-container" style="background-image: url(<?= $element->immagine_main; ?>)"></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php // Layout 100% foto ?>
|
||||
<?php elseif ($element->classe == 'larghezza100') : ?>
|
||||
<div class="swiper-content <?= $element->classe; ?>">
|
||||
<div class="image-container" style="background-image: url(<?= $element->immagine_main; ?>)"></div>
|
||||
<?php if (!empty($element->immagine_main)) : ?>
|
||||
<div class="image-container" style="background-image: url(<?= $element->immagine_main; ?>)"></div>
|
||||
<?php endif; ?>
|
||||
<div class="wrap-slide ">
|
||||
<div class="container-lg px-0">
|
||||
<div class="caption-slide">
|
||||
|
||||
<?php if (!empty($element->immagine_secondaria)) : ?>
|
||||
<img src="<?= $element->immagine_secondaria; ?>" class="img-caption" />
|
||||
<?php if (!empty($element->link_pdf)) : ?>
|
||||
<a href="<?= $element->link_pdf; ?>" title="Apri il pdf" target="_blank">
|
||||
<img src="<?= $element->immagine_secondaria; ?>" alt="locandina" class="img-caption" />
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<img src="<?= $element->immagine_secondaria; ?>" alt="locandina" class="img-caption" />
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($element->titolo)) : ?>
|
||||
<p class="title-slider">
|
||||
<?= $element->titolo; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($element->sottotitolo)) : ?>
|
||||
<p class="text-slider">
|
||||
<?= $element->sottotitolo; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($element->link_pulsante)) : ?>
|
||||
<a href="<?= $element->link_pulsante; ?>" class="btn btn-slide" title="<?= $element->testo_pulsante; ?>"><?= $element->testo_pulsante; ?></a>
|
||||
<?php endif; ?>
|
||||
<p class="title-slider">
|
||||
<?= $element->titolo; ?>
|
||||
</p>
|
||||
<p class="text-slider">
|
||||
<?= $element->sottotitolo; ?>
|
||||
</p>
|
||||
<a href="<?= $element->link_pulsante; ?>" class="btn btn-slide" title="<?= $element->testo_pulsante; ?>"><?= $element->testo_pulsante; ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php // Layout 100% foto testp boxed ?>
|
||||
<?php // Layout 100% foto testo boxed style="background:transparent; color:<?= $element->colore_testo; ?>; position:relative;" ?>
|
||||
<div class="swiper-content <?= $element->classe; ?>">
|
||||
<div class="image-container" style="background-image: url(<?= $element->immagine_main; ?>)">
|
||||
<div class="image-container" <?= !empty($element->immagine_main) ? 'style="background-image: url(' . $element->immagine_main . ')"' : ''; ?>>
|
||||
<div class="wrap-slide">
|
||||
<div class="container-lg px-0">
|
||||
<div class="caption-slide">
|
||||
<?php if (!empty($element->immagine_secondaria)) : ?>
|
||||
<img src="<?= $element->immagine_secondaria; ?>" class="img-caption" />
|
||||
<div class="caption-slide"
|
||||
<?php if ($element->colore_sfondo == '00000') : ?>
|
||||
style="<?php if ($element->colore_testo != '00000') : ?>color:<?= $element->colore_testo; ?>;<?php endif; ?>">
|
||||
<?php else: ?>
|
||||
<?php if ($element->colore_testo == '00000') : ?>
|
||||
<?= 'style="background:transparent; position:relative;">' ;?>
|
||||
<div style="z-index:-1; width:100%; height:100%; position:absolute; top:0; left:0; background:<?= $element->colore_sfondo; ?>; <?php if (!empty($element->opacita)) : ?>opacity:<?= $element->opacita; ?>;<?php endif; ?>"></div>
|
||||
<?php else: ?>
|
||||
<?= 'style="background:transparent; color:'.$element->colore_testo,'; position:relative;">';?>
|
||||
<div style="z-index:-1; width:100%; height:100%; position:absolute; top:0; left:0; background:<?= $element->colore_sfondo; ?>; <?php if (!empty($element->opacita)) : ?>opacity:<?= $element->opacita; ?>;<?php endif; ?>"></div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($element->immagine_secondaria)) : ?>
|
||||
<?php if (!empty($element->link_pdf)) : ?>
|
||||
<a href="<?= $element->link_pdf; ?>" title="Apri il pdf" target="_blank">
|
||||
<img src="<?= $element->immagine_secondaria; ?>" alt="locandina" class="img-caption" />
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<img src="<?= $element->immagine_secondaria; ?>" alt="locandina" class="img-caption" />
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($element->titolo)) : ?>
|
||||
<p class="title-slider">
|
||||
<?= $element->titolo; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($element->sottotitolo)) : ?>
|
||||
<p class="text-slider">
|
||||
<?= $element->sottotitolo; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($element->link_pulsante)) : ?>
|
||||
<a href="<?= $element->link_pulsante; ?>" class="btn btn-slide" title="<?= $element->testo_pulsante; ?>"><?= $element->testo_pulsante; ?></a>
|
||||
<?php endif; ?>
|
||||
<p class="title-slider">
|
||||
<?= $element->titolo; ?>
|
||||
</p>
|
||||
<p class="text-slider">
|
||||
<?= $element->sottotitolo; ?>
|
||||
</p>
|
||||
<a href="<?= $element->link_pulsante; ?>" class="btn btn-slide" title="<?= $element->testo_pulsante; ?>"><?= $element->testo_pulsante; ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -138,7 +193,6 @@ var swiper = new Swiper(".sliderfull'. $module->id . '", {
|
||||
</div>
|
||||
<div class="swiper-pagination"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version CVS: 1.0.0
|
||||
* @package com_highlights
|
||||
* @subpackage mod_highlights
|
||||
* @author Eddy Prosperi <eddy.prosperi@protocollicreativi.it>
|
||||
* @copyright 2024 Eddy Prosperi
|
||||
* @license GNU General Public License versione 2 o successiva; vedi LICENSE.txt
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Pcrt\Module\Highlights\Site\Helper\HighlightsHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
|
||||
|
||||
$elements = HighlightsHelper::getList($params);
|
||||
|
||||
//Come accedere alle variabili generali:
|
||||
$opacita = $params->get('opacita', []);
|
||||
$sfondo = $params->get('sfondo', []);
|
||||
|
||||
$classemodulo = $params->get('header_class', []);
|
||||
|
||||
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
|
||||
$wa->useStyle('swiper.css.styles', ['position' => 'before']);
|
||||
$wa->useScript('swiper.js.scripts');
|
||||
|
||||
|
||||
$wa->addInlineScript('
|
||||
window.addEventListener("DOMContentLoaded", function(){
|
||||
|
||||
var swiper = new Swiper(".carosello'. $module->id . '", {
|
||||
slidesPerView: 1,
|
||||
spaceBetween: 10,
|
||||
loop: true,
|
||||
navigation: {
|
||||
nextEl: ".swiper-button-next",
|
||||
prevEl: ".swiper-button-prev",
|
||||
},
|
||||
breakpoints: {
|
||||
|
||||
480: {
|
||||
spaceBetween: 10,
|
||||
slidesPerView: 2,
|
||||
},
|
||||
|
||||
768: {
|
||||
spaceBetween: 10,
|
||||
slidesPerView: 3,
|
||||
},
|
||||
|
||||
1200: {
|
||||
spaceBetween: 20,
|
||||
slidesPerView: 3,
|
||||
},
|
||||
|
||||
1524: {
|
||||
spaceBetween: 40,
|
||||
slidesPerView: 4,
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
', [], ['type' => 'text/javascript']);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<?php //var_dump($module); ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php if (!empty($elements)) : ?>
|
||||
<div class="container-jit <?= !empty($classemodulo) ? $classemodulo : 'bg-grigio'; ?>">
|
||||
<div class="container">
|
||||
<?= $module->title; ?>
|
||||
<div class="swiper carosello<?= $module->id; ?>">
|
||||
<div class="swiper-wrapper">
|
||||
<?php foreach ($elements as $index => $element) : ?>
|
||||
<div class="swiper-slide">
|
||||
<div class="swiper-content pt-3 pb-5">
|
||||
<a href="/news/natale-2024" itemprop="url" title="<?= $element->titolo; ?>" class="" data-focus-mouse="false">
|
||||
<img src="<?= $element->immagine_main; ?>" alt="<?= $element->titolo; ?>" class="img-fluid" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="swiper-controls container">
|
||||
<div class="swiper-button-next swiper-button-next"></div>
|
||||
<div class="swiper-button-prev swiper-button-prev"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user