Skip to content

Commit

Permalink
Check if SVG tag display in multi-line
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Dec 12, 2023
1 parent d85bfe9 commit b069603
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions framework/frontend/logo.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
?><img src="<?php echo Uri::root() . Astroid\Helper\Media::getPath() . '/' . $default_logo; ?>" alt="<?php echo $sitename; ?>" class="astroid-logo-default" /><?php
} else {
$logo_svg = file_get_contents(JPATH_ROOT . '/' . Astroid\Helper\Media::getPath() . '/' . $default_logo);
$logo_svg = preg_replace('/\<svg(.*?)\>/i', '<svg$1 class="astroid-logo-default"'.$default_logo_style.'>', $logo_svg);
$logo_svg = preg_replace('/\<svg(.*?)\>/is', '<svg$1 class="astroid-logo-default"'.$default_logo_style.'>', $logo_svg);
echo $logo_svg;
}
} ?>
Expand All @@ -129,7 +129,7 @@
?><img src="<?php echo Uri::root() . Astroid\Helper\Media::getPath() . '/' . $default_logo_dark; ?>" alt="<?php echo $sitename; ?>" class="astroid-logo-default dark" /><?php
} else {
$logo_svg = file_get_contents(JPATH_ROOT . '/' . Astroid\Helper\Media::getPath() . '/' . $default_logo_dark);
$logo_svg = preg_replace('/\<svg(.*?)\>/i', '<svg$1 class="astroid-logo-default dark"'.$default_logo_style.'>', $logo_svg);
$logo_svg = preg_replace('/\<svg(.*?)\>/is', '<svg$1 class="astroid-logo-default dark"'.$default_logo_style.'>', $logo_svg);
echo $logo_svg;
}
} ?>
Expand All @@ -139,7 +139,7 @@
?><img src="<?php echo Uri::root() . Astroid\Helper\Media::getPath() . '/' . $mobile_logo; ?>" alt="<?php echo $sitename; ?>" class="astroid-logo-mobile" /><?php
} else {
$logo_svg = file_get_contents(JPATH_ROOT . '/' . Astroid\Helper\Media::getPath() . '/' . $mobile_logo);
$logo_svg = preg_replace('/\<svg(.*?)\>/i', '<svg$1 class="astroid-logo-mobile"'.$mobile_logo_style.'>', $logo_svg);
$logo_svg = preg_replace('/\<svg(.*?)\>/is', '<svg$1 class="astroid-logo-mobile"'.$mobile_logo_style.'>', $logo_svg);
echo $logo_svg;
}
} ?>
Expand All @@ -148,7 +148,7 @@
?><img src="<?php echo Uri::root() . Astroid\Helper\Media::getPath() . '/' . $mobile_logo_dark; ?>" alt="<?php echo $sitename; ?>" class="astroid-logo-mobile dark d-none" /><?php
} else {
$logo_svg = file_get_contents(JPATH_ROOT . '/' . Astroid\Helper\Media::getPath() . '/' . $mobile_logo_dark);
$logo_svg = preg_replace('/\<svg(.*?)\>/i', '<svg$1 class="astroid-logo-mobile dark d-none"'.$mobile_logo_style.'>', $logo_svg);
$logo_svg = preg_replace('/\<svg(.*?)\>/is', '<svg$1 class="astroid-logo-mobile dark d-none"'.$mobile_logo_style.'>', $logo_svg);
echo $logo_svg;
}
} ?>
Expand All @@ -175,7 +175,7 @@
?><img src="<?php echo Uri::root() . Astroid\Helper\Media::getPath() . '/' . $stickey_header_logo; ?>" alt="<?php echo $sitename; ?>" class="astroid-logo-sticky" /><?php
} else {
$logo_svg = file_get_contents(JPATH_ROOT . '/' . Astroid\Helper\Media::getPath() . '/' . $stickey_header_logo);
$logo_svg = preg_replace('/\<svg(.*?)\>/i', '<svg$1 class="astroid-logo-sticky"'.$sticky_logo_style.'>', $logo_svg);
$logo_svg = preg_replace('/\<svg(.*?)\>/is', '<svg$1 class="astroid-logo-sticky"'.$sticky_logo_style.'>', $logo_svg);
echo $logo_svg;
}
} ?>
Expand All @@ -184,7 +184,7 @@
?><img src="<?php echo Uri::root() . Astroid\Helper\Media::getPath() . '/' . $stickey_header_logo_dark; ?>" alt="<?php echo $sitename; ?>" class="astroid-logo-sticky dark d-none" /><?php
} else {
$logo_svg = file_get_contents(JPATH_ROOT . '/' . Astroid\Helper\Media::getPath() . '/' . $stickey_header_logo_dark);
$logo_svg = preg_replace('/\<svg(.*?)\>/i', '<svg$1 class="astroid-logo-sticky dark d-none"'.$sticky_logo_style.'>', $logo_svg);
$logo_svg = preg_replace('/\<svg(.*?)\>/is', '<svg$1 class="astroid-logo-sticky dark d-none"'.$sticky_logo_style.'>', $logo_svg);
echo $logo_svg;
}
} ?>
Expand Down

0 comments on commit b069603

Please sign in to comment.