Skip to content

Commit cff797b

Browse files
committed
Update
1 parent 7545c22 commit cff797b

File tree

3 files changed

+80
-51
lines changed

3 files changed

+80
-51
lines changed

_static/css/custom.css

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -95,47 +95,3 @@
9595
.pytorch-left-menu-search input[type=text] {
9696
background-image: url("../images/search-icon.svg");
9797
}
98-
99-
.gsc-search-button-v2 {
100-
display: none;
101-
}
102-
103-
.gsc-input-box {
104-
border: 1px solid #ffffff;
105-
background-color: #f3f4f7;
106-
border-radius: 0;
107-
width: 100%;
108-
}
109-
110-
.gsc-input-box {
111-
background-image: url("../images/search-icon.svg");
112-
background-repeat: no-repeat;
113-
}
114-
115-
.gsc-input {
116-
background-image: url("../images/search-icon.svg");
117-
background-repeat: no-repeat;
118-
background-size: 18px 18px;
119-
background-position: 12px 10px;
120-
font-size: 1rem;
121-
color: #262626;
122-
}
123-
124-
.gsst_a .gscb_a {
125-
display: none;
126-
}
127-
128-
.gsc-control-cse {
129-
padding-bottom: 0;
130-
}
131-
132-
form.gsc-search-box {
133-
margin-bottom: 0;
134-
padding-bottom: 0;
135-
}
136-
137-
.gs-search-image {
138-
width: 16px;
139-
height: 16px;
140-
margin-right: 5px;
141-
}

_static/css/custom2.css

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,69 @@
4141
input[type="radio"] {
4242
accent-color: #ee4c2c;
4343
}
44+
45+
.gsst_b {
46+
display: none;
47+
}
48+
49+
#gsc-i-id1 {
50+
height: 1.5rem;
51+
text-indent: 12px !important;
52+
font-size: 1rem !important;
53+
font-family: "FreightSansi";
54+
background-image: url(../images/search-icon.svg) !important;
55+
background-repeat: no-repeat !important;
56+
background-size: 18px 18px !important;
57+
background-position: 5px 0px !important;
58+
padding-left: 20px !important;
59+
}
60+
61+
#gsc-i-id1::placeholder {
62+
font-family: 'FreightSans';
63+
font-size: 1rem;
64+
color: #262626;
65+
}
66+
67+
.gsc-control-cse {
68+
padding: 0 !important;
69+
border-radius: 0px !important;
70+
border: none !important;;
71+
overflow: hidden;
72+
}
73+
74+
#___gcse_0 {
75+
height: 44px !important;
76+
padding: 0 !important;
77+
}
78+
79+
table.gsc-search-box td.gsc-input {
80+
padding-right: 0 !important;
81+
}
82+
83+
table.gsc-search-box td {
84+
height: 44px;
85+
margin-bottom: 0 !important;
86+
padding-bottom: 0 !important;
87+
}
88+
89+
.gsc-search-button-v2 {
90+
display: none;
91+
}
92+
93+
.gs_id50 {
94+
width: 308px;
95+
}
96+
97+
.gsib_a {
98+
padding: 0px 8px 4px 9px !important;
99+
}
100+
101+
.gsc-input-box {
102+
border-radius: 0px !important;
103+
border: none !important;
104+
}
105+
106+
form.gsc-search-box {
107+
margin-bottom 0px;
108+
}
109+

_templates/layout.html

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,13 @@
4545
<!-- Search box -->
4646
<div id="searchBox">
4747
<div class="searchbox" id="googleSearchBox">
48-
<div class="gs-search-image">
49-
<img src="../images/search-icon.svg">
50-
</div>
5148
<script async src="https://cse.google.com/cse.js?cx=e65585f8c3ea1440e"></script>
52-
<div class="gcse-search" data-placeholder="Search"></div>
49+
<div class="gcse-search"</div>
5350
</div>
5451
<div id="sphinxSearchBox" style="display: none;">
5552
<div role="search">
5653
<form id="rtd-search-form" class="wy-form" action="{{ pathto('search') }}" method="get">
57-
<input type="text" name="q" placeholder="Search {{ search_project }}" />
54+
<input type="text" name="q" placeholder="Search Docs" />
5855
<input type="hidden" name="check_keywords" value="yes" />
5956
<input type="hidden" name="area" value="default" />
6057
</form>
@@ -68,7 +65,7 @@
6865
</label>
6966
<label style="margin-bottom: 1rem">
7067
<input type="radio" name="searchType" value="sphinx">
71-
Sphinx Search
68+
Classic Search
7269
</label>
7370
</form>
7471

@@ -98,9 +95,19 @@
9895
localStorage.setItem('searchType', selectedSearchType);
9996
toggleSearchBox(selectedSearchType);
10097
});
98+
// Set placeholder text for Google search box
99+
window.onload = function() {
100+
var placeholderText = "Search Docs";
101+
var googleSearchboxText = document.querySelector("#gsc-i-id1");
102+
if (googleSearchboxText) {
103+
googleSearchboxText.placeholder = placeholderText;
104+
googleSearchboxText.style.fontFamily = 'FreightSans';
105+
googleSearchboxText.style.fontSize = "1.2rem";
106+
googleSearchboxText.style.color = '#262626';
107+
}
108+
};
101109
});
102110
</script>
103-
104111
{% endblock %}
105112

106113
{% block footer %}

0 commit comments

Comments
 (0)