Browse Source

whitespaces

rails6
Jérémy Lecour 1 year ago
committed by Jérémy Lecour
parent
commit
86fd697eee
1 changed files with 49 additions and 50 deletions
  1. +49
    -50
      app/views/shared/_navbar.html.erb

+ 49
- 50
app/views/shared/_navbar.html.erb View File

@ -1,63 +1,62 @@
<% # Copyright (C) 2018 Colin Darie <colin@darie.eu>, 2018 Evolix <info@evolix.fr> %>
<% # License: GNU AGPL-3+ (see full text in LICENSE file) %>
<nav class="navbar navbar-expand-lg navbar-dark justify-content-between">
<div class="container-fluid">
<%= link_to (user_signed_in? ? checks_path : root_path), class: "navbar-brand" do %>
<%= image_tag 'chexpire10.png', width: 200, alt: 'chexpire logo' %>
<% end %>
<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>
<% # License: GNU AGPL-3+ (see full text in LICENSE file) %>
<nav class="navbar navbar-expand-lg navbar-dark justify-content-between">
<div class="container-fluid">
<%= link_to (user_signed_in? ? checks_path : root_path), class: "navbar-brand" do %>
<%= image_tag 'chexpire10.png', width: 200, alt: 'chexpire logo' %>
<% end %>
<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>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<% if user_signed_in? %>
<li class="nav-item">
<%= link_to(t(".my_checks"), checks_path, class: "nav-link") %>
</li>
<li class="nav-item">
<%= link_to(t(".new_domain_check"), new_check_path(kind: :domain), class: "nav-link") %>
</li>
<li class="nav-item">
<%= link_to(t(".new_ssl_check"), new_check_path(kind: :ssl), class: "nav-link") %>
</li>
<li class="nav-item">
<%= link_to(t(".my_notifications"), notifications_path, class: "nav-link") %>
</li>
<li class="nav-item">
<%= link_to("GitHub", "https://github.com/Evolix/chexpire", class: "nav-link") %>
</li>
<% end %>
</ul>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<% if user_signed_in? %>
<li class="nav-item">
<%= link_to(t(".my_checks"), checks_path, class: "nav-link") %>
</li>
<li class="nav-item">
<%= link_to(t(".new_domain_check"), new_check_path(kind: :domain), class: "nav-link") %>
</li>
<li class="nav-item">
<%= link_to(t(".new_ssl_check"), new_check_path(kind: :ssl), class: "nav-link") %>
</li>
<li class="nav-item">
<%= link_to(t(".my_notifications"), notifications_path, class: "nav-link") %>
</li>
<li class="nav-item">
<%= link_to("GitHub", "https://github.com/Evolix/chexpire", class: "nav-link") %>
</li>
<% end %>
</ul>
<div class="my-2 my-lg-0">
<% if user_signed_in? %>
<div class="navbar-item">
<div class="dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<%= current_user.email %>
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<%= link_to edit_user_registration_path, class: "dropdown-item" do %>
<div class="my-2 my-lg-0">
<% if user_signed_in? %>
<div class="navbar-item">
<div class="dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<%= current_user.email %>
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<%= link_to edit_user_registration_path, class: "dropdown-item" do %>
<i class="fa fa-user"></i>
<%= t(".profile", default: "Profile") %>
<% end %>
<%= link_to destroy_user_session_path, method: :delete, class: "dropdown-item" do %>
<i class="fa fa-sign-out"></i>
<%= t(".sign_out", default: "Sign out") %>
<% end %>
<i class="fa fa-sign-out"></i>
<%= t(".sign_out", default: "Sign out") %>
<% end %>
</div>
</div>
</div>
</div>
<% else %>
<!-- Login link (when logged out) -->
<%= link_to t(".sign_in"), new_user_session_path, class: "navbar-item navbar-link" %>
<%= link_to t(".sign_up"), new_user_registration_path, class: "navbar-item navbar-link" %>
<%= link_to "GitHub", "https://github.com/Evolix/chexpire", class: "navbar-item navbar-link" %>
<% end %>
<% else %>
<!-- Login link (when logged out) -->
<%= link_to t(".sign_in"), new_user_session_path, class: "navbar-item navbar-link" %>
<%= link_to t(".sign_up"), new_user_registration_path, class: "navbar-item navbar-link" %>
<%= link_to "GitHub", "https://github.com/Evolix/chexpire", class: "navbar-item navbar-link" %>
<% end %>
</div>
</div>
</div>
</div>
</nav>

Loading…
Cancel
Save