asciinema.org/web/templates/layout/header.html.eex
2017-06-02 15:40:24 +02:00

41 lines
1.5 KiB
Elixir

<header class="navbar navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle" data-target=".navbar-ex1-collapse" data-toggle="collapse" type="button">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">
<img src="<%= static_path(@conn, "/images/logo-red.svg") %>">
</a>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li><a href="/browse/featured">Browse</a></li>
<li><a href="<%= doc_path(@conn, :index) %>">Docs</a></li>
<li><a href="http://blog.asciinema.org">Blog</a></li>
</ul>
<ul class="nav navbar-nav navbar-right session-info">
<%= if @current_user do %>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<img class="avatar" src="<%= avatar_url(@current_user) %>"><%= @current_user.username || @current_user.email %><b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="<%= profile_path(@current_user) %>">Profile</a></li>
<li><a href="/user/edit">Settings</a></li>
<li><a class="logout" href="/logout">Log out</a></li>
</ul>
</li>
<% else %>
<li><a href="/login/new" id="log-in">Log in</a></li>
<% end %>
</ul>
</div>
</div>
</header>