diff --git a/app/Helper/functions.php b/app/Helper/functions.php index b0ee57f0..6b72fab3 100644 --- a/app/Helper/functions.php +++ b/app/Helper/functions.php @@ -82,3 +82,26 @@ function getShareLinks(\App\Models\Link $link) return $links; } + +/** + * Get an SVG from a path and return it as a string + * + * @param $path + * @param null $width + * @param null $height + * @return mixed|string|string[]|null + */ +function displaySVG($path, $width = null, $height = null) +{ + $svg = file_get_contents($path); + + if ($width) { + $svg = preg_replace('/width="([\d]+)"/i', "width='$width'", $svg); + } + + if ($height) { + $svg = preg_replace('/height="([\d]+)"/i', "height='$height'", $svg); + } + + return $svg; +} diff --git a/public/assets/img/logo_linkace.svg b/public/assets/img/logo_linkace.svg index 0a7a1b6b..7ade0bff 100644 --- a/public/assets/img/logo_linkace.svg +++ b/public/assets/img/logo_linkace.svg @@ -1,9 +1,10 @@ - + diff --git a/resources/assets/sass/custom/_fixes.scss b/resources/assets/sass/custom/_fixes.scss index 2caf79eb..f7f5709f 100644 --- a/resources/assets/sass/custom/_fixes.scss +++ b/resources/assets/sass/custom/_fixes.scss @@ -2,3 +2,20 @@ .custom-control-label { cursor: pointer; } + +// Style fix for the navbar logo +.navbar-dark { + + .svg { + max-height: 30px; + max-width: 81px; + } + + .svg-path { + fill: $white; + } + + .svg-stroke { + stroke: $white; + } +} diff --git a/resources/assets/sass/third-party/bootstrap/_variables.scss b/resources/assets/sass/third-party/bootstrap/_variables.scss index 50df2a13..28b9dd4e 100644 --- a/resources/assets/sass/third-party/bootstrap/_variables.scss +++ b/resources/assets/sass/third-party/bootstrap/_variables.scss @@ -736,10 +736,10 @@ $navbar-toggler-padding-x: .75rem !default; $navbar-toggler-font-size: $font-size-lg !default; $navbar-toggler-border-radius: $btn-border-radius !default; -$navbar-dark-color: rgba($white, .5) !default; -$navbar-dark-hover-color: rgba($white, .75) !default; +$navbar-dark-color: rgba($white, .75) !default; +$navbar-dark-hover-color: rgba($white, 1) !default; $navbar-dark-active-color: $white !default; -$navbar-dark-disabled-color: rgba($white, .25) !default; +$navbar-dark-disabled-color: rgba($white, .4) !default; $navbar-dark-toggler-icon-bg: str-replace(url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='#{$navbar-dark-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"), "#", "%23") !default; $navbar-dark-toggler-border-color: rgba($white, .1) !default; diff --git a/resources/views/guest/partials/nav.blade.php b/resources/views/guest/partials/nav.blade.php index a7d9f6f6..af70ae05 100644 --- a/resources/views/guest/partials/nav.blade.php +++ b/resources/views/guest/partials/nav.blade.php @@ -1,8 +1,7 @@ -
- @lang('linkace.linkace') + {!! displaySVG(public_path('assets/img/logo_linkace.svg')) !!}