Added the search bar to the footer
This commit is contained in:
parent
1ce6ec080b
commit
b2a2b49abe
|
@ -7793,12 +7793,8 @@ article code {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
width: 90%; }
|
width: 90%; }
|
||||||
|
|
||||||
.site-search {
|
.site-search[type=text].lite {
|
||||||
width: 100%; }
|
transition: border-bottom-color 60ms ease-in-out, width 300ms ease; }
|
||||||
.site-search:focus {
|
|
||||||
width: 200%; }
|
|
||||||
.site-search[type=text].lite {
|
|
||||||
transition: border-bottom-color 60ms ease-in-out, width 300ms ease; }
|
|
||||||
|
|
||||||
#search_button_homepage {
|
#search_button_homepage {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
|
|
|
@ -720,12 +720,6 @@ footer {
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-search {
|
.site-search {
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
width: 200%;
|
|
||||||
}
|
|
||||||
|
|
||||||
&[type=text].lite {
|
&[type=text].lite {
|
||||||
// wow CSS selector priority sucks
|
// wow CSS selector priority sucks
|
||||||
|
|
||||||
|
|
|
@ -29,4 +29,9 @@
|
||||||
<a href="{{ .Footer.ContactUrl }}">Contact</a>
|
<a href="{{ .Footer.ContactUrl }}">Contact</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<form onsubmit="this.querySelector('input[name=q]').value = this.querySelector('#searchstring').value + ' site:handmade.network';" class="ma0 mt3 bg--card pa1 br2 dib" method="GET" action="{{ .Footer.SearchActionUrl }}" target="_blank">
|
||||||
|
<input type="hidden" name="q" />
|
||||||
|
<input class="site-search bn lite pa2 fira" type="text" id="searchstring" value="" placeholder="Search with DuckDuckGo" size="18" />
|
||||||
|
<input id="search_button_homepage" type="submit" value="Go"/>
|
||||||
|
</form>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -75,6 +75,7 @@ type Footer struct {
|
||||||
ProjectIndexUrl string
|
ProjectIndexUrl string
|
||||||
ForumsUrl string
|
ForumsUrl string
|
||||||
ContactUrl string
|
ContactUrl string
|
||||||
|
SearchActionUrl string
|
||||||
}
|
}
|
||||||
|
|
||||||
type Thread struct {
|
type Thread struct {
|
||||||
|
|
|
@ -84,6 +84,7 @@ func getBaseData(c *RequestContext, title string, breadcrumbs []templates.Breadc
|
||||||
ProjectIndexUrl: hmnurl.BuildProjectIndex(1),
|
ProjectIndexUrl: hmnurl.BuildProjectIndex(1),
|
||||||
ForumsUrl: hmnurl.HMNProjectContext.BuildForum(nil, 1),
|
ForumsUrl: hmnurl.HMNProjectContext.BuildForum(nil, 1),
|
||||||
ContactUrl: hmnurl.BuildContactPage(),
|
ContactUrl: hmnurl.BuildContactPage(),
|
||||||
|
SearchActionUrl: "https://duckduckgo.com",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue