SVG logo image re-sizing (#10826)

* feat: add some heights and widths on the logo svg so any svg can be resized to fit in the header

* chore: show a realistic view of the logo as per the header
This commit is contained in:
Ridhwana 2020-10-13 17:41:31 +02:00 committed by GitHub
parent fc933b991a
commit 9e8ce4569e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View file

@ -41,6 +41,7 @@
// Logo
.site-logo {
display: flex;
max-width: 20%;
.logo {
width: 50px;
@ -50,6 +51,12 @@
fill: var(--logo-color);
border-radius: 3px;
}
svg {
height: calc(var(--header-height));
width: auto;
padding: 0.5em;
}
}
// Search bar

View file

@ -552,7 +552,9 @@
placeholder: Constants::SiteConfig::DETAILS[:logo_svg][:placeholder] %>
<div class="alert alert-info"><%= Constants::SiteConfig::DETAILS[:logo_svg][:description] %></div>
<% if SiteConfig.logo_svg.present? %>
<%= SiteConfig.logo_svg.html_safe %>
<div class="site-logo">
<%= SiteConfig.logo_svg.html_safe %>
</div>
<% end %>
</div>