Skip to content

Commit

Permalink
Update Grid add with Unveil effect
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Sep 26, 2024
1 parent 18a5b17 commit e0973ba
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions assets/vendor/astroid/scss/utilities/_animations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@
.as-effect-unveil {
position: relative;
overflow: hidden;
> img {
img {
transition: opacity 0.35s, transform 0.35s, filter 0.35s;
}
&:before {
Expand Down Expand Up @@ -644,7 +644,7 @@
border-left-color: rgba(255, 255, 255, 0.75);
transform: rotate(-35deg);
}
> img {
img {
opacity: 0.9;
filter: brightness(100%) contrast(113%) saturate(159%) blur(0.2px) hue-rotate(0deg);
-webkit-transform: scale3d(1.05, 1.05, 1);
Expand Down
1 change: 1 addition & 0 deletions assets/vendor/astroid/scss/widgets/_grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
border: none;
}
.card-img-overlay {
pointer-events: none;
top: auto;
}
}
4 changes: 3 additions & 1 deletion framework/elements/grid/grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,10 @@

$media = '';
if ($grid_params->get('type', '') == 'image' && $grid_params->get('image', '')) {
$media = '<div class="as-image-cover position-relative overflow-hidden' . ($layout == 'overlay' ? ' astroid-image-overlay-cover' : '') . $image_border_radius . $hover_effect . $transition . ($media_position == 'bottom' ? ' order-2 ' : '') . '">';
$media = '<div class="as-image-cover position-relative overflow-hidden' . $image_border_radius . $hover_effect . $transition . ($media_position == 'bottom' ? ' order-2 ' : '') . '">';
$media .= $layout == 'overlay' ? '<div class="as-image-cover astroid-image-overlay-cover">' : '';
$media .= '<img class="' . ($image_fullwidth ? 'w-100' : '') . ($enable_image_cover || $media_position == 'left' || $media_position == 'right' ? ' object-fit-cover h-100' : '') . ($params->get('card_style', '') == 'none' ? '' : ' card-img-'. $media_position) .'" src="'. Astroid\Helper\Media::getPath() . '/' . $grid_params->get('image', '').'" alt="'.$grid_params->get('title', '').'">';
$media .= $layout == 'overlay' ? '</div>' : '';
$media .= '</div>';
if ( !empty($grid_params->get('link', '')) ) {
$media = '<a href="'. $grid_params->get('link', '') . '"'.$link_target.' class="'.($media_position == 'bottom' ? 'order-2 ' : '').'">'. $media .'</a>';
Expand Down
1 change: 1 addition & 0 deletions language/en-GB/en-GB.astroid.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,7 @@ ASTROID_WIDGET_SHADOW_POPUP="Popup Shadow"
ASTROID_WIDGET_HOVER_EFFECT_LABEL="Hover Effect"
ASTROID_WIDGET_EFFECT_LIGHT_UP="Light Up"
ASTROID_WIDGET_EFFECT_FLASH="Flash"
ASTROID_WIDGET_EFFECT_UNVEIL="Unveil"
ASTROID_WIDGET_TRANSITION_LABEL="Transition"
ASTROID_WIDGET_HOVER_TRANSITION_LABEL="Hover Transition"
ASTROID_WIDGET_TRANSITION_SCALE_UP="Scale Up"
Expand Down

0 comments on commit e0973ba

Please sign in to comment.