diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-06-30 14:00:49 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-06-30 14:00:49 +0200 |
commit | 60a7fc417568d895c65f03b538a37452cf5745c6 (patch) | |
tree | e2c83e1877f9ca4ab526bf2cbfb64dca69d9731b /newspipe | |
parent | minor fixes for the templates. (diff) | |
parent | Alert messages are now placed in the navbar. (diff) | |
download | newspipe-60a7fc417568d895c65f03b538a37452cf5745c6.tar.gz newspipe-60a7fc417568d895c65f03b538a37452cf5745c6.tar.bz2 newspipe-60a7fc417568d895c65f03b538a37452cf5745c6.zip |
Merge branch 'master' of git.sr.ht:~cedric/newspipe
Diffstat (limited to 'newspipe')
-rw-r--r-- | newspipe/static/css/custom.css | 8 | ||||
-rw-r--r-- | newspipe/templates/edit_feed.html | 61 | ||||
-rw-r--r-- | newspipe/templates/layout.html | 37 |
3 files changed, 50 insertions, 56 deletions
diff --git a/newspipe/static/css/custom.css b/newspipe/static/css/custom.css index 8bd1e92c..0e1d5a9b 100644 --- a/newspipe/static/css/custom.css +++ b/newspipe/static/css/custom.css @@ -87,12 +87,20 @@ a { display: inline; } +.alert { + margin-bottom: 1px; + height: 30px; + line-height: 30px; + padding: 0px 15px; +} + .alert-message { position: relative; display: block; z-index: 1001; } + /*customization for Flask-Paginate*/ .pagination-page-info { display: inline; diff --git a/newspipe/templates/edit_feed.html b/newspipe/templates/edit_feed.html index 8d3cec4a..41e929aa 100644 --- a/newspipe/templates/edit_feed.html +++ b/newspipe/templates/edit_feed.html @@ -5,64 +5,53 @@ <form action="" method="POST" name="save"> {{ form.hidden_tag() }} <p>Enter the URL of the website or the URL of the feed (RSS/ATOM).</p> - <div class="form-row"> + <div class="row row-cols-md-auto g-2 align-items-center"> <div class="col-md-6"> <label for="{{ form.site_link.id }}" class="col-sm-3 control-label">{{ form.site_link.label }}</label> - <div class="col"> - {{ form.site_link(class_="form-control", size="100%") }} - </div> + {{ form.site_link(class_="form-control", size="100%") }} {% for error in form.site_link.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} </div> <div class="col-md-6"> <label for="{{ form.link.id }}" class="col-sm-3 control-label">{{ form.link.label }}</label> - <div class="col"> - {{ form.link(class_="form-control", size="100%") }} - </div> + {{ form.link(class_="form-control", size="100%") }} {% for error in form.link.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} </div> - </div> - <div> - <div class="col-sm-offset-3 col-sm-9"> + <div class="col-md-12"> {{ form.submit(class_="btn btn-primary") }} </div> </div> <hr /> - <div class="form-group"> - <label for="{{ form.title.id }}" class="col control-label">{{ form.title.label }}</label> - <div class="col"> + <div class="row row-cols-md-auto g-2 align-items-center"> + <div class="col-md-6"> + <label for="{{ form.title.id }}" class="col control-label">{{ form.title.label }}</label> {{ form.title(class_="form-control", size="100%", placeholder=_('Will be retrieved automatically but you can specify a custom title.')) }} + {% for error in form.title.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} </div> - {% for error in form.title.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - </div> - - <div class="form-group"> - <label for="{{ form.category_id.id }}" class="col control-label">{{ form.category_id.label }}</label> - <div class="col"> + <div class="col-md-6"> + <label for="{{ form.category_id.id }}" class="col control-label">{{ form.category_id.label }}</label> {{ form.category_id(class_="form-control", placeholder=_('Optional')) }} + {% for error in form.category_id.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} </div> - {% for error in form.category_id.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} </div> - <div class="form-check form-check-inline"> - <div class="form-group col-md-6"> + <br /> + + <div class="row row-cols-md-auto g-2 align-items-center"> + <div class="col-md-6"> <label for="{{ form.enabled.id }}" class="form-check-label">{{ form.enabled.label }}</label> - <div class="col-sm-9"> - {{ form.enabled(class_="form-check-input", style="margin-left: 0px;") }} - <div class="text-muted text-justify"> - {{ _("If unchecked, this feed won't be retrieved by the aggregator.") }} - </div> + {{ form.enabled(class_="form-check-input", style="margin-left: 0px;") }} + <div class="text-muted text-justify"> + {{ _("If unchecked, this feed won't be retrieved by the aggregator.") }} </div> </div> - <div class="form-group col-md-6"> + <div class="col-md-6"> <label for="{{ form.private.id }}" class="form-check-label">{{ form.private.label }}</label> - <div class="col-sm-9"> - {{ form.private(class_="form-check-input", style="margin-left: 0px;") }} - <div class="text-muted text-justify"> - {{ _("If checked, this feed won't be listed on <a href='%(url)s'>your profile page</a>.", url=url_for('user.profile_public', nickname=current_user.nickname) ) }} - {{ _("Check this box if there is a private token in the link of the feed.") }} - </div> + {{ form.private(class_="form-check-input", style="margin-left: 0px;") }} + <div class="text-muted text-justify"> + {{ _("If checked, this feed won't be listed on <a href='%(url)s'>your profile page</a>.", url=url_for('user.profile_public', nickname=current_user.nickname) ) }} + {{ _("Check this box if there is a private token in the link of the feed.") }} </div> </div> </div> @@ -113,9 +102,9 @@ {% endfor %} {% endif %} </div> - + <br /> - + <div class="form-group"> <div class="col-sm-offset-3 col-sm-9"> {{ form.submit(class_="btn btn-primary") }} diff --git a/newspipe/templates/layout.html b/newspipe/templates/layout.html index 115a1cd9..f24ab854 100644 --- a/newspipe/templates/layout.html +++ b/newspipe/templates/layout.html @@ -28,6 +28,23 @@ {% block menu_links %} <div class="collapse navbar-collapse" id="navbarSupportedContent"> + <ul class="navbar-nav mr-auto w-100 justify-content-center"> + <li class="nav-item"> + {% block messages %} + {% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} + {% for category, message in messages %} + <div class="alert alert-{{category}}" role="alert"> + {{ message }} + <button type="button" class="close" data-dismiss="alert">×</button> + </div> + {% endfor %} + {% endif %} + {% endwith %} + {% endblock %} + </li> + </ul> + <ul class="navbar-nav mr-auto w-100 justify-content-end"> {% if current_user.is_authenticated %} {% if current_user.is_admin %} @@ -129,26 +146,6 @@ </div> </nav> {% endblock %} - <br /> - - <div class="container alert-message not-at-home"> - {% block messages %} - {% with messages = get_flashed_messages(with_categories=true) %} - {% if messages %} - <div class="row justify-content-center"> - <div class="col-md-6"> - {% for category, message in messages %} - <div class="alert alert-{{category}}"> - <button type="button" class="close" data-dismiss="alert">×</button> - {{ message }} - </div> - {% endfor %} - </div> - </div> - {% endif %} - {% endwith %} - {% endblock %} - </div> {% block content %}{% endblock %} |