-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
templates: search and header overlay
- Loading branch information
1 parent
3a9ac47
commit 65cf772
Showing
3 changed files
with
1,087 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
{# | ||
## This file is part of Invenio. | ||
## Copyright (C) 2012 CERN. | ||
## | ||
## Invenio is free software; you can redistribute it and/or | ||
## modify it under the terms of the GNU General Public License as | ||
## published by the Free Software Foundation; either version 2 of the | ||
## License, or (at your option) any later version. | ||
## | ||
## Invenio is distributed in the hope that it will be useful, but | ||
## WITHOUT ANY WARRANTY; without even the implied warranty of | ||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
## General Public License for more details. | ||
## | ||
## You should have received a copy of the GNU General Public License | ||
## along with Invenio; if not, write to the Free Software Foundation, Inc., | ||
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. | ||
#} | ||
|
||
{# | ||
## This file contains header part of main page template. | ||
## | ||
## Usage: | ||
## {% include 'header.html' %} | ||
#} | ||
|
||
|
||
<nav class="navbar navbar-fixed-top navbar-inverse"> | ||
<div class="container"> | ||
<div class="navbar-header"> | ||
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".navbar-collapse"> | ||
<span class="sr-only">{{ _('Toggle navigation') }}</span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</button> | ||
<a class="navbar-brand" href="{{ url_for('search.index') }}"> | ||
<img src="{{ url_for('static', filename='img/logo_white.png') }}" alt="{{ config.CFG_SITE_NAME_INTL[g.ln] }}" /> | ||
</a> | ||
</div> | ||
|
||
<div class="navbar-collapse collapse"> | ||
<ul class="nav navbar-nav"> | ||
{%- for item in current_menu.submenu('main').children if item.visible recursive %} | ||
{%- if item.children -%} | ||
<li class="dropdown"> | ||
<a href="{{ item.url }}" style="display: inline-block; padding-right: 5px;">{{ item.text|safe }}</a> | ||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="display: inline-block; padding-left: 5px;"> | ||
<b class="caret"></b> | ||
</a> | ||
<ul class="dropdown-menu pull-right"> | ||
{{ loop(item.children) }} | ||
</ul> | ||
</li> | ||
{%- else -%} | ||
<li><a href="{{ item.url }}">{{ item.text|safe }}</a></li> | ||
{%- endif %} | ||
{%- endfor %} | ||
</ul> | ||
|
||
<ul class="nav navbar-nav navbar-right"> | ||
<li class="dropdown"> | ||
{% if current_user.is_guest %} | ||
<a href="{{ url_for(config.SSO_LOGIN_ENDPOINT) }}" style="display: inline-block; padding-right: 5px;"> | ||
<i class="glyphicon glyphicon-user"></i> {{ _("guest") }} | ||
</a> | ||
{% else %} | ||
<a href="{{ url_for('webaccount.index') }}" style="display: inline-block; padding-right: 5px;"> | ||
<i class="glyphicon glyphicon-user"></i> {{ current_user.nickname|default(current_user.email) }} | ||
</a> | ||
{% endif %} | ||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="display: inline-block; padding-left: 5px;"> | ||
<span class="caret"></span> </a> | ||
<ul class="dropdown-menu"> | ||
{%- for item in current_menu.submenu('personalize').children if item.visible %} | ||
<li><a href="{{ item.url }}">{{ item.text|safe }}</a></li> | ||
{% endfor %} | ||
<li class="divider"></li> | ||
{% if current_user.is_guest %} | ||
<li><a href="{{ url_for(config.SSO_LOGIN_ENDPOINT) }}"> | ||
<i class="glyphicon glyphicon-lock"></i> {{ _("Login") }} | ||
</a></li> | ||
{% else %} | ||
<li><a href="{{ url_for('webaccount.logout') }}"> | ||
<i class="glyphicon glyphicon-off"></i> {{ _("Logout") }} | ||
</a></li> | ||
{% endif %} | ||
</ul> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> | ||
|
Oops, something went wrong.