Skip to content

Commit

Permalink
Fix issue alignment not work on Icon Widget #694
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Jun 13, 2024
1 parent 055eb72 commit bd50a3b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 11 additions & 1 deletion framework/elements/icons/icons.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,17 @@
$icon_gutter = $params->get('icon_gutter', '3');
$color = Style::getColor($params->get('color', ''));
$color_hover = Style::getColor($params->get('color_hover', ''));
echo '<div class="row row-cols-auto g-'.$icon_gutter.'">';

// Alignment
$text_alignment = $params->get('text_alignment','');
$text_alignment_breakpoint = $params->get('text_alignment_breakpoint','');
$text_alignment_fallback = $params->get('text_alignment_fallback','');
if ($text_alignment) {
$alignment = ' justify-content' . ($text_alignment_breakpoint ? '-' . $text_alignment_breakpoint : '') . '-' . $text_alignment . ($text_alignment_fallback ? ' justify-content-' . $text_alignment_fallback : '');
} else {
$alignment = '';
}
echo '<div class="row row-cols-auto g-'.$icon_gutter.$alignment.'">';
foreach ($icons as $icon) {
$icon_params = Style::getSubFormParams($icon->params);
$target = isset($icon_params['target']) && $icon_params['target'] ? ' target="'.$icon_params['target'].'"' : '';
Expand Down
2 changes: 2 additions & 0 deletions language/en-GB/en-GB.astroid.ini
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ TPL_ASTROID_SYSTEM_MESSAGES_JCACHE="Joomla Cache cleared."
TPL_ASTROID_SYSTEM_MESSAGES_PRESET="Preset Applied, Please save your changes."
TPL_ASTROID_LAYOUT_LABEL="Layout"
TPL_ASTROID_LAYOUT_DESC="Drag & Drop Layout Builder"
TPL_ASTROID_SUB_LAYOUTS_LABEL="Sub Layouts"
TPL_ASTROID_SUB_LAYOUTS_DESC="Drag & Drop Sub-layouts builder. It will be used to contribute to Layout Builder"
TPL_ASTROID_PRESET_DROPDOWN="Load Preset"
TPL_ASTROID_PRESETS_MAIN_TITLE_LABEL="Preset Profiles"
TPL_ASTROID_PRESETS_LABEL="Preset Profiles"
Expand Down

0 comments on commit bd50a3b

Please sign in to comment.