aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/templates/layout.html
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel+bitbucket@gmail.com>2015-04-12 15:46:06 +0200
committerCédric Bonhomme <kimble.mandel+bitbucket@gmail.com>2015-04-12 15:46:06 +0200
commitdba34e9840e812aff4b13978a958e4c01a0644d2 (patch)
treea882749ba2ab5090188bc2ab5987aec81eb57eb1 /pyaggr3g470r/templates/layout.html
parentUpdated bootstrap. (diff)
parentimproving look and feel of home page (diff)
downloadnewspipe-dba34e9840e812aff4b13978a958e4c01a0644d2.tar.gz
newspipe-dba34e9840e812aff4b13978a958e4c01a0644d2.tar.bz2
newspipe-dba34e9840e812aff4b13978a958e4c01a0644d2.zip
Merged in jaesivsm/pyaggr3g470r (pull request #8)
again miscellaneous improvements
Diffstat (limited to 'pyaggr3g470r/templates/layout.html')
-rw-r--r--pyaggr3g470r/templates/layout.html73
1 files changed, 40 insertions, 33 deletions
diff --git a/pyaggr3g470r/templates/layout.html b/pyaggr3g470r/templates/layout.html
index 60efa69e..e673a128 100644
--- a/pyaggr3g470r/templates/layout.html
+++ b/pyaggr3g470r/templates/layout.html
@@ -6,13 +6,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="pyAggr3g470r is a web-based news aggregator." />
<meta name="author" content="" />
- <title>{% if head_title %}{{ head_title }} - {% endif %}pyAggr3g470r</title>
+ <title>pyAggr3g470r{% if head_title %} - {{ head_title }}{% endif %}</title>
<link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.png') }}" />
<!-- Bootstrap core CSS -->
- <link href="{{ url_for('static', filename = 'css/bootstrap.css') }}" rel="stylesheet" media="screen" />
+ <link href="{{ url_for('static', filename='css/bootstrap.css') }}" rel="stylesheet" media="screen" />
<!-- Add custom CSS here -->
- <link href="{{ url_for('static', filename = 'css/customized-bootstrap.css') }}" rel="stylesheet" media="screen" />
- <link href="{{ url_for('static', filename = 'css/side-nav.css') }}" rel="stylesheet" media="screen" />
+ <link href="{{ url_for('static', filename='css/customized-bootstrap.css') }}" rel="stylesheet" media="screen" />
+ <link href="{{ url_for('static', filename='css/side-nav.css') }}" rel="stylesheet" media="screen" />
{% endblock %}
</head>
<body>
@@ -25,38 +25,44 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
- <a class="navbar-brand" href="/">pyAggr3g470r</a>
+ <a class="navbar-brand" href="{{ url_for("home") }}">pyAggr3g470r</a>
+ <span class="navbar-brand">{% if head_title %} - {{ head_title }}{% endif %}</span>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav navbar-right">
{% if g.user.is_authenticated() %}
+ <li><a href="{{ url_for("feed.form") }}"><span class="glyphicon glyphicon-plus-sign"></span>{{ _('Add a feed') }}</a></li>
+ {% if favorites %}
+ <li><a href="{{ url_for("home") }}"><span class="glyphicon glyphicon-home"></span> {{ _('Home') }}</a></li>
+ {% else %}
+ <li><a accesskey="f" href="{{ url_for("favorites") }}"><span class="glyphicon glyphicon-star"></span> {{ _('Favorites') }}</a></li>
+ {% endif %}
+ {% if conf.ON_HEROKU and g.user.is_admin() %}
+ <li><a accesskey="r" href="/fetch"><span class="glyphicon glyphicon-import"></span>{{ _('Fetch') }}</a></li>
+ {% endif %}
<li class="dropdown">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ _('Articles') }} <b class="caret"></b></a>
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ _('Feed') }} <b class="caret"></b></a>
<ul class="dropdown-menu">
- <li><a accesskey="r" href="/fetch">{{ _('Fetch') }}</a></li>
- <li><a href="/mark_as/read">{{ _('Mark all as read') }}</a></li>
+ <li><a href="{{ url_for("feeds.update", action="read") }}">{{ _('Mark all as read') }}</a></li>
<li role="presentation" class="divider"></li>
- <li><a href="/create_feed">{{ _('Add a feed') }}</a></li>
+ <li><a accesskey="i" href="{{ url_for("inactives") }}">{{ _('Inactive') }}</a></li>
+ <li><a href="{{ url_for("history") }}">{{ _('History') }}</a></li>
+ <li><a href="{{ url_for("feeds.feeds") }}">{{ _('All') }}</a></li>
</ul>
</li>
<li class="dropdown">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-filter"></span> {{ _('Filter') }} <b class="caret"></b></a>
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ _('Tools') }} <b class="caret"></b></a>
<ul class="dropdown-menu">
- <li><a accesskey="u" href="/unread">{{ _('Unread') }}</a></li>
- <li><a accesskey="f" href="/favorites">{{ _('Favorites') }}</a></li>
- <li><a accesskey="i" href="/inactives">{{ _('Inactive feeds') }}</a></li>
- <li><a href="/feeds">{{ _('All feeds') }}</a></li>
- <li><a href="/history">{{ _('History') }}</a></li>
+i <li><a accesskey="m" href="{{ url_for("management") }}"><span class="glyphicon glyphicon-cog"></span> {{ _('Management') }}</a></li>
+ {% if g.user.is_admin() %}
+ <li><a href="{{ url_for("dashboard") }}"><span class="glyphicon glyphicon-dashboard"></span> {{ _('Dashboard') }}</a></li>
+ {% endif %}
+ <li><a href="{{ url_for("about") }}"><span class="glyphicon glyphicon-question-sign"></span>{{ _('About') }}</a></li>
</ul>
</li>
- <li><a accesskey="m" href="/management"><span class="glyphicon glyphicon-cog"></span> {{ _('Management') }}</a></li>
- {% if g.user.is_admin() %}
- <li><a href="{{ url_for('dashboard') }}"><span class="glyphicon glyphicon-dashboard"></span> {{ _('Dashboard') }}</a></li>
- {% endif %}
- <li><a href="/about">{{ _('About') }}</a></li>
- <li><a href="{{ url_for('logout') }}"><span class="glyphicon glyphicon-log-out"></span> {{ _('Logout') }}</a></li>
+ <li><a href="{{ url_for("logout") }}"><span class="glyphicon glyphicon-log-out"></span> {{ _('Logout') }}</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<div><span class="glyphicon glyphicon-search"></span>&nbsp;<b class="caret"></b></div>
@@ -72,7 +78,7 @@
</ul>
</li>
{% else %}
- <li><a href="/about">{{ _('About') }}</a></li>
+ <li><a href="{{ url_for("about") }}"><span class="glyphicon glyphicon-question-sign"></span>{{ _('About') }}</a></li>
{% endif %}
</ul>
</div><!-- /.navbar-collapse -->
@@ -102,18 +108,19 @@
<script src="{{ url_for('static', filename = 'js/bootstrap.js') }}"></script>
<script src="{{ url_for('static', filename = 'js/articles.js') }}"></script>
<script type="text/javascript" class="source">
- if (window.location.href.indexOf("filter_=all") > -1){
- $("#tab-all").attr('class', "active");
- }
- else if (window.location.href.indexOf("filter_=unread") > -1) {
- $("#tab-unread").attr('class', "active");
- }
- else if (window.location.href.indexOf("filter_=read") > -1) {
- $("#tab-read").attr('class', "active");
- }
- else {
- $("#tab-unread").attr('class', "active");
+ var filter_ = {% if filter_ %}"{{ filter_ }}"{% else %}undefined{% endif %};
+ if (filter_ == undefined) {
+ if (window.location.href.indexOf("filter_=all") > -1){
+ filter_ = 'all';
+ }
+ else if (window.location.href.indexOf("filter_=unread") > -1) {
+ filter_ = 'unread';
+ }
+ else if (window.location.href.indexOf("filter_=read") > -1) {
+ filter_ = 'read';
+ }
}
+ $("#tab-" + filter_).attr('class', "active");
</script>
</body>
</html>
bgstack15