mirror of
https://github.com/torproject/community.git
synced 2024-11-23 01:39:50 +00:00
Update navbar from lego
This commit is contained in:
parent
e1b27a81b3
commit
0f6756584e
@ -1,61 +0,0 @@
|
||||
{% if this.color == 'primary' %}
|
||||
<div class="container bg-primary">
|
||||
<nav class="navbar no-background navbar-expand-lg navbar-dark fixed-top bg-primary p-4">
|
||||
{% else %}
|
||||
<div class="container bg-dark">
|
||||
<nav class="navbar no-background navbar-expand-lg navbar-dark fixed-top bg-dark p-4">
|
||||
{% endif %}
|
||||
<a class="navbar-brand" href="/">
|
||||
<img alt="{{ 'The Tor Project' }}" src="{{ '/static/images/tor-logo.svg'|asseturl }}" >
|
||||
<span class="sr-only">{{ _("Tor Logo") }}</span>
|
||||
</a>
|
||||
<a href="https://donate.torproject.org" title="{{ _("Donate") }}"><h5><span class="badge badge-warning p-2">{{ _("Donate Now") }}</span></h5></a>
|
||||
<label for="nav-toggle">
|
||||
<a class="btn btn-lg btn-primary navbar-toggler" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</a>
|
||||
</label>
|
||||
<input type="checkbox" id="nav-toggle"/>
|
||||
<div class="collapse navbar-collapse hamburger-menu" id="navbarSupportedContent">
|
||||
<div class="mx-auto pt-2 pl-4">
|
||||
<ul class="navbar-nav">
|
||||
{% set menubag = 'menu+' + this.alt %}
|
||||
{% for id, item in bag(menubag).items() %}
|
||||
<li{% if this.path == item.path %} class="nav-item active" {% else %} class="nav-item"{% endif %}>
|
||||
{% set link = site.get(item.path) %}
|
||||
{% if link %}
|
||||
<a class="nav-link" href="{{ item.path|url(alt=id) }}">
|
||||
{% else %}
|
||||
<a class="nav-link" href="{{ item.path }}">
|
||||
{% endif %}
|
||||
{{ item.label }}
|
||||
{% if this.path == item.path %}
|
||||
<span class="sr-only">(current)</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mt-2 btn-group dropdown pr-2">
|
||||
{% if this.color == 'primary' %}
|
||||
<button type="button" class="btn btn-primary bg-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{% else %}
|
||||
<button type="button" class="btn btn-dark bg-dark dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{% endif %}
|
||||
{{ bag('alternatives', this.alt, 'language') }}
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
{% for id, item in bag('alternatives').items() %}
|
||||
{% if this.alt != id %}
|
||||
<a class="dropdown-item" href="{{ this.path|url(alt=id) }}">{{ item.language }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<a class="btn text-primary bg-white btn-light pull-right mt-2" href="https://www.torproject.org/download">
|
||||
{{ _("Download Tor Browser") }}<span class="oi oi-arrow-bottom ml-2 p-1" title="icon arrow-bottom" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
1
templates/navbar.html
Symbolic link
1
templates/navbar.html
Symbolic link
@ -0,0 +1 @@
|
||||
../lego/templates/navbar.html
|
Loading…
Reference in New Issue
Block a user