Skip to content

Commit

Permalink
fixed search bar rendering in webkit, mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
kfarwell committed May 20, 2016
1 parent 59cf989 commit 556aa63
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 2 deletions.
1 change: 0 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
* fix tag overflow when there are many tags at small horizontal resolutions
* fix search bar in webkit and ie11
* add proper file uploads
* improve trending tag algorithm
2 changes: 1 addition & 1 deletion lib/default_master.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<label for="search"><i class="mdi mdi-magnify white-text"></i></label>
</div>
</form>
<div style="height: 64px; overflow: hidden; padding-left: 16px">
<div style="height: 64px; overflow: hidden; padding-left: 16px" id="search-tags">
% for(i in `{cat $sitedir/_werc/trending}) {
<div class="chip">
<form action="/search" method="post">
Expand Down
6 changes: 6 additions & 0 deletions lib/headers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
<link rel="stylesheet" href="/_werc/pub/style.css" type="text/css" media="screen, projection">
% }
<noscript><link rel="stylesheet" href="/pub/style/noscript.css" type="text/css" media="screen, projection"></noscript>
<link rel="stylesheet" type="text/css" media"screen, projection" id="webkit">
<script>
if(navigator.userAgent.indexOf("WebKit") != -1) {
document.getElementById("webkit").href="/pub/style/webkit.css";
}
</script>
% if(! ~ `{get_cookie theme} '') {
<link rel="stylesheet" href="/_werc/pub/%(`{get_cookie theme}%).css" type="text/css" media="screen, projection">
% }
Expand Down
13 changes: 13 additions & 0 deletions pub/style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,19 @@ nav ul li {
margin: 0;
border: 0;
}

@media only screen and (max-width : 600px) {
#search {
height: 3.75em;
}
#search-form .mdi {
margin-top: 0.75em;
}
#search-tags {
margin-top: 0.5em;
}
}

#main-copy {
margin: 0 auto;
border-left: none;
Expand Down
5 changes: 5 additions & 0 deletions pub/style/webkit.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@media only screen and (min-width : 601px) {
#search {
height: 3.75em;
}
}

0 comments on commit 556aa63

Please sign in to comment.