global topbar #6
@@ -17,7 +17,7 @@
|
|||||||
{{{ if ./iconClass }}}
|
{{{ if ./iconClass }}}
|
||||||
<i class="fa fa-fw {./iconClass}" data-content="{./content}"></i>
|
<i class="fa fa-fw {./iconClass}" data-content="{./content}"></i>
|
||||||
{{{ end }}}
|
{{{ end }}}
|
||||||
{{{ if ./text }}}<span class="nav-text text-truncate">{./text}</span>{{{ end }}}
|
{{{ if ./text }}}<span class="nav-text text-truncate {./textClass}">{./text}</span>{{{ end }}}
|
||||||
<span component="navigation/count" class="badge rounded-1 bg-primary {{{ if !./content }}}hidden{{{ end }}}">{./content}</span>
|
<span component="navigation/count" class="badge rounded-1 bg-primary {{{ if !./content }}}hidden{{{ end }}}">{./content}</span>
|
||||||
</a>
|
</a>
|
||||||
{{{ if ./dropdown }}}
|
{{{ if ./dropdown }}}
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
{{{ if displayMenuItem(@root, @index) }}}
|
{{{ if displayMenuItem(@root, @index) }}}
|
||||||
<a class="wg-topbar__drawer-link {./class}" href="{./route}" {{{ if ./targetBlank }}}target="_blank"{{{ end }}}>
|
<a class="wg-topbar__drawer-link {./class}" href="{./route}" {{{ if ./targetBlank }}}target="_blank"{{{ end }}}>
|
||||||
{{{ if ./iconClass }}}<i class="fa fa-fw {./iconClass}" aria-hidden="true"></i>{{{ end }}}
|
{{{ if ./iconClass }}}<i class="fa fa-fw {./iconClass}" aria-hidden="true"></i>{{{ end }}}
|
||||||
{{{ if ./text }}}<span>{./text}</span>{{{ end }}}
|
{{{ if ./text }}}<span class="{./textClass}">{./text}</span>{{{ end }}}
|
||||||
<span component="navigation/count" class="badge rounded-1 bg-primary {{{ if !./content }}}hidden{{{ end }}}">{./content}</span>
|
<span component="navigation/count" class="badge rounded-1 bg-primary {{{ if !./content }}}hidden{{{ end }}}">{./content}</span>
|
||||||
</a>
|
</a>
|
||||||
{{{ end }}}
|
{{{ end }}}
|
||||||
|
|||||||
@@ -105,6 +105,8 @@ assertIncludes(topbar, '{{{ if config.loggedIn }}}', 'Topbar should branch on th
|
|||||||
assertIncludes(topbar, '{{{ if canChat }}}', 'Chat controls should remain permission-gated');
|
assertIncludes(topbar, '{{{ if canChat }}}', 'Chat controls should remain permission-gated');
|
||||||
assertIncludes(topbar, '{{{ if allowRegistration }}}', 'Registration should remain server-gated');
|
assertIncludes(topbar, '{{{ if allowRegistration }}}', 'Registration should remain server-gated');
|
||||||
assertIncludes(topbar, '{{{ each navigation }}}', 'Topbar should render ACP Navigation items');
|
assertIncludes(topbar, '{{{ each navigation }}}', 'Topbar should render ACP Navigation items');
|
||||||
|
assertIncludes(topbar, '{./textClass}', 'Topbar should honor ACP Navigation text visibility classes');
|
||||||
|
assertExcludes(topbar, 'href="{relative_path}/admin"', 'Topbar should not hard-code the administrator link');
|
||||||
|
|
||||||
assertMissing(
|
assertMissing(
|
||||||
'templates/partials/header/brand.tpl',
|
'templates/partials/header/brand.tpl',
|
||||||
|
|||||||
Reference in New Issue
Block a user