Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (2)
......@@ -6,7 +6,7 @@ a {
color: #5e42ed;
}
nav {
.navbar {
border-bottom: #2855e6 3px solid;
}
......
{% macro genurl(string, force=False) %}
{% if (force or
( string.startswith('/') and not string.startswith('//') )) %}
{% set url = '/'.join([SITEURL.rstrip('/'),string.lstrip('/')]) %}
{{- url -}}
{% else %}
{{- string -}}
{% endif %}
{% endmacro %}
{% macro newtab(string, force=False) %}
{% if ( string.startswith('http://') or
string.startswith('https://')) %}
target="_blank"
{% endif %}
{% endmacro %}
<!DOCTYPE html>
<html lang="{{ DEFAULT_LANG }}">
......@@ -31,12 +48,35 @@
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="navbar-main">
<ul class="nav navbar-nav navbar-right">
{% for name, link in LINKS %}
<li>
<a href="{{ link }}">{{ name }}</a>
</li>
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="nav navbar-nav navbar-right" id="menuitem-list">
{% for title,url in MENUITEMS %}
{% if url is string %}
{% if title != 'Search' %}
<li {% if url == link %}class="active"{% endif %}>
<a href="{{ genurl( url ) }}" {{ newtab(url) }}>{{ title }}</a>
</li>
{% endif %}
{% elif url is iterable %}
<li class="btn-group
{%- for title,item_url in url -%}
{%- if item_url == link -%}
{{- ' active' -}}
{%- endif -%}
{%- endfor -%}
">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
{{- title }}<b class="caret"></b>
</a>
<ul class="dropdown-menu" role="menu">
{% for title,item_url in url %}
<li {% if item_url == link %}class="active"{% endif %}>
<a href="{{ genurl( item_url ) }}" {{ newtab(item_url) }}>{{ title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
</div>
......