greenlight/app/views/shared/_header.html.erb

31 lines
1.1 KiB
Plaintext

<div class="header py-4">
<div class="container">
<div class="d-flex">
<a class="header-brand" href="{{ site.base }}/index.html">
<%= image_tag("bbb_logo.png", class: "header-brand-img") %>
</a>
<div class="d-flex order-lg-2 ml-auto">
<% if current_user %>
<div class="dropdown">
<a href="#" class="nav-link pr-0 leading-none" data-toggle="dropdown">
<% if current_user.image.nil? %>
<span class="avatar"><%= current_user.name.first %></span>
<% else %>
<span class="avatar" style="background-image: url(<%= current_user.image %>)"></span>
<% end %>
<span class="ml-2 d-none d-lg-block">
<span class="text-default"><%= current_user.name %></span>
<small class="text-muted d-block mt-1"><%= current_user.subtitle %></small>
</span>
</a>
</div>
<% else %>
<button type="submit" class="btn btn-pill btn-outline-primary ml-auto" data-toggle="modal" data-target="#loginModal">Login</button>
<%= render "shared/modals/login_modal" %>
<% end %>
</div>
</div>
</div>
</div>