diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-12-11 01:45:57 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-12-11 01:45:57 +0100 |
| commit | 6702125f12820c504ae18114f99fee3e13b2616f (patch) | |
| tree | f775b3d409951e1078547d380fc87a2da69cddb5 | |
| parent | 7b6a999eb2ae4ade37acd045cf8f806b4021d4c1 (diff) | |
moreeeeee styling
| -rw-r--r-- | public/assets/css/bucky.css | 11 | ||||
| -rw-r--r-- | public/assets/js/lib/views/details/comments.js | 3 | ||||
| -rw-r--r-- | public/assets/js/lib/views/index/index.js | 1 | ||||
| -rw-r--r-- | public/assets/js/lib/views/search/results.js | 4 | ||||
| -rw-r--r-- | views/pages/index.ejs | 9 | ||||
| -rw-r--r-- | views/pages/search.ejs | 2 | ||||
| -rw-r--r-- | views/partials/comments.ejs | 11 | ||||
| -rw-r--r-- | views/partials/searchform.ejs | 6 | ||||
| -rw-r--r-- | views/partials/threads.ejs | 5 |
9 files changed, 28 insertions, 24 deletions
diff --git a/public/assets/css/bucky.css b/public/assets/css/bucky.css index 9bce371..fbac5f3 100644 --- a/public/assets/css/bucky.css +++ b/public/assets/css/bucky.css @@ -105,6 +105,7 @@ table, tr { #content { width: -webkit-calc(100% - 310px); width: calc(100% - 310px); + max-width: 814px; } #content .ledger { @@ -167,6 +168,7 @@ table, tr { padding-right: 4px; line-height: 15px; padding-top: 10px; + padding-bottom: 4px; } #threads .keyword:first-child td { padding-top: 5px; @@ -579,6 +581,11 @@ code br { } #search .next_page { font-size: 14px; + display: block; + padding: 10px; +} +#search_form { + margin-bottom: 10px; } #search_form .button { background-image: url("data:image/svg+xml,%3C%3Fxml version=%221.0%22 encoding=%22UTF-8%22%3F%3E%0A%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%2213%22%3E%0A%09%3Cg fill=%22none%22 stroke=%22%2354595d%22 stroke-width=%222%22%3E%0A%09%09%3Cpath d=%22M11.29 11.71l-4-4%22/%3E%0A%09%09%3Ccircle cx=%225%22 cy=%225%22 r=%224%22/%3E%0A%09%3C/g%3E%0A%3C/svg%3E%0A"); @@ -593,13 +600,13 @@ code br { border-top: 0; border-left: 0; border-right: 0; - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #888; padding-bottom: 3px; font-size: 14px; font-family: 'Trebuchet MS', sans-serif; background: transparent; outline: 0; - width: 300px; + width: 270px; } #search_form input[type='text']:focus { border-bottom: 1px solid #211; diff --git a/public/assets/js/lib/views/details/comments.js b/public/assets/js/lib/views/details/comments.js index 4bd2eb7..c031efc 100644 --- a/public/assets/js/lib/views/details/comments.js +++ b/public/assets/js/lib/views/details/comments.js @@ -10,6 +10,7 @@ var CommentsView = FormView.extend({ initialize: function(){ this.__super__.initialize.call(this) this.template = this.$(".template").html() + this.$formRow = this.$("#comment_form") }, load: function(comments){ @@ -33,7 +34,7 @@ var CommentsView = FormView.extend({ appendComment: function(comment){ var $el = $( this.parse(comment) ) - this.$el.append($el) + $el.insertBefore(this.$formRow) }, success: function(){ diff --git a/public/assets/js/lib/views/index/index.js b/public/assets/js/lib/views/index/index.js index c4d1330..840f150 100644 --- a/public/assets/js/lib/views/index/index.js +++ b/public/assets/js/lib/views/index/index.js @@ -22,6 +22,7 @@ var IndexView = View.extend({ this.hootbox.load(data.hootbox) this.threadbox.load(data) this.lastlog.load(data.lastlog) + $("#search_form input").focus() }, success: function(){ diff --git a/public/assets/js/lib/views/search/results.js b/public/assets/js/lib/views/search/results.js index 2c992e7..516f10d 100644 --- a/public/assets/js/lib/views/search/results.js +++ b/public/assets/js/lib/views/search/results.js @@ -33,7 +33,7 @@ var SearchResults = View.extend({ start: res.meta.start + res.meta.limit, limit: res.meta.limit, } - this.$(".next_page").toggle(res.meta.start + res.meta.limit > res.meta.count) + this.$(".next_page").toggle(res.meta.next < res.meta.total) this.$(".next_page").attr("href", querystring(next_page)) res.results.forEach((result) => { if (! result.thread) { @@ -70,7 +70,7 @@ function bold_terms (s, terms) { return s } function querystring(opt){ - var s = Object.keys(opt).map((key) => { + return '?' + Object.keys(opt).map((key) => { return encodeURIComponent(key) + "=" + encodeURIComponent(opt[key]) }).join("&") } diff --git a/views/pages/index.ejs b/views/pages/index.ejs index ea9236a..0dd5cdd 100644 --- a/views/pages/index.ejs +++ b/views/pages/index.ejs @@ -1,18 +1,11 @@ <% include ../partials/header %> <div id="content"> - <% include ../partials/searchform %> <% include ../partials/threads %> </div> <div id="sidebar"> - <div class="bluebox"> - <b><big>welcome to bucky</big></b> - <a href="/mail">Inbox</a> | - <a href="/profile">Profile</a> | - <a href="/logout">Logout</a> - </div> - + <% include ../partials/searchform %> <span class="lastlog bluebox"> <script class="template" type="text/html"> <a href="/profile/{{username}}">{{username}}</a> diff --git a/views/pages/search.ejs b/views/pages/search.ejs index 3ee3f8e..6994876 100644 --- a/views/pages/search.ejs +++ b/views/pages/search.ejs @@ -35,7 +35,7 @@ </script> </div> - <a class="next_page" href="">Next page</a> + <a class="next_page" href="">Next page →</a> </div> </div> diff --git a/views/partials/comments.ejs b/views/partials/comments.ejs index 14bb9bf..936e487 100644 --- a/views/partials/comments.ejs +++ b/views/partials/comments.ejs @@ -20,13 +20,12 @@ </td> </tr> </script> -</table> -<table id="comment_form"> - <tr> - <td> + <tr id="comment_form"> + <td></td> + <td colspan="2"> <form> - <textarea required name="comment" placeholder="Enter your comment"></textarea> + <textarea required name="comment" placeholder="Add a comment"></textarea> <div class="inputs"> <input name="files" type="file" multiple> <input type="submit" value="POST" /> @@ -35,4 +34,4 @@ </form> </td> </tr> -</table>
\ No newline at end of file +</table> diff --git a/views/partials/searchform.ejs b/views/partials/searchform.ejs index be4bd97..c3b07e1 100644 --- a/views/partials/searchform.ejs +++ b/views/partials/searchform.ejs @@ -1,4 +1,4 @@ -<form id="search_form" action="/search" method="get" style="margin: 10px;"> +<form id="search_form" action="/search" method="get"> <div class='button'></div> - <input type="text" name="query" autofocus> -</form> + <input type="text" name="query"> +</form>
\ No newline at end of file diff --git a/views/partials/threads.ejs b/views/partials/threads.ejs index 9711eff..be3e458 100644 --- a/views/partials/threads.ejs +++ b/views/partials/threads.ejs @@ -7,7 +7,10 @@ <b><i>the latest</i></b> · </td> <td> - <a href="/post/">Start a new thread!</a> + <a href="/post/">Start a new thread!</a> | + <a href="/mail">Inbox</a> | + <a href="/profile">Profile</a> | + <a href="/logout">Logout</a> </td> </tr> </script> |
