friendica-github/view/theme/frio/templates/common_tabs.tpl

79 lines
2.7 KiB
Smarty
Raw Normal View History

2024-08-24 18:23:27 +00:00
{{*
* Copyright (C) 2010-2024, the Friendica project
* SPDX-FileCopyrightText: 2010-2024 the Friendica project
*
* SPDX-License-Identifier: AGPL-3.0-or-later
*}}
2017-02-08 00:34:36 +00:00
<div class="tabbar-wrapper">
{{* Tab navigation bar for tablets and computer *}}
<ul role="menubar" class="tabbar list-inline visible-lg visible-md visible-sm hidden-xs">
{{* The normal tabbar *}}
<li>
2021-01-24 21:07:24 +00:00
<ul class="tabs flex-nav" role="menu">
{{foreach $tabs as $tab}}
2021-01-24 22:28:58 +00:00
<li id="{{$tab.id}}" role="presentation" {{if $tab.sel}} class="{{$tab.sel}}" {{/if}}>
<a role="menuitem" class="tabbar-wrapper__link" href="{{$tab.url}}" {{if $tab.accesskey}}accesskey="{{$tab.accesskey}}" {{/if}}
2021-01-24 22:28:58 +00:00
{{if $tab.title}} title="{{$tab.title}}" {{/if}}>
{{$tab.label}}
</a>
</li>
2021-01-24 21:07:24 +00:00
{{/foreach}}
2017-02-08 00:34:36 +00:00
</ul>
</li>
2017-02-08 00:34:36 +00:00
{{* The extended dropdown menu - this would be shown if the tab menu points
doesn't fit in the available space. This is done through flexMenu.js *}}
2017-02-08 00:34:36 +00:00
<li class="pull-right">
<ul class="tabs tabs-extended" role="menu">
2017-10-20 13:21:42 +00:00
<li role="presentation" class="dropdown flex-target">
2021-01-24 21:07:24 +00:00
<button type="button" class="btn-link dropdown-toggle" id="dropdownMenuTools" data-toggle="dropdown"
aria-expanded="false">
2017-10-20 13:21:42 +00:00
<i class="fa fa-chevron-down" aria-hidden="true"></i>
</button>
2017-02-08 00:34:36 +00:00
</li>
2021-01-24 21:07:24 +00:00
</ul>
2017-02-08 00:34:36 +00:00
</li>
</ul>
{{* Tab navigation bar for smartphones *}}
<ul role="menubar" class="tabbar list-inline visible-xs">
{{* The active menupoint will be shown as one menupoint*}}
<li>
<ul class="tabs" role="menu">
{{foreach $tabs as $tab}}
{{if $tab.sel}}
2021-01-24 22:28:58 +00:00
<li id="{{$tab.id}}-xs" role="presentation" {{if $tab.sel}} class="{{$tab.sel}}" {{/if}}>
<a role="menuitem" class="tabbar-wrapper__link" href="{{$tab.url}}" {{if $tab.title}} title="{{$tab.title}}" {{/if}}>
2021-01-24 22:28:58 +00:00
{{$tab.label}}
</a>
</li>
2017-02-08 00:34:36 +00:00
{{else}}
2021-01-24 21:07:24 +00:00
{{$exttabs[]=$tab}}
2017-02-08 00:34:36 +00:00
{{/if}}
{{/foreach}}
</ul>
</li>
{{* All others are moved to this dropdown menu *}}
2021-01-24 21:19:52 +00:00
<li>
2017-02-08 00:34:36 +00:00
<ul class="tabs tabs-extended">
<li class="dropdown">
2021-01-24 21:07:24 +00:00
<button type="button" class="btn-link dropdown-toggle" id="dropdownMenuTools-xs"
data-toggle="dropdown" aria-expanded="false">
2017-10-20 13:21:42 +00:00
<i class="fa fa-chevron-down" aria-hidden="true"></i>
</button>
2021-01-24 21:19:52 +00:00
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenuTools">
2017-02-08 00:34:36 +00:00
{{foreach $exttabs as $tab}}
2021-01-24 22:28:58 +00:00
<li id="{{$tab.id}}-xs" role="presentation" {{if $tab.sel}} class="{{$tab.sel}}" {{/if}}>
<a role="menuitem" href="{{$tab.url}}" {{if $tab.title}} title="{{$tab.title}}" {{/if}}>
{{$tab.label}}
</a>
</li>
2017-02-08 00:34:36 +00:00
{{/foreach}}
</ul>
</li>
</ul>
</li>
</ul>
2021-01-24 22:28:58 +00:00
</div>