summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-13 01:01:31 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-13 01:01:31 +0200
commit6730af4b33b207a7a1880cef2706e67313a7e5cd (patch)
tree84b45a86c94c9f3b17ecc2576d7e023d9fb3e204
parent4faf0da3a36bfdcf354b095a2cf5b297ca09af65 (diff)
Fix search widget input width; remove dead navigation CSS
The input's width was calc(100% - 70px), a number tuned to leave room for a "Search: " label that no longer needs to exist -- replaced by a placeholder instead, which also removes the fragile arithmetic entirely rather than re-tuning it. Also picked up a proper border-radius and padding, matching the dashboard's own search input. The width bug's actual proximate cause was a stray #navigation div { float: left } left over from the old text nav, interfering with the icon nav's own flex layout. Going through that whole block with the same scrutiny turned up four more rules worth removing, not fixing: a:hover (identical specificity, later in the file, silently winning the cascade since the icon nav landed), and #metadata/#overview_toggle in the remaining selectors were dead for two different, confirmed reasons -- #overview_toggle was the old wizard's toggle bar, gone along with it, and #metadata here was the pre-details-view subnav toggle, retired before this session and unrelated to the current, still-live #metadata id on the metadata-details section in nodes#edit (a confusing reuse that's caused real problems before).
-rw-r--r--app/views/layouts/admin.html.erb2
-rw-r--r--public/stylesheets/admin.css35
2 files changed, 6 insertions, 31 deletions
diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb
index 61bb5c3..5ae363f 100644
--- a/app/views/layouts/admin.html.erb
+++ b/app/views/layouts/admin.html.erb
@@ -30,7 +30,7 @@
30 <div id="search_widget" style="display: none;"> 30 <div id="search_widget" style="display: none;">
31 <div> 31 <div>
32 <%= form_tag admin_search_path, method: :get do %> 32 <%= form_tag admin_search_path, method: :get do %>
33 <span>Search: </span><%= text_field_tag :search_term, nil, autocomplete: "off" %> 33 <%= text_field_tag :search_term, nil, placeholder: "Search nodes…", autocomplete: "off" %>
34 <% end %> 34 <% end %>
35 </div> 35 </div>
36 <div id="menu_search_results" class="search_results" style="display: none"></div> 36 <div id="menu_search_results" class="search_results" style="display: none"></div>
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css
index 2044ab0..d85e61e 100644
--- a/public/stylesheets/admin.css
+++ b/public/stylesheets/admin.css
@@ -138,35 +138,6 @@ input[type=radio] {
138 margin-top: 10px; 138 margin-top: 10px;
139} 139}
140 140
141#navigation div { float: left; }
142
143#navigation a:hover {
144 color: #ffffff;
145 background-color: #000000;
146}
147
148#navigation a.selected,
149#metadata a.selected,
150#overview_toggle a.selected {
151 color: #ffffff;
152 background-color: #000000;
153}
154
155#main_navigation a,
156#metadata a,
157#overview_toggle a {
158 letter-spacing: 1px;
159 padding-left: 5px;
160 padding-right: 5px;
161 padding-top: 1px;
162 padding-bottom: 1px;
163}
164
165#metadata a:hover {
166 color: #ffffff;
167 background-color: #ff9600;
168}
169
170.admin_content_spacer { 141.admin_content_spacer {
171 clear: both; 142 clear: both;
172 margin-bottom: 40px; 143 margin-bottom: 40px;
@@ -1098,6 +1069,7 @@ div#draft_list table td.actions a {
1098 top: 2.75rem; 1069 top: 2.75rem;
1099 left: 0; 1070 left: 0;
1100 width: min(520px, 90vw); 1071 width: min(520px, 90vw);
1072 border-radius: 2px;
1101 border: 1px solid #000000; 1073 border: 1px solid #000000;
1102 -webkit-box-shadow: 3px 3px 5px #b1b1b1; 1074 -webkit-box-shadow: 3px 3px 5px #b1b1b1;
1103 box-shadow: 3px 3px 5px #b1b1b1; 1075 box-shadow: 3px 3px 5px #b1b1b1;
@@ -1107,7 +1079,10 @@ div#draft_list table td.actions a {
1107} 1079}
1108 1080
1109#search_widget input { 1081#search_widget input {
1110 width: calc(100% - 70px); 1082 width: 100%;
1083 box-sizing: border-box;
1084 padding: 8px 12px;
1085 border-radius: 2px;
1111 font-size: 18px; 1086 font-size: 18px;
1112} 1087}
1113 1088