Merge branch 'master' of https://github.com/ewhal/nyaa
Cette révision appartient à :
révision
dcc8a8ad1c
5 fichiers modifiés avec 51 ajouts et 9 suppressions
|
@ -34,13 +34,14 @@ The provided unit file uses options directly; if you prefer a config file, do th
|
||||||
* Replace in the unit file the options by `-conf /etc/nyaa.conf`
|
* Replace in the unit file the options by `-conf /etc/nyaa.conf`
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
* RSS feeds(work in progress)
|
* adding new magnet links
|
||||||
* torrent sorting (work in progress)
|
|
||||||
* API improvement
|
* API improvement
|
||||||
|
* add rss link and generate link based on your current search
|
||||||
|
* make renchon the favicon and official mascot
|
||||||
|
* make sukebei db schema compatible with current code
|
||||||
|
* comments in torrent view page
|
||||||
* Site theme
|
* Site theme
|
||||||
* Torrent view and description page(work in progress)
|
|
||||||
* accounts?
|
* accounts?
|
||||||
* Adding new torrents
|
|
||||||
* scraping
|
* scraping
|
||||||
* Daily DB dumps
|
* Daily DB dumps
|
||||||
* p2p sync of dbs?
|
* p2p sync of dbs?
|
||||||
|
|
|
@ -16,7 +16,7 @@ nav#mainmenu {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
color: white;
|
color: white;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 3;
|
z-index: 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav#mainmenu a {
|
nav#mainmenu a {
|
||||||
|
@ -72,6 +72,11 @@ a {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table > tbody > tr > td {
|
||||||
|
/* fix bootstrap uglyness */
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
div.container div.blockBody:nth-of-type(2) table{table-layout:fixed;}
|
div.container div.blockBody:nth-of-type(2) table{table-layout:fixed;}
|
||||||
div.container div.blockBody:nth-of-type(2) table tr:first-of-type th:first-of-type, div.container div.blockBody:nth-of-type(2) table tr:first-of-type th:nth-of-type(5){width:10%;}
|
div.container div.blockBody:nth-of-type(2) table tr:first-of-type th:first-of-type, div.container div.blockBody:nth-of-type(2) table tr:first-of-type th:nth-of-type(5){width:10%;}
|
||||||
div.container div.blockBody:nth-of-type(2) table tr:first-of-type th:nth-of-type(3){width:15%;}
|
div.container div.blockBody:nth-of-type(2) table tr:first-of-type th:nth-of-type(3){width:15%;}
|
||||||
|
|
40
js/main.js
40
js/main.js
|
@ -22,12 +22,18 @@
|
||||||
var maxId = 5;
|
var maxId = 5;
|
||||||
for (var i = 0; i < maxId; i++) {
|
for (var i = 0; i < maxId; i++) {
|
||||||
var el = document.getElementById('page-' + i), n = prev + i;
|
var el = document.getElementById('page-' + i), n = prev + i;
|
||||||
|
if (el == null)
|
||||||
|
continue;
|
||||||
el.href = pageString + n + query;
|
el.href = pageString + n + query;
|
||||||
el.innerHTML = n;
|
el.innerHTML = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById('page-next').href = pageString + next + query;
|
var e = document.getElementById('page-next');
|
||||||
document.getElementById('page-prev').href = pageString + prev + query;
|
if (e != null)
|
||||||
|
e.href = pageString + next + query;
|
||||||
|
var e = document.getElementById('page-prev');
|
||||||
|
if (e != null)
|
||||||
|
e.href = pageString + prev + query;
|
||||||
|
|
||||||
// Used by spoiler tags
|
// Used by spoiler tags
|
||||||
function toggleLayer(elem) {
|
function toggleLayer(elem) {
|
||||||
|
@ -36,3 +42,33 @@ function toggleLayer(elem) {
|
||||||
else
|
else
|
||||||
elem.classList.add("hide");
|
elem.classList.add("hide");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function formatDate(date) { // thanks stackoverflow
|
||||||
|
var monthNames = [
|
||||||
|
"January", "February", "March",
|
||||||
|
"April", "May", "June", "July",
|
||||||
|
"August", "September", "October",
|
||||||
|
"November", "December"
|
||||||
|
];
|
||||||
|
|
||||||
|
var day = date.getDate();
|
||||||
|
var monthIndex = date.getMonth();
|
||||||
|
var year = date.getFullYear();
|
||||||
|
|
||||||
|
return day + ' ' + monthNames[monthIndex] + ' ' + year;
|
||||||
|
}
|
||||||
|
|
||||||
|
var list = document.getElementsByClassName("date-short");
|
||||||
|
for(var i in list) {
|
||||||
|
var e = list[i];
|
||||||
|
e.title = e.innerText;
|
||||||
|
e.innerText = formatDate(new Date(e.innerText));
|
||||||
|
}
|
||||||
|
|
||||||
|
var list = document.getElementsByClassName("date-full");
|
||||||
|
for(var i in list) {
|
||||||
|
var e = list[i];
|
||||||
|
e.title = e.innerText;
|
||||||
|
var date = new Date(e.innerText);
|
||||||
|
e.innerText = date.toDateString() + " " + date.toLocaleTimeString();
|
||||||
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
{{.Name}}
|
{{.Name}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="date">{{.Date}}</td>
|
<td class="date date-short">{{.Date}}</td>
|
||||||
<td class="filesize">{{.Filesize}}</td>
|
<td class="filesize">{{.Filesize}}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{.Magnet}}" target="_blank" title="Magnet link">
|
<a href="{{.Magnet}}" target="_blank" title="Magnet link">
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Date</td>
|
<td>Date</td>
|
||||||
<td>{{.Date}}</td>
|
<td class="date-full">{{.Date}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>FileSize</td>
|
<td>FileSize</td>
|
||||||
|
|
Référencer dans un nouveau ticket