Add return buttons and the like to the Index.navLinks

We need to generate these now because the Index features always
will remove them.
This commit is contained in:
Zixaphir 2014-01-11 00:04:44 -07:00
parent 1900bbfa27
commit 3a76018fe4
6 changed files with 20 additions and 9 deletions

View File

@ -1,5 +1,5 @@
/* /*
* 4chan X - Version 1.3.0 - 2014-01-10 * 4chan X - Version 1.3.0 - 2014-01-11
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -82,6 +82,7 @@ Index =
$.on @pagelist, 'click', @cb.pageNav $.on @pagelist, 'click', @cb.pageNav
$.on @searchInput, 'input', @onSearchInput $.on @searchInput, 'input', @onSearchInput
$.on $('#index-search-clear', @navLinks), 'click', @clearSearch $.on $('#index-search-clear', @navLinks), 'click', @clearSearch
$.on $('#returnlink', @navLinks), 'click', Navigate.navigate
@update() if g.VIEW is 'index' @update() if g.VIEW is 'index'
$.asap (-> $('.board', doc) or d.readyState isnt 'loading'), -> $.asap (-> $('.board', doc) or d.readyState isnt 'loading'), ->

View File

@ -499,14 +499,20 @@ div.center:not(.ad-cnt) {
.summary { .summary {
text-decoration: none; text-decoration: none;
} }
.index #returnlink,
.index #bottomlink,
.thread #index-last-refresh, .thread #index-last-refresh,
.thread #index-search-clear, .thread #index-search-clear,
.thread #index-search { .thread #index-search {
display: none; display: none;
} }
#returnlink::before,
#bottomlink::before,
#index-last-refresh::before { #index-last-refresh::before {
content: '['; content: '[';
} }
#returnlink::after,
#bottomlink::after,
#index-last-refresh::after { #index-last-refresh::after {
content: ']'; content: ']';
} }

View File

@ -1,4 +1,6 @@
[<a href="./catalog">Catalog</a>]&nbsp; <a href=.././ id=returnlink>Return</a>
<time id="index-last-refresh" title="Last index refresh">...</time>&nbsp; [<a href=./catalog>Catalog</a>]
<a href="#bottom" id=bottomlink>Bottom</a>
<time id="index-last-refresh" title="Last index refresh">...</time>
<input type="search" id="index-search" class="field" placeholder="Search"> <input type="search" id="index-search" class="field" placeholder="Search">
<a id="index-search-clear" href="javascript:;" title="Clear search">×</a> <a id="index-search-clear" href="javascript:;" title="Clear search">×</a>