diff --git a/assets/vendor/astroid/scss/joomla/_com_content.scss b/assets/vendor/astroid/scss/joomla/_com_content.scss index 1aff20a0..1e23b8b2 100644 --- a/assets/vendor/astroid/scss/joomla/_com_content.scss +++ b/assets/vendor/astroid/scss/joomla/_com_content.scss @@ -1,5 +1,5 @@ .blog { - .com-content-category-blog__items + .com-content-category-blog__items { + .blog-items + .blog-items { margin-top: 3rem; } .item-content.border-top { diff --git a/framework/html/com_content/category/blog_item.php b/framework/html/com_content/category/blog_item.php index e5d31851..18519956 100644 --- a/framework/html/com_content/category/blog_item.php +++ b/framework/html/com_content/category/blog_item.php @@ -3,189 +3,9 @@ /** * @package Astroid Framework * @author Astroid Framework https://astroidframe.work - * @copyright Copyright (C) 2023 AstroidFrame.work. + * @copyright Copyright (C) 2024 AstroidFrame.work. * @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later */ -defined('_JEXEC') or die; - -use Joomla\CMS\Factory; -use Joomla\CMS\Language\Associations; -use Joomla\CMS\Layout\LayoutHelper; -use Joomla\CMS\Router\Route; -use Joomla\CMS\Uri\Uri; -use Joomla\Component\Content\Administrator\Extension\ContentComponent; -use Joomla\Component\Content\Site\Helper\RouteHelper; -use Joomla\Registry\Registry; -use Astroid\Framework; -use Astroid\Article; - -// Astroid Article/Blog -if (!isset($astroidArticle)) { - $astroidArticle = new Article($this->item, true); -} - -$template = Framework::getTemplate(); -$document = Framework::getDocument(); - -$is_lead = $this->item->is_leaditem ?? false; -$is_intro = $this->item->is_introitem ?? false; - -// Create shortcuts to some parameters. -$params = $this->item->params; -$canEdit = $params->get('access-edit'); -$info = $params->get('info_block_position', 0); -$images = json_decode($this->item->images); - -// Check if associations are implemented. If they are, define the parameter. -$assocParam = (Associations::isEnabled() && $params->get('show_associations')); - -$tpl_params = $template->getParams(); - -// Post Format -$post_attribs = new Registry(json_decode($this->item->attribs)); -$post_format = $post_attribs->get('post_format', 'standard'); -$astroid_article_type = $post_attribs->get('astroid_article_type', ''); -$astroid_article_video_type = $post_attribs->get('astroid_article_video_type', ''); - -// Image position -$image_width = array(); -if ($is_lead) { - $image_width = Article::getImageWidth($params, 'lead', $this->item->key_idx); - $image_position = $image_width['position']; -} elseif ($is_intro) { - $image_width = Article::getImageWidth($params, 'intro', $this->item->key_idx); - $image_position = $image_width['position']; -} else { - $image_position = 'top'; -} - -if (empty($image_position)) { - $image_position = 'top'; -} - -$image_width_cls = ''; -if ($image_position == 'left' || $image_position == 'right') { - $image_width_cls = $image_width['xl'] . $image_width['lg'] . $image_width['md'] . $image_width['sm'] . $image_width['default']; -} -$currentDate = Factory::getDate()->format('Y-m-d H:i:s'); -$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate) - || ($this->item->publish_down < $currentDate && $this->item->publish_down !== null); - -$clsItemContainer = $astroidArticle->getStyle('container'); -$clsItemBody = $astroidArticle->getStyle('body'); -?> -
- -
- - get('astroid_article_video_local', ''); - $image = '
image_intro) ? ' data-as-video-poster="'.Uri::base('true').'/'.$images->image_intro.'"' : '').'>
'; - } else { - $image = $astroidArticle->getImage(); - } - if (((!empty($images->image_intro)) && $post_format == 'standard') || (is_string($image) && !empty($image))) { - if ($image_position == 'left' || $image_position == 'right' || $image_position == 'bottom') { - if ($image_position == 'left' || $image_position == 'right') { - echo '
'; - echo '
'; - } else { - echo '
'; - } - } - } - // Generate media - if ((!empty($images->image_intro)) && $post_format == 'standard' && ($astroid_article_type !== 'video' || $astroid_article_video_type !== 'local')) { - echo LayoutHelper::render('joomla.content.intro_image', $this->item); - } else if (is_string($image) && !empty($image)) { - echo '
'; - if ($astroid_article_type == 'video' && $astroid_article_video_type == 'local') { - $document->loadVideoBG(); - echo $image; - } else { - $document->include('blog.modules.image', ['image' => $image, 'title' => $this->item->title, 'item' => $this->item]); - } - echo '
'; - } else { - echo LayoutHelper::render('joomla.content.post_formats.post_' . $post_format, array('params' => $post_attribs, 'item' => $this->item)); - } - - if (((!empty($images->image_intro)) && $post_format == 'standard') || (is_string($image) && !empty($image))) { - if ($image_position == 'left' || $image_position == 'right' || $image_position == 'bottom') { - echo '
'; - echo ($image_position == 'left' || $image_position == 'right') ? '
' : ''; - } - } - ?> -
- renderPostTypeIcon(); ?> - renderArticleBadge(); ?> - - - $params, 'item' => $this->item]); ?> - - - - get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date') - || $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam); ?> - -
- item); ?> -
- - $this->item, 'params' => $params, 'astroidArticle' => $astroidArticle, 'position' => 'above')); ?> - - get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?> - item->tags->itemTags); ?> - - - get('show_intro')) : ?> - - item->event->afterDisplayTitle; ?> - - - - item->event->beforeDisplayContent; ?> -
- item->introtext; ?> -
- - - - $this->item, 'params' => $params, 'astroidArticle' => $astroidArticle, 'position' => 'below')); ?> - - get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?> - item->tags->itemTags); ?> - - - - 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; ?> - - $this->item, 'params' => $params, 'link' => $link]); ?> - -
- image_intro)) && $post_format == 'standard') || (is_string($image) && !empty($image))) { - if (($image_position == 'left' || $image_position == 'right')) { - echo '
'; - echo '
'; - } - } - ?> - -
- - - item->event->afterDisplayContent; ?> -
\ No newline at end of file +defined('_JEXEC') or die; +require \Joomla\Filesystem\Path::clean(JPATH_LIBRARIES . '/astroid/framework/html/layouts/joomla/content/blog_item.php'); \ No newline at end of file diff --git a/framework/html/com_content/featured/default.php b/framework/html/com_content/featured/default.php index f35ce497..6e02c0ff 100644 --- a/framework/html/com_content/featured/default.php +++ b/framework/html/com_content/featured/default.php @@ -7,8 +7,16 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later */ defined('_JEXEC') or die; + +use Astroid\Framework; +$use_masonry = $this->params->get('use_masonry', 0); + +if ($use_masonry) { + $document = Framework::getDocument(); + $document->loadMasonry('.as-masonry'); +} ?> -
+
params->get('show_page_heading') != 0) : ?>