Project

General

Profile

« Previous | Next » 

Revision 281dd918

Added by Guillaume Denis almost 8 years ago

responsive navbar

View differences:

ckanext/ozwillo_theme/templates/header.html
1 1
{% set current_lang = request.environ.CKAN_LANG %}
2 2
{% set current_page = request.environ.CKAN_CURRENT_URL %}
3
<div id="toggle-container">
4
  <button id="toggle-toc" class="btn btn-primary visible-xs-inline-block" type="button">
5
    <i class="fa fa-bars"></i>
6
  </button>
7
</div>
8
<nav id="off-nav">
9
  <ul class="nav">
10
    <li>
11
      <a class="logo" href="{{ g.ozwillo_url }}/{{current_lang}}"><img src="/img/logo-h43.png" alt="{% trans %}Home{% endtrans %}"></a>
12
    </li>
13
    <li class="divider first"></li>
14
    <li>
15
      <a class="nav-apps" href="{{ g.ozwillo_portal_url }}/{{current_lang}}/store?ui_locales={{current_lang}}">{% trans %}Catalog{% endtrans %}</a>
16
    </li>
17
    {% if c.userobj %}
18
    <li class="deeper dropdown parent">
19
      <a class="nav-data" href="#">{% trans %}Data{% endtrans %}</a>
20
      <ul class="nav">
21
        <li{% if current_page.startswith('/dataset') %} class='active'{% endif %}><a href="/{{current_lang}}/dataset">{% trans %}Datasets{% endtrans %}</a></li>
22
        <li{% if current_page.startswith('/organization') %} class='active'{% endif %}><a href="/{{current_lang}}/organization">{% trans %}Organizations{% endtrans %}</a></li>
23
        <li{% if current_page.startswith('/group') %} class='active'{% endif %}><a href="/{{current_lang}}/group">{% trans %}Groups{% endtrans %}</a></li>
24
        <li{% if current_page.startswith('/dashboard') %} class='active'{% endif %}><a href="/{{current_lang}}/dashboard">{% trans %}Dashboard{% endtrans %}</a></li>
25
      </ul>
26
    {% else %}
27
    <li class="active deeper dropdown parent">
28
      <a class="dropdown-toggle nav-data" href="/">{% trans %}Data{% endtrans %}</a>
29
    {% endif %}
30
    </li>
31
    <li class="divider"></li>
32
    <li>
33
      <a class="dropdown-toggle" href="{{ g.ozwillo_url }}{{ g.localized_links[current_lang]['discovering'] }}"><i class="fa fa-search"></i> {% trans %}Discover{% endtrans %}</a>
34
    </li>
35
    <li>
36
      {% if c.userobj %}
37
      <a href="{{ h.url_for('/user/slo') }}"><i class="fa fa-sign-out"></i> {% trans %}Log out{% endtrans %}</a>
38
      {% else %}
39
      <a href="{{ g.ozwillo_portal_url }}/my?ui_locales={{current_lang}}"><i class="fa fa-sign-in"></i> {% trans %}Log in{% endtrans %}</a>
40
      {% endif %}
41
    </li>
42
    <li class="divider"></li>
43
  </ul>
44
</nav>
3 45
<nav id="t3-mainnav" class="wrap navbar navbar-default navbar-fixed-top t3-mainnav">
4 46
	<div class="container">
5
		<div class="navbar-header">
6
      <button class="btn btn-primary visible-xs-inline-block off-canvas-toggle " type="button" data-pos="left" data-nav="#t3-off-canvas" data-effect="off-canvas-effect-4">
7
        <i class="fa fa-bars"></i>
8
      </button>
9
		</div>
10
		<div class="t3-navbar navbar-collapse collapse" id="t3-off-canvas">
47
		<div class="t3-navbar">
11 48
			<ul class="nav navbar-nav">
12 49
  			<li class="item-107 current">
13 50
          <a class="logo" href="{{ g.ozwillo_url }}/{{current_lang}}"><img src="/img/logo-h43.png" alt="{% trans %}Home{% endtrans %}"></a>
......
44 81
        <a class="btn navbar-btn" href="{{ g.ozwillo_portal_url }}/my?ui_locales={{current_lang}}">{% trans %}Log in{% endtrans %}</a>
45 82
        {% endif %}
46 83
        </li>
47
        <li class="item-112 deeper dropdown parent hidden-menu-table"><a class="dropdown-toggle" href="/en/oz/discover" data-toggle="dropdown">{% trans %}Discover{% endtrans %} <b class="caret"></b></a>
84
        <li class="item-112 deeper dropdown parent hidden-menu-table"><a class="dropdown-toggle" href="#" data-toggle="dropdown">{% trans %}Discover{% endtrans %} <b class="caret"></b></a>
48 85
          <ul class="dropdown-menu">
49 86
            <li><a href="{{ g.ozwillo_url }}{{ g.localized_links[current_lang]['discovering'] }}">{% trans %}Discovering the Platform{% endtrans %}</a></li>
50 87
            <li><a href="{{ g.ozwillo_url }}{{ g.localized_links[current_lang]['news'] }}">{% trans %}News{% endtrans %}</a></li>

Also available in: Unified diff