From faa6e4bb14619052e3997172d2c4167763ea0432 Mon Sep 17 00:00:00 2001 From: catborise Date: Tue, 27 Oct 2026 17:09:52 +0300 Subject: [PATCH] refactor(templates): Bootstrap utilities instead of the upstream rules that redid them webvirtcloud.css still carried the upstream panel's rules for what Bootstrap 5.3 has as utilities and components: - the page's bottom space (body padding) is pb-5 on base.html's body, and the console page no longer has to undo it; - the VM page's action tabs (.action-button, .action-block with a fixed 65px width) are text-center with a d-block icon; its tab panes (#power ... #undefine, one rule each) mt-3; - the bordered sub-tab panes (.tab-pane-bordered, a fixed #eee border that dark themes could not change) border border-top-0 p-3; - the search box and header buttons (.search, .btn-header) m-1 and mt-1; the SSH key select (.keyselect) a form-select; - the boot order list (.multipleselect, fixed size, #c0c0c0 border) a list-group of form-check-input items; its unused .multipleselect-on goes; - table cells centred by a global rule are align-middle on each table. Two rules against Bootstrap's behaviour go: menus opened on hover on wide screens (Bootstrap opens them on a click, and keyboard and touch users had no hover), and "a { outline: 0 }", which hid the keyboard focus ring. The paragraph and page-header margins and the 900px container stay for a separate change: they set every page's layout. --- accounts/templates/account.html | 4 +- accounts/templates/api_token_table.html | 2 +- accounts/templates/profile.html | 8 +- admin/templates/admin/group_list.html | 4 +- admin/templates/admin/logs.html | 2 +- admin/templates/admin/tombstone_list.html | 2 +- admin/templates/admin/user_list.html | 4 +- computes/templates/computes/instances.html | 4 +- console/templates/console-base.html | 4 - instances/templates/allinstances.html | 4 +- .../templates/allinstances_index_grouped.html | 2 +- .../allinstances_index_nongrouped.html | 2 +- instances/templates/create_inst_block.html | 2 +- instances/templates/instance.html | 28 +++--- instances/templates/instances/access_tab.html | 12 +-- .../templates/instances/destroy_tab.html | 4 +- instances/templates/instances/info_tab.html | 2 +- instances/templates/instances/power_tab.html | 20 ++-- instances/templates/instances/resize_tab.html | 8 +- .../templates/instances/settings_tab.html | 36 +++---- .../templates/instances/snapshots_tab.html | 12 +-- instances/templates/instances/stats_tab.html | 8 +- interfaces/templates/interface.html | 2 +- networks/templates/network.html | 2 +- .../templates/create_nwfilter_block.html | 2 +- nwfilters/templates/nwfilter.html | 4 +- nwfilters/templates/nwfilters.html | 2 +- static/css/webvirtcloud.css | 96 ------------------- storages/templates/storage.html | 2 +- templates/base.html | 2 +- templates/search_block.html | 2 +- virtsecrets/templates/secrets.html | 2 +- 32 files changed, 95 insertions(+), 195 deletions(-) diff --git a/accounts/templates/account.html b/accounts/templates/account.html index 2becbb6d..ee09e82d 100644 --- a/accounts/templates/account.html +++ b/accounts/templates/account.html @@ -44,7 +44,7 @@
- +
@@ -83,7 +83,7 @@
-
#
+
diff --git a/accounts/templates/api_token_table.html b/accounts/templates/api_token_table.html index bfef7bfe..0b330e84 100644 --- a/accounts/templates/api_token_table.html +++ b/accounts/templates/api_token_table.html @@ -2,7 +2,7 @@ {% load bootstrap_icons %} {# the tokens of the signed-in user, or of owner on a superuser's view of a user #}
-
{% trans "Key name" %}
+
diff --git a/accounts/templates/profile.html b/accounts/templates/profile.html index c22a7d6e..9f054dab 100644 --- a/accounts/templates/profile.html +++ b/accounts/templates/profile.html @@ -27,7 +27,7 @@
-
+
@@ -48,11 +48,11 @@
-
+
{% if publickeys %}
-
{% trans "Name" %}
+
{% for key in publickeys %} @@ -86,7 +86,7 @@ -
+

{% blocktrans %}A token lets a script or a tool use the REST API as you, without your password or OTP: send it as Authorization: Token <token>. A password change does not delete tokens: delete a token you no longer use, or one that may have leaked.{% endblocktrans %}

{% if api_tokens %} {% include "api_token_table.html" %} diff --git a/admin/templates/admin/group_list.html b/admin/templates/admin/group_list.html index 43b52320..a4a0bda6 100644 --- a/admin/templates/admin/group_list.html +++ b/admin/templates/admin/group_list.html @@ -6,7 +6,7 @@ {% block content %}
- + {% bs_icon 'plus-circle-fill' %} {% include 'search_block.html' %} @@ -23,7 +23,7 @@ {% else %}
-
+
diff --git a/admin/templates/admin/logs.html b/admin/templates/admin/logs.html index 033f2fda..f9706224 100644 --- a/admin/templates/admin/logs.html +++ b/admin/templates/admin/logs.html @@ -32,7 +32,7 @@ {% else %}
-
{% trans "Group Name" %}
+
diff --git a/admin/templates/admin/tombstone_list.html b/admin/templates/admin/tombstone_list.html index f5ba1d2b..83c13c5a 100644 --- a/admin/templates/admin/tombstone_list.html +++ b/admin/templates/admin/tombstone_list.html @@ -21,7 +21,7 @@ {% else %}
-
#
+
diff --git a/admin/templates/admin/user_list.html b/admin/templates/admin/user_list.html index 59c4f171..32022b12 100644 --- a/admin/templates/admin/user_list.html +++ b/admin/templates/admin/user_list.html @@ -9,7 +9,7 @@ {% block page_heading %}{{ title }}{% endblock page_heading %} {% block page_heading_extra %} - + {% bs_icon 'plus-circle-fill' %} {% include 'search_block.html' %} @@ -26,7 +26,7 @@ {% else %}
-
{% trans "Name" %}
+
diff --git a/computes/templates/computes/instances.html b/computes/templates/computes/instances.html index 01c1b5f7..c61739cc 100644 --- a/computes/templates/computes/instances.html +++ b/computes/templates/computes/instances.html @@ -8,7 +8,7 @@ {% block page_heading_extra %} + class="btn btn-success mt-1 float-end" title="{% trans "New Instance" %}"> {% bs_icon 'plus-circle-fill' %} {% if instances %} @@ -39,7 +39,7 @@ {% endif %} {% else %}
-
{% trans "Username" %}
+
diff --git a/console/templates/console-base.html b/console/templates/console-base.html index 609f413c..28a27218 100644 --- a/console/templates/console-base.html +++ b/console/templates/console-base.html @@ -13,10 +13,6 @@
{% trans 'Name' %}
{% trans 'Description' %}