Configurazione template

This commit is contained in:
2024-12-20 16:13:51 +01:00
parent e650f8df99
commit 7d63c3c59c
89 changed files with 2829 additions and 240 deletions

View File

@ -78,7 +78,7 @@ $baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/im
<div class="">
<div class="container">
<div class="row px-3">
<div class="col-12 col-lg-9">
<div class="col-12 col-lg-9 pe-lg-5">
<section class="accauno-title pb-3 mb-4">
<h1><?php echo $this->escape($this->item->title); ?></h1>
</section>
@ -163,8 +163,8 @@ $baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/im
</article>
</div>
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="aside-main aside-sticky mt-5 ms-4 ms-lg-0">
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3 ps-lg-3">
<aside class="aside-main mt-5 ms-4 ms-lg-0">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
@ -244,7 +244,9 @@ $baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/im
</div>
</div>
<?php endif; ?>
<?= JHtml::_('content.prepare', '{loadposition right}'); ?>
<div class="menu-laterale">
<?= JHtml::_('content.prepare', '{loadposition right}'); ?>
</div>
</aside>
</div>
</div>

View File

@ -44,180 +44,149 @@ $catactive = $this->category->title;
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="blogj4a blog-category" itemscope itemtype="https://schema.org/Blog">
<section class="section bg-purplelight bg-purplegradient py-5 position-relative d-flex align-items-center overflow-hidden">
<div class="purple-oval-forms">
<svg width="100%" height="100%" viewBox="0 0 578 359" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g id="Group-2">
<path id="Oval-2" d="M578,359c0,-159.61 -129.39,-289 -289,-289c-159.61,0 -289,129.39 -289,289l578,0Z" style="fill:url(#_Linear1);fill-rule:nonzero;"></path>
<path id="Oval-2-Copy" d="M578,0c0,159.61 -129.39,289 -289,289c-159.61,0 -289,-129.39 -289,-289l578,0Z" style="fill:url(#_Linear2);fill-rule:nonzero;"></path>
</g>
<defs>
<linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.76961e-14,289,-289,1.76961e-14,289,70)">
<stop offset="0" style="stop-color:#610e0e;stop-opacity:1"></stop>
<stop offset="1" style="stop-color:#b21dd0;stop-opacity:0.61"></stop>
</linearGradient>
<linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(-578,-7.07846e-14,7.07846e-14,-578,578,144.5)">
<stop offset="0" style="stop-color:#590e61;stop-opacity:0"></stop>
<stop offset="1" style="stop-color:#b21dd0;stop-opacity:1"></stop>
</linearGradient>
</defs>
</svg>
</div>
<div class="wrapperblog <?php echo $this->params->get('blog_class') ?>">
<div class="container">
<div class="row">
<div class="col-md-5">
<div class="hero-title text-left">
<?php if ($this->params->get('show_category_title', 1)) : ?>
<h1><?php echo $this->category->title; ?></h1>
<?php endif; ?>
<?php if ($this->params->get('show_page_heading')) : ?>
<h1><?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
<?php endif; ?>
<?php echo $afterDisplayTitle; ?>
<?php if ($this->params->get('show_cat_tags', 1) && !empty($this->category->tags->itemTags)) : ?>
<?php $this->category->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->category->tagLayout->render($this->category->tags->itemTags); ?>
<?php endif; ?>
</div>
<?php if ($beforeDisplayContent || $afterDisplayContent || $this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
<div class="category-desc clearfix h4 font-weight-normal">
<?php echo $beforeDisplayContent; ?>
<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo HTMLHelper::_('content.prepare', $this->category->description, '', 'com_content.category'); ?>
<?php endif; ?>
<?php echo $afterDisplayContent; ?>
</div>
<?php if ($this->params->get('show_category_title', 1)) : ?>
<h1><?php echo $this->category->title; ?></h1>
<?php endif; ?>
<?php if ($this->params->get('show_page_heading')) : ?>
<h1><?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
<?php endif; ?>
<?php echo $afterDisplayTitle; ?>
<?php if ($this->params->get('show_cat_tags', 1) && !empty($this->category->tags->itemTags)) : ?>
<?php $this->category->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->category->tagLayout->render($this->category->tags->itemTags); ?>
<?php endif; ?>
<?php if ($beforeDisplayContent || $afterDisplayContent || $this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
<div class="category-desc clearfix h4 font-weight-normal">
<?php echo $beforeDisplayContent; ?>
<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo HTMLHelper::_('content.prepare', $this->category->description, '', 'com_content.category'); ?>
<?php endif; ?>
<?php echo $afterDisplayContent; ?>
</div>
<?php endif; ?>
</div>
<?php if (empty($this->lead_items) && empty($this->link_items) && empty($this->intro_items)) : ?>
<?php if ($this->params->get('show_no_articles', 1)) : ?>
<div class="container">
<div class="alert alert-info">
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_('COM_CONTENT_NO_ARTICLES'); ?>
</div>
</div>
</section>
<div class="wrapperblog purplelight <?php echo $this->params->get('blog_class') ?>">
<?php if (empty($this->lead_items) && empty($this->link_items) && empty($this->intro_items)) : ?>
<?php if ($this->params->get('show_no_articles', 1)) : ?>
<div class="container">
<div class="alert alert-info">
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_('COM_CONTENT_NO_ARTICLES'); ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->children[$this->category->id]) : ?>
<div class="wrapper-subcategorie">
<?php foreach ($this->children[$this->category->id] as $kategorie) : ?>
<section class="py-5">
<div class="container">
<div class="title-section mb-5">
<h2 class="h4"><?php echo $kategorie->title; ?></h2>
</div>
<div class="row">
<?php $kategoriereset = 0; ?>
<?php if (!empty($this->intro_items)) : ?>
<?php foreach ($this->intro_items as $key => &$item) : ?>
<?php if ($item->catid !== $kategorie->id) {
continue;
} ?>
<div class="col-md-4 col-12 mb-4">
<?php
$this->item = & $item;
echo $this->loadTemplate('itemsottocategorie');
?>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
<div class="text-center pt-3">
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($kategorie->id, $kategorie->language)); ?>" class="text-underline small">Vedi tutti</a>
</div>
<div class="wrapper-subcategorie">
<?php foreach ($this->children[$this->category->id] as $kategorie) : ?>
<section class="py-5">
<div class="container">
<div class="title-section mb-5">
<h2 class="h4"><?php echo $kategorie->title; ?></h2>
</div>
</section>
<?php endforeach; ?>
</div>
<?php elseif (!empty($this->intro_items)) : ?>
<section class="bg-white border-top border-bottom d-block d-lg-none">
<div class="container d-flex justify-content-between align-items-center py-3">
<h3 class="h6 text-uppercase mb-0 label-filter"><strong>Filtri</strong></h3>
<a class="toggle-filtri" href="#" aria-label="filtri" id="filtri-tipologia" title="Filtra per tipologia">
<svg class="icon icon-sm">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-funnel"></use>
</svg>
</a>
</div>
</section>
<section class="bg-gray-light">
<div class="container">
<div class="row">
<div class="tipologia-menu col-lg-3 bg-white bg-white-left">
<aside class="aside-list aside-sticky">
<div class="d-flex d-lg-none mb-3 align-items-center">
<a class="toggle-filtri pe-2" href="#" aria-label="chiudi filtri" id="back-filtri-tipologia" title="Chiudi i filtri per tipologia">
<svg class="icon">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-arrow-left"></use>
</svg>
</a>
<p class="h6 mb-0 label-filter lh100"><strong>Filtri</strong></p>
</div>
<h2 class="h6 text-uppercase"><strong>Tipologia</strong></h2>
<?php
// Mostro le categorie che hanno la stessa categoria parent
$db = Factory::getContainer()->get('DatabaseDriver');
$query = $db->getQuery(true);
$query->select($db->quoteName(array('title', 'id','language')))
->from($db->quoteName('#__categories'))
->where($db->quoteName('parent_id') . ' = '. $this->category->parent_id)
->where($db->quoteName('extension') . ' = ' . $db->quote('com_content'));
$db->setQuery($query);
$rows = $db->loadObjectList();
?>
<ul class="">
<?php foreach ($rows as $row) : ?>
<div class="form-check my-0">
<li class="catsamelevel">
<input type="RADIO" value="<?php echo Route::_(RouteHelper::getCategoryRoute($row->id, $row->language)); ?>" onchange="window.open(this.value, '_self')" name="<?php echo $row->title; ?>" id="check-<?php echo $row->title; ?>" <?php echo ($catactive == $row->title) ? ('checked') :''; ?>>
<label class="mb-0" for="check-<?php echo $row->title; ?>"><?php echo $row->title; ?></label>
</li>
</div>
<?php endforeach ?>
</ul>
</aside>
<div class="row">
<?php $kategoriereset = 0; ?>
<?php if (!empty($this->intro_items)) : ?>
<?php foreach ($this->intro_items as $key => &$item) : ?>
<?php if ($item->catid !== $kategorie->id) {
continue;
} ?>
<div class="col-md-4 col-12 mb-4">
<?php
$this->item = & $item;
echo $this->loadTemplate('itemsottocategorie');
?>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
<div class="col-lg-8 col-xl-7 offset-lg-1 pt84">
<?php foreach ($this->intro_items as $key => &$item) :
$this->item = & $item;
echo $this->loadTemplate('item');
endforeach; ?>
</div>
<div class="text-center pt-3">
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($kategorie->id, $kategorie->language)); ?>" class="text-underline small">Vedi tutti</a>
</div>
</div>
</div>
</section>
<?php endif; ?>
<?php if (!empty($this->link_items)) : ?>
<div class="items-more">
<?php echo $this->loadTemplate('links'); ?>
</section>
<?php endforeach; ?>
</div>
<?php elseif (!empty($this->intro_items)) : ?>
<section class="bg-white border-top border-bottom d-block d-lg-none">
<div class="container d-flex justify-content-between align-items-center py-3">
<h3 class="h6 text-uppercase mb-0 label-filter"><strong>Filtri</strong></h3>
<a class="toggle-filtri" href="#" aria-label="filtri" id="filtri-tipologia" title="Filtra per tipologia">
<svg class="icon icon-sm">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-funnel"></use>
</svg>
</a>
</div>
<?php endif; ?>
<?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?>
<div class="com-content-category-blog__navigation w-100">
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<p class="com-content-category-blog__counter counter float-end pt-3 pe-2">
<?php echo $this->pagination->getPagesCounter(); ?>
</p>
<?php endif; ?>
<div class="com-content-category-blog__pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</section>
<section>
<div class="container">
<div class="row">
<div class="col-lg-9">
<?php if (!empty($this->intro_items)) : ?>
<?php $blogClass = $this->params->get('blog_class', ''); ?>
<?php if ((int) $this->params->get('num_columns') > 1) : ?>
<?php $blogClass .= (int) $this->params->get('multi_column_order', 0) === 0 ? ' masonry-' : ' columns-'; ?>
<?php $blogClass .= (int) $this->params->get('num_columns'); ?>
<?php endif; ?>
<div class="com-content-category-blog__items blog-items <?php echo $blogClass; ?>">
<?php foreach ($this->intro_items as $key => &$item) : ?>
<div class="com-content-category-blog__item blog-item">
<?php
$this->item = & $item;
echo $this->loadTemplate('item');
?>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<div class="tipologia-menu col-lg-3">
<aside class="aside-list aside-sticky">
<div class="d-flex d-lg-none mb-3 align-items-center">
<a class="toggle-filtri pe-2" href="#" aria-label="chiudi filtri" id="back-filtri-tipologia" title="Chiudi i filtri per tipologia">
<svg class="icon">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-arrow-left"></use>
</svg>
</a>
<p class="h6 mb-0 label-filter lh100"><strong>Filtri</strong></p>
</div>
<div class="menu-laterale">
<?= JHtml::_('content.prepare', '{loadposition right}'); ?>
</div>
</aside>
</div>
</div>
</div>
</section>
<?php endif; ?>
<div class="container">
<?php if (!empty($this->link_items)) : ?>
<div class="items-more">
<?php echo $this->loadTemplate('links'); ?>
</div>
<?php endif; ?>
<?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?>
<div class="com-content-category-blog__navigation w-100">
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<p class="com-content-category-blog__counter counter float-end pt-3 pe-2">
<?php echo $this->pagination->getPagesCounter(); ?>
</p>
<?php endif; ?>
<div class="com-content-category-blog__pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>

View File

@ -39,56 +39,53 @@ $baseImagePath= Uri::root(false) . "media/templates/site/joomla-italia-theme/ima
?>
<article class="card card-bg card-article card-article-purplelight">
<div class="card-body">
<div class="card-article-img d-none d-lg-block">
<?php if ($introimg->image_intro =='') {
?>
<figure><a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" title="service-link"><img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid" alt="immagine-segnaposto"/></a></figure>
<?php
} else {
echo LayoutHelper::render('joomla.content.intro_image', $this->item);
}
?>
</div>
<div class="card-article-content">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_item_title_servizio', $this->item); ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<?php if ($info == 0 && $params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<?php //echo LayoutHelper::render('joomla.content.tags', $this->item->tags->itemTags);?>
<?php endif; ?>
<p><?php echo JHTML::_('string.truncate', $this->item->introtext, 200, false, false) ; ?></p>
<?php if ($info == 1 || $info == 2) : ?>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<?php echo LayoutHelper::render('joomla.content.tags', $this->item->tags->itemTags); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($params->get('show_readmore') && $this->item->readmore) :
if ($params->get('access-view')) :
$link = Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language));
else :
$menu = Factory::getApplication()->getMenu();
$active = $menu->getActive();
$itemId = $active->id;
$link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false));
$link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)));
endif; ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php if ($isUnpublished) : ?>
</div>
<?php endif; ?>
</div>
<article class="card card-article">
<div class="card-body">
<div class="card-article-img d-none d-lg-block">
<?php if ($introimg->image_intro =='') { ?>
<figure><a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" title="service-link"><img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid" alt="immagine-segnaposto"/></a></figure>
<?php } else {
echo LayoutHelper::render('joomla.content.intro_image', $this->item);
} ?>
</div>
</article>
<div class="card-article-content">
<?php echo LayoutHelper::render('joomla.content.blog_style_j4a_item_title_servizio', $this->item); ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<?php if ($info == 0 && $params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<?php //echo LayoutHelper::render('joomla.content.tags', $this->item->tags->itemTags);?>
<?php endif; ?>
<p><?php echo JHTML::_('string.truncate', $this->item->introtext, 200, false, false) ; ?></p>
<?php if ($info == 1 || $info == 2) : ?>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<?php echo LayoutHelper::render('joomla.content.tags', $this->item->tags->itemTags); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($params->get('show_readmore') && $this->item->readmore) :
if ($params->get('access-view')) :
$link = Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language));
else :
$menu = Factory::getApplication()->getMenu();
$active = $menu->getActive();
$itemId = $active->id;
$link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false));
$link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)));
endif; ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php if ($isUnpublished) : ?>
</div>
<?php endif; ?>
</div>
</div>
</article>