From 842c15b0171573564b0472e8fc217e146254a7c8 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 3 Mar 2020 22:31:50 +0100 Subject: Various improvements for every views. --- newspipe/web/static/css/custom.css | 80 ++++++++++++++++++++++++ newspipe/web/static/css/customized-bootstrap.css | 65 ------------------- newspipe/web/templates/about.html | 2 +- newspipe/web/templates/admin/create_user.html | 2 +- newspipe/web/templates/admin/dashboard.html | 2 +- newspipe/web/templates/edit_bookmark.html | 6 +- newspipe/web/templates/edit_category.html | 2 +- newspipe/web/templates/edit_feed.html | 2 +- newspipe/web/templates/layout.html | 22 +++---- newspipe/web/templates/login.html | 5 +- newspipe/web/templates/management.html | 14 ++--- newspipe/web/templates/profile.html | 2 +- package-lock.json | 6 +- package.json | 3 +- 14 files changed, 112 insertions(+), 101 deletions(-) create mode 100644 newspipe/web/static/css/custom.css delete mode 100644 newspipe/web/static/css/customized-bootstrap.css diff --git a/newspipe/web/static/css/custom.css b/newspipe/web/static/css/custom.css new file mode 100644 index 00000000..8fb4eef3 --- /dev/null +++ b/newspipe/web/static/css/custom.css @@ -0,0 +1,80 @@ +html { + position: relative; + min-height: 100%; + font-size: 14px; +} +body { + /* Margin bottom by footer height */ + margin-bottom: 60px; + background-color: rgb(246, 248, 250); +} +img { + padding: 2px; +} +a { + color: #3572B0; +} + +.navbar-dark .navbar-nav .nav-link { + color: + rgb(255, 255, 255, 1); +} + +.bg-newspipe-blue { + /* background-color: #0082c9; */ + background-image: linear-gradient(40deg, #0082c9 0%, #30b6ff 100%); +} +.btn-primary { + background-color: #0082c9; + color: white; +} + +.btn-outline-primary { + border-color: #0082c9; + color: #0082c9; +} + +/* Sticky footer */ +.footer { + position: absolute; + bottom: 0; + width: 100%; + /* Set the fixed height of the footer here */ + height: 60px; + line-height: 60px; /* Vertically center the text there */ + background-color: #006FBA; +} +.footer a{ + color: #FFFFFF; +} + +#sidebar { + overflow: auto; + max-height: 700px; +} + +#sidebar .nav li { + list-style-type: none; + padding: 0; + line-height: 1.0; + flex-direction: row; + flex-wrap: nowrap; /* assumes you only want one row */ +} + + +.input-group-inline { + min-width: 0; + width: 200px; + display: inline; +} + +.alert-message { + position: relative; + display: block; + z-index: 1001; +} + +/*customization for Flask-Paginate*/ +.pagination-page-info { + display: inline; +} diff --git a/newspipe/web/static/css/customized-bootstrap.css b/newspipe/web/static/css/customized-bootstrap.css deleted file mode 100644 index 02f8a72e..00000000 --- a/newspipe/web/static/css/customized-bootstrap.css +++ /dev/null @@ -1,65 +0,0 @@ -html { - position: relative; - min-height: 100%; - font-size: 14px; -} -body { - /* Margin bottom by footer height */ - margin-bottom: 60px; - background-color: rgb(246, 248, 250); -} -img { - padding: 2px; -} -a { - color: #3572B0; -} - -.bg-newspipe-blue { - background-color: #205081; -} - -/* Sticky footer */ -.footer { - position: absolute; - bottom: 0; - width: 100%; - /* Set the fixed height of the footer here */ - height: 60px; - line-height: 60px; /* Vertically center the text there */ - background-color: #006FBA; -} -.footer a{ - color: #FFFFFF; -} - -#sidebar { - overflow: auto; - max-height: 700px; -} - -#sidebar .nav li { - list-style-type: none; - padding: 0; - line-height: 1.0; - flex-direction: row; - flex-wrap: nowrap; /* assumes you only want one row */ -} - - -.input-group-inline { - min-width: 0; - width: 200px; - display: inline; -} - -.alert-message { - position: relative; - display: block; - z-index: 1001; -} - -/*customization for Flask-Paginate*/ -.pagination-page-info { - display: inline; -} diff --git a/newspipe/web/templates/about.html b/newspipe/web/templates/about.html index ff8cac47..43d8c73d 100644 --- a/newspipe/web/templates/about.html +++ b/newspipe/web/templates/about.html @@ -19,7 +19,7 @@

{{ _('Help') }}

{{ _('Contact')}}: {{ contact }}

{{ _('You can subscribe to new feeds with a bookmarklet. Drag the following button to your browser bookmarks.') }}

- {{ _('Subscribe to this feed using Newspipe', bookmarklet='javascript:window.location="%s?url="+encodeURIComponent(document.location)' % url_for('feed.bookmarklet', _external=True)) }} + {{ _('Subscribe to this feed using Newspipe', bookmarklet='javascript:window.location="%s?url="+encodeURIComponent(document.location)' % url_for('feed.bookmarklet', _external=True)) }} diff --git a/newspipe/web/templates/admin/create_user.html b/newspipe/web/templates/admin/create_user.html index 40aad468..8844f987 100644 --- a/newspipe/web/templates/admin/create_user.html +++ b/newspipe/web/templates/admin/create_user.html @@ -19,7 +19,7 @@ {{ form.automatic_crawling(class_="form-control") }} {% for error in form.automatic_crawling.errors %} {{ error }}
{% endfor %}
- {{ form.submit(class_="btn btn-default") }} + {{ form.submit(class_="btn btn-primary") }} diff --git a/newspipe/web/templates/admin/dashboard.html b/newspipe/web/templates/admin/dashboard.html index 350a2e47..390e8853 100644 --- a/newspipe/web/templates/admin/dashboard.html +++ b/newspipe/web/templates/admin/dashboard.html @@ -46,7 +46,7 @@ {% endfor %} -{{ _('Add a new user') }} +{{ _('Add a new user') }} - - + {% endblock %} {% block menu %} - - - {% endblock %}
diff --git a/newspipe/web/templates/login.html b/newspipe/web/templates/login.html index 0c23b7fe..1253e2d3 100644 --- a/newspipe/web/templates/login.html +++ b/newspipe/web/templates/login.html @@ -20,11 +20,12 @@ {% for message in form.password.errors %} {% endfor %} - {{ form.submit(class_="btn btn-light") }} + {{ form.submit(class_="btn btn-primary") }} - {{ _('Sign up') }} +
+ {{ _('Sign up') }} diff --git a/newspipe/web/templates/management.html b/newspipe/web/templates/management.html index c3f6a943..af4dae2b 100644 --- a/newspipe/web/templates/management.html +++ b/newspipe/web/templates/management.html @@ -9,12 +9,12 @@

{{ _('You are subscribed to') }} {{ nb_feeds }} {{ _('feeds') }}. {{ _('Add') }} {{ _('a feed') }}.

{{ nb_articles }} {{ _('articles are stored in the database with') }} {{ nb_unread_articles }} {{ _('unread articles') }}.

{{ _('You have') }} {{ nb_categories }} {{ _('categories') }}.

- {{ _('Delete articles older than 10 weeks') }} + {{ _('Delete articles older than 10 weeks') }}

{{ _('Your bookmarks') }}

{{ _('You have') }} {{ nb_bookmarks }} {{ _('bookmarks') }}.

- {{ _('Delete all bookmarks') }} + {{ _('Delete all bookmarks') }}
@@ -33,17 +33,17 @@

{{ _('Import') }}

{{ _('Import a Newspipe account') }} (*.json) - +

{{ _('Export') }}

- {{ _('Export your Newspipe account to JSON') }} + {{ _('Export your Newspipe account to JSON') }}

{{ _('OPML') }}

{{ _('Import') }}

{{ _('Batch import feeds from OPML') }} (*.xml {{ _('or') }} *.opml) - +

{{ _('Export') }}

@@ -61,14 +61,14 @@
- +
diff --git a/newspipe/web/templates/profile.html b/newspipe/web/templates/profile.html index 1ddb7e74..edbae368 100644 --- a/newspipe/web/templates/profile.html +++ b/newspipe/web/templates/profile.html @@ -52,7 +52,7 @@

- {{ form.submit(class_="btn btn-light") }} + {{ form.submit(class_="btn btn-primary") }}
diff --git a/package-lock.json b/package-lock.json index cbbd0aed..106e200a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,10 +25,10 @@ "jquery": "3.4.1" } }, - "datatables.net-bs": { + "datatables.net-bs4": { "version": "1.10.20", - "resolved": "https://registry.npmjs.org/datatables.net-bs/-/datatables.net-bs-1.10.20.tgz", - "integrity": "sha512-NsMoOOYZ6NlteOpzhltw21lXsNdhjIMbIOxnqmcrb62ntl8eL9pYzk2AeiDXBlIKY4e550ZrExCq3CYKQ9myEg==", + "resolved": "https://registry.npmjs.org/datatables.net-bs4/-/datatables.net-bs4-1.10.20.tgz", + "integrity": "sha512-kQmMUMsHMOlAW96ztdoFqjSbLnlGZQ63iIM82kHbmldsfYdzuyhbb4hTx6YNBi481WCO3iPSvI6YodNec46ZAw==", "requires": { "datatables.net": "1.10.20", "jquery": "3.4.1" diff --git a/package.json b/package.json index feccdfbe..099771b0 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,7 @@ "dependencies": { "bootstrap": "^4.4.1", "datatables": "^1.10.18", - "datatables.net": "^1.10.20", - "datatables.net-bs": "^1.10.20", + "datatables.net-bs4": "^1.10.20", "fork-awesome": "^1.1.7", "jquery": "^3.4.1", "lodash": "^4.17.15", -- cgit