diff options
Diffstat (limited to 'src/web/templates')
33 files changed, 0 insertions, 1359 deletions
diff --git a/src/web/templates/about.html b/src/web/templates/about.html deleted file mode 100644 index 4cfafb79..00000000 --- a/src/web/templates/about.html +++ /dev/null @@ -1,23 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <div class="well"> - <h1>{{ _('About') }}</h1> - <p> - {{ _('Newspipe is a news aggregator platform.') }} - {{ _('You can easily <a href="https://newspipe.readthedocs.io/en/latest/deployment.html">install Newspipe on your server</a>.') }} - <p>{{ _('This software is under AGPLv3 license. You are welcome to copy, modify or - redistribute the <a href="https://git.sr.ht/~cedric/Newspipe">source code</a> - according to the <a href="https://www.gnu.org/licenses/agpl-3.0.html">Affero GPL</a> license.') }}</p> - <p>{{ _('Found a bug? Report it <a href="https://todo.sr.ht/~cedric/newspipe">here</a>.') }}</p> - <p><a href="{{ url_for('about_more') }}">{{ _('More information') }}</a> {{ _('about this instance.') }}</p> - </div> - <div class="well"> - <h1>{{ _('Help') }}</h1> - <p>{{ _('The documentation of the API is <a href="https://newspipe.readthedocs.io/en/latest/web-services-v3.html">here</a>.') }}</p> - <p>{{ _('Contact')}}: <a href="mailto:{{ contact }}">{{ contact }}</a></p> - <p>{{ _('You can subscribe to new feeds with a bookmarklet. Drag the following button to your browser bookmarks.') }}</p> - {{ _('<a class="btn btn-default" href="%(bookmarklet)s" rel="bookmark">Subscribe to this feed using Newspipe</a>', bookmarklet='javascript:window.location="%s?url="+encodeURIComponent(document.location)' % url_for('feed.bookmarklet', _external=True)) }} - </div> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/about_more.html b/src/web/templates/about_more.html deleted file mode 100644 index d4353a15..00000000 --- a/src/web/templates/about_more.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <ul class="list-group"> - <li class="list-group-item">{{ _('Newspipe version') }}: <a href="https://git.sr.ht/~cedric/Newspipe/refs/{{newspipe_version}}">{{newspipe_version}}</a></li> - <li class="list-group-item">{{ _('Running on Heroku') }}: {{on_heroku}}</li> - <li class="list-group-item">{{ _('Registration') }}: {{registration}}</li> - <li class="list-group-item">{{ _('Python version') }}: {{python_version}}</li> - <li class="list-group-item">{{ _('Number of users') }}: {{nb_users}}</li> - </ul> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/admin/create_user.html b/src/web/templates/admin/create_user.html deleted file mode 100644 index 40aad468..00000000 --- a/src/web/templates/admin/create_user.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends "layout.html" %} -{% block head%} -{{super()}} -{% endblock %} -{% block content %} -<div class="container"> - <div class="well"> - <h2>{{ message | safe }}</h2> - <form action="" method="post" name="saveprofileform" id="profileform"> - {{ form.hidden_tag() }} - - {{ form.nickname.label }} - {{ form.nickname(class_="form-control") }} {% for error in form.nickname.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - - {{ form.password.label }} - {{ form.password(class_="form-control") }} {% for error in form.password.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - - {{ form.automatic_crawling.label }} - {{ form.automatic_crawling(class_="form-control") }} {% for error in form.automatic_crawling.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - - <br /> - {{ form.submit(class_="btn btn-default") }} - </form> - </div> -</div> -{% endblock %} diff --git a/src/web/templates/admin/dashboard.html b/src/web/templates/admin/dashboard.html deleted file mode 100644 index 350a2e47..00000000 --- a/src/web/templates/admin/dashboard.html +++ /dev/null @@ -1,68 +0,0 @@ -{% extends "layout.html" %} -{% block head%} -{{super()}} -{% endblock %} -{% block content %} -<div class="container"> -<h1>{{ _('Registered users') }}</h1> -<table id="table-users" class="table table-striped"> - <thead> - <tr> - <th>#</th> - <th>{{ _('Nickname') }}</th> - <th>{{ _('Member since') }}</th> - <th>{{ _('Last seen') }}</th> - <th>{{ _('Actions') }}</th> - </tr> - </thead> - <tbody> - {% for user in users %} - <tr {% if not user.is_active %}class="warning"{% endif %}> - <td>{{ loop.index }}</td> - <td> - {% if user.is_public_profile %} - <a href="{{ url_for("user.profile_public", nickname=user.nickname) }}">{{ user.nickname }}</a> - {% else %} - {{ user.nickname }} - {% endif %} - {% if user.id == current_user.id %} (It's you!){% endif %} - </td> - <td class="date">{{ user.date_created | datetime }}</td> - <td class="date">{{ user.last_seen | datetime }}</td> - <td> - <a href="{{ url_for("admin.user_form", user_id=user.id) }}"><i class="glyphicon glyphicon-edit" title="{{ _('Edit this user') }}"></i></a> - {% if user.id != current_user.id %} - <a href="{{ url_for("admin.toggle_user", user_id=user.id) }}"> - {% if user.is_active %} - <i class="glyphicon glyphicon-ban-circle" title="{{ _("Disable this account") }}"></i> - {% else %} - <i class="glyphicon glyphicon-ok-circle" title="{{ _("Enable this account") }}"></i> - {% endif %} - </a> - <a href="{{ url_for("admin.delete_user", user_id=user.id) }}"><i class="glyphicon glyphicon-remove" title="{{ _('Delete this user') }}" onclick="return confirm('{{ _('You are going to delete this account.') }}');"></i></a> - {% endif %} - </td> - </tr> - {% endfor %} - </tbody> -</table> -<a href="{{ url_for("admin.user_form") }}" class="btn btn-default">{{ _('Add a new user') }}</a> -</div> -<script> -$(document).ready(function() { - $('#table-users').DataTable( { - responsive: true, - columnDefs: [ - { - targets: [0, 4], - "searchable": false - }, - { - targets: [3], - "orderSequence": ["desc"] - } - ] - }); -}); -</script> -{% endblock %} diff --git a/src/web/templates/article.html b/src/web/templates/article.html deleted file mode 100644 index a95d86d9..00000000 --- a/src/web/templates/article.html +++ /dev/null @@ -1,35 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container" data-article="{{ article.id }}"> - <div class="well"> - <h2><a href="{{ article.link }}" target="_blank">{{ article.title|safe }}</a></h2> - <h3>{{ _('from') }} <a href="/feed/{{ article.source.id }}">{{ article.source.title }}</a></h3> - <a href="{{ url_for("article.delete", article_id=article.id) }}"><i class="glyphicon glyphicon-remove" title="{{ _('Delete this article') }}"></i></a> - {% if article.like %} - <a href="#"><i class="glyphicon glyphicon-star like" title="{{ _('One of your favorites') }}"></i></a> - {% else %} - <a href="#"><i class="glyphicon glyphicon-star-empty like" title="{{ _('Click if you like this article') }}"></i></a> - {% endif %} - {% if article.readed %} - <a href="#"><i class="glyphicon glyphicon-unchecked readed" title="{{ _('Mark this article as unread') }}"></i></a> - {% else %} - <a href="#"><i class="glyphicon glyphicon-check readed" title="{{ _('Mark this article as read') }}"></i></a> - {% endif %} - <h6>{{ article.date | datetime }}</h6> - </div> - <div class="well"> - {{ article.content | safe }} - </div> - <div class="well"> - <a href="https://api.pinboard.in/v1/posts/add?url={{ article.link }}&description={{ article.title }}" rel="noreferrer" target="_blank"> - <img src="{{ url_for('static', filename='img/pinboard.png') }}" title="{{ _('Share on') }} Pinboard" /> - </a> - <a href="https://reddit.com/submit?url={{ article.link }}&title={{ article.title }}" rel="noreferrer" target="_blank"> - <img src="{{ url_for('static', filename='img/reddit.png') }}" title="{{ _('Share on') }} reddit" /> - </a> - <a href="https://twitter.com/intent/tweet?url={{ article.link }}&text={{ article.title }}" rel="noreferrer" target="_blank"> - <img src="{{ url_for('static', filename='img/twitter.png') }}" title="{{ _('Share on') }} twitter" > - </a> - </div> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/article_pub.html b/src/web/templates/article_pub.html deleted file mode 100644 index e810d18f..00000000 --- a/src/web/templates/article_pub.html +++ /dev/null @@ -1,24 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container" data-article="{{ article.id }}"> - <div class="well"> - <h2><a href="{{ article.link }}" target="_blank">{{ article.title|safe }}</a></h2> - <h3>{{ _('from') }} <a href="{{ url_for('feed.feed_pub', feed_id=article.source.id) }}">{{ article.source.title }}</a></h3> - <h6>{{ article.date | datetime }}</h6> - </div> - <div class="well"> - {{ article.content | safe }} - </div> - <div class="well"> - <a href="https://api.pinboard.in/v1/posts/add?url={{ article.link }}&description={{ article.title }}" rel="noreferrer" target="_blank"> - <img src="{{ url_for('static', filename='img/pinboard.png') }}" title="{{ _('Share on') }} Pinboard" /> - </a> - <a href="https://reddit.com/submit?url={{ article.link }}&title={{ article.title }}" rel="noreferrer" target="_blank"> - <img src="{{ url_for('static', filename='img/reddit.png') }}" title="{{ _('Share on') }} reddit" /> - </a> - <a href="https://twitter.com/intent/tweet?url={{ article.link }}&text={{ article.title }}" rel="noreferrer" target="_blank"> - <img src="{{ url_for('static', filename='img/twitter.png') }}" title="{{ _('Share on') }} twitter" > - </a> - </div> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/bookmarks.html b/src/web/templates/bookmarks.html deleted file mode 100644 index a3ec4580..00000000 --- a/src/web/templates/bookmarks.html +++ /dev/null @@ -1,74 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <div class="row"> - <div class="col-md-6"> - {{ pagination.info }} - </div> - <div class="col-md-6 text-right"> - {% if current_user.is_authenticated %} - <a class="text-muted" href="{{ url_for('bookmarks.list_') }}">all</a> ⸱ - <a class="text-muted" href="{{ url_for('bookmarks.list_') + 'private' }}">private</a> ⸱ - <a class="text-muted" href="{{ url_for('bookmarks.list_') + 'public' }}">public</a> ⸱ - <a class="text-muted" href="{{ url_for('bookmarks.list_') + 'unread' }}">unread</a> - {% endif %} - </div> - </div> - <br /> - <div class="row"> - <div class="col-md-6"> - {% if tag %} - <span class="glyphicon glyphicon-tags" aria-hidden="true"></span> {{ tag }} - {% endif %} - {% if query %} - <span class="glyphicon glyphicon-search" aria-hidden="true"></span> {{ query }} - {% endif %} - </div> - <div class="col-md-6 text-right"> - <form method="GET"> - <div class="form-inline"> - <input type="text" name="query" class="form-control" /> - <button type="submit" class="btn btn-default">Search</button> - </div> - </form> - </div> - </div> - <br /> - <div class="row"> - <div class="col-md-8"> - {{ pagination.links }} - </div> - </div> - - <div class="row"> - <div class="col-md-8"> - <ul class="list-group"> - {% for bookmark in bookmarks %} - <li class="list-group-item"> - <a href="#"> - <h4 class="list-group-item-heading"> - <a href="{{ bookmark.href }}">{{ bookmark.title }}</a> - </h4> - <p class="list-group-item-text"> - <div class="text-muted">{{ bookmark.description }}</div> - <div>{% for tag in bookmark.tags %}<a href="{{ url_for('bookmarks.list_', tag=tag.text) }}">{{ tag.text }} </a>{% endfor %}</div> - {{ bookmark.time | datetime }} - {% if current_user.is_authenticated %} - <a class="text-muted" href="{{ url_for('bookmark.form', bookmark_id=bookmark.id) }}">edit</a> - <a class="text-muted" href="{{ url_for('bookmark.delete', bookmark_id=bookmark.id) }}">delete</a> - {% endif %} - </p> - </a> - </li> - {% endfor %} - </ul> - </div> - </div> - <br /> - <div class="row"> - <div class="col-md-8"> - {{ pagination.links }} - </div> - </div> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/categories.html b/src/web/templates/categories.html deleted file mode 100644 index 4985e0ca..00000000 --- a/src/web/templates/categories.html +++ /dev/null @@ -1,36 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <h1>{{ _("You have %(categories)d categories · Add a %(start_link)scategory%(end_link)s", categories=categories|count, start_link=("<a href='%s'>" % url_for("category.form"))|safe, end_link="</a>"|safe) }}</h1> - {% if categories|count == 0 %} - <h1>{{_("No category")}}</h1> - {% else %} - <div class="table-responsive"> - <table class="table table-striped"> - <thead> - <tr> - <th>#</th> - <th>{{ _('Name') }}</th> - <th>{{ _('Feeds') }}</th> - <th>{{ _('Articles') }}</th> - <th>{{ _('Actions') }}</th> - </tr> - </thead> - <tbody> - {% for category in categories %} - <tr> - <td>{{ loop.index }}</td> - <td>{{ category.name }}</td> - <td>{{ feeds_count.get(category.id, 0) }}</td> - <td>( {{ unread_article_count.get(category.id, 0) }} ) {{ article_count.get(category.id, 0) }}</td> - <td> - <a href="{{ url_for("category.form", category_id=category.id) }}"><i class="glyphicon glyphicon-edit" title='{{ _("Edit this category") }}'></i></a> - <a href="{{ url_for("category.delete", category_id=category.id) }}"><i class="glyphicon glyphicon-remove" title='{{ _("Delete this category") }}' onclick="return confirm('{{ _('You are going to delete this category.') }}');"></i></a> - </td> - </tr> - {% endfor %} - </tbody> - </table> - </div> - {% endif %} -{% endblock %} diff --git a/src/web/templates/duplicates.html b/src/web/templates/duplicates.html deleted file mode 100644 index d944a1a5..00000000 --- a/src/web/templates/duplicates.html +++ /dev/null @@ -1,30 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <p><h1>{{ _('Duplicates in the feed') }} <a href="/feed/{{ feed.id }}">{{ feed.title }}</a>.</h1><p> - <div class="table-responsive"> - <table class="table table-striped"> - <thead> - <tr> - <th>#</th> - <th align="center"> - <span class="delete-all btn btn-default">{{ _('Delete all in this column') }}</span> - </th> - <th align="center"> - <span class="delete-all btn btn-default">{{ _('Delete all in this column') }}</span> - </th> - </tr> - </thead> - <tbody> - {% for pair in duplicates %} - <tr> - <td>{{ loop.index }}</td> - <td id="{{ pair[0].id }}"><a href="{{ url_for("article.delete", article_id=pair[0].id) }}"><i class="glyphicon glyphicon-remove" title="{{ _('Delete this article') }}"></i></a> <a href="/article/{{ pair[0].id }}">{{ pair[0].title }}</a> ({{ pair[0].retrieved_date }})</td> - <td id="{{ pair[1].id }}"><a href="{{ url_for("article.delete", article_id=pair[1].id) }}"><i class="glyphicon glyphicon-remove" title="{{ _('Delete this article') }}"></i></a> <a href="/article/{{ pair[1].id }}">{{ pair[1].title }}</a> ({{ pair[1].retrieved_date }})</td> - </tr> - {% endfor %} - </tobdy> - </table> - </div> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/edit_bookmark.html b/src/web/templates/edit_bookmark.html deleted file mode 100644 index efd9d775..00000000 --- a/src/web/templates/edit_bookmark.html +++ /dev/null @@ -1,84 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <div class="well"> - <h3>{{ action }}</h3> - <form action="" method="post" name="save" class="form-horizontal"> - {{ form.hidden_tag() }} - <div class="form-group"> - <label for="{{ form.href.id }}" class="col-sm-3 control-label">{{ form.href.label }}</label> - <div class="col-sm-9"> - {{ form.href(class_="form-control", size="100%") }} - </div> - {% for error in form.href.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - </div> - - <div class="form-group"> - <label for="{{ form.title.id }}" class="col-sm-3 control-label">{{ form.title.label }}</label> - <div class="col-sm-9"> - {{ form.title(class_="form-control", size="100%") }} - </div> - {% for error in form.title.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - </div> - - <div class="form-group"> - <label for="{{ form.description.id }}" class="col-sm-3 control-label">{{ form.description.label }}</label> - <div class="col-sm-9"> - {{ form.description(class_="form-control", size="100%") }} - </div> - {% for error in form.description.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - </div> - - <div class="form-group"> - <label for="{{ form.tags.id }}" class="col-sm-3 control-label">{{ form.tags.label }}</label> - <div class="col-sm-9"> - {{ form.tags(class_="form-control", size="100%") }} - </div> - {% for error in form.tags.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - </div> - - <div class="form-group"> - <label for="{{ form.shared.id }}" class="col-sm-3 control-label">{{ form.shared.label }}</label> - <div class="col-sm-9"> - <div class="checkbox"> - {{ form.shared(class_="checkbox", style="margin-left: 0px;") }} - </div> - </div> - </div> - - <div class="form-group"> - <label for="{{ form.to_read.id }}" class="col-sm-3 control-label">{{ form.to_read.label }}</label> - <div class="col-sm-9"> - <div class="checkbox"> - {{ form.to_read(class_="checkbox", style="margin-left: 0px;") }} - </div> - </div> - </div> - - <div class="form-group"> - <div class="col-sm-offset-3 col-sm-9"> - {{ form.submit(class_="btn btn-default") }} - </div> - </div> - </form> - </div> - {% if action == _('Add a new bookmark') %} - <div class="row"> - <div class="col-md-6 pull-right"> - <p>{{ _('You can add a bookmark with a bookmarklet. Drag the following button to your browser bookmarks.') }}</p> - {{ _('<a class="btn btn-default" href="%(bookmarklet)s" rel="bookmark">Bookmark this page using Newspipe</a>', bookmarklet='javascript:window.location="%s?href="+encodeURIComponent(document.location)+"&title="+document.title' % url_for('bookmark.bookmarklet', _external=True)) }} - </div> - <div class="col-md-6"> - <form action="{{ url_for('bookmark.import_pinboard') }}" method="post" id="formImportPinboard" enctype="multipart/form-data"> - <p>{{ _('Import bookmarks from Pinboard') }} (*.json)</p> - <span> - <input type="file" name="jsonfile" /> - <br /> - <button class="btn btn-default btn-default" type="submit">OK</button> - </span> - </form> - </div> - </div> - {% endif %} -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/edit_category.html b/src/web/templates/edit_category.html deleted file mode 100644 index 93c952d6..00000000 --- a/src/web/templates/edit_category.html +++ /dev/null @@ -1,23 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <div class="well"> - <h3>{{ action }}</h3> - <form action="" method="post" name="save" class="form-horizontal"> - {{ form.hidden_tag() }} - <div class="form-group"> - <label for="{{ form.name.id }}" class="col-sm-3 control-label">{{ form.name.label }}</label> - <div class="col-sm-9"> - {{ form.name(class_="form-control", size="100%") }} - </div> - {% for error in form.name.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - </div> - <div class="form-group"> - <div class="col-sm-offset-3 col-sm-9"> - {{ form.submit(class_="btn btn-default") }} - </div> - </div> - </form> - </div> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/edit_feed.html b/src/web/templates/edit_feed.html deleted file mode 100644 index 9c773204..00000000 --- a/src/web/templates/edit_feed.html +++ /dev/null @@ -1,98 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <div class="well"> - <h3>{{ action }}</h3> - <form action="" method="post" name="save" class="form-horizontal"> - {{ form.hidden_tag() }} - <div class="form-group"> - <label for="{{ form.link.id }}" class="col-sm-3 control-label">{{ form.link.label }}</label> - <div class="col-sm-9"> - {{ form.link(class_="form-control", size="100%") }} - </div> - {% for error in form.link.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - </div> - - <div class="form-group"> - <label for="{{ form.title.id }}" class="col-sm-3 control-label">{{ form.title.label }}</label> - <div class="col-sm-9"> - {{ form.title(class_="form-control", size="100%", placeholder=_('Optional')) }} - </div> - {% for error in form.title.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - </div> - - <div class="form-group"> - <label for="{{ form.site_link.id }}" class="col-sm-3 control-label">{{ form.site_link.label }}</label> - <div class="col-sm-9"> - {{ form.site_link(class_="form-control", size="100%", placeholder=_('Optional')) }} - </div> - {% for error in form.site_link.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - </div> - - <div class="form-group"> - <label for="{{ form.category_id.id }}" class="col-sm-3 control-label">{{ form.category_id.label }}</label> - <div class="col-sm-9"> - {{ form.category_id(class_="form-control", placeholder=_('Optional')) }} - </div> - {% for error in form.category_id.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - </div> - - <div class="form-group"> - <label for="{{ form.enabled.id }}" class="col-sm-3 control-label">{{ form.enabled.label }}</label> - <div class="col-sm-9"> - <div class="checkbox"> - {{ form.enabled(class_="checkbox", style="margin-left: 0px;") }} - </div> - </div> - </div> - - <div class="form-group"> - <label for="{{ form.private.id }}" class="col-sm-3 control-label">{{ form.private.label }}</label> - <div class="col-sm-9"> - <div class="checkbox"> - {{ form.private(class_="checkbox", style="margin-left: 0px;") }} - </div> - <span class="text-muted">{{ _("If checked, articles of this feed won't be available to others and the feed won't be listed on <a href='%(url)s'>your profile page</a>.", url=url_for('user.profile_public', nickname=current_user.nickname) ) }}</span> - <span class="text-muted">{{ _("Check this box if there is a private token in the link of the feed.") }}</span> - </div> - - </div> - - <div class="form-group"> - <label class="col-sm-3 control-label">{{ _("Filters") }}</label> - <div class="col-sm-1"> - <input value="+" type="button" class="form-control" id="add-feed-filter-row" /> - </div> - </div> - <div class="form-inline col-sm-offset-4 col-sm-8" id="filters-container"> - {% if feed %} - {% for filter_ in feed.filters or [] %} - <div class="form-group"> - <input value="-" type="button" class="form-control del-feed-filter-row" /> - <select name="type" class="form-control" > - <option value="simple match" {% if filter_.get("type") == "simple match" %}selected{% endif %}>{{ _("simple match") }}</option> - <option value="regex" {% if filter_.get("type") == "regex" %}selected{% endif %}>{{ _("regex") }}</option> - </select> - <input type="text" class="form-control" value="{{ filter_.get("pattern") }}" name="pattern" /> - <select name="action_on" class="form-control"> - <option value="match" {% if filter_.get("action on") == "match" %}selected{% endif %}>{{ _("match") }}</option> - <option value="no match" {% if filter_.get("action on") == "no match" %}selected{% endif %}>{{ _("no match") }}</option> - </select> - <select name="action" class="form-control"> - <option value="mark as read" {% if filter_.get("action") == "mark as read" %}selected{% endif %}>{{ _("mark as read") }}</option> - <option value="mark as favorite" {% if filter_.get("action") == "mark as favorite" %}selected{% endif %}>{{ _("mark as favorite") }}</option> - </select> - </div> - {% endfor %} - {% endif %} - </div> - - <div class="form-group"> - <div class="col-sm-offset-3 col-sm-9"> - {{ form.submit(class_="btn btn-default") }} - </div> - </div> - </form> - </div> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/emails/account_activation.txt b/src/web/templates/emails/account_activation.txt deleted file mode 100644 index c7d9c52e..00000000 --- a/src/web/templates/emails/account_activation.txt +++ /dev/null @@ -1,9 +0,0 @@ -Hello {{ user.nickname }}, - -Your account has been created. -Click on the following link in order to confirm it: -{{ platform_url }}user/confirm_account/{{ token }} - -The link expires at {{ expire_time.strftime('%Y-%m-%d %H:%M') }}. - -See you, diff --git a/src/web/templates/emails/new_password.txt b/src/web/templates/emails/new_password.txt deleted file mode 100644 index 1a04a36d..00000000 --- a/src/web/templates/emails/new_password.txt +++ /dev/null @@ -1,8 +0,0 @@ -Hello {{ user.nickname }}, - -A new password has been generated at your request: -{{ password }} - -It is advised to replace it as soon as connected to Newspipe. - -See you, diff --git a/src/web/templates/errors/404.html b/src/web/templates/errors/404.html deleted file mode 100644 index c64a2be8..00000000 --- a/src/web/templates/errors/404.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "layout.html" %} -{% block head %} -{{ super() }} -{% endblock %} -{% block content %} -<div class="container"> - <div class="well"> - <h1>Page Not Found</h1> - <p>What you were looking for is just not there, go to the <a href="{{ url_for('home') }}">home page</a>.</p> - </div> -</div> -{% endblock %} diff --git a/src/web/templates/errors/500.html b/src/web/templates/errors/500.html deleted file mode 100644 index 417fc0c7..00000000 --- a/src/web/templates/errors/500.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "layout.html" %} -{% block head %} -{{ super() }} -{% endblock %} -{% block content %} -<div class="container"> - <div class="well"> - <h1>Internal Server Error</h1> - <p>Something bad just happened! Go to the <a href="{{ url_for('home') }}">home page</a>.</p> - </div> -</div> -{% endblock %} diff --git a/src/web/templates/feed.html b/src/web/templates/feed.html deleted file mode 100644 index 31db94a5..00000000 --- a/src/web/templates/feed.html +++ /dev/null @@ -1,76 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <div class="well"> - <h2>{{ feed.title }}</h2> - {% if feed.description %} <p>{{ feed.description }}</p> {% endif %} - {% if current_user.is_authenticated %} - <a href="{{ url_for("feed.delete", feed_id=feed.id) }}"><i class="glyphicon glyphicon-remove" title="{{ _('Delete this feed') }}" onclick="return confirm('{{ _('You are going to delete this feed.') }}');"></i></a> - <a href="{{ url_for("feed.form", feed_id=feed.id) }}"><i class="glyphicon glyphicon-edit" title="{{ _('Edit this feed') }}"></i></a> - {% endif %} - </div> - <div class="well"> - <p> - {{ _('This feed contains') }} {{ feed.articles.all()|count }} {{ _('articles') }}.<br /> - {% if category %} - {{ _('This feed is part of category %(category_name)s', category_name=category.name) }}<br /> - {% endif %} - {{ _('Address of the feed') }}: <a href="{{ feed.link }}" target="_blank">{{ feed.link }}</a><br /> - {% if feed.site_link != "" %} - {{ _('Address of the site') }}: <a href="{{ feed.site_link }}" target="_blank">{{ feed.site_link }}</a><br /> - {% endif %} - - <br /> - - {% if feed.last_retrieved %} - {{ _("Last download:") }} {{ feed.last_retrieved | datetime }}<br /> - {% endif %} - - {% if feed.error_count >= conf.DEFAULT_MAX_ERROR %} - <b>{{ _("That feed has encountered too much consecutive errors and won't be retrieved anymore.") }}</b><br /> - {{ _("You can click <a href='%(reset_error_url)s'>here</a> to reset the error count and reactivate the feed.", reset_error_url=url_for("feed.reset_errors", feed_id=feed.id)) }} - {% elif feed.error_count > 0 %} - {{ _("The download of this feed has encountered some problems. However its error counter will be reinitialized at the next successful retrieving.") }}<br /> - {% endif %} - - {% if feed.last_error %} - {{ _("Here's the last error encountered while retrieving this feed:") }} <pre>{{ feed.last_error }}</pre><br /> - {% endif %} - - {% if feed.articles.all()|count != 0 %} - {{ _('The last article was posted') }} {{ elapsed.days }} {{ _('day(s) ago.') }}<br /> - {{ _('Daily average') }}: {{ average }}, {{ _('between the') }} {{ first_post_date | datetime }} {{ _('and the') }} {{ end_post_date | datetime }}. - {% endif %} - </p> - </div> - - <div class="row"> - <div class="col-md-12"> - <div class="table-responsive"> - <table id="table-articles" class="table table-striped"> - <thead> - <tr> - <th>{{ _('Article') }}</th> - <th>{{ _('Date') }}</th> - </tr> - </thead> - <tbody> - {% for article in articles %} - <tr> - <td><a href="{{ url_for("article.article_pub", article_id=article.id) }}">{{ article.title }}</a></td> - <td>{{ article.date | datetime }}</td> - </tr> - {% endfor %} - </tbody> - </table> - </div> - </div> - </div> - - <div class="row"> - <div class="col-md-8 offset-md-1"> - {{ pagination.links }} - </div> - </div> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/feed_list.html b/src/web/templates/feed_list.html deleted file mode 100644 index 8c258c3c..00000000 --- a/src/web/templates/feed_list.html +++ /dev/null @@ -1,55 +0,0 @@ -{% if feeds.count() != 0 %} -<div class="table-responsive"> - <table id="table-feeds" class="table table-striped"> - <thead> - <tr> - <th>#</th> - <th>{{ _('Status') }}</th> - <th>{{ _('Title') }}</th> - <th>{{ _('Site') }}</th> - <th>{{ _('Articles') }}</th> - <th>{{ _('Actions') }}</th> - </tr> - </thead> - <tbody> - {% for feed in feeds %} - <tr {% if not feed.enabled %}class="warning"{% endif %}> - <td>{{ loop.index }}</td> - <td> - {% if feed.enabled %} - <i class="glyphicon glyphicon-eye-open" title="{{ _('Feed enabled') }}"></i> - {% else %} - <i class="glyphicon glyphicon-eye-close" title="{{ _('Feed disabled') }}"></i> - {% endif %} - {% if feed.error_count >= conf.DEFAULT_MAX_ERROR %} - <i class="glyphicon glyphicon-exclamation-sign" title="{{ _('Feed encountered too much errors.') }}"></i> - {% endif %} - </td> - <td>{% if feed.icon_url %}<img src="{{ url_for('icon.icon', url=feed.icon_url) }}" width="16px" /> {% endif %}{{ feed.title }}</td> - <td><a href="{{ feed.site_link }}">{{ feed.site_link }}</a></td> - <td>( {{ unread_article_count.get(feed.id, 0) }} ) {{ article_count.get(feed.id, 0) }}</td> - <td> - <a href="{{ url_for("feed.feed", feed_id=feed.id) }}"><i class="glyphicon glyphicon-info-sign" title="{{ _('Information') }}"></i></a> - <a href="{{ url_for("feed.form", feed_id=feed.id) }}"><i class="glyphicon glyphicon-edit" title="{{ _('Edit this feed') }}"></i></a> - <a href="{{ url_for("feed.duplicates", feed_id=feed.id) }}"><i class="glyphicon glyphicon-book" title="{{ _('Duplicate articles') }}"></i></a> - <a href="{{ url_for("feed.delete", feed_id=feed.id) }}"><i class="glyphicon glyphicon-remove" title="{{ _('Delete this feed') }}" onclick="return confirm('{{ _('You are going to delete this feed.') }}');"></i></a> - </td> - </tr> - {% endfor %} - </tbody> - </table> -</div> -<script> -$(document).ready(function() { - $('#table-feeds').DataTable( { - responsive: true, - columnDefs: [ - { - bSortable: false, - targets: [0, 1, 4, 5] - } - ] - }); -}); -</script> -{% endif %} diff --git a/src/web/templates/feed_list_per_categories.html b/src/web/templates/feed_list_per_categories.html deleted file mode 100644 index 34d10ddd..00000000 --- a/src/web/templates/feed_list_per_categories.html +++ /dev/null @@ -1,52 +0,0 @@ -<div class="row"> - <div class="col-md-8"> - <form class="form-inline"> - <div class="form-group"> - <label>Filter per category</label> - <select class="form-control" id="category-select" name="category_id"> - <option value="0">All</option> - {% for category in user.categories %} - <option value="{{category.id}}" {% if category.id==selected_category_id %}selected{% endif %}>{{ category.name }}</option> - {% endfor %} - </select> - <button type="submit" class="btn btn-primary mb-2">OK</button> - </div> - </form> - </div> -</div> - -<br /> - -<div class="table-responsive"> - <table id="table-feeds" class="table table-striped"> - <thead> - <tr> - <th>#</th> - <th>{{ _('Title') }}</th> - <th>{{ _('Site') }}</th> - </tr> - </thead> - <tbody> - {% for feed in feeds %} - <tr> - <td>{{ loop.index }}</td> - <td>{% if feed.icon_url %}<img src="{{ url_for('icon.icon', url=feed.icon_url) }}" width="16px" /> {% endif %} <a href="{{ url_for('feed.feed_pub', feed_id=feed.id) }}">{{ feed.title }}</a></td> - <td><a href="{{ feed.site_link }}">{{ feed.site_link }}</a></td> - </tr> - {% endfor %} - </tbody> - </table> -</div> -<script> -$(document).ready(function() { - $('#table-feeds').DataTable( { - responsive: true, - columnDefs: [ - { - bSortable: false, - targets: [0] - } - ] - }); -}); -</script> diff --git a/src/web/templates/feed_list_simple.html b/src/web/templates/feed_list_simple.html deleted file mode 100644 index 5f692a53..00000000 --- a/src/web/templates/feed_list_simple.html +++ /dev/null @@ -1,35 +0,0 @@ -{% if feeds | length != 0 %} -<div class="table-responsive"> - <table id="table-feeds" class="table table-striped"> - <thead> - <tr> - <th>#</th> - <th>{{ _('Title') }}</th> - <th>{{ _('Site') }}</th> - </tr> - </thead> - <tbody> - {% for feed in feeds %} - <tr> - <td>{{ loop.index }}</td> - <td>{% if feed.icon_url %}<img src="{{ url_for('icon.icon', url=feed.icon_url) }}" width="16px" /> {% endif %} <a href="{{ url_for('feed.feed_pub', feed_id=feed.id) }}">{{ feed.title }}</a></td> - <td><a href="{{ feed.site_link }}">{{ feed.site_link }}</a></td> - </tr> - {% endfor %} - </tbody> - </table> -</div> -<script> -$(document).ready(function() { - $('#table-feeds').DataTable( { - responsive: true, - columnDefs: [ - { - bSortable: false, - targets: [0] - } - ] - }); -}); -</script> -{% endif %} diff --git a/src/web/templates/feeds.html b/src/web/templates/feeds.html deleted file mode 100644 index 805e1b74..00000000 --- a/src/web/templates/feeds.html +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <h1>{{ _('You are subscribed to %(feed_count)d feeds.', feed_count=feeds.count()) }} <a href="{{ url_for("feed.form") }}">{{ _('Add') }}</a> {{ _('a feed') }}.</h1> - {% include "feed_list.html" %} -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/history.html b/src/web/templates/history.html deleted file mode 100644 index d9ee9538..00000000 --- a/src/web/templates/history.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <h1>{{ _('History') }}</h1> - {% if month != None %} - <h2><a href="{{ url_for("articles.history", year=year) }}"><span class="glyphicon glyphicon-chevron-left"></span> {{ year }}</a></h2> - <h3>{{ month | month_name }}</h3> - {% elif year != None %} - <h2><a href="{{ url_for("articles.history") }}"><span class="glyphicon glyphicon-chevron-left"></span> {{ _('all years') }}</a></h2> - <h3>{{ year }}</h3> - {% endif %} - <ul class="list-group"> - {% for article in articles_counter | sort(reverse = True) %} - {% if year == None %} - <li class="list-group-item"><a href="{{ url_for("articles.history", year=article) }}">{{ article }}</a> : {{ articles_counter[article] }} articles</li> - {% elif month == None %} - <li class="list-group-item"><a href="{{ url_for("articles.history", year=year, month=article) }}">{{ article | month_name }}</a> : {{ articles_counter[article] }} articles</li> - {% else %} - {% for article in articles %} - <li class="list-group-item">{{ article.date | datetime }} - <a href="/article/{{ article.id }}">{{ article.title | safe }}</a></li> - {% endfor %} - {% endif %} - {% endfor %} - </ul> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/home.html b/src/web/templates/home.html deleted file mode 100644 index bc38d189..00000000 --- a/src/web/templates/home.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "layout.html" %} -{% block head %} - {{ super() }} - <link href="{{ url_for("static", filename="css/one-page-app.css") }}" rel="stylesheet" media="screen" /> -{% endblock %} -{% block content %} - <section id="newspipeapp"></section> - <script type="text/javascript" src="{% if cdn != '' %}{{ cdn }}bundle.min.js{% else %}{{ url_for('static', filename = 'js/bundle.min.js') }}{% endif %}"></script> -{% endblock %} diff --git a/src/web/templates/inactives.html b/src/web/templates/inactives.html deleted file mode 100644 index e89a5fe1..00000000 --- a/src/web/templates/inactives.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <div class="well"> - <form method=get action="{{ url_for("feeds.inactives") }}"> - <p>{{ _('Days of inactivity') }}:</p> - <input type="number" name="nb_days" class="form-control" value="{{ nb_days }}" min="0" max="1000000" step="1" size="4" style="text-align: center" /> - </form> - <br /> - {% if inactives != [] %} - <ul class="list-group"> - {% for feed, delta in inactives %} - <li class="list-group-item"> - <a href="{{ url_for('feed.feed', feed_id=feed.id) }}"> - {% if feed.icon %}<img src="{{ url_for('feed.icon', feed_id=feed.id) }}" width="16px" />{% endif %} - {{ feed.title }} - </a> - {{ delta.days }} {{ _('days') }} - </li> - {% endfor %} - </ul> - {% else %} - <p>{{ _('No inactive feeds.') }}<p> - {% endif %} - </div> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/layout.html b/src/web/templates/layout.html deleted file mode 100644 index 29d4470f..00000000 --- a/src/web/templates/layout.html +++ /dev/null @@ -1,155 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - {% block head %} - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="description" content="Newspipe is a web news aggregator and reader." /> - <meta name="author" content="" /> - <title>Newspipe{% if head_titles %} - {{ ' - '.join(head_titles) }}{% endif %}</title> - <link rel="shortcut icon" href="{{ url_for("static", filename="img/favicon.ico") }}" /> - <!-- Bootstrap core CSS --> - <link href="{{ url_for('static', filename='bower_components/bootstrap/dist/css/bootstrap.min.css') }}" rel="stylesheet" media="screen" /> - <!-- Add custom CSS here --> - <link href="{{ url_for("static", filename="css/customized-bootstrap.css") }}" rel="stylesheet" media="screen" /> - <!-- jquery, bootstrap, datatables --> - <script type="text/javascript" src="{{ url_for('static', filename = 'js/jquery.js') }}"></script> - <script type="text/javascript" src="{{ url_for('static', filename = 'bower_components/bootstrap/dist/js/bootstrap.min.js') }}"></script> - <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') }}"> - <script type="text/javascript" src="{{ url_for('static', filename='bower_components/datatables.net/js/jquery.dataTables.min.js') }}"></script> - <script type="text/javascript" src="{{ url_for('static', filename='bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js') }}"></script> - {% endblock %} - </head> - <body> - {% block menu %} - <nav id="newspipenav" class="navbar navbar-inverse navbar-fixed-top" role="navigation"> - <div class="container-fluid"> - <div class="navbar-header"> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> - <span class="sr-only">Toggle navigation</span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - {% if current_user.is_authenticated %} - <a class="navbar-brand" href="{{ url_for("feeds.feeds") }}">🗞 </a> - {% else %} - <a class="navbar-brand" href="{{ url_for("home") }}">🗞 </a> - {% endif %} - <a class="navbar-brand" href="{{ url_for("home") }}">Newspipe</a> - {% if head_titles %} - <p class="navbar-text" style="max-height: 20px; overflow: hidden"> - {{ " - ".join(head_titles) }} - </p> - {% endif %} - </div> - <!-- Collect the nav links, forms, and other content for toggling --> - <div id="navbar" class="navbar-collapse collapse"> - <ul class="nav navbar-nav navbar-right"> - {% if current_user.is_authenticated %} - {% if conf.CRAWLING_METHOD == "default" and (not conf.ON_HEROKU or current_user.is_admin) %} - <li><a href="/fetch"><span class="glyphicon glyphicon-import"></span> {{ _('Fetch') }}</a></li> - {% endif %} - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown"> - <div><span class="glyphicon glyphicon-bookmark"></span></div> - </a> - <ul class="dropdown-menu"> - <li><a href="{{ url_for('bookmarks.list_') }}">{{ _('Your bookmarks') }}</a></li> - <li><a href="{{ url_for('bookmark.form') }}">{{ _('Add a new bookmark') }}</a></li> - </ul> - </li> - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown"> - <div><span class="glyphicon glyphicon-plus-sign"></span> {{ _('Add a new feed') }}</div> - </a> - <ul class="dropdown-menu"> - <li> - <form action="{{ url_for('feed.bookmarklet') }}" class="navbar-form navbar-left" method="GET" name="save"> - <div class="input-group input-group-inline"> - <input class="form-control" name="url" type="url" placeholder="{{_("Site or feed url")}}" required="required"/> - <span class="input-group-btn"> - <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span></button> - </span> - </div><!-- /input-group --> - </form> - </li> - </ul> - </li> - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown"> - <div><span class="glyphicon glyphicon-plus-sign"></span> {{ _('Add a new category') }}</div> - </a> - <ul class="dropdown-menu"> - <li> - <form action="{{ url_for('category.form') }}" class="navbar-form navbar-left" method="POST" name="category"> - <div class="input-group input-group-inline"> - <input class="form-control" name="name" type="text" placeholder="{{_("Category name")}}" required="required"/> - <span class="input-group-btn"> - <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span></button> - </span> - </div><!-- /input-group --> - </form> - </li> - </ul> - </li> - <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.inactives") }}">{{ _('Inactive') }}</a></li> - <li><a href="{{ url_for("articles.history") }}">{{ _('History') }}</a></li> - <li><a href="{{ url_for("feeds.feeds") }}">{{ _('All') }}</a></li> - <li role="presentation" class="divider"></li> - <li><a href="{{ url_for("popular") }}">{{ _('Popular') }}</a></li> - </ul> - </li> - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown"> - <div><span class="glyphicon glyphicon-user"></span> <b class="caret"></b></div> - </a> - <ul class="dropdown-menu"> - <li><a href="{{ url_for("user.profile") }}"><span class="glyphicon glyphicon-user"></span> {{ _('Profile') }}</a></li> - <li><a href="{{ url_for("user.management") }}"><span class="glyphicon glyphicon-hdd"></span> {{ _('Your data') }}</a></li> - <li><a href="{{ url_for("about") }}"><span class="glyphicon glyphicon-question-sign"></span> {{ _('About') }}</a></li> - {% if current_user.is_admin %} - <li role="presentation" class="divider"></li> - <li><a href="{{ url_for("admin.dashboard") }}"><span class="glyphicon glyphicon-dashboard"></span> {{ _('Dashboard') }}</a></li> - <li role="presentation" class="divider"></li> - {% endif %} - <li><a href="{{ url_for("logout") }}"><span class="glyphicon glyphicon-log-out"></span> {{ _('Logout') }}</a></li> - </ul> - </li> - {% else %} - <li><a href="{{ url_for("bookmarks.list_") }}"><span class="glyphicon glyphicon-bookmark"></span> {{ _('Recent bookmarks') }}</a></li> - <li><a href="{{ url_for("popular") }}"><span class="glyphicon glyphicon-list"></span> {{ _('Popular feeds') }}</a></li> - <li><a href="{{ url_for("about") }}"><span class="glyphicon glyphicon-question-sign"></span> {{ _('About') }}</a></li> - {% endif %} - </ul> - </div><!-- /.navbar-collapse --> - </div><!-- /.container-fluid --> - </nav> - {% endblock %} - <br /> - - <div class="container alert-message not-at-home"> - {% block messages %} - {% 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">×</button> - {{ message }} - </div> - {% endfor %} - {% endif %} - {% endwith %} - {% endblock %} - </div> - - {% block content %}{% endblock %} - - <!-- Placed at the end of the document so the pages load faster --> - <script type="text/javascript" src="{{ url_for('static', filename = 'js/articles.js') }}"></script> - <script type="text/javascript" src="{{ url_for('static', filename = 'js/feed.js') }}"></script> - </body> -</html> diff --git a/src/web/templates/login.html b/src/web/templates/login.html deleted file mode 100644 index d2724ac3..00000000 --- a/src/web/templates/login.html +++ /dev/null @@ -1,28 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <div class="well"> - <h2>{{ _('Log In') }}</h2> - <form action="{{ url_for('login') }}" method=post> - {{ form.hidden_tag() }} - - <div class="form-group"> - {{ form.nickmane(class_="form-control", placeholder=_('Your nickname')) }} - </div> - {% for message in form.nickmane.errors %} - <div class="alert alert-warning" role="alert">{{ message }}</div> - {% endfor %} - - <div class="form-group"> - {{ form.password(class_="form-control", placeholder=_('Your Password')) }} - </div> - {% for message in form.password.errors %} - <div class="alert alert-warning" role="alert">{{ message }}</div> - {% endfor %} - - {{ form.submit(class_="btn btn-default") }} - </form> - </div> - <a href="/signup" class="btn btn-default">{{ _('Sign up') }}</a> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/management.html b/src/web/templates/management.html deleted file mode 100644 index 4d7c2da3..00000000 --- a/src/web/templates/management.html +++ /dev/null @@ -1,72 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <div class="well"> - <div class="row"> - <div class="col-md-6"> - <h1>{{ _('Your subscriptions') }}</h1> - <p>{{ _('You are subscribed to') }} {{ nb_feeds }} <a href="/feeds">{{ _('feeds') }}</a>. <a href="{{ url_for("feed.form") }}">{{ _('Add') }}</a> {{ _('a feed') }}.</p> - <p>{{ nb_articles }} {{ _('articles are stored in the database with') }} {{ nb_unread_articles }} {{ _('unread articles') }}.</p> - <p>{{ _('You have') }} {{ nb_categories }} <a href="{{ url_for("categories.list_")}}">{{ _('categories') }}</a>.</p> - <a href="{{ url_for("articles.expire", weeks=10) }}" class="btn btn-default" onclick="return confirm('{{ _('You are going to delete old articles.') }}');">{{ _('Delete articles older than 10 weeks') }}</a> - </div> - <div class="col-md-6"> - <h1>{{ _('Your bookmarks') }}</h1> - <p>{{ _('You have') }} {{ nb_bookmarks }} <a href="{{ url_for("bookmarks.list_")}}">{{ _('bookmarks') }}</a>.</p> - <a href="{{ url_for("bookmarks.delete_all") }}" class="btn btn-default" onclick="return confirm('{{ _('You are going to delete all bookmarks.') }}');">{{ _('Delete all bookmarks') }}</a> - </div> - </div> - </div> - <div class="well"> - <div class="row"> - <div class="col-md-6"> - <h1>{{ _('Your data') }}</h1> - </div> - </div> - <div class="row"> - <div class="col-md-6"> - <h2>{{ _('Articles') }}</h2> - <h3>{{ _('Import') }}</h3> - <form action="" method="post" id="formImportJSON" enctype="multipart/form-data"> - <span class="btn btn-default btn-file">{{ _('Import a Newspipe account') }} (<span class="text-info">*.json</span>)<input type="file" name="jsonfile" /></span> - <button class="btn btn-default" type="submit">OK</button> - </form> - <h3>{{ _('Export') }}</h3> - <a href="{{ url_for('articles.export') }}" class="btn btn-default">{{ _('Export your Newspipe account to JSON') }}</a> - </div> - <div class="col-md-6"> - <h2 id="import">{{ _('OPML') }}</h2> - <h3>{{ _('Import') }}</h3> - <form action="" method="post" id="formImportOPML" enctype="multipart/form-data"> - <span class="btn btn-default btn-file">{{ _('Batch import feeds from OPML') }} (<span class="text-info">*.xml {{ _('or') }} *.opml</span>)<input type="file" name="opmlfile" /></span> - <button class="btn btn-default" type="submit">OK</button> - </form> - <h3>{{ _('Export') }}</h3> - <form class="form-inline" action="{{ url_for('feeds.export') }}" method="GET" id="formExportOPML"> - <div class="form-group"> - <div class="input-group"> - <label>Include disabled feeds</label> - <input type="checkbox" class="form-control" name="includedisabled" checked /> - </div> - <div class="input-group"> - <label title="Newspipe encountered too much problems when retrieving these feeds.">Include dead feeds</label> - <input type="checkbox" class="form-control" name="includeexceedederrorcount" checked /> - </div> - <div class="input-group"> - <label>Include private feeds</label> - <input type="checkbox" class="form-control" name="includeprivate" checked /> - </div> - </div> - <button class="btn btn-default" type="submit">{{ _('Export your feeds to OPML') }}</button> - </form> - </div> - </div> - <div class="row"> - <div class="col-md-12"> - <h1>{{ _('Bookmarks') }}</h1> - <a href="{{ url_for('bookmarks.export') }}" class="btn btn-default">{{ _('Export your bookmarks to JSON') }}</a> - </div> - </div> - </div> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/opml.xml b/src/web/templates/opml.xml deleted file mode 100644 index 7159e279..00000000 --- a/src/web/templates/opml.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!-- OPML generated by Newspipe on {{ now | datetime }} --> -<opml version="1.1"> - <head> - <title>Feeds of {{ user.nickname }}</title> - <dateCreated>{{ now | datetime }}</dateCreated> - <dateModified>{{ now | datetime }}</dateModified> - <ownerName>{{ user.nickname }}</ownerName> - </head> - <body> - {% for feed in feeds %} <outline title="{{ feed.title|escape }}" text="{{ feed.title|escape }}" description="{{ feed.description|escape }}" {% if feed.category_id != None %}category="/{{ categories[feed.category_id].name }}"{% endif %} xmlUrl="{{ feed.link|escape }}" htmlUrl="{{ feed.site_link|escape }}" /> - {% endfor %}</body> -</opml> diff --git a/src/web/templates/popular.html b/src/web/templates/popular.html deleted file mode 100644 index 4b207903..00000000 --- a/src/web/templates/popular.html +++ /dev/null @@ -1,27 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <div class="row"> - <div class="col-md-12"> - <h1>{{ _('Popular feeds') }}</h1> - <a href="{{ url_for('popular', nb_days='all') }}">all</a> ‧ <a href="{{ url_for('popular', nb_days=365) }}">last year</a> ‧ <a href="{{ url_for('popular', nb_days=31) }}">last month</a> - </div> - </div> - <div class="row"> - <div class="col-md-12"> - <ul class="list-group"> - {% for feed in popular %} - <li class="list-group-item"> - <a href="{{ feed[0] }}">{{ feed[0] }}</a> - <a href="{{ url_for('feed.bookmarklet', url=feed[0]) }}" > - <span class="glyphicon glyphicon-plus text-muted" title="follow this feed"></span> - <span class="text-muted">{{ _('add this feed') }}</span> - </a> - <span class="badge">{{ feed[1] }}</span> - </li> - {% endfor %} - </ul> - </div> - </div> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/profile.html b/src/web/templates/profile.html deleted file mode 100644 index 523e7c3c..00000000 --- a/src/web/templates/profile.html +++ /dev/null @@ -1,65 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <h1>{{ _('Your Profile') }}</h1> - <div class="row"> - <div class="col-md-6"> - <p>{{ _('Member since') }}: {{ user.date_created | datetime }}.</p> - <p>{{ _('Last seen') }}: {{ user.last_seen | datetime }}.</p> - </div> - </div> - <div class="well"> - <div class="row"> - <div class="col-md-12"> - <h2>Edit your profile</h2> - </div> - </div> - <form action="" method="post" name="save"> - <div class="row"> - {{ form.hidden_tag() }} - - <div class="col-md-6"> - {{ form.nickname.label }} - {{ form.nickname(class_="form-control") }} {% for error in form.nickname.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - - {{ form.password.label }} - {{ form.password(class_="form-control") }} {% for error in form.password.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - - {{ form.password_conf.label }} - {{ form.password_conf(class_="form-control") }} {% for error in form.password_conf.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - </div> - - <div class="col-md-6"> - {{ form.bio.label }} - {{ form.bio(class_="form-control") }} {% for error in form.bio.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - - {{ form.webpage.label }} - {{ form.webpage(class_="form-control") }} {% for error in form.webpage.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - - {{ form.twitter.label }} - {{ form.twitter(class_="form-control") }} {% for error in form.twitter.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - - {{ form.is_public_profile.label }} - {{ form.is_public_profile(class_="form-control") }} {% for error in form.is_public_profile.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - <p>{{ _('Your profile will be available <a href="%(url)s">here</a>.', url=url_for('user.profile_public', nickname=user.nickname) ) }}</p> - - {{ form.automatic_crawling.label }} - {{ form.automatic_crawling(class_="form-control") }} {% for error in form.automatic_crawling.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - <p>{{ _('Uncheck if you are using your own crawler.') }}</p> - </div> - </div> - <div class="row"> - <div class="col-md-12"> - <br /> - {{ form.submit(class_="btn btn-default") }} - </div> - </div> - </form> - </div> - <div class="row"> - <div class="col-md-12"> - <a href="/delete_account" class="btn btn-default" onclick="return confirm('{{ _('You are going to delete your account.') }}');">{{ _('Delete your account') }}</a> - </div> - </div> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/profile_public.html b/src/web/templates/profile_public.html deleted file mode 100644 index e933a04b..00000000 --- a/src/web/templates/profile_public.html +++ /dev/null @@ -1,45 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <h1>{{ user.nickname }} / <a href="{{ url_for('user.user_stream', nickname=user.nickname) }}">stream</a></h1> - <div class="row"> - <div class="col-md-12"> - <p> - <span class="glyphicon glyphicon-time" aria-hidden="true"></span> - {{ _('Member since') }}: {{ user.date_created | datetime }} - </p> - <p> - <span class="glyphicon glyphicon-time" aria-hidden="true"></span> - {{ _('Last seen') }}: {{ user.last_seen | datetime }} - </p> - {% if user.webpage %} - <p> - <span class="glyphicon glyphicon-link" aria-hidden="true"></span> - {{ _('Webpage') }}: <a href="{{ user.webpage | safe }}">{{ user.webpage | safe }}</a> - </p> - {% endif %} - {% if user.twitter %} - <p> - <span class="glyphicon glyphicon-link" aria-hidden="true"></span> - {{ _('Twitter') }}: <a href="{{ user.twitter | safe }}">{{ user.twitter | safe }}</a> - </p> - {% endif %} - </div> - </div> - <div class="row"> - <div class="col-md-5"> - {% if user.bio %} - <p align="justify">{{ user.bio }}</p> - {% endif %} - </div> - <div class="col-md-6 pull-right"></div> - </div> - - <h2>{{ _('Feeds') }}</h2> - <div class="row"> - <div class="col-md-12"> - {% include "feed_list_per_categories.html" %} - </div> - </div> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/signup.html b/src/web/templates/signup.html deleted file mode 100644 index 8d34b3bf..00000000 --- a/src/web/templates/signup.html +++ /dev/null @@ -1,24 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <div class="form well"> - <form action="" method="post" name="save"> - {{ form.hidden_tag() }} - <div class="form-group"> - {{ form.nickname(class_="form-control", placeholder=_('Your nickname')) }} {% for error in form.nickname.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - <p class="help-block">{{ _('Letters, numbers, dots and underscores only.') }}</p> - </div> - <div class="form-group"> - {{ form.email(class_="form-control", placeholder=_('Your email')) }} {% for error in form.email.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - <p class="help-block">{{ _("Only for account activation. Your email won't be stored.") }}</p> - </div> - <div class="form-group"> - {{ form.password(class_="form-control", placeholder=_('Your password')) }} {% for error in form.password.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - <p class="help-block">{{ _('Minimum 6 characters.') }}</p> - </div> - <br /> - {{ form.submit(class_="btn btn-default") }} - </form> - </div> -</div><!-- /.container --> -{% endblock %} diff --git a/src/web/templates/user_stream.html b/src/web/templates/user_stream.html deleted file mode 100644 index b05376a8..00000000 --- a/src/web/templates/user_stream.html +++ /dev/null @@ -1,70 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<div class="container"> - <div class="row"> - <div class="col-md-8"> - <form class="form-inline"> - <div class="form-group"> - <label>Filter per category</label> - <select class="form-control" id="category-select" name="category_id"> - <option value="0">All</option> - {% for cur_category in user.categories %} - <option value="{{cur_category.id}}" {% if cur_category.id==category.id %}selected{% endif %}>{{ cur_category.name }}</option> - {% endfor %} - </select> - <button type="submit" class="btn btn-primary mb-2">OK</button> - </div> - </form> - </div> - </div> - - <br /><br /> - - {% if category %} - <div class="row"> - <div class="col-md-8 offset-md-1"> - <p class="lead">Articles from the category <a href="{{ url_for('user.profile_public', nickname=user.nickname, category_id=category.id) }}">{{ category.name }}</a></p> - </div> - </div> - {% endif %} - - <div class="row"> - <div class="col-md-8 offset-md-1"> - {{ pagination.info }} - </div> - </div> - - <div class="row"> - <div class="col-md-8 offset-md-1"> - {{ pagination.links }} - </div> - </div> - - <div class="table-responsive"> - <table id="table-feeds" class="table table-striped"> - <thead> - <tr> - <th>#</th> - <th>{{ _('Title') }}</th> - <th>{{ _('Published at') }}</th> - </tr> - </thead> - <tbody> - {% for article in articles %} - <tr> - <td>{{ loop.index }}</td> - <td><a href="{{ url_for('article.article_pub', article_id=article.id) }}">{{ article.title }}</a></td> - <td>{{ article.date }}</td> - </tr> - {% endfor %} - </tbody> - </table> - </div> - - <div class="row"> - <div class="col-md-8 offset-md-1"> - {{ pagination.links }} - </div> - </div> -</div><!-- /.container --> -{% endblock %} |