Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

307 lines
19KB

  1. {{* we have modified the navmenu (look at function frio_remote_nav() ) to have remote links. $nav.userinfo is a new variable and replaces the original $userinfo variable *}}
  2. {{if $nav.userinfo}}
  3. <header>
  4. {{* {{$langselector}} *}}
  5. <div id="site-location">{{$sitelocation}}</div>
  6. <div id="banner" class="hidden-sm hidden-xs">
  7. {{* show on remote/visitor connections an other logo which symols that fact*}}
  8. {{if $nav.remote}}
  9. <a href="{{$baseurl}}"><div id="remote-logo-img"></div></a>
  10. {{else}}
  11. {{* #logo-img is the the placeholder to insert a mask (friendica logo) into this div
  12. For Firefox we have to call the paths of the mask (look at the bottom of this file).
  13. Because for FF we need relative paths we apply them with js after the page is loaded (look at theme.js *}}
  14. <a href="{{$baseurl}}"><div id="logo-img"></div></a>
  15. {{/if}}
  16. </div>
  17. </header>
  18. <nav id="topbar-first" class="topbar">
  19. <div class="container">
  20. <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding"><!-- div for navbar width-->
  21. <!-- Brand and toggle get grouped for better mobile display -->
  22. <div class="topbar-nav" role="navigation">
  23. {{* Buttons for the mobile view *}}
  24. <button type="button" class="navbar-toggle collapsed pull-right" data-toggle="offcanvas" data-target="#myNavmenu" aria-controls="myNavmenu" aria-haspopup="true">
  25. <span class="sr-only">Toggle navigation</span>
  26. <i class="fa fa-ellipsis-v" aria-hidden="true"></i>
  27. </button>
  28. <button type="button" class="navbar-toggle collapsed pull-right" data-toggle="collapse" data-target="#search-mobile" aria-expanded="false" aria-controls="search-mobile">
  29. <span class="sr-only">Toggle Search</span>
  30. <i class="fa fa-search" aria-hidden="true" style="color:#FFF;"></i>
  31. </button>
  32. <button type="button" class="navbar-toggle collapsed pull-left visible-sm visible-xs" data-toggle="offcanvas" data-target="aside" aria-haspopup="true">
  33. <span class="sr-only">Toggle navigation</span>
  34. <i class="fa fa-ellipsis-v" aria-hidden="true"></i>
  35. </button>
  36. {{* Left section of the NavBar with navigation shortcuts/icons *}}
  37. <ul class="nav navbar-nav navbar-left" role="menubar">
  38. <li id="nav-communication" class="nav-segment" role="presentation">
  39. {{if $nav.network}}
  40. <a accesskey="n" role="menuitem" class="nav-menu {{$sel.network}}" href="{{$nav.network.0}}" data-toggle="tooltip" aria-label="{{$nav.network.3}}" title="{{$nav.network.3}}"><i class="fa fa-lg fa-th" aria-hidden="true"></i><span id="net-update" class="nav-network-badge badge nav-notify"></span></a>
  41. {{/if}}
  42. {{if $nav.home}}
  43. <a accesskey="p" role="menuitem" class="nav-menu {{$sel.home}}" href="{{$nav.home.0}}" data-toggle="tooltip" aria-label="{{$nav.home.3}}" title="{{$nav.home.3}}"><i class="fa fa-lg fa-home" aria-hidden="true"></i><span id="home-update" class="nav-home-badge badge nav-notify"></span></a>
  44. {{/if}}
  45. {{if $nav.community}}
  46. <a accesskey="c" role="menuitem" class="nav-menu {{$sel.community}}" href="{{$nav.community.0}}" data-toggle="tooltip" aria-label="{{$nav.community.3}}" title="{{$nav.community.3}}"><i class="fa fa-lg fa-bullseye" aria-hidden="true"></i></a>
  47. {{/if}}
  48. </li>
  49. <li id="nav-personal" class="nav-segment hidden-xs" role="presentation">
  50. {{if $nav.messages}}
  51. <a role="menuitem" id="nav-messages-link" href="{{$nav.messages.0}}" data-toggle="tooltip" aria-label="{{$nav.messages.1}}" title="{{$nav.messages.1}}" class="nav-menu {{$sel.messages}}"><i class="fa fa-envelope fa-lg" aria-hidden="true"></i><span id="mail-update" class="nav-mail-badge badge nav-notify"></span></a>
  52. {{/if}}
  53. {{if $nav.events}}
  54. <a accesskey="e" role="menuitem" id="nav-events-link" href="{{$nav.events.0}}" data-toggle="tooltip" aria-label="{{$nav.events.1}}" title="{{$nav.events.1}}" class="nav-menu"><i class="fa fa-lg fa-calendar"></i></a>
  55. {{/if}}
  56. {{if $nav.contacts}}
  57. <a role="menuitem" id="nav-contacts-link" class="nav-menu {{$sel.contacts}} {{$nav.contacts.2}}" href="{{$nav.contacts.0}}" data-toggle="tooltip" aria-label="{{$nav.contacts.1}}" title="{{$nav.contacts.1}}" ><i class="fa fa-users fa-lg" aria-hidden="true"></i></a>
  58. <span id="intro-update" class="nav-intro-badge badge nav-notify" onclick="window.location.href = '{{$nav.introductions.0}}' " data-toggle="tooltip" aria-label="{{$nav.introductions.3}}" title="{{$nav.introductions.3}}"></span>
  59. {{/if}}
  60. </li>
  61. {{* The notifications dropdown *}}
  62. {{if $nav.notifications}}
  63. <li id="nav-notification" class="nav-segment" role="presentation">
  64. <a href="{{$nav.notifications.0}}" rel="#nav-notifications-menu" data-toggle="tooltip" aria-label="{{$nav.notifications.1}}" title="{{$nav.notifications.1}}" role="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  65. <i class="fa fa-bell fa-lg" aria-hidden="true"></i>
  66. <span role="menuitem" class="sr-only">{{$nav.notifications.1}}</span>
  67. <span id="notify-update" class="nav-notify-badge badge nav-notify dropdown" data-toggle="dropdown"></span>
  68. </a>
  69. {{* The notifications dropdown menu. There are two parts of menu. The second is at the bottom of this file. It is loaded via js. Look at nav-notifications-template *}}
  70. <ul id="nav-notifications-menu" class="dropdown-menu menu-popup" role="menu" aria-labelledby="dropdownMenu1" style="display: none;">
  71. {{* the following list entry must have the id "nav-notificaionts-mark-all". Without it this isn't visable. ....strange behavior :-/ *}}
  72. <li role="presentation" id="nav-notifications-mark-all" class="dropdown-header">
  73. <div class="arrow"></div>
  74. {{$nav.notifications.1}}
  75. <div class="dropdown-header-link">
  76. <button role="menuitem" type="button" class="btn-link" onclick="notifyMarkAll();" data-toggle="tooltip" aria-label="{{$nav.notifications.mark.3}}" title="{{$nav.notifications.mark.3}}">{{$nav.notifications.mark.1}}</button>
  77. </div>
  78. </li>
  79. <li role="presentation">
  80. <p role="menuitem" class="text-muted"><i>{{$emptynotifications}}</i></p>
  81. </li>
  82. </ul>
  83. </li>
  84. {{/if}}
  85. </ul>
  86. </div>
  87. {{* This is the right part of the NavBar. It includes the search and the user menu *}}
  88. <div class="topbar-actions pull-right">
  89. <ul class="nav">
  90. {{* The search box *}}
  91. {{if $nav.search}}
  92. <li id="search-box" class="hidden-xs">
  93. <form class="navbar-form" role="search" method="get" action="{{$nav.search.0}}">
  94. <!-- <img class="hidden-xs" src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}" style="max-width:33px; max-height:33px; min-width:33px; min-height:33px; width:33px; height:33px;"> -->
  95. <div class="form-group form-group-search">
  96. <input accesskey="s" id="nav-search-input-field" class="form-control form-search" type="text" name="search" data-toggle="tooltip" title="{{$search_hint}}" placeholder="{{$nav.search.1}}">
  97. <button class="btn btn-default btn-sm form-button-search" type="submit">{{$nav.search.1}}</button>
  98. </div>
  99. </form>
  100. </li>
  101. {{/if}}
  102. {{* The user dropdown menu *}}
  103. {{if $nav.userinfo}}
  104. <li id="nav-user-linkmenu" class="dropdown account nav-menu hidden-xs">
  105. <button accesskey="u" id="main-menu" class="btn-link dropdown-toggle nav-avatar" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false" aria-controls="nav-user-menu">
  106. <div class="user-title pull-left hidden-xs hidden-sm hidden-md">
  107. <strong>{{$nav.userinfo.name}}</strong><br>
  108. {{if $nav.remote}}<span class="trunctate">{{$nav.remote}}</span>{{/if}}
  109. </div>
  110. <img id="avatar" src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}">
  111. <span class="caret"></span>
  112. </button>
  113. {{* The list of available usermenu links *}}
  114. <ul id="nav-user-menu" class="dropdown-menu pull-right menu-popup" role="menu" aria-labelledby="main-menu">
  115. {{if $nav.remote}}{{if $nav.sitename}}
  116. <li id="nav-sitename" role="menuitem">{{$nav.sitename}}</li>
  117. <li role="presentation" class="divider"></li>
  118. {{/if}}{{/if}}
  119. {{foreach $nav.usermenu as $usermenu}}
  120. <li role="presentation"><a role="menuitem" class="{{$usermenu.2}}" href="{{$usermenu.0}}" title="{{$usermenu.3}}">{{$usermenu.1}}</a></li>
  121. {{/foreach}}
  122. <li role="presentation" class="divider"></li>
  123. {{if $nav.notifications}}
  124. <li role="presentation"><a role="menuitem" href="{{$nav.notifications.all.0}}" title="{{$nav.notifications.1}}"><i class="fa fa-bell fa-fw" aria-hidden="true"></i> {{$nav.notifications.1}}</a></li>
  125. {{/if}}
  126. {{if $nav.messages}}
  127. <li role="presentation"><a role="menuitem" class="nav-commlink {{$nav.messages.2}} {{$sel.messages}}" href="{{$nav.messages.0}}" title="{{$nav.messages.3}}" ><i class="fa fa-envelope fa-fw" aria-hidden="true"></i> {{$nav.messages.1}} <span id="mail-update-li" class="nav-mail-badge badge nav-notify"></span></a></li>
  128. {{/if}}
  129. <li role="presentation" class="divider"></li>
  130. {{if $nav.contacts}}
  131. <li role="presentation"><a role="menuitem" id="nav-menu-contacts-link" class="nav-link {{$nav.contacts.2}}" href="{{$nav.contacts.0}}" title="{{$nav.contacts.3}}"><i class="fa fa-users fa-fw" aria-hidden="true"></i> {{$nav.contacts.1}}</a><span id="intro-update-li" class="nav-intro-badge badge nav-notify"></span></li>
  132. {{/if}}
  133. {{if $nav.manage}}
  134. <li role="presentation"><a role="menuitem" id="nav-manage-link" class="nav-commlink {{$nav.manage.2}} {{$sel.manage}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}"><i class="fa fa-flag fa-fw" aria-hidden="true"></i> {{$nav.manage.1}}</a></li>
  135. {{/if}}
  136. <li role="presentation"><a role="menuitem" id="nav-directory-link" class="nav-link {{$nav.directory.2}}" href="{{$nav.directory.0}}" title="{{$nav.directory.3}}"><i class="fa fa-sitemap fa-fw" aria-hidden="true"></i>{{$nav.directory.1}}</a></li>
  137. <li role="presentation" class="divider"></li>
  138. {{if $nav.apps}}
  139. <li role="presentation"><a role="menuitem" id="nav-apps-link" class="nav-link {{$nav.apps.2}} {{$sel.manage}}" href="{{$nav.apps.0}}" title="{{$nav.apps.3}}" ><i class="fa fa-puzzle-piece fa-fw" aria-hidden="true"></i> {{$nav.apps.1}}</a>
  140. <li role="presentation" class="divider"></li>
  141. {{/if}}
  142. {{if $nav.help}}
  143. <li role="presentation"><a role="menuitem" id="nav-help-link" class="nav-link {{$nav.help.2}}" href="{{$nav.help.0}}" title="{{$nav.help.3}}" ><i class="fa fa-question-circle fa-fw" aria-hidden="true"></i> {{$nav.help.1}}</a></li>
  144. {{/if}}
  145. {{if $nav.settings}}
  146. <li role="presentation"><a role="menuitem" id="nav-settings-link" class="nav-link {{$nav.settings.2}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}"><i class="fa fa-cog fa-fw" aria-hidden="true"></i> {{$nav.settings.1}}</a></li>
  147. {{/if}}
  148. {{if $nav.admin}}
  149. <li role="presentation"><a accesskey="a" role="menuitem" id="nav-admin-link" class="nav-link {{$nav.admin.2}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" ><i class="fa fa-user-secret fa-fw" aria-hidden="true"></i> {{$nav.admin.1}}</a></li>
  150. {{/if}}
  151. {{if $nav.tos}}
  152. <li role="presentation" class="divider"></li>
  153. <li role="presentation"><a role="menuitem" id="nav-tos-link" class="nav-link {{$nav.tos.2}}" href="{{$nav.tos.0}}" title="{{$nav.tos.3}}" ><i class="fa fa-file-text" aria-hidden="true"></i> {{$nav.tos.1}}</a></li>
  154. {{/if}}
  155. <li role="presentation" class="divider"></li>
  156. {{if $nav.logout}}
  157. <li role="presentation"><a role="menuitem" id="nav-logout-link" class="nav-link {{$nav.logout.2}}" href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" ><i class="fa fa fa-sign-out fa-fw" aria-hidden="true"></i> {{$nav.logout.1}}</a></li>
  158. {{else}}
  159. <li role="presentation"><a role="menuitem" id="nav-login-link" class="nav-login-link {{$nav.login.2}}" href="{{$nav.login.0}}" title="{{$nav.login.3}}" ><i class="fa fa-power-off fa-fw" aria-hidden="true"></i> {{$nav.login.1}}</a></li>
  160. {{/if}}
  161. </ul>
  162. </li>{{* End of userinfo dropdown menu *}}
  163. {{/if}}
  164. <!-- Language selector, I do not find it relevant, activate if necessary.
  165. <li>{{$langselector}}</li>
  166. -->
  167. </ul>
  168. </div>{{* End of right navbar *}}
  169. {{* The usermenu dropdown for the mobile view. It is called via the buttons. Have a look at the top of this file *}}
  170. <div id="myNavmenu" class="navmenu navmenu-default navmenu-fixed-right offcanvas">
  171. <div class="nav-container">
  172. <ul role="menu" class="list-group">
  173. {{if $nav.remote}}{{if $nav.sitename}}
  174. <li role="menuitem" class="nav-sitename list-group-item">{{$nav.sitename}}</li>
  175. {{/if}}{{/if}}
  176. <li role="presentation" class="list-group-item"><img src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}" style="max-width:15px; max-height:15px; min-width:15px; min-height:15px; width:15px; height:15px;"> {{$nav.userinfo.name}}{{if $nav.remote}} ({{$nav.remote}}){{/if}}</li>
  177. {{foreach $nav.usermenu as $usermenu}}
  178. <li role="menuitem" class="list-group-item"><a role="menuitem" class="{{$usermenu.2}}" href="{{$usermenu.0}}" title="{{$usermenu.3}}">{{$usermenu.1}}</a></li>
  179. {{/foreach}}
  180. {{if $nav.notifications}}
  181. <li role="presentation" class="list-group-item"><a role="menuitem" href="{{$nav.notifications.all.0}}" title="{{$nav.notifications.1}}"><i class="fa fa-bell fa-fw" aria-hidden="true"></i> {{$nav.notifications.1}}</a></li>
  182. {{/if}}
  183. {{if $nav.contacts}}
  184. <li role="presentation" class="list-group-item"><a role="menuitem" class="nav-link {{$nav.contacts.2}}" href="{{$nav.contacts.0}}" title="{{$nav.contacts.3}}"><i class="fa fa-users fa-fw" aria-hidden="true"></i> {{$nav.contacts.1}}</a></li>
  185. {{/if}}
  186. {{if $nav.messages}}
  187. <li role="presentation" class="list-group-item"><a role="menuitem" class="nav-link {{$nav.messages.2}} {{$sel.messages}}" href="{{$nav.messages.0}}" title="{{$nav.messages.3}}" ><i class="fa fa-envelope fa-fw" aria-hidden="true"></i> {{$nav.messages.1}}</a></li>
  188. {{/if}}
  189. {{if $nav.manage}}
  190. <li role="presentation" class="list-group-item"><a role="menuitem" class="nav-commlink {{$nav.manage.2}} {{$sel.manage}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}"><i class="fa fa-flag fa-fw" aria-hidden="true"></i> {{$nav.manage.1}}</a></li>
  191. {{/if}}
  192. {{if $nav.settings}}
  193. <li role="presentation" class="list-group-item"><a role="menuitem" class="nav-link {{$nav.settings.2}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}"><i class="fa fa-cog fa-fw" aria-hidden="true"></i> {{$nav.settings.1}}</a></li>
  194. {{/if}}
  195. {{if $nav.admin}}
  196. <li role="presentation" class="list-group-item"><a role="menuitem" class="nav-link {{$nav.admin.2}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" ><i class="fa fa-user-secret fa-fw" aria-hidden="true"></i> {{$nav.admin.1}}</a></li>
  197. {{/if}}
  198. {{if $nav.logout}}
  199. <li role="presentation" class="list-group-item"><a role="menuitem" class="nav-link {{$nav.logout.2}}" href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" ><i class="fa fa fa-sign-out fa-fw" aria-hidden="true"></i> {{$nav.logout.1}}</a></li>
  200. {{else}}
  201. <li role="presentation" class="list-group-item"><a role="menuitem" class="nav-login-link {{$nav.login.2}}" href="{{$nav.login.0}}" title="{{$nav.login.3}}" ><i class="fa fa-power-off fa-fw" aria-hidden="true"></i> {{$nav.login.1}}</a></li>
  202. {{/if}}
  203. </ul>
  204. </div>
  205. </div><!--/.sidebar-offcanvas-->
  206. </div><!-- end of div for navbar width-->
  207. </div><!-- /.container -->
  208. </nav><!-- /.navbar -->
  209. {{/if}}
  210. {{* The navbar for users which are not logged in *}}
  211. {{if $nav.userinfo == ''}}
  212. <nav class="navbar navbar-fixed-top">
  213. <div class="container">
  214. <div class="navbar-header pull-left">
  215. <a class="navbar-brand" href="#"><div id="navbrand-container">
  216. <div id="logo-img"></div>
  217. <div id="navbar-brand-text"> Friendica</div></div>
  218. </a>
  219. </div>
  220. <div class="pull-right">
  221. <ul class="nav navbar-nav navbar-right">
  222. <li role="presentation">
  223. <a href="login?mode=none" id="nav-login"
  224. data-toggle="tooltip" aria-label="{{$nav.login.3}}" title="{{$nav.login.3}}">
  225. <i class="fa fa-sign-in fa-fw" aria-hidden="true"></i>
  226. </a>
  227. </li>
  228. <li role="presentation">
  229. <a href="{{$nav.about.0}}" id="nav-about" data-toggle="tooltip" aria-label="{{$nav.about.3}}" title="{{$nav.about.3}}">
  230. <i class="fa fa-info fa-fw" aria-hidden="true"></i>
  231. </a>
  232. </li>
  233. </ul>
  234. </div>
  235. </div>
  236. </nav>
  237. {{/if}}
  238. {{* provide a a search input for mobile view, which expands by pressing the search icon *}}
  239. <div id="search-mobile" class="hidden-lg hidden-md collapse">
  240. <form class="navbar-form" role="search" method="get" action="{{$nav.search.0}}">
  241. <!-- <img class="hidden-xs" src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}" style="max-width:33px; max-height:33px; min-width:33px; min-height:33px; width:33px; height:33px;"> -->
  242. <div class="form-group form-group-search">
  243. <input id="nav-search-input-field-mobile" class="form-control form-search" type="text" name="q" data-toggle="tooltip" title="{{$search_hint}}" placeholder="{{$nav.search.1}}">
  244. <button class="btn btn-default btn-sm form-button-search" type="submit">{{$nav.search.1}}</button>
  245. </div>
  246. </form>
  247. </div>
  248. {{* The second navbar which contains nav points of the actual page - (nav points are actual handled by this theme throug js *}}
  249. <div id="topbar-second" class="topbar">
  250. <div class="container">
  251. <div class="col-lg-3 col-md-3 hidden-sm hidden-xs" id="nav-short-info"></div>
  252. <div class="col-lg-7 col-md-7 col-sm-11 col-xs-10" id="tabmenu"></div>
  253. <div class="col-lg-2 col-md-2 col-sm-1 col-xs-2" id="navbar-button"></div>
  254. </div>
  255. </div>
  256. {{*The second part of the notifications dropdown menu. It handles the notifications *}}
  257. {{if $nav.notifications}}
  258. <ul id="nav-notifications-template" class="media-list" style="display:none;" rel="template">
  259. <li class="{4} notif-entry">
  260. <div class="notif-entry-wrapper media">
  261. <div class="notif-photo-wrapper media-object pull-left"><a href="{6}" class="userinfo"><img data-src="{1}"></a></div>
  262. <a href="{0}" class="notif-desc-wrapper media-body">
  263. {2}
  264. <div><time class="notif-when time" data-toggle="tooltip" title="{5}">{3}</time></div>
  265. </a>
  266. </div>
  267. </li>
  268. </ul>
  269. {{/if}}
  270. {{* This is the mask of the firefox logo. We set the background of #logo-img to the user icon color and apply this mask to it
  271. The result is a friendica logo in the user icon color.*}}
  272. <svg id="friendica-logo-mask" x="0px" y="0px" width="0px" height="0px" viewBox="0 0 250 250">
  273. <defs>
  274. <mask id="logo-mask" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox">
  275. <path style="fill-rule:evenodd;clip-rule:evenodd;fill:#ffffff;" d="M0.796,0L0.172,0.004C0.068,0.008,0.008,0.068,0,0.172V0.824c0,0.076,0.06,0.16,0.168,0.172h0.652c0.072,0,0.148-0.06,0.172-0.144V0.14C1,0.06,0.908,0,0.796,0zM0.812,0.968H0.36v-0.224h0.312v-0.24H0.36V0.3h0.316l0-0.264l0.116-0c0.088,0,0.164,0.044,0.164,0.096l0,0.696C0.96,0.912,0.876,0.968,0.812,0.968z"></path>
  276. </mask>
  277. </defs>
  278. </svg>