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 | |
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
-rw-r--r-- | .gitignore | 1 | ||||
-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 | ||||
-rw-r--r-- | poetry.lock | 63 |
5 files changed, 79 insertions, 91 deletions
@@ -31,4 +31,3 @@ instance/development.py # js and node files node_modules newspipe/static/npm_components -newspipe/static/js/bundle.min.js 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 %} diff --git a/poetry.lock b/poetry.lock index 85f6728d..08238643 100644 --- a/poetry.lock +++ b/poetry.lock @@ -488,7 +488,7 @@ description = "Database Abstraction Library" name = "sqlalchemy" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "1.3.17" +version = "1.3.18" [package.extras] mssql = ["pyodbc"] @@ -745,11 +745,6 @@ markupsafe = [ {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-win32.whl", hash = "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-win32.whl", hash = "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be"}, {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, ] mccabe = [ @@ -858,34 +853,34 @@ soupsieve = [ {file = "soupsieve-1.9.6.tar.gz", hash = "sha256:7985bacc98c34923a439967c1a602dc4f1e15f923b6fcf02344184f86cc7efaa"}, ] sqlalchemy = [ - {file = "SQLAlchemy-1.3.17-cp27-cp27m-macosx_10_14_x86_64.whl", hash = "sha256:fe01bac7226499aedf472c62fa3b85b2c619365f3f14dd222ffe4f3aa91e5f98"}, - {file = "SQLAlchemy-1.3.17-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:b50f45d0e82b4562f59f0e0ca511f65e412f2a97d790eea5f60e34e5f1aabc9a"}, - {file = "SQLAlchemy-1.3.17-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:ce2646e4c0807f3461be0653502bb48c6e91a5171d6e450367082c79e12868bf"}, - {file = "SQLAlchemy-1.3.17-cp27-cp27m-win32.whl", hash = "sha256:e4e2664232005bd306f878b0f167a31f944a07c4de0152c444f8c61bbe3cfb38"}, - {file = "SQLAlchemy-1.3.17-cp27-cp27m-win_amd64.whl", hash = "sha256:925b4fe5e7c03ed76912b75a9a41dfd682d59c0be43bce88d3b27f7f5ba028fb"}, - {file = "SQLAlchemy-1.3.17-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:869bbb637de58ab0a912b7f20e9192132f9fbc47fc6b5111cd1e0f6cdf5cf9b0"}, - {file = "SQLAlchemy-1.3.17-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:703c002277f0fbc3c04d0ae4989a174753a7554b2963c584ce2ec0cddcf2bc53"}, - {file = "SQLAlchemy-1.3.17-cp35-cp35m-macosx_10_14_x86_64.whl", hash = "sha256:eb4fcf7105bf071c71068c6eee47499ab8d4b8f5a11fc35147c934f0faa60f23"}, - {file = "SQLAlchemy-1.3.17-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:8d01e949a5d22e5c4800d59b50617c56125fc187fbeb8fa423e99858546de616"}, - {file = "SQLAlchemy-1.3.17-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:a9e75e49a0f1583eee0ce93270232b8e7bb4b1edc89cc70b07600d525aef4f43"}, - {file = "SQLAlchemy-1.3.17-cp35-cp35m-win32.whl", hash = "sha256:a87d496884f40c94c85a647c385f4fd5887941d2609f71043e2b73f2436d9c65"}, - {file = "SQLAlchemy-1.3.17-cp35-cp35m-win_amd64.whl", hash = "sha256:6cd157ce74a911325e164441ff2d9b4e244659a25b3146310518d83202f15f7a"}, - {file = "SQLAlchemy-1.3.17-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:27e2efc8f77661c9af2681755974205e7462f1ae126f498f4fe12a8b24761d15"}, - {file = "SQLAlchemy-1.3.17-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:31c043d5211aa0e0773821fcc318eb5cbe2ec916dfbc4c6eea0c5188971988eb"}, - {file = "SQLAlchemy-1.3.17-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:a9030cd30caf848a13a192c5e45367e3c6f363726569a56e75dc1151ee26d859"}, - {file = "SQLAlchemy-1.3.17-cp36-cp36m-win32.whl", hash = "sha256:f502ef245c492b391e0e23e94cba030ab91722dcc56963c85bfd7f3441ea2bbe"}, - {file = "SQLAlchemy-1.3.17-cp36-cp36m-win_amd64.whl", hash = "sha256:128bc917ed20d78143a45024455ff0aed7d3b96772eba13d5dbaf9cc57e5c41b"}, - {file = "SQLAlchemy-1.3.17-cp37-cp37m-macosx_10_14_x86_64.whl", hash = "sha256:2a12f8be25b9ea3d1d5b165202181f2b7da4b3395289000284e5bb86154ce87c"}, - {file = "SQLAlchemy-1.3.17-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e8aa395482728de8bdcca9cc0faf3765ab483e81e01923aaa736b42f0294f570"}, - {file = "SQLAlchemy-1.3.17-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:f35248f7e0d63b234a109dd72fbfb4b5cb6cb6840b221d0df0ecbf54ab087654"}, - {file = "SQLAlchemy-1.3.17-cp37-cp37m-win32.whl", hash = "sha256:ce1ddaadee913543ff0154021d31b134551f63428065168e756d90bdc4c686f5"}, - {file = "SQLAlchemy-1.3.17-cp37-cp37m-win_amd64.whl", hash = "sha256:9cb1819008f0225a7c066cac8bb0cf90847b2c4a6eb9ebb7431dbd00c56c06c5"}, - {file = "SQLAlchemy-1.3.17-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:65eb3b03229f684af0cf0ad3bcc771970c1260a82a791a8d07bffb63d8c95bcc"}, - {file = "SQLAlchemy-1.3.17-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8a0e0cd21da047ea10267c37caf12add400a92f0620c8bc09e4a6531a765d6d7"}, - {file = "SQLAlchemy-1.3.17-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:b7878e59ec31f12d54b3797689402ee3b5cfcb5598f2ebf26491732758751908"}, - {file = "SQLAlchemy-1.3.17-cp38-cp38-win32.whl", hash = "sha256:ce6c3d18b2a8ce364013d47b9cad71db815df31d55918403f8db7d890c9d07ae"}, - {file = "SQLAlchemy-1.3.17-cp38-cp38-win_amd64.whl", hash = "sha256:ed375a79f06cad285166e5be74745df1ed6845c5624aafadec4b7a29c25866ef"}, - {file = "SQLAlchemy-1.3.17.tar.gz", hash = "sha256:156a27548ba4e1fed944ff9fcdc150633e61d350d673ae7baaf6c25c04ac1f71"}, + {file = "SQLAlchemy-1.3.18-cp27-cp27m-macosx_10_14_x86_64.whl", hash = "sha256:f11c2437fb5f812d020932119ba02d9e2bc29a6eca01a055233a8b449e3e1e7d"}, + {file = "SQLAlchemy-1.3.18-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:0ec575db1b54909750332c2e335c2bb11257883914a03bc5a3306a4488ecc772"}, + {file = "SQLAlchemy-1.3.18-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:f57be5673e12763dd400fea568608700a63ce1c6bd5bdbc3cc3a2c5fdb045274"}, + {file = "SQLAlchemy-1.3.18-cp27-cp27m-win32.whl", hash = "sha256:8cac7bb373a5f1423e28de3fd5fc8063b9c8ffe8957dc1b1a59cb90453db6da1"}, + {file = "SQLAlchemy-1.3.18-cp27-cp27m-win_amd64.whl", hash = "sha256:adad60eea2c4c2a1875eb6305a0b6e61a83163f8e233586a4d6a55221ef984fe"}, + {file = "SQLAlchemy-1.3.18-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:57aa843b783179ab72e863512e14bdcba186641daf69e4e3a5761d705dcc35b1"}, + {file = "SQLAlchemy-1.3.18-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:621f58cd921cd71ba6215c42954ffaa8a918eecd8c535d97befa1a8acad986dd"}, + {file = "SQLAlchemy-1.3.18-cp35-cp35m-macosx_10_14_x86_64.whl", hash = "sha256:fc728ece3d5c772c196fd338a99798e7efac7a04f9cb6416299a3638ee9a94cd"}, + {file = "SQLAlchemy-1.3.18-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:736d41cfebedecc6f159fc4ac0769dc89528a989471dc1d378ba07d29a60ba1c"}, + {file = "SQLAlchemy-1.3.18-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:427273b08efc16a85aa2b39892817e78e3ed074fcb89b2a51c4979bae7e7ba98"}, + {file = "SQLAlchemy-1.3.18-cp35-cp35m-win32.whl", hash = "sha256:cbe1324ef52ff26ccde2cb84b8593c8bf930069dfc06c1e616f1bfd4e47f48a3"}, + {file = "SQLAlchemy-1.3.18-cp35-cp35m-win_amd64.whl", hash = "sha256:8fd452dc3d49b3cc54483e033de6c006c304432e6f84b74d7b2c68afa2569ae5"}, + {file = "SQLAlchemy-1.3.18-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:e89e0d9e106f8a9180a4ca92a6adde60c58b1b0299e1b43bd5e0312f535fbf33"}, + {file = "SQLAlchemy-1.3.18-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:6ac2558631a81b85e7fb7a44e5035347938b0a73f5fdc27a8566777d0792a6a4"}, + {file = "SQLAlchemy-1.3.18-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:87fad64529cde4f1914a5b9c383628e1a8f9e3930304c09cf22c2ae118a1280e"}, + {file = "SQLAlchemy-1.3.18-cp36-cp36m-win32.whl", hash = "sha256:e4624d7edb2576cd72bb83636cd71c8ce544d8e272f308bd80885056972ca299"}, + {file = "SQLAlchemy-1.3.18-cp36-cp36m-win_amd64.whl", hash = "sha256:89494df7f93b1836cae210c42864b292f9b31eeabca4810193761990dc689cce"}, + {file = "SQLAlchemy-1.3.18-cp37-cp37m-macosx_10_14_x86_64.whl", hash = "sha256:716754d0b5490bdcf68e1e4925edc02ac07209883314ad01a137642ddb2056f1"}, + {file = "SQLAlchemy-1.3.18-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:50c4ee32f0e1581828843267d8de35c3298e86ceecd5e9017dc45788be70a864"}, + {file = "SQLAlchemy-1.3.18-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:d98bc827a1293ae767c8f2f18be3bb5151fd37ddcd7da2a5f9581baeeb7a3fa1"}, + {file = "SQLAlchemy-1.3.18-cp37-cp37m-win32.whl", hash = "sha256:0942a3a0df3f6131580eddd26d99071b48cfe5aaf3eab2783076fbc5a1c1882e"}, + {file = "SQLAlchemy-1.3.18-cp37-cp37m-win_amd64.whl", hash = "sha256:16593fd748944726540cd20f7e83afec816c2ac96b082e26ae226e8f7e9688cf"}, + {file = "SQLAlchemy-1.3.18-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:c26f95e7609b821b5f08a72dab929baa0d685406b953efd7c89423a511d5c413"}, + {file = "SQLAlchemy-1.3.18-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:512a85c3c8c3995cc91af3e90f38f460da5d3cade8dc3a229c8e0879037547c9"}, + {file = "SQLAlchemy-1.3.18-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:d05c4adae06bd0c7f696ae3ec8d993ed8ffcc4e11a76b1b35a5af8a099bd2284"}, + {file = "SQLAlchemy-1.3.18-cp38-cp38-win32.whl", hash = "sha256:109581ccc8915001e8037b73c29590e78ce74be49ca0a3630a23831f9e3ed6c7"}, + {file = "SQLAlchemy-1.3.18-cp38-cp38-win_amd64.whl", hash = "sha256:8619b86cb68b185a778635be5b3e6018623c0761dde4df2f112896424aa27bd8"}, + {file = "SQLAlchemy-1.3.18.tar.gz", hash = "sha256:da2fb75f64792c1fc64c82313a00c728a7c301efe6a60b7a9fe35b16b4368ce7"}, ] sqlalchemy-schemadisplay = [ {file = "sqlalchemy_schemadisplay-1.3.tar.gz", hash = "sha256:0a9f26d77be9d92c9564d87cc17668fe141a816036c5f5d7c8cb053b253957e0"}, |