Skip to content

Commit 1db5f5f

Browse files
UI: Fix package search bar (#643)
* UI: Fix package search bar --------- Co-authored-by: Joe Wallwork <22053413+joewallwork@users.noreply.github.com>
1 parent a770b1e commit 1db5f5f

File tree

2 files changed

+39
-12
lines changed

2 files changed

+39
-12
lines changed

source/_static/custom.css

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,40 @@ i.fa-rss:before {
9696
i.fa-envelope-open-text:before {
9797
color: #734f96;
9898
}
99-
.package-search {
100-
margin: auto;
101-
text-align: center;
102-
width: 100%;
103-
max-width: 600px;
104-
}
105-
.bd-search {
106-
margin-bottom: 2rem;
99+
.package-search-form {
100+
text-align: center;
101+
margin: 20px auto 40px auto;
102+
}
103+
.package-search-input {
104+
width: 100%;
105+
max-width: 900px;
106+
height: 60px;
107+
108+
padding: 0 20px;
109+
110+
border: 3px solid var(--pst-color-primary);
111+
border-radius: 12px;
112+
113+
font-size: 18px;
114+
text-align: center;
115+
116+
display: block;
117+
margin: auto;
118+
}
119+
html[data-theme="dark"] .package-search-input {
120+
background-color: #1e1e1e;
121+
color: white;
122+
}
123+
124+
.package-search-input::placeholder {
125+
color: #888;
126+
}
127+
128+
html[data-theme="dark"] .package-search-input::placeholder {
129+
color: #bbb;
130+
}
131+
.package-search-input:focus {
132+
outline: none;
133+
border: 3px solid var(--pst-color-primary);
134+
box-shadow: 0 0 8px rgba(115, 79, 150, 0.35);
107135
}

source/packages.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ A rich ecosystem of high-performance code
1616
Find a Package
1717
:::
1818

19-
<form class="bd-search d-flex align-items-center" align="center" action="../search/index.html" method="get"> <input type="search" class="form-control" name="q" id="search-input" placeholder="Search for a package" aria-label="Search" autocomplete="off" style="margin:auto;text-align:center;width:100%;max-width:600px;">
20-
</form>
19+
<form class="package-search-form" action="../search/index.html" method="get"> <input type="search" name="q" id="search-input" class="package-search-input" placeholder="Search for a package" aria-label="Search" autocomplete="off"></form>
2120

2221
:::::{grid} 2
2322
:gutter: 3
@@ -30,7 +29,7 @@ Package index
3029
:::
3130

3231
:::{div} sd-fs-6
33-
The fortran-lang package index is community-maintained and lists open source Fortran-related projects.This includes large-scale scientific applications,function libraries, Fortran interfaces, and developer tools.<br>
32+
The fortran-lang package index is community-maintained and lists open source Fortran-related projects. This includes large-scale scientific applications, function libraries, Fortran interfaces, and developer tools.<br>
3433
See [here](../community/packages/) for how to get your project listed. <br>
3534
Use the box above to search the package index by keyword, package name, or author username.
3635
:::
@@ -111,4 +110,4 @@ packages/numerical
111110
packages/programming
112111
packages/strings
113112
packages/scientific
114-
:::
113+
:::

0 commit comments

Comments
 (0)