Skip to content

Commit 556aa63

Browse files
committed
fixed search bar rendering in webkit, mobile
1 parent 59cf989 commit 556aa63

File tree

5 files changed

+25
-2
lines changed

5 files changed

+25
-2
lines changed

TODO

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
* fix tag overflow when there are many tags at small horizontal resolutions
2-
* fix search bar in webkit and ie11
32
* add proper file uploads
43
* improve trending tag algorithm

lib/default_master.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<label for="search"><i class="mdi mdi-magnify white-text"></i></label>
4444
</div>
4545
</form>
46-
<div style="height: 64px; overflow: hidden; padding-left: 16px">
46+
<div style="height: 64px; overflow: hidden; padding-left: 16px" id="search-tags">
4747
% for(i in `{cat $sitedir/_werc/trending}) {
4848
<div class="chip">
4949
<form action="/search" method="post">

lib/headers.tpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
<link rel="stylesheet" href="/_werc/pub/style.css" type="text/css" media="screen, projection">
1414
% }
1515
<noscript><link rel="stylesheet" href="/pub/style/noscript.css" type="text/css" media="screen, projection"></noscript>
16+
<link rel="stylesheet" type="text/css" media"screen, projection" id="webkit">
17+
<script>
18+
if(navigator.userAgent.indexOf("WebKit") != -1) {
19+
document.getElementById("webkit").href="/pub/style/webkit.css";
20+
}
21+
</script>
1622
% if(! ~ `{get_cookie theme} '') {
1723
<link rel="stylesheet" href="/_werc/pub/%(`{get_cookie theme}%).css" type="text/css" media="screen, projection">
1824
% }

pub/style/style.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,19 @@ nav ul li {
5858
margin: 0;
5959
border: 0;
6060
}
61+
62+
@media only screen and (max-width : 600px) {
63+
#search {
64+
height: 3.75em;
65+
}
66+
#search-form .mdi {
67+
margin-top: 0.75em;
68+
}
69+
#search-tags {
70+
margin-top: 0.5em;
71+
}
72+
}
73+
6174
#main-copy {
6275
margin: 0 auto;
6376
border-left: none;

pub/style/webkit.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@media only screen and (min-width : 601px) {
2+
#search {
3+
height: 3.75em;
4+
}
5+
}

0 commit comments

Comments
 (0)