aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/templates/layout.html
blob: 94d3fdc636385968a3263e827474e202a1fbc15f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
    <!DOCTYPE html>
<html>
  <head>
    {% block head %}
    <meta charset="utf-8">
    <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>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" />
    <!-- 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" />
  {% endblock %}
  </head>
  <body>
    <nav class="navbar navbar-inverse navbar-fixed-top navbar-custom" role="navigation">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <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> -->
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <div><span class="glyphicon glyphicon-plus-sign"></span>&nbsp;{{ _('Add a feed') }}</div>
                    </a>
                    <ul class="dropdown-menu">
                        <li>
                            <form action="/feed/create" class="navbar-form" method="POST" name="save">
                                {{ create_feed_form.hidden_tag() }}

                                {{ create_feed_form.link.label }}
                                {{ create_feed_form.link(class_="form-control", placeholder="Feed link") }} {% for error in create_feed_form.link.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %}

                                {{ create_feed_form.title.label }}
                                {{ create_feed_form.title(class_="form-control", placeholder="Optional") }} {% for error in create_feed_form.title.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %}

                                {{ create_feed_form.site_link.label }}
                                {{ create_feed_form.site_link(class_="form-control", placeholder="Optional") }} {% for error in create_feed_form.site_link.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %}

                                {{ create_feed_form.enabled.label }}
                                {{ create_feed_form.enabled(class_="checkbox") }}
                                <br />
                                {{ create_feed_form.submit(class_="btn btn-default") }}
                            </form>
                        </li>
                    </ul>
                </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 not on_heroku or 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">{{ _('Feed') }} <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <li><a href="{{ url_for("feeds.update", action="read") }}">{{ _('Mark all as read') }}</a></li>
                        <li role="presentation" class="divider"></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">{{ _('Tools') }} <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <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 href="{{ url_for("logout") }}"><span class="glyphicon glyphicon-log-out"></span> {{ _('Logout') }}</a></li>
                {% if not on_heroku %}
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <div><span class="glyphicon glyphicon-search"></span>&nbsp;<b class="caret"></b></div>
                    </a>
                    <ul class="dropdown-menu">
                        <li>
                            <form class="navbar-form" method=get action="/search" role="search">
                                <div class="input-group">
                                    <input type="text" class="form-control" name="query" placeholder="Search">
                                </div>
                            </form>
                        </li>
                    </ul>
                </li>
                {% endif %}
            {% else %}
                <li><a href="{{ url_for("about") }}"><span class="glyphicon glyphicon-question-sign"></span>&nbsp;{{ _('About') }}</a></li>
            {% endif %}
          </ul>
        </div><!-- /.navbar-collapse -->
      </div><!-- /.container -->
    </nav>

    <br />

    <div class="container">
    {% with messages = get_flashed_messages(with_categories=true) %}
    {% if messages %}
        {% for category, message in messages %}
            <div class="alert alert-{{category}}">
                <button type="button" class="close" data-dismiss="alert">&times;</button>
                {{ message }}
            </div>
        {% endfor %}
    {% endif %}
    {% endwith %}
    </div>

    {% block content %}{% endblock %}

    <!-- Bootstrap core JavaScript -->
    <!-- Placed at the end of the document so the pages load faster -->
    <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">
        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