patx/gitman

match issue search and PR search to repo search style found on index

Commit 394cd79 · patx · 2026-05-10T19:28:30Z

Changeset
394cd795ffab3726ab1f3395ac08e5454472dcad
Parents
f83dab4d2ce31978baafc8c3fd82a9fbb186b412

View source at this commit

Comments

No comments yet.

Log in to comment

Diff

diff --git a/static/styles.css b/static/styles.css
index 1e50688..a57fb47 100644
--- a/static/styles.css
+++ b/static/styles.css
@@ -187,6 +187,14 @@ button, .button {
   max-width: 100%;
   align-self: flex-start;
 }
+.repo-search-input {
+  width: 350px;
+  margin-bottom: 10px;
+}
+.repo-search-form {
+  display: block;
+  margin: 0;
+}
 .panel-heading > .repo-search { margin-left: auto; }
 .hero-actions .repo-search-menu { left: 0; right: auto; }
 .repo-search-menu {
@@ -320,6 +328,7 @@ button, .button {
 @media (max-width: 760px) {
   body { margin-top: 1rem; }
   .repo-search { width: 100%; }
+  .repo-search-input { width: 100%; }
   .repo-search-menu { left: 0; right: auto; width: 100%; }
   .grid.two, .commit-list li, .tag-list li { grid-template-columns: 1fr; }
 }
diff --git a/templates/index.tpl b/templates/index.tpl
index 7b3b04b..805e2a2 100644
--- a/templates/index.tpl
+++ b/templates/index.tpl
@@ -15,7 +15,6 @@
               <div class="repo-search" data-repo-search data-repo-search-url="/-/repos/search">
                 <input
                   id="repo-search-input"
-                  style="width:350px; margin-bottom:10px;"
                   class="repo-search-input"
                   type="search"
                   placeholder="Search all repositories"
diff --git a/templates/issues.tpl b/templates/issues.tpl
index 48a5024..2040053 100644
--- a/templates/issues.tpl
+++ b/templates/issues.tpl
@@ -14,19 +14,19 @@
 
 <section class="panel">
   <div class="panel-heading">
-      <form class="list-search" action="/{{repo['owner_username']}}/{{repo['name']}}/issues" method="get" role="search">
+      <form class="repo-search-form" action="/{{repo['owner_username']}}/{{repo['name']}}/issues" method="get" role="search">
         <input type="hidden" name="status" value="{{status}}">
         <label class="sr-only" for="issue-search-input">Search issues</label>
-        <input id="issue-search-input" type="search" name="q" value="{{q}}" placeholder="Search issues" autocomplete="off">
-        <button type="submit">Search</button>
-        % if q:
-          <a href="{{current_url_with_params(q=None)}}">Clear</a>
-        % end
+        <input id="issue-search-input" class="repo-search-input" type="search" name="q" value="{{q}}" placeholder="Search issues" autocomplete="off">
+        <button class="sr-only" type="submit">Search issues</button>
       </form>
     <div class="filters">
       <a class="{{'active' if status == 'open' else ''}}" href="{{current_url_with_params(status='open')}}">Open ({{counts["open"]}})</a>
       <a class="{{'active' if status == 'closed' else ''}}" href="{{current_url_with_params(status='closed')}}">Closed ({{counts["closed"]}})</a>
       <a class="{{'active' if status == 'all' else ''}}" href="{{current_url_with_params(status='all')}}">All</a>
+      % if q:
+        <a href="{{current_url_with_params(q=None)}}">Clear search</a>
+      % end
       % if user:
         <a href="/{{repo['owner_username']}}/{{repo['name']}}/issues/new">New issue</a>
       % else:
diff --git a/templates/pull_requests.tpl b/templates/pull_requests.tpl
index 0dfd623..057d30a 100644
--- a/templates/pull_requests.tpl
+++ b/templates/pull_requests.tpl
@@ -14,20 +14,20 @@
 
 <section class="panel">
   <div class="panel-heading">
-      <form class="list-search" action="/{{repo['owner_username']}}/{{repo['name']}}/pulls" method="get" role="search">
+      <form class="repo-search-form" action="/{{repo['owner_username']}}/{{repo['name']}}/pulls" method="get" role="search">
         <input type="hidden" name="status" value="{{status}}">
         <label class="sr-only" for="pull-request-search-input">Search pull requests</label>
-        <input id="pull-request-search-input" type="search" name="q" value="{{q}}" placeholder="Search pull requests" autocomplete="off">
-        <button type="submit">Search</button>
-        % if q:
-          <a href="{{current_url_with_params(q=None)}}">Clear</a>
-        % end
+        <input id="pull-request-search-input" class="repo-search-input" type="search" name="q" value="{{q}}" placeholder="Search pull requests" autocomplete="off">
+        <button class="sr-only" type="submit">Search pull requests</button>
       </form>
     <div class="filters">
       <a class="{{'active' if status == 'open' else ''}}" href="{{current_url_with_params(status='open')}}">Open ({{counts["open"]}})</a>
       <a class="{{'active' if status == 'merged' else ''}}" href="{{current_url_with_params(status='merged')}}">Merged ({{counts["merged"]}})</a>
       <a class="{{'active' if status == 'closed' else ''}}" href="{{current_url_with_params(status='closed')}}">Closed ({{counts["closed"]}})</a>
       <a class="{{'active' if status == 'all' else ''}}" href="{{current_url_with_params(status='all')}}">All</a>
+      % if q:
+        <a href="{{current_url_with_params(q=None)}}">Clear search</a>
+      % end
       % if user:
         <a href="/{{repo['owner_username']}}/{{repo['name']}}/pulls/new">New pull request</a>
       % else: