From 27fa130b7cad93de0a25913ab13f2bf8d3737e1a Mon Sep 17 00:00:00 2001 From: Sonny Le Date: Sat, 10 Aug 2024 17:18:56 +0700 Subject: [PATCH] Improve Article Widget and Sidebar Header --- assets/vendor/astroid/scss/_header.scss | 8 ++------ framework/elements/articles/articles.php | 8 ++++++++ framework/elements/articles/articles.xml | 1 + framework/elements/navigation/navigation.php | 10 ++++++++-- framework/elements/navigation/navigation.xml | 5 ----- framework/html/com_content/category/blog_item.php | 2 +- language/en-GB/en-GB.astroid.ini | 5 ++++- 7 files changed, 24 insertions(+), 15 deletions(-) diff --git a/assets/vendor/astroid/scss/_header.scss b/assets/vendor/astroid/scss/_header.scss index 0422dc45..dd0dd31b 100644 --- a/assets/vendor/astroid/scss/_header.scss +++ b/assets/vendor/astroid/scss/_header.scss @@ -277,10 +277,6 @@ header .logo-wrapper { .astroid-sidebar-mobile-menu { display: none; } - - .astroid-sidebar-block { - padding: 10px 15px; - } } @media (min-width: 1200px) { @@ -327,11 +323,11 @@ header .logo-wrapper { .astroid-sidebar-content { overflow-y: auto; @media(min-width: 1200px) { - padding: 15px 25px; + padding: 15px 25px 20px; } @media(min-width: 1400px) { - padding: 15px 35px; + padding: 15px 35px 30px; } } diff --git a/framework/elements/articles/articles.php b/framework/elements/articles/articles.php index 88045603..551f7bbc 100644 --- a/framework/elements/articles/articles.php +++ b/framework/elements/articles/articles.php @@ -371,6 +371,14 @@ if ($enable_slider) { $document->loadSlick('#'.$element->id.' .astroid-slick', implode(',', $slide_settings)); + if ($slider_nav) { + $nav_color = Style::getColor($params->get('nav_color', '')); + $style->child('.astroid-slick .slick-prev')->addCss('color', $nav_color['light']); + $style->child('.astroid-slick .slick-next')->addCss('color', $nav_color['light']); + $style_dark->child('.astroid-slick .slick-prev')->addCss('color', $nav_color['dark']); + $style_dark->child('.astroid-slick .slick-next')->addCss('color', $nav_color['dark']); + } + } elseif ($use_masonry) { $document->loadMasonry(); } diff --git a/framework/elements/articles/articles.xml b/framework/elements/articles/articles.xml index 8e76db0c..6bdb2936 100644 --- a/framework/elements/articles/articles.xml +++ b/framework/elements/articles/articles.xml @@ -401,6 +401,7 @@ + diff --git a/framework/elements/navigation/navigation.php b/framework/elements/navigation/navigation.php index dbf36b3f..a35e62c8 100644 --- a/framework/elements/navigation/navigation.php +++ b/framework/elements/navigation/navigation.php @@ -30,8 +30,14 @@ $item_padding = $params->get('item_padding', ''); $list_style = $params->get('list_style', ''); $list_style = $list_style !== '' ? ' ' . $list_style : ''; -$alignment = $params->get('alignment', ''); -$alignment = $alignment !== '' ? ' '. $alignment : ''; +$text_alignment = $params->get('text_alignment',''); +$text_alignment_breakpoint = $params->get('text_alignment_breakpoint',''); +$text_alignment_fallback = $params->get('text_alignment_fallback',''); + +$alignment = ''; +if ($text_alignment) { + $alignment = ' justify-content' . ($text_alignment_breakpoint ? '-' . $text_alignment_breakpoint : '') . '-' . $text_alignment . ($text_alignment_fallback ? ' justify-content-' . $text_alignment_fallback : ''); +} $color = Style::getColor($params->get('color', '')); $color_hover = Style::getColor($params->get('color_hover', '')); $color_active = Style::getColor($params->get('color_active', '')); diff --git a/framework/elements/navigation/navigation.xml b/framework/elements/navigation/navigation.xml index abcb1de1..370dc0fc 100644 --- a/framework/elements/navigation/navigation.xml +++ b/framework/elements/navigation/navigation.xml @@ -36,11 +36,6 @@ - - - - - diff --git a/framework/html/com_content/category/blog_item.php b/framework/html/com_content/category/blog_item.php index 00c20ead..e5d31851 100644 --- a/framework/html/com_content/category/blog_item.php +++ b/framework/html/com_content/category/blog_item.php @@ -82,7 +82,7 @@ get('astroid_article_video_local', ''); - $image = '
image_intro) ? ' data-as-video-poster="'.$images->image_intro.'"' : '').'>
'; + $image = '
image_intro) ? ' data-as-video-poster="'.Uri::base('true').'/'.$images->image_intro.'"' : '').'>
'; } else { $image = $astroidArticle->getImage(); } diff --git a/language/en-GB/en-GB.astroid.ini b/language/en-GB/en-GB.astroid.ini index f82b8593..d206c964 100644 --- a/language/en-GB/en-GB.astroid.ini +++ b/language/en-GB/en-GB.astroid.ini @@ -963,8 +963,10 @@ ASTROID_VIDEO_TYPE="Video Type" ASTROID_VIDEO_TYPE_DESC="Select between YouTube and Vimeo to use video on an article." ASTROID_YOUTUBE="YouTube" ASTROID_VIMEO="Vimeo" +ASTROID_LOCAL="Local" ASTROID_VIDEO_ID="Video URL" -ASTROID_VIDEO_ID_DESC="Enter the video URL." +ASTROID_VIDEO_ID_DESC="Enter the video URL." +ASTROID_VIDEO_LOCAL_URL="Select Local Video" ASTROID_ARTICLE_BADGE="Article Badge" ASTROID_ARTICLE_BADGE_DESC="Article badge will appear on the top right corner of the respective article." ASTROID_SELECT_BADGE="Select Badge" @@ -1402,6 +1404,7 @@ ASTROID_WIDGET_ENABLE_IMAGE_COVER="Enable Image Cover" ASTROID_WIDGET_IMAGE_FULLWIDTH="Image Fullwidth?" ASTROID_WIDGET_ENABLE_ICON_LINK="Enable Icon Link" ASTROID_WIDGET_MIN_HEIGHT="Min Height" +ASTROID_WIDGET_NAV_COLOR="Navigation Color" ASTROID_WIDGET_OVERLAY_COLOR="Overlay Color" ASTROID_WIDGET_OVERLAY_GRADIENT="Overlay Gradient" ASTROID_WIDGET_META_POSITION_LABEL="Meta Position"