mobile-friendly search results

This commit is contained in:
mappu 2017-12-10 14:05:45 +13:00
parent 437e1f60e5
commit 35b9973a4a
2 changed files with 18 additions and 2 deletions

View File

@ -123,7 +123,7 @@ func (this *ArchiveState) renderSearch(w http.ResponseWriter) {
this.renderTemplateHead(w)
totalResults := 0
w.Write([]byte(`<ul>`))
w.Write([]byte(`<ul class="search-results">`))
limit := this.log.LatestDate().Next() // one off the end
for ympair := this.log.EarliestDate(); !ympair.Equals(limit); ympair = ympair.Next() {

View File

@ -61,7 +61,8 @@ select {
#chatarea {
word-break:break-word;
white-space: pre;
white-space: pre; /* Safari 1/2, IE 6/7 */
white-space: pre-wrap; /* Chrome, Firefox, IE8++ */
}
.timestamp {
@ -256,6 +257,21 @@ select {
#searchbox {
width:auto;
}
ul.search-results {
list-style-type: none;
padding-left: 2px;
}
.search-results li a:first-child {
/* convert mini link to touchable */
display:inline-block;
padding: 2px 6px;
margin: 2px;
border: 1px solid grey;
background: lightgrey;
}
}
@media (max-width: 400px) {