aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/templates
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r/templates')
-rw-r--r--pyaggr3g470r/templates/home.html49
-rw-r--r--pyaggr3g470r/templates/layout.html13
2 files changed, 35 insertions, 27 deletions
diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html
index 5c9cf0f7..5e9180fa 100644
--- a/pyaggr3g470r/templates/home.html
+++ b/pyaggr3g470r/templates/home.html
@@ -53,33 +53,28 @@
</div>
<div class="container col-md-9">
<div id="filters" data-filter="{{ filter_ }}">
- {% if filter_ == 'all' %}<b>{% endif %}
- <a href="{{ gen_url(filter_='all') }}">{{ _('All') }}</a>
- {% if filter_ == 'all' %}</b>{% endif %}
- |
- {% if filter_ == 'read' %}<b>{% endif %}
- <a href="{{ gen_url(filter_='read') }}">{{ _('Read') }}</a>
- {% if filter_ == 'read' %}</b>{% endif %}
- |
- {% if filter_ == 'unread' %}<b>{% endif %}
- <a href="{{ gen_url(filter_='unread') }}">{{ _('Unread') }}</a>
- {% if filter_ == 'unread' %}</b>{% endif %}
- -
- {% if limit == 10 %}<b>{% endif %}
- <a href="{{ gen_url(limit=10) }}">{{ _(10) }}</a>
- {% if limit == 10 %}</b>{% endif %}
- |
- {% if limit == 100 %}<b>{% endif %}
- <a href="{{ gen_url(limit=100) }}">{{ _(100) }}</a>
- {% if limit == 100 %}</b>{% endif %}
- |
- {% if limit == 1000 %}<b>{% endif %}
- <a href="{{ gen_url(limit=1000) }}">{{ _(1000) }}</a>
- {% if limit == 1000 %}</b>{% endif %}
- |
- {% if limit == 'all' %}<b>{% endif %}
- <a href="{{ gen_url(limit='all') }}">{{ _('All') }}</a>
- {% if limit == 'all' %}</b>{% endif %}
+ <ul id="myTab" class="nav nav-tabs" role="tablist">
+ <li id="tab-all"><a href="{{ gen_url(filter_='all') }}">{{ _('All') }}</a></li>
+ <li id="tab-read"><a href="{{ gen_url(filter_='read') }}">{{ _('Read') }}</a></li>
+ <li id="tab-unread"><a href="{{ gen_url(filter_='unread') }}">{{ _('Unread') }}</a></li>
+ </ul>
+ <div id="nbdisplay">
+ {% if limit == 10 %}<b>{% endif %}
+ <a href="{{ gen_url(limit=10) }}">{{ _(10) }}</a>
+ {% if limit == 10 %}</b>{% endif %}
+ |
+ {% if limit == 100 %}<b>{% endif %}
+ <a href="{{ gen_url(limit=100) }}">{{ _(100) }}</a>
+ {% if limit == 100 %}</b>{% endif %}
+ |
+ {% if limit == 1000 %}<b>{% endif %}
+ <a href="{{ gen_url(limit=1000) }}">{{ _(1000) }}</a>
+ {% if limit == 1000 %}</b>{% endif %}
+ |
+ {% if limit == 'all' %}<b>{% endif %}
+ <a href="{{ gen_url(limit='all') }}">{{ _('All') }}</a>
+ {% if limit == 'all' %}</b>{% endif %}
+ </div>
</div>
{% if articles | count != 0%}
<div class="table-responsive">
diff --git a/pyaggr3g470r/templates/layout.html b/pyaggr3g470r/templates/layout.html
index 5509cc4d..b02bdf07 100644
--- a/pyaggr3g470r/templates/layout.html
+++ b/pyaggr3g470r/templates/layout.html
@@ -167,5 +167,18 @@ deployed on Heroku or on a traditional server." />
<script src="{{ url_for('.static', filename = 'js/jquery.js') }}"></script>
<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">
+ $(document).ready(function() {
+ if (window.location.href.indexOf("unread") > -1) {
+ $("#tab-unread").attr('class', "active");
+ }
+ else if (window.location.href.indexOf("read") > -1) {
+ $("#tab-read").attr('class', "active");
+ }
+ else {
+ $("#tab-all").attr('class', "active");
+ }
+ });
+ </script>
</body>
</html>
bgstack15