Skip to content

Commit

Permalink
Fix issue when SVG size not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Dec 13, 2023
1 parent b069603 commit a4fd3b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion assets/vendor/astroid/scss/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ header .logo-wrapper {
}
}

img {
.astroid-logo-default, .astroid-logo-mobile, .astroid-logo-sticky {
max-width: $logo-max-width;
max-height: $logo-max-height;
}
Expand Down
3 changes: 3 additions & 0 deletions framework/frontend/logo.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,14 @@
$default_logo_height = $params->get('default_logo_height', '');
$default_logo_style = !empty($default_logo_width) ? ' width="'.$default_logo_width.'"' : '';
$default_logo_style .= !empty($default_logo_height) ? ' height="'.$default_logo_height.'"' : '';
$default_logo_style = $default_logo_style != '' ? $default_logo_style : ' width="250px" height="250px"';

// Mobile logo
$mobile_logo_width = $params->get('mobile_logo_width', '');
$mobile_logo_height = $params->get('mobile_logo_height', '');
$mobile_logo_style = !empty($mobile_logo_width) ? ' width="'.$mobile_logo_width.'"' : '';
$mobile_logo_style .= !empty($mobile_logo_height) ? ' height="'.$mobile_logo_height.'"' : '';
$mobile_logo_style = $mobile_logo_style != '' ? $mobile_logo_style : ' width="200px" height="200px"';

// Set style for image logo
$style = new Style('.astroid-logo');
Expand Down Expand Up @@ -159,6 +161,7 @@
$sticky_logo_height = $params->get('sticky_logo_height', '60px');
$sticky_logo_style = !empty($sticky_logo_width) ? ' width="'.$sticky_logo_width.'"' : '';
$sticky_logo_style .= !empty($sticky_logo_height) ? ' height="'.$sticky_logo_height.'"' : '';
$sticky_logo_style = $sticky_logo_style != '' ? $sticky_logo_style : ' width="200px" height="200px"';

// Set style for image logo
$style = new Style('.astroid-logo > .astroid-logo-sticky');
Expand Down

0 comments on commit a4fd3b0

Please sign in to comment.