diff --git a/bukuserver/README.md b/bukuserver/README.md index 86cee542..e19dd1ac 100644 --- a/bukuserver/README.md +++ b/bukuserver/README.md @@ -118,7 +118,7 @@ The following are os env config variables available for bukuserver. | DISABLE_FAVICON | disable bookmark [favicons](https://wikipedia.org/wiki/Favicon) | boolean [default: `true`] ([here's why](#why-favicons-are-disabled-by-default))| | OPEN_IN_NEW_TAB | url link open in new tab | boolean [default: `false`] | | REVERSE_PROXY_PATH | reverse proxy path | string | -| THEME | [GUI theme](https://bootswatch.com/3) | string [default: `default`] (`slate` is a good pick for dark mode) | +| THEME | [GUI theme](https://bootswatch.com/4) | string [default: `default`] (`slate` is a good pick for dark mode) | | LOCALE | GUI language (partial support) | string [default: `en`] | | DEBUG | debug mode (verbose logging etc.) | boolean [default: `false`] | diff --git a/bukuserver/bookmarklet.js b/bukuserver/bookmarklet.js index e0b126d4..644526fc 100644 --- a/bukuserver/bookmarklet.js +++ b/bukuserver/bookmarklet.js @@ -16,4 +16,4 @@ url = "{{url}}" + "?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "&description=" + encodeURIComponent(desc); -window.open(url, '_blank', 'menubar=no, height=600, width=800, toolbar=no, scrollbars=yes, status=no, dialog=1'); +window.open(url, '_blank', 'menubar=no, height=700, width=800, toolbar=no, scrollbars=yes, status=no, dialog=1'); diff --git a/bukuserver/server.py b/bukuserver/server.py index 5ae498eb..0d9b5002 100644 --- a/bukuserver/server.py +++ b/bukuserver/server.py @@ -125,7 +125,7 @@ def shell_context(): app.jinja_env.globals.update(_p=_p) admin = Admin( - app, name='buku server', template_mode='bootstrap3', + app, name='buku server', template_mode='bootstrap4', index_view=views.CustomAdminIndexView( template='bukuserver/home.html', url='/' ) diff --git a/bukuserver/static/bukuserver/css/bookmark.css b/bukuserver/static/bukuserver/css/bookmark.css index 24d79e7a..c0a0c458 100644 --- a/bukuserver/static/bukuserver/css/bookmark.css +++ b/bukuserver/static/bukuserver/css/bookmark.css @@ -10,6 +10,9 @@ table tr td:not(:first-child) { } } +/* fixing details filter width */ +#fa_filter {flex-grow: 1} + .link { display: block; } diff --git a/bukuserver/static/bukuserver/css/list.css b/bukuserver/static/bukuserver/css/list.css index 8e722957..5d43dc51 100644 --- a/bukuserver/static/bukuserver/css/list.css +++ b/bukuserver/static/bukuserver/css/list.css @@ -1,20 +1,33 @@ +/* overriding icon-button text color with theme color */ +form.icon button { + color: inherit; +} + +/* fixing table layout */ +.list-buttons-column {width: 0} +.list-buttons-column .icon:last-child {margin-right: 10px} + .filters .filter-op {width: var(--filter-op) !important} .filters .filter-val {width: calc(var(--filters) - var(--filter-op) - var(--filter-buttons) - var(--filter-type)) !important} #filter_form[action^='/tag/'] {--filter-type: var(--filter-type-tags)} -:root {--filters: 645px; --filter-op: 9em; --filter-buttons: 12.5em; --filter-type: 5.5em; --filter-type-tags: 9em} +:root {--filters: 510px; --filter-op: 9rem; --filter-buttons: 12.5rem; --filter-type: 6rem; --filter-type-tags: 9.5rem} /* due to how flask-admin filters are set up, each language requires manual adjustments for full-width sizes */ -html[lang=de] {--filter-buttons: 19em} -html[lang=fr] {--filter-buttons: 17em} -html[lang=ru] {--filter-buttons: 16.5em; --filter-type: 8.5em; --filter-type-tags: 11em} +html[lang=de] {--filter-buttons: 18rem} +html[lang=fr] {--filter-buttons: 16rem} +html[lang=ru] {--filter-buttons: 16.5rem; --filter-type: 8.5rem; --filter-type-tags: 11.5rem} +@media (max-width: 767px) { + .filters .filter-val {width: calc(var(--filters) - var(--filter-op) - var(--filter-type)) !important} + #filter_form .pull-right:first-child {margin: .5ex 0} +} @media (min-width: 768px) { - :root {--filters: 710px; --filter-op: 11.5em} + :root {--filters: 690px; --filter-op: 11.5rem} } @media (min-width: 992px) { - :root {--filters: 930px; --filter-op: 20em} + :root {--filters: 930px; --filter-op: 20rem} } @media (min-width: 1200px) { - :root {--filters: 1130px; --filter-op: 20em} - html[lang=ru] #filter_form[action^='/bookmark/'] {--filter-op: 25em} /* the last 'buku' filter has a rather long name */ + :root {--filters: 1110px; --filter-op: 20rem} + html[lang=ru] #filter_form[action^='/bookmark/'] {--filter-op: 25rem} /* the last 'buku' filter has a rather long name */ } diff --git a/bukuserver/static/bukuserver/css/modal.css b/bukuserver/static/bukuserver/css/modal.css index 20de439b..764e50d9 100644 --- a/bukuserver/static/bukuserver/css/modal.css +++ b/bukuserver/static/bukuserver/css/modal.css @@ -5,7 +5,7 @@ body.modal-open { /* limit dialog height with a scrollbox */ .modal-content { - max-height: calc(100vh - 60px); + max-height: calc(100vh - 3.5rem); display: flex; flex-direction: column; } diff --git a/bukuserver/templates/bukuserver/bookmark_create.html b/bukuserver/templates/bukuserver/bookmark_create.html index d3fc5ec5..8b9af7ec 100644 --- a/bukuserver/templates/bukuserver/bookmark_create.html +++ b/bukuserver/templates/bukuserver/bookmark_create.html @@ -7,6 +7,7 @@ {{ buku.limit_navigation_if_popup() }} {{ buku.script('bookmark.js') }} {{ buku.fetch_checkbox(form.fetch.data) }} + {{ buku.horizontal_form(excluding_popups=True) }} {{ buku.focus() }} {{ buku.link_saved() }} {% endblock %} diff --git a/bukuserver/templates/bukuserver/bookmark_create_modal.html b/bukuserver/templates/bukuserver/bookmark_create_modal.html index e263b2ff..ef1efe7f 100644 --- a/bukuserver/templates/bukuserver/bookmark_create_modal.html +++ b/bukuserver/templates/bukuserver/bookmark_create_modal.html @@ -10,6 +10,7 @@ {% block tail %} {{ super() }} {{ buku.script('bookmark.js') }} - {{ buku.fetch_checkbox(form.fetch.data) }} + {{ buku.fetch_checkbox(form.fetch.data, modal=True) }} + {{ buku.horizontal_form() }} {{ buku.focus('.modal-body') }} {% endblock %} diff --git a/bukuserver/templates/bukuserver/bookmark_details_modal.html b/bukuserver/templates/bukuserver/bookmark_details_modal.html index 916a0fcc..4e208e9c 100644 --- a/bukuserver/templates/bukuserver/bookmark_details_modal.html +++ b/bukuserver/templates/bukuserver/bookmark_details_modal.html @@ -4,8 +4,8 @@ {% block header_text %}