diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-02-29 21:21:37 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-02-29 21:21:37 +0100 |
commit | aac4a264769f06c7f30555d840165d76902f64ec (patch) | |
tree | 868123e6cc6c6cefb01cf8dc51a48c6f6b66c42d | |
parent | Migrating frontend to Bootstrap 4. (diff) | |
download | newspipe-aac4a264769f06c7f30555d840165d76902f64ec.tar.gz newspipe-aac4a264769f06c7f30555d840165d76902f64ec.tar.bz2 newspipe-aac4a264769f06c7f30555d840165d76902f64ec.zip |
wi
-rw-r--r-- | newspipe/web/templates/layout.html | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/newspipe/web/templates/layout.html b/newspipe/web/templates/layout.html index b5eb801a..576c444b 100644 --- a/newspipe/web/templates/layout.html +++ b/newspipe/web/templates/layout.html @@ -31,10 +31,40 @@ {% block menu_links %} <div class="collapse navbar-collapse" id="navbarSupportedContent"> - <ul class="navbar-nav mr-auto w-100 justify-content-end"> - {% if current_user.is_authenticated %} - <li class="nav-item"> - <a class="nav-link" href="{{ url_for('logout') }}" title="{{ _('Logout') }}"><i class="fa fa-sign-out" aria-hidden="true"></i></a> + <ul class="navbar-nav mr-auto w-100 justify-content-end"> + {% if current_user.is_authenticated %} + {% if current_user.is_admin %} + <li class="nav-item"> + <a class="nav-link" href="/fetch" title="{{ _('Fetch') }}">{{ _('Fetch') }}</a> + </li> + {% endif %} + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownBookmark" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-bookmark" aria-hidden="true"></i></a> + <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownBookmark"> + <a class="dropdown-item" href="{{ url_for('bookmarks.list_') }}">{{ _('Your bookmarks') }}</a> + <a class="dropdown-item" href="{{ url_for('bookmark.form') }}">{{ _('Add a new bookmark') }}</a> + </div> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownRSS" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-rss" aria-hidden="true"></i> {{ _('Add a new feed') }}</a> + <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownRSS"> + + <form class="px-4 py-3" action="{{ url_for('feed.bookmarklet') }}"> + <label class="sr-only" for="inlineFormInputGroupAPIKey">{{ _('Add a new feed') }}</label> + <div class="input-group input-group-inline"> + <div class="input-group-prepend"> + <input class="form-control" name="url" type="url" placeholder="{{_('Site or feed url')}}" required="required"/> + </div> + <button type="submit" class="btn btn-primary"><i class="fa fa-plus" aria-hidden="true"></i></button> + </div> + </form> + </div> + </li> + + + + <li class="nav-item"> + <a class="nav-link" href="{{ url_for('logout') }}" title="{{ _('Logout') }}"><i class="fa fa-sign-out" aria-hidden="true"></i></a> </li> {% else %} <li class="nav-item"> |