header.html 2.56 KB
Newer Older
Yohan Jarosz's avatar
Yohan Jarosz committed
1 2 3
<div class="header clearfix">
    <div class="container-fluid">
        <div class="row">
Yohan Jarosz's avatar
Yohan Jarosz committed
4
            <a href="http://wwwen.uni.lu/lcsb" target="_blank"><img class="img-responsive center-block header-image" src="https://webdav-r3lab.uni.lu/public/biocore/logos/title.uni.lu.Centres.LCSB_en.png"></a>
Yohan Jarosz's avatar
Yohan Jarosz committed
5
        </div>
Yohan Jarosz's avatar
Yohan Jarosz committed
6 7
        <br/>
        <div class="row">
Yohan Jarosz's avatar
Yohan Jarosz committed
8 9 10 11 12
            {% if page.index %}
                {% assign brand =  page.index | split:"$" %}
            {% endif %}

            {% if page.type == 'project' or page.type == 'subpage' %}
Yohan Jarosz's avatar
Yohan Jarosz committed
13
                {% capture prefix %}/web/{{brand[0]}}/{% endcapture %}
Yohan Jarosz's avatar
Yohan Jarosz committed
14
            {% elsif page.type == 'frozen'%}
Yohan Jarosz's avatar
Yohan Jarosz committed
15 16 17
                {% capture prefix %}/frozen/{{brand[0]}}/{% endcapture %}
            {% elsif page.type == 'index'%}
                {% capture prefix %}{{brand[0]}}{% endcapture %}
Yohan Jarosz's avatar
Yohan Jarosz committed
18 19
            {% endif %}

Yohan Jarosz's avatar
Yohan Jarosz committed
20 21 22 23
            <nav class="navbar navbar-default navbar-static-top">
                <div class="container-fluid">
                    {% if page.index %}
                        {% assign brand =  page.index | split:"$" %}
Yohan Jarosz's avatar
Yohan Jarosz committed
24
                        <a class="navbar-brand" href="{{ site.baseurl }}{{prefix}}">{{brand[1]}}</a>
Yohan Jarosz's avatar
Yohan Jarosz committed
25 26 27
                    {% endif %}
                    <ul class="nav navbar-nav">
                    {% if page.nav %}
Yohan Jarosz's avatar
Yohan Jarosz committed
28
                            {% capture indexurl %}{{ site.baseurl }}{{prefix}}{% endcapture %}
Yohan Jarosz's avatar
Yohan Jarosz committed
29
                            {% capture indexurl2 %}{{ site.baseurl }}{{prefix}}index.html{% endcapture %}
Yohan Jarosz's avatar
Yohan Jarosz committed
30 31 32 33 34
                            {% assign navs =  page.nav | split:"," %}
                            {% for nav in navs %}
                                {% assign link =  nav | split:"$" %}
                                {% assign myurl =  link[0] %}
                                {% if myurl contains '://' %}
Yohan Jarosz's avatar
Yohan Jarosz committed
35 36
                                    <li><a href="{{myurl}}">{{link[1]}}</a></li>
                                {% elsif myurl == 'index' and (page.url == indexurl or page.url == indexurl2)  %}
Yohan Jarosz's avatar
Yohan Jarosz committed
37
                                    <li class="active"><a href="{{ site.baseurl }}{{prefix}}{{myurl}}.html">{{link[1]}}</a></li>
Yohan Jarosz's avatar
Yohan Jarosz committed
38
                                {% else %}
Yohan Jarosz's avatar
Yohan Jarosz committed
39
                                    <li class="{% if page.url contains myurl and myurl != '/index' and myurl != 'index' %}active{% endif %}"><a href="{{ site.baseurl }}{{prefix}}{{myurl}}.html">{{link[1]}}</a></li>
Yohan Jarosz's avatar
Yohan Jarosz committed
40 41 42 43 44 45 46 47 48
                                {% endif %}
                            {% endfor %}
                        </ul>
                    {% endif %}
                </div>
            </nav>
        </div>
    </div>
</div>