Skip to content

Commit

Permalink
App stub tweaks (#24392)
Browse files Browse the repository at this point in the history
* Replace underscores in locales (i.e. `en_US`) with dashes to make them IETF-compliant.
* Added missing `.nav-item` Bootstrap 4 classes.
* Added `.dropdown-menu-right` class to dropdown menu, since toggle is right-aligned.
  • Loading branch information
martinbean authored and taylorotwell committed May 31, 2018
1 parent 9983fd8 commit 33cfd96
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Illuminate/Auth/Console/stubs/make/views/layouts/app.stub
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand Down Expand Up @@ -41,15 +41,19 @@
<ul class="navbar-nav ml-auto">
<!-- Authentication Links -->
@guest
<li><a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a></li>
<li><a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a></li>
<li class="nav-item">
<a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a>
</li>
@else
<li class="nav-item dropdown">
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
{{ Auth::user()->name }} <span class="caret"></span>
</a>

<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{ route('logout') }}"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
Expand Down

0 comments on commit 33cfd96

Please sign in to comment.