empty.tpl: improve navbar

This commit is contained in:
Benjamin Renard 2023-03-08 13:04:33 +01:00
parent 7b635a4f00
commit 76b134d747
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC

View file

@ -31,51 +31,61 @@
{block name="body"} {block name="body"}
{block name="navbar"} {block name="navbar"}
<header class="p-3 mb-3 border-bottom"> <header>
<div class="container"> <nav class="{block name="navbar-class"}navbar navbar-expand-lg{/block}" {block name="navbar-extra-args"}{/block}>
<div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start"> <div class="{block name="navbar-container-class"}container{/block}">
{block name="navbar-brand"} {block name="navbar-brand"}
<a href="/" class="d-flex align-items-center mb-2 mb-lg-0 text-dark text-decoration-none"> <a class="navbar-brand me-3" href="#">
<img id="logo" src="{static_url path="images/logo.svg"}" alt="Logo" title="Logo"/> <img id="logo" src="{static_url path="images/logo.svg"}" alt="Logo" title="Logo"/>
</a> </a>
{/block} {/block}
<ul class="pr-2 nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0"> <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
{block name="navbar-menu"} data-bs-target="#navbar-menu" aria-controls="navbar-menu" aria-expanded="false"
{/block} aria-label="Toggle navigation">
</ul> <span class="navbar-toggler-icon"></span>
</button>
{block name="navbar-extra-content"}{/block} <div class="collapse navbar-collapse" id="navbar-menu">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
{block name="navbar-menu"}
{/block}
</ul>
{block name="navbar-user"} {block name="navbar-extra-content"}{/block}
{if isset($auth_user) && $auth_user}
<div class="dropdown text-end"> {block name="navbar-user"}
{block name="navbar-user-name"} {if isset($auth_user) && $auth_user}
<a href="#" class="d-block link-dark text-decoration-none dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> <ul class="navbar-nav text-end">
<i class="fa fa-user-circle" aria-hidden="true"></i> <li class="nav-item dropdown">
{$auth_user->name|escape:"htmlall"} {block name="navbar-user-name"}
</a> <a class="nav-link active dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
{/block} <i class="fa fa-user-circle" aria-hidden="true"></i>
{block name="navbar-user-menu"} {$auth_user->name|escape:"htmlall"}
<ul class="dropdown-menu text-small">
{block name="navbar-user-menu-content"}{/block}
<li>
<a class="dropdown-item" href="logout">
<i class="fas fa-sign-out-alt"></i> {t domain=$CORE_TEXT_DOMAIN}Sign out{/t}
</a> </a>
{/block}
{block name="navbar-user-menu"}
<ul class="dropdown-menu text-small">
{block name="navbar-user-menu-content"}{/block}
<li>
<a class="dropdown-item" href="logout">
<i class="fa fa-sign-out"></i> {t domain=$CORE_TEXT_DOMAIN}Sign out{/t}
</a>
</li>
</ul>
{/block}
</li> </li>
</ul> </ul>
{/if}
{/block} {/block}
</div> </div>
{/if}
{/block}
</div> </div>
</div> </div>
</header> </header>
{/block} {/block}
{block name="main"} {block name="main"}
<main class="flex-shrink-0"> <main class="flex-shrink-0 mt-2">
<div class="container"> <div class="container">
{block name="pagetitle"}{if $pagetitle}<h1 class="mt-5">{$pagetitle}</h1>{/if}{/block} {block name="pagetitle"}{if $pagetitle}<h1 class="mt-5">{$pagetitle}</h1>{/if}{/block}
{include file='Tpl:errors.tpl'} {include file='Tpl:errors.tpl'}