Improve navbar brand visualisation

This commit is contained in:
riggraz
2019-09-24 16:37:55 +02:00
parent c554d68f54
commit 9bdbcef0ab
3 changed files with 14 additions and 7 deletions

View File

@@ -16,10 +16,15 @@
.navbar-brand {
font-size: 18pt;
font-weight: 700;
}
.logo img {
width: 48px;
.logo {
@extend
.d-inline-block,
.align-top,
.mr-2;
width: 36px;
}
}
.boardsNav {

View File

@@ -5,9 +5,9 @@
@import 'general/components';
@import 'general/custom_texts';
@import 'general/form';
@import 'general/header';
@import 'general/icons';
@import 'general/index';
@import 'general/navbar';
/* Components */
@import 'components/Board';

View File

@@ -1,11 +1,13 @@
<nav class="navbar navbar-expand-md navbar-light">
<div class="container">
<%=
if Rails.application.show_logo?
link_to image_tag(asset_pack_path('media/images/logo.png')), root_path, class: 'logo navbar-brand'
link_to root_path, class: 'navbar-brand' do
app_name = content_tag :span, Rails.application.name
logo = image_tag(asset_pack_path('media/images/logo.png'), class: 'logo')
Rails.application.show_logo? ? logo + app_name : app_name
end
%>
<%= link_to Rails.application.name, root_path, class: 'navbar-brand' %>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>