Skip to content

Commit

Permalink
Improve Article Widget and Sidebar Header
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Aug 10, 2024
1 parent a0360f8 commit 27fa130
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 15 deletions.
8 changes: 2 additions & 6 deletions assets/vendor/astroid/scss/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,6 @@ header .logo-wrapper {
.astroid-sidebar-mobile-menu {
display: none;
}

.astroid-sidebar-block {
padding: 10px 15px;
}
}

@media (min-width: 1200px) {
Expand Down Expand Up @@ -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;
}
}

Expand Down
8 changes: 8 additions & 0 deletions framework/elements/articles/articles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
1 change: 1 addition & 0 deletions framework/elements/articles/articles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
<field astroidgroup="slider_options" ngShow="[enable_slider]==1" name="slider_autoplay" type="astroidradio" astroid-switch="true" default="0" label="ASTROID_WIDGET_AUTOPLAY"/>
<field astroidgroup="slider_options" ngShow="[enable_slider]==1 AND [slider_autoplay]==1" name="interval" type="astroidrange" min="1" max="10" step="1" default="3" label="ASTROID_WIDGET_INTERVAL" postfix="seconds" />
<field astroidgroup="slider_options" ngShow="[enable_slider]==1" name="slider_nav" type="astroidradio" astroid-switch="true" default="1" label="ASTROID_WIDGET_NAVIGATION"/>
<field astroidgroup="slider_options" ngShow="[enable_slider]==1 AND [slider_nav]==1" name="nav_color" type="astroidcolor" label="ASTROID_WIDGET_NAV_COLOR" />
<field astroidgroup="slider_options" ngShow="[enable_slider]==1" name="slider_dotnav" type="astroidradio" astroid-switch="true" default="0" label="ASTROID_WIDGET_DOT_NAVIGATION"/>

<field astroidgroup="readmore_options" name="enable_readmore" type="astroidradio" astroid-switch="true" default="0" label="ASTROID_WIDGET_ARTICLES_ENABLE_READMORE"/>
Expand Down
10 changes: 8 additions & 2 deletions framework/elements/navigation/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', ''));
Expand Down
5 changes: 0 additions & 5 deletions framework/elements/navigation/navigation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
<option value="">ASTROID_WIDGET_NAV_NAVIGATION</option>
<option value="flex-column">ASTROID_WIDGET_NAV_LIST</option>
</field>
<field astroidgroup="misc_options" name="alignment" type="astroidradio" default="" label="ASTROID_WIDGET_ALIGNMENT_LABEL">
<option value="">JGLOBAL_LEFT</option>
<option value="justify-content-center">JGLOBAL_CENTER</option>
<option value="justify-content-end">JGLOBAL_RIGHT</option>
</field>
<field astroidgroup="misc_options" name="font_style" label="ASTROID_WIDGET_FONT_STYLES_LABEL" type="astroidtypography" columns="1" preview="false" color-picker="false"/>

<field astroidgroup="color_options" name="color_settings" type="astroidradio" width="full" default="color">
Expand Down
2 changes: 1 addition & 1 deletion framework/html/com_content/category/blog_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<?php
if ($astroid_article_type == 'video' && $astroid_article_video_type == 'local') {
$astroid_article_video_local = $post_attribs->get('astroid_article_video_local', '');
$image = '<div class="as-article-video-local h-100 ratio ratio-16x9" data-as-video-bg="'.Uri::base('true').'/images/'.$astroid_article_video_local.'"'.(!empty($images->image_intro) ? ' data-as-video-poster="'.$images->image_intro.'"' : '').'></div>';
$image = '<div class="as-article-video-local h-100 ratio ratio-16x9" data-as-video-bg="'.Uri::base('true').'/images/'.$astroid_article_video_local.'"'.(!empty($images->image_intro) ? ' data-as-video-poster="'.Uri::base('true').'/'.$images->image_intro.'"' : '').'></div>';
} else {
$image = $astroidArticle->getImage();
}
Expand Down
5 changes: 4 additions & 1 deletion language/en-GB/en-GB.astroid.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 27fa130

Please sign in to comment.