Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0
Graphe des révisions

1124 Révisions

Auteur SHA1 Message Date
kilo dd94402f04
Fixes & improvements (#1684)
* Update main.css

* Update torrent_item.jet.html

* Update main.js

* Update torrent_item.jet.html

* Update main.js

* Update main.js

* Update main.js

* Update main.js

* Update main.js

* Update template_functions_test.go

* Update template_functions_test.go

* Update user.go

* Update profile.jet.html

* Update view.jet.html

* Update template_functions.go

* Update en-us.all.json

* Add files via upload

* Update CHANGELOG.md

* Update main.css

* Update template_functions.go

* Add files via upload

* Update en-us.all.json

* Update template_functions_test.go

* Update view.jet.html

* Update main.css

* Update ja-jp.all.json

* Update main.css

* Update edit.jet.html

* Update main.css

* Update tomorrow.css

* Update ja-jp.all.json

* Update main.css

* Update view.jet.html

* Update comment.go

* Update create.go

* Update classic.css

* Make GetOldNavFromRequest return true by default

* Update view.jet.html

* Force torrent date in UTC+0 timezone during display

* ditto

* Update ja-jp.all.json

* Update oldNav.jet.html

* Update structs.go

* Update default_config.yml

* Update torrent.go

* Update stats.go

* Update stats.go

* Update user.go

* Update template_functions.go

* Update template_functions_test.go

* Update torrent.go

* Update comment.go

* Update view.jet.html

* Update main.css

* Update user.go

* Update template_functions.go

* Update profile.jet.html

* Update main.js
2017-10-28 18:28:59 +02:00
MMP0 901c933632 Improve date formatting (#1693)
* Update main.js

* Update base.jet.html

* Update CHANGELOG.md

* Update en-us.all.json

* Update ja-jp.all.json

* Update main.js
2017-10-28 17:01:56 +02:00
akuma06 b2b48f61b0 Torrent Generation on not found error (#1600)
* [WIP] Torrent Generation on not found error
As asked in #1517, it allows on-the-fly torrent generation. Since it uses magnet links, it needs some time to connect to peers. So it can't be instant generation, we need the user to wait and try after a minute at least.

* Replace Fatal by simple error

* attempt at fixing travis

* del

* Add Anacrolyx dependency

* Add back difflib

* Remove .torrent suffix in the url example

* Add some explanations when file missing page shown

* Ignore downloads directory

* Either use cache (third-party site) or own download directory

* Wrong import

* If there is an error then it means we aren't generating a torrent file

May it be "torrent not found" or "We do not store torrent files" which are the two only existing errors for this page

* hash is never empty

* TorrentLink may be empty at times

So we add a /download/:hash link if it is

* Update README.md

* Made a mistake here, need to check if false

* Update en-us.all.json

* Update CHANGELOG.md

* Torrent file generation can be triggered by click on button if JS enabled

* Update download.go

* Update download.go

* Use c.JSON instead of text/template

* Return to default behavior if we don't generate the file

* Don't do the query if returned to default behavior

* Add "Could not generate torrent file" error

* Fix JS condition & lower delay until button updates

* Start download automatically once torrent file is generated

* Fix torrentFileExists() constantly returning false if external torrent download URL

* torrent-view-data is two tables instead of one

This allows the removal of useless things without any problem (e.g Website link), but also a better responsibe design since the previous one separated stats after a certain res looking very wonky

* CSS changes to go along

* Remove useless <b></b>

* Update main.css

* In torrentFileExists, check if filestorage path exists instead of looking at the domain in torrent link

When checking if the file is stored on another server i used to simply check if the domain name was inside the torrent link, but we can straight up check for filestorage length

* Fix JS of on-demand stat fetching

* ScrapeAge variable accessible through view.jet.html

Contains last scraped time in hours, is at -1 is torrent has never been scraped
Stats will get updated if it's either at -1 or above 1460 (2 months old)

* Refresh stats if older than two months OR unknown and older than 24h

Show last scraped date even if stats are unknown

* Add StatsObsolete variable to torrent

Indicating if:
- They can be shown
- They need to be updated

* Update scraped data even if Unknown, prevent users from trying to fetch stats every seconds

* Torrent file stored locally by default

* no need to do all of that if no filestorage

* fix filestorage path

* Fix torrent download button stuck on "Generating torrent file" at rare times

* fix some css rules that didn't work on IE

* Fix panic error

Seems like this error is a known bug from  anacrolyx torrent https://github.com/anacrolix/torrent/issues/83

To prevent it, I'm creating a single client and modifying the socket.go to make it not raise a panic but a simple error log.
2017-10-21 09:40:43 +02:00
akuma06 33c83030b9 Fix Api documetation (#1685)
* Fix Api documetation

Fix #1682
* Remove unused SubCategory field from struct TorrentRequest
* Change `category` argument in documentation to correct `c` (same key as the one in Search)

* Apidoc generation

* Remove SubCategory from template_test's torrentValidator

* Update template_test.go
2017-10-18 22:27:55 +02:00
kilo 40b90f1739 Update index_site.jet.html (#1681)
* Update index_site.jet.html

* Update classic.css
2017-10-18 19:38:21 +10:00
kilo 8a8137fd58 Make old navigation use user torrent search route when needed (#1678)
* Update template_functions.go

* Update listing.jet.html

* Update oldNav.jet.html

* Update template_functions_test.go

* Update template_functions_test.go

* Update view.jet.html

* Update torrent.go
2017-10-18 05:46:58 +02:00
kilo c791e3bc08 Show refine constantly in no results page (#1675)
* Update search.jet.html

* show refine constantly in "no results" page

* no results page is now a box

* remove useless class
2017-10-16 19:52:36 +10:00
kilo a4ea57e771 Update last-scraped date on view even if stats.go return unknown stats & other things (#1673)
* Update view.jet.html

* reduce the time limit of how fast stats.go is supposed to be called

* Update router.go

* add subcategory display in old navigation

* css to go along

* remove useless variable

* Update oldNav.jet.html

* fix travis

* fix missing css line that had user search input & link way wider than they should've been

* "See more torrents from" now make use of user torrent search route

* remove useless variable

* use stat obsolete variable in listing instead of checking the date
2017-10-16 17:03:18 +10:00
kilo bc580942e7 fix display of user search in firefox & IE (#1669)
* fix display of user search in firefox & IE

* remove '

* fix display of user search's search button on user search page search search search search

* remove '
2017-10-15 14:55:22 +02:00
kilo 1ec2a77974 fix wrong translation string being used on user edit page for mods & improve stats.go (#1665)
* fix wrong translation string being used on user edit page for mods

* fix css rule that did not apply

* fix error in stats.go

* stats.go scrapes default trackers if torrent has no tracker

* remove useless thing

* change behavior of right arrow in page list (now goes to latest page)

* fix { too much

* Update view.jet.html

* Update view.jet.html

* pin user search input & link at the bottom of user page

* HTML to go along
2017-10-15 13:18:57 +02:00
kilo 61d1aa4195 Different color for cookie warning on sukebei (g.css) & copy pasting improvements from another PR (#1660)
* Different color for cookie warning on sukebei

* Copy paste improvement from another PR since it's going to take time until it's complete

* ditto

* ditto

* ditto

* Update main.css

* JS fallback for /settings page on mirrors

* Update main.js

* Update settings.jet.html
2017-10-15 15:31:05 +10:00
akuma06 d3e50b8ffd Fix User delete button (#1662)
* Fix User delete button

Fix #1652
This bug comes from the fact that @kiloutre edited how the form behave and instead of a GET request, do a POST one. However every POST request not in /api or /mod need a CSRF Token to work.

* Update userlist.jet.html

* Update index.jet.html
2017-10-15 01:34:45 +02:00
kilo ba058ec3e1 Prevent session cookie from existing on .pantsu.cat & other things (#1658)
* Update user.go

* Update main.css

* add comment

* fix JS function that did not  behave as intended

* Update classic.css

* Update classic.css

* Update search.jet.html

* Update en-us.all.json

* Update site.jet.html

* Update router.go

* Update search.go

* Update helpers.go

* Update search.go
2017-10-14 11:16:34 +10:00
kilo 3c06b0fc5c Small design fixes (#1657)
* Update main.css

* Update main.css

* fix inline display of delete button

* Update main.css

* Update torrentlist.jet.html

* Update torrent_report.jet.html

* Update torrentlist.jet.html

* Update announcements.jet.html

* Update announcements.jet.html

* Update user.go

* Update tomorrow.css

* Update tomorrow.css
2017-10-12 21:13:04 +02:00
kilo bde8ff4f49 Fix invalid comment date when JS is enabled, wrong url in an admin torrent list link, malformed pubDate for RSS feed (#1654)
* Fix invalid comment date when JS is enabled

* fix travis

* fix wrong url in admin torrent list

* Fix wrong pubDate for /feed

* Different function name

* same changes as rss for magnet rss

* travis test

* fix delete button on torrent view

* Update edit.jet.html

* Update index.jet.html

* Update userlist.jet.html

* Update torrentlist.jet.html
2017-10-12 17:53:04 +02:00
kilo 941aceb9b0 Small changes (#1653)
* Update tomorrow.css

* Update main.css

* Update main.css

* fix invalid date of torrents in user profile

* modify fancy js to work with new form

* enhance fancy JS to adapt to every form

* Update index.jet.html

* Update index_admin.jet.html

* Update torrentlist.jet.html

* what the fuck

* ditto

* forgot to remove the debug alert
2017-10-12 12:22:44 +10:00
kilo 83540ad31c Fix a condition that didn't behave as intended (#1651)
* Update profile.go

* Update router.go

* Update torrents.go

* Update router.go

* Update announcements.go

* Update comments.go

* Update oauth.go

* Update reports.go

* Update router.go

* Update index.jet.html

* Update torrentlist.jet.html

* Update commentlist.jet.html

* Update announcements.jet.html

* Update clientlist.jet.html

* Update torrent_report.jet.html

* Update userlist.jet.html

* Update userlist.jet.html

* Update userlist.jet.html

* Update edit.jet.html

* Update delete.go

* Update edit.jet.html

* Update index.jet.html

* Update profile.go

* Update router.go

* Update profile.go

* Update edit.jet.html

* Update userlist.jet.html

* Update index.jet.html

* remove hotfix that didn't even hit live
2017-10-12 02:54:01 +02:00
kilo 0f83b95625 fix image display in comments (#1650)
* fix image display in comments

* Update main.css

* temporary ghetto fix

* Update view.jet.html
2017-10-12 01:26:43 +02:00
kilo c7869fd4fc fancy JS to delete comments faster (#1649) 2017-10-11 19:18:00 +02:00
kilo 2044a3c98a bottom margin for comment avatar & other small things (#1646)
* bottom margin for comment avatar

* Resetting API key now redirects you back to edit page

* move important faq things up in the faq

* Add div as high as header instead of top margin for #content

* Fix modtools showing behind ad

* No margin-top for body

* add functions that will be used in the future to file.go

* Update create.go

* fix css rule that didn't apply

* Fix some JS of upload form that kept shitting out errors since i updated the upload form

* Update upload.jet.html

* fix duplicate id on a form

* Fix very very slightly misaligned input

* fix html error on filelist

* Add FullDate variable to torrents

* Create Go function that returns an user-friendly date when fed a go date

* akuma must hate me for butchering the template_functions_test file

* Make use of said function in view.jet.html

* Forgot to vars.set the function

* Remove useless title

* Make use of function in listing

* modify JS to fetch full date from title instead of innerText

* Fix title date & two functions looping on non-existing objects

* Show full dates in an AM/PM format like on live

* Torrent dates on UTC+0 by default
2017-10-11 03:24:09 +02:00
kilo bad9285eb4 "No API token" message if no API token, small changes (#1644)
* No API token message if no API token

* Update CHANGELOG.md

* Update en-us.all.json

* move delete user button to the right

* prettier button hovering text color [tomorrow]

* Update en-us.all.json

* use of translation strings for certain themes

* ditto

* Remove hardcoded theme name, make use of translation strings in function if it exist

* Update template_functions_test.go

* Update template_functions_test.go

* Update template_functions.go

* fix travis

* remove useless condition
2017-10-10 02:33:38 +02:00
kilo 10a70e16c9 remove bad inline styling (#1643) 2017-10-07 17:45:43 +02:00
kilo 88904bade9 Medium changes (#1642)
* lower top margin for comment usernames & avatar

* Update classic.css

* temporary workaround to hide quadrupled comments

* Update view.jet.html

* Add "search from user" input below user rss link, change styling of follow button to fit other links

* all into the same div

* Remove padding of usersearch input in panel, remove useless css rule

* min-width for user buttons, max-width for the input

* Don't show "search from this user" if it's your profile

* remove max-width when responsive userprofile kicks in

* remove useless css rule

* Update view.jet.html

* le fix

* optimize stats.go a bit and add comments

* Update stats.go

* Update template_functions_test.go

* Update template_functions.go

* Remove hardcoded theme list, generate dynamically

* ditto

* Add possibility of forcing a theme for everyone

* in the .yml config file

* Make it ignore both user settings and cookies

* add forced theme in default theme config struct

* Update publicSettings.go

* fix missing , & travis

* Update template_functions_test.go

* Update main.css

* fix travis

* Update template_functions_test.go

* travis
2017-10-07 01:39:38 +02:00
kilo 67d8492380 On-demand stats fetching (#1621)
* Update view.jet.html

* Update router.go

* Create stats.go

* Update view.jet.html

* Update stats.go

* Update stats.go

* rollback

* returns -1 by default

* Update stats.go

* Update stats.go

* Import goscrape & torrent

* copypaste stats.go from scrapers

* travis

* Update stats.go

* Update stats.go

* Put fresh stats into a <span>

* Background-color for freshly fetched stats

* ditto but for tomorrow

* "Loading..." text in case it gets a bit too long

* Stat fetching in controller (missing DB update)

* Update last scraped date too

* update torrent.Scrape tho it doesn't  do anything

* forgot to edit a name

* Update scrape.go

* Update stats.go

* Update stats.go

* flush cache to update stats in listing

* Change function name

* Update stats.go

* Update stats.go

* fix travis

* Update view.jet.html

* Update stats.go

* Update stats.go

* Update stats.go

* Update stats.go

* Update stats.go
2017-10-06 17:06:14 +02:00
kilo 4570ad5d06 Fix cookie warning constantly showing & JS cookies on mirror (#1641)
* Fix cookie warning constantly showing on mirrors, fix JS cookies on mirrors

* space mirrors links on faq

* Update base.jet.html

* Update base.jet.html
2017-10-06 16:33:22 +02:00
kilo 5496d6e19d Lower amount of torrents shown in user profile from 20 to 15, user not found page (#1631)
* Lower amount of torrents shown in user profile

* Additional routes for user search

* Handler for user not found page

* User not found error page, with input to search username

* Move theme css in their own folder

* Delete g.css

* Delete classic.css

* Delete classic_colors.css

* Delete tomorrow.css

* Delete bg-body.png

* Delete bg-header-tile.png

* Delete s_bg-header-tile.png

* Change path used by stylesheet in html head

* Change theme path used by JS theme changers

* Update user_not_found.jet.html

* Update CHANGELOG.md

* Update en-us.all.json

* fix ad scrolling

* remove useless stuff

* fix travis & json file

* fix travis again

* remove duplicate

* Update CHANGELOG.md

* Writing an username instead of an userid in userprofile URL will no longer return the Anonymous profile

* redirect to username search instead of rendering a template without checking if username exists
2017-10-04 15:46:06 +02:00
kilo 7273156007 Add RSS link on userprofile, "Search from this user" input, route changes, other changes (#1630)
* Styling for new "Search from user" input in profile

* new "Search from this user" input

* Add RSS link on user profile

* fix rss icon being misaligned

* start comment count at 1 instead of 0

* fix misalignement of category in refine in japanese

* Add new routes for user search

* Update torrents.jet.html

* add translation string

* Update en-us.all.json

* Update CHANGELOG.md

* remove margin-right of torrent button icon

* Add /username/XXX/Search route

* /username/XXX route doesn't redirect anymore
2017-10-03 01:44:33 +02:00
kilo e49dd1a7b9 Small changes (#1627)
* Change probability of which ad shows up

* Fix missing line break in FAQ

* remove now useless thing

* Fix torrent auto-updating script
2017-10-02 18:13:54 +02:00
kilo 30517b314e Remove useles </div> (i think) & some JS cookie path stuff (#1626)
* Remove useles </div>

* Delete cookie both for current path and general path
2017-10-02 17:59:35 +02:00
kilo 975ae06b7c Fixes (#1625)
* Update ad.jet.html

* Update main.js

* Update publicSettings.go

* move inputs

* Update ad.jet.html
2017-09-30 16:05:09 +02:00
kilo d6c030d9e6 [WIP] Anidex, TT & Nyaa.si uploading (#1604)
* Update main.css

* Update tomorrow.css

* Create upload_multiple.jet.html

* Create upload.js

* Update upload.jet.html

* Update upload.jet.html

* Update upload.jet.html

* Update tomorrow.css

* Update main.css

* Update tomorrow.css

* Update main.css

* Update user.go

* Update template_test.go

* Update main.css

* Update upload.jet.html

* Update edit.jet.html

* Update template_test.go

* Update upload.jet.html

* Update main.css

* new design for user edit

* Fix CRSF token

* Update upload_multiple.jet.html

* Update upload.jet.html

* Update profile.jet.html

* Update base.jet.html

* Update edit.jet.html

* Update forms.go

* Update forms_test.go

* Update forms_test.go

* Update forms.go

* Update forms_test.go

* Update main.css

* Fix 4+ torrent flags display on IE

* Fix userprofile buttons on IE, remove fancy css

* Fix torrent link being hidden on IE

* Update listing.jet.html

* Update main.css

* Update listing.jet.html

* Delete torrent_item_upload.jet.html

* Update torrent_item.jet.html

* Update main.css

* Update classic.css

* Update listing.jet.html

* Update classic.css

* Update profile.jet.html

* Update upload.jet.html

* Update classic.css

* Update classic.css

* Update main.css

* Update user.go

* Update upload.jet.html

* Update upload.jet.html

* Update edit.jet.html

* Update template_test.go

* Update forms.go

* Update forms_test.go

* Update main.css

* Update classic.css

* checkboxes next to language div

* wooo responsive checkboxes

* remove empty space

* need an !important here

* Fix flags being unaligned on IE

* Fix some inputs being too big on classic.css, remove fancy shit

* Update classic.css

* fix travis

* Update main.css

* Update upload.jet.html

* Update edit.jet.html
2017-09-30 15:10:47 +02:00
kilo 9fcd597cbc Remove useless class & add onions in faq (#1612)
* Remove useless class

* add onions to faq

* Fix complement tag JS thinking you submitted the form when cancelling the modal

* Update classic.css

* Update publicSettings.go

* Update template.go

* Update template_test.go

* remove OwO

* ditto

* Update view.jet.html

* fix website link / torrent hash not always being shown fully below 810px

* Update publicSettings.go

* Remove now useless cookie creation line

* Fix few IE-specific bugs

* Update ad.jet.html

* Update base.jet.html

* Delete Games_300x250.jpg

* Delete Onahole_300x250.jpg

* Delete Touhou_300x250.jpg

* Delete Touhou_728x90.jpg

* Delete Games_728x90.jpg

* Delete Snacks_300x250.jpg

* Delete Snacks_728x90.jpg

* Delete Onahole_728x90.jpg

* Update main.css

* Update main.css

* Update listing.jet.html
2017-09-30 14:50:54 +02:00
MMP0 9eed725f1d Update oldNav.jet.html (#1616) 2017-09-24 10:41:19 +02:00
MMP0 d6f6ed5c29 Add translation (#1615)
* Update ja-jp.all.json

* Update edit.jet.html

* Update edit.jet.html

* Update settings.jet.html

* Update view.jet.html

* Update CHANGELOG.md

* Update en-us.all.json

* Update ja-jp.all.json

* Update oldNav.jet.html

* Update en-us.all.json
2017-09-24 09:59:27 +02:00
kilo 6ca8ffe5fc Default & dark theme set in .yml (#1610)
* Update default_config.yml

* Update publicSettings.go

* Update base.jet.html

* Update config.go

* Update structs.go

* Update base.jet.html

* Update base.jet.html

* Update main.js

* Update base.jet.html

* Update base.jet.html

* Update publicSettings.go

* Update template.go

* Update template_test.go

* Update template.go

* Update classic.css

* allow user profile URl to contain just ID

* Update router.go

* Add nyaa.pt to mirrors

* Update main.js

* Update main.js

* Add /username/:username userprofile route

* Update profile.go
2017-09-22 14:54:19 +10:00
kilo cd128df436 s (#1606)
* Update template_functions.go

* Update template_functions.go

* Update main.js

* remove useless condition

* Update main.js

* Fix login on nyaa -> log off sukebei issue

* Update user.go

* Update main.js
2017-09-21 14:18:55 +10:00
kilo 6cdab6cbc9 Forgot to close a <a> (#1603) 2017-09-20 11:26:04 +10:00
kilo f3881734e2 Make sukebei have all ads PLUS onahole instead of only onahole (#1598)
* Update ad.jet.html

* Update base.jet.html

* Update template_functions.go

* Update template_functions_test.go

* Update ad.jet.html
2017-09-20 09:59:17 +10:00
kilo 7264ab0d0a Small fixes (#1593)
* Update torrent_file_missing.jet.html

* Update en-us.all.json

* Update CHANGELOG.md

* Update main.css

* Update upload.jet.html

* Remove unused refine inputs from URL when doing a refine search

* fix cookie warning not showing up
2017-09-19 10:00:30 +10:00
kilo 33e90093b7 2px (#1587)
* 2px

* remove useless css rule

* Forgot path=/; in resetCookie()

* forgot a max-width

* Update base.jet.html

* resetCookies() now also triggered by mismatching website version
2017-09-18 14:20:25 +10:00
kilo e1f6a97a86 Ad design changes (#1581)
* Update main.css

* Update classic.css

* Update base.jet.html

* Update classic.css

* Update main.css

* Update base.jet.html

* Update upload.jet.html
2017-09-18 11:24:08 +10:00
kilo 216d241143 alt attribute for ads images, fix missing tags on upload, fix wrong name for translation string (#1577)
* alt attribute for ads images

* fix <tr> too much

* fix missing <tr> that created HTML error

* fix wrong translation string name

* ditto

* fix accepted tags not having background on classic

* Put tag table inside upload table

* Update classic.css

* Remove prefix of dlsite tag on view

* Update main.css

* 10px bigger website

* fix wrong css selector

* fix markdown scroll visually broken in classic.css

* Add magnet link on torrent file not found page

* don't show magnet <a> if empty

* Fetch magnet link in download.go and pass it on to torrent_file_missing

* add magnet in template_test
2017-09-18 10:15:39 +10:00
kilo 43fd3e8956 Sync JS cookies & Go cookies's domain & random other things (#1571)
* create JS domain variable

* use domain JS variable when creating cookies

* Create getDomainName() function in Go

* Update template_functions_test.go

* Update template_functions_test.go

* recreate cookie when resetCookies() is called

* Update main.css

* Update classic.css

* show "unknown" instead of "0 0 0" if stats are unknown

* don't show top ad if there's an announcement

* remove BBCode support that broke description's line breaks

* remove useless identifier

* hide error instead of fixing it

* Update markdown_test.go

* Update markdown_test.go

* css for tags in classic

* remove wrong explanation for alternating color

* fix RSS URL in header

* remove eu cookie <div> from base

* fix cookie warning never showing up

* Update main.js

* nyaa.se-like styling for upload form on classic.css

* Smaller markdown toolbar on classic upload form

* Fix indent, non-round borders for markdown & language list on classic

* Update view.jet.html

* add fillZero function

* ditto but in test

* Update view.jet.html

* add RJ prefix to dlsite link

* Update template_functions_test.go

* Update listing.jet.html

* prevent responsiveness of upload form in classic.css

* remove now useless css rule

* fix tag input padding on classic

* Update template_functions_test.go

* rollback workaround

* rollback workaround

* rollback workaround

* remove now unused function

* ditto

* Update main.css
2017-09-17 22:10:43 +02:00
akuma06 421935f8be Change DLSite to String (#1576)
* Change DLSite to String

Fix #1573
Plus it seems the filtering search for ES didn't work for anidbid, vndbid and vgmdb. Should be fixed now.

* Update helpers.go
2017-09-17 21:27:20 +02:00
kilo cedbec3246 New design for upload form (#1574)
* CSS for new upload form

* add torrent_name in translation

* Update CHANGELOG.md

* New upload form HTML, don't load kilo.js

* Update upload.jet.html

* Update main.css

* change placeholder of torrent name input

* Update upload.jet.html

* remove useless function call from upload

* responsive upload form

* Fix description being constantly bold in upload

* fix vertical align of labels in upload

* upload tags inputs in table too

* tag table styling & remove old upload tag styling

* Update main.css

* Update main.css

* Update main.css

* Update upload.jet.html

* fix flag misalignement in upload form

* Remove rules <div> from upload, provide temporary link to rules in faq (maybe will turn into a modal in the future?), remove useless input

* bigger upload button & no margin for upload rules text

* Update en-us.all.json

* Update CHANGELOG.md

* add ID to rules div

* Update upload.jet.html
2017-09-17 20:30:58 +02:00
kilo 2ec6eaab9d fix sukebei condition (#1569)
* fix sukebei condition

* put top ad into a div
2017-09-16 09:39:14 +10:00
kilo 79b05a8a84 Fix visual artifact on pagination when it was empty (#1568)
* Update classic.css

* add classic colors in user edit

* Update main.css

* Update classic.css

* Update classic.css

* Update main.css

* Update classic.css
2017-09-15 11:48:30 +02:00
kilo 20456373e0 Update view.jet.html (#1565) 2017-09-15 11:37:24 +10:00
kilo 8d8bb5cf1f miao (#1563)
* Add files via upload

* Update main.css

* Create ad.jet.html

* add testRand function in template_test

* add rand function

* Update base.jet.html

* Update listing.jet.html

* Update classic.css

* import math/rand

* attempt at fixing travis

* Update template_functions_test.go

* Update template_functions_test.go

* Update classic.css

* Update ad.jet.html

* Update ad.jet.html

* Update main.css

* Update classic.css

* Update base.jet.html

* Update base.jet.html

* Update main.css

* Update base.jet.html

* Update main.css

* Update classic.css

* Update main.css

* Update classic.css

* Update classic.css

* forgot a max-width

* Update classic.css

* Add files via upload

* Add files via upload

* Update classic.css

* Update classic.css

* Update classic.css

* dont show in moderation pages
2017-09-15 10:57:32 +10:00
MMP0 b203af4c87 Update upload.jet.html (#1561) 2017-09-13 15:54:59 +02:00
kilo b0f4ea5e57 Change ul into div to remove html error (#1560)
* Change ul into div to remove html error

* remove useless attribute and useless tag

* Remove useless <p> tag
2017-09-13 14:20:30 +10:00
kilo 65772d8654 rollback the rollback (#1554)
* rollback the rollback

* fix classic.css padding

* remove </img> tag

* Update torrents.jet.html

* Fix html tag

* fix footer & ad showing over the TOS

* move setting & add it's explanation

* Update en-us.all.json

* include nav in listing directly instead of refine

* Update search.jet.html

* remove now useless css rules

* Update main.css

* Update base.jet.html

* exclude old navigation cookie from deletion

* add torrent uploaded total size to user profile
2017-09-12 15:03:26 +02:00
kilo 1b0211cfb9 Remove https for dlsite, fix few html errors, small css improvements (#1551)
* Remove https for dlsite

* Update listing.jet.html

* Update torrent_item.jet.html

* Update torrent_item_upload.jet.html

* Update torrents.jet.html

* remove role attribute

* remove role attribute

* login & register page styling

* website-nav stylisation for main.css

* remove now useless css rules

* up to date main.css

* OwO

* Update main.css

* Last stylisation changes for classic's nav

* margin-left

* add categories

* add TestgenSearchWithCategory to template_test

* add genSearchWithCategory function

* forgot to close the function call

* Update template_functions_test.go

* Update template_functions.go

* Update template_functions.go

* attempt at fixing template_functions

* Update template_functions.go
2017-09-12 00:17:35 +02:00
kilo 615ff10dc8 Fix some html errors (#1549)
* Remove useless / that created html error

* Slightly bigger font for torrent name on view.html, padding fixes

* Set kilo.js to look for span class name instead of name to remove HTML error

* Change span name into class to remove html errors

* remove name attribute

* remove link to user profile is Anon or invalid userid

* fix duplicate class attribute

* remove useless center, remove useless attribute, remove useless yield errors & bad name attribute

* turn name attribute into ID

* JS changes to go along

* fix travis

* Delete OldNav.jet.html

* Create oldNav.jet.html

* turn <li> into <span>

* Update classic.css

* Update main.css

* Update g.css

* Update tomorrow.css

* Update tomorrow.css

* Update classic_colors.css
2017-09-11 21:59:17 +02:00
kilo 870b72f1e9 "No comments" message, avatar in comments, classic theme improvements, some other changes, Old Navigation (#1545)
* Update view.jet.html

* Update en-us.all.json

* Update view.jet.html

* Update CHANGELOG.md

* fix travis

* Update classic.css

* Update view.jet.html

* Update main.css

* Update classic.css

* Update classic.css

* Update classic.css

* add link to user page & avatar in comment

* stylisation for avatar in main.css

* Update classic.css

* Fix wrongly placed ::before

* Add rule list to terms of service

* import rules on register

* fix refine-container-2's inputs

* Update base.jet.html

* Update en-us.all.json

* Update CHANGELOG.md

* GenNav changes to constantly put HTML for nav arrows regardless of page

* css changes for website nav etc etc

* add OldNav global variable

* Add OldNav to test.go

* Update publicSettings.go

* change OldNav's value type

* Old navigation in settings

* add OldNav in user variables

* add oldNav input handler in settings.go

* Change OldNav's default value into false

* Create OldNav.jet.html

* Update search.jet.html

* remove character that had nothing to do here

* fix wrong variable name

* fix worng variable name and travis

* Update classic.css

* Add sort order & type to old nav

* add toString() function in test

* add toString() function

* translation string for oldnav setting

* Use translation string in settings.jet.html

* fix few html errors

* ditto

* travis fix test

* remove useless charset

* remove useless things

* add spaces before attributes

* attempt at fixing travis 2

* fix wrong variable name

* Update classic.css

* fix travis plsss
2017-09-11 19:45:39 +02:00
kilo 83bd0165d1 Small css fix,, classic improvements & translation change (#1543)
* remove useless spacing

* spacing through CSS instead of HTML

* remove icon spacing on classic

* Update en-us.all.json

* Update classic.css

* Update classic.css
2017-09-10 22:53:34 +10:00
kilo d8a6837261 Update settings.jet.html 2017-09-09 15:01:40 +02:00
kilo c0059bdb09 Merge branch 'dev' into classic-theme 2017-09-09 14:09:08 +02:00
kilo f8112723f8 fix "torrent file button grayed out for old torrents (anicache.com link)" (#1542)
* add strfind function & check for pantsu.cat when checking torrent file exists

* test

* Update listing.jet.html

* Update view.jet.html

* Update torrents.jet.html

* Update template_functions_test.go
2017-09-09 14:05:51 +02:00
kilo 0fe6e8dc2a Update view.jet.html 2017-09-08 23:38:53 +02:00
kilo 2ef8739642 Update view.jet.html 2017-09-08 23:29:46 +02:00
kilo e9b0e21121 Update view.jet.html 2017-09-08 23:18:06 +02:00
kilo ad7ee377a1 Update search.jet.html 2017-09-08 21:53:08 +02:00
kilo c7fe32d867 remove useless spacing 2017-09-08 21:38:24 +02:00
kilo 3c5773df34 Update view.jet.html 2017-09-08 21:19:08 +02:00
kilo 79ab59b5f0 Update view.jet.html 2017-09-08 21:09:31 +02:00
kilo 59a690159f fix select value 2017-09-08 20:59:46 +02:00
kilo 31317c579a Merge branch 'dev' into classic-theme 2017-09-08 20:52:32 +02:00
kilo d1d4bf8e28 Remove hide ads options (#1536)
* Update base.jet.html

* Update settings.jet.html

* Update template.go

* Update publicSettings.go

* Update user.go

* Update settings.go

* Update main.js

* Update base.jet.html

* Update template_test.go

* Update en-us.all.json
2017-09-08 20:46:45 +02:00
kilo 5e3d88356f Update listing.jet.html 2017-09-08 20:34:39 +02:00
kilo 6be9d8eb72 Update listing.jet.html 2017-09-08 20:34:04 +02:00
kilo 6e937ed5d4 Update site.jet.html 2017-09-08 20:32:35 +02:00
kilo 611113c1f9 Update settings.jet.html 2017-09-08 20:32:07 +02:00
kilo 8c16fdf798 Update settings.jet.html 2017-09-08 20:31:58 +02:00
kilo c485801d79 Turn comment count into comment icon, add link to comments on comment icon (#1534) 2017-09-08 20:29:32 +02:00
kilo 548a0df333 (merge this second) (#1530)
* Update template_functions.go

* Update template_test.go

* Update admin.jet.html

* Update template_test.go

* right file

* Update template_functions_test.go

* forgot a }

* Update admin.jet.html

* Update template_functions_test.go

* Update template_functions.go

* Update template_functions.go
2017-09-08 23:08:12 +10:00
kilo 388e0e0622 (merge this first) small css improvements & small enhancements (#1529)
* Update main.css

* Update tomorrow.css

* Update listing.jet.html

* Update torrents.jet.html

* Update admin.jet.html
2017-09-08 13:03:17 +10:00
kilo cacbceb9e2 Move close button to upper right corner of cookie warning & styling adjustements (#1522)
* Move close button before to upper right corner of cookie warning

* Update index_admin.jet.html

* Update main.css

* Update tomorrow.css

* Update tomorrow.css

* Update main.css

* lighter background
2017-09-07 17:56:02 +02:00
kilo a0f12724de Show small box instead of nothing at the ads position if ads are blocked (#1527)
* Update main.css

* Update base.jet.html

* remove useless rule
2017-09-07 17:42:33 +02:00
kilo 5e0ef75b68 Fix top padding for admins (#1521)
* Update main.css

* Update base.jet.html

* Update index_admin.jet.html

* add content-admin back

* Add content-admin back

* Update base.jet.html

* Update base.jet.html

* Update index_admin.jet.html
2017-09-06 20:00:48 +10:00
kilo 4cb5c9cf23 Styling fixes & improvements for cookie warning, addition of cookie warning text & close button (#1519)
* Styling fixes for new nav, improvements for cookie warning, styling for close button on cookie warning

* Fix wrong css rule name on tomorrow

* add cookie warning text

* Update CHANGELOG.md

* tomorrow colors for cookie warning

* Color improvements for cookie-warning & close button styling

* Addition of close button for cookie warning

* JS to hide cookie warning when clicking the cross

* Add warning that message will be hidden at next page load

* middle alignement for japanese text in refine

* Remove NyaaPantsu link from admin nav

* Allow HTML in cookie warning translation string

* Remove [0] that was not needed and broke the script from JS

* Bold font & slightly taller cookie warning

* Add message when ad is blocked

* styling for blocked message

* fix wrong id

* Prevent JS error

* remove ad-blocked message

* remove ad-blocked styling

* Update main.css

* Update base.jet.html
2017-09-06 10:51:25 +02:00
kilo 786ff3a3dc Fill Username input if UserID query isn't equal to 0 2017-09-06 08:36:32 +02:00
kilo a78f4117c3 "Torrent file not found" page (#1503)
* Add torrent file missing page instead of old 404

* Make download.go redirect to file missing page instead of 404

* Add files via upload

* Update translation changelog

* add translation string for "torrent file not found" page

* Forgot to create variables

* import templates
2017-09-06 08:20:24 +02:00
kilo 70a865e49a Show message pinned at the bottom of the window warning of cookie usage to comply with EU law (#1506)
* Add global variable to template_test

* Add global variable related to EU cookie law

* Add GetEUCookieFromRequest function that checks if the EU cookie exists (to comply with EU law)

* Add div at bottom of page if no EU cookie set

* add styling in css

* Prevent message from showing up any more than once

* prevent cookie from being erased by resetCookies() function

* Fix wrong function return type

* shorter condition

* Import timeHelper

* Update template_test.go

* remove variable name

* Update template_test.go
2017-09-06 07:55:00 +02:00
kilo 35d4eb9ca8 Add torrentFileExists function, check if torrent file exists and if it doesn't lower the opacity on the torrent download button (#1504)
* Add torrentFileExists function

* If torrent file doesn't exist, put torrent download button opacity at 50%

* ditto for listing

* Forgot an if

* attempt at fixing travis by adding function into test templates

* Attempt at fixing travis by having sex with my own mother

* fix wrong error message

* Add torrentFileExists as global function

* Update template_functions.go
2017-09-06 12:30:49 +10:00
kilo ea7d42210c improvements for moderation (#1516)
* styling for new nav shit

* new nav html

* Update index_admin.jet.html

* remove top margin

* Add moderation link

* color changes

* tomorrow colors

* remove useless class

* remove further useless styling

* remove useless class

* Remove useless class again
2017-09-06 12:15:29 +10:00
kilo b3788f1167 Revert "Add background color to remake-checkbox" (#1500)
* Revert "Update CHANGELOG.md (#1497)"

This reverts commit 2450a70cce.

* Revert "Updated translation. (#1496)"

This reverts commit 2187c2e06a.

* Revert "Add background color to remake-checkbox (#1499)"

This reverts commit 5b58380bd1.
2017-09-05 09:03:26 +10:00
MMP0 5b58380bd1 Add background color to remake-checkbox (#1499) 2017-09-04 22:03:20 +10:00
Miiiiaaooooo 25e6fe2942 Ads enabled settings, ads in FAQ, ads actually in code (#1493)
* Update base.jet.html

* Remove inline styling, put whole thing into a div instead of center to be able to move it at other places at will

* Move inline styling in there & some adjustements that will need further tweaking

* Add GetAdsEnabledFromRequest() function

* Ads Enabled global var

* Need to add global var in test file for it to work properly

* AdEnabled handler in settings

* Create AdsEnabled var for users

* Check if user wants to hide ads

* change var name

* change var name

* change var name

* change var name

* var name changes

* Add ad enabled settings & put each indiviidual setting into a span

* add |raw

* add translation strings

* add ads to faq

* Remove <br> and add faq link

* Fix travis

* Fix wrong condition check

* exclude aldColors & hideAds cookie from deletion

* remove useless things

* Fix template_test.go

* No idea why that part got removed

* Forgot }}

* lower padding for ad container
2017-09-04 21:48:47 +10:00
akuma06 5633a37030 Fix for Tags (#1494)
* Fix #1479 and allows the removal of accepted tags for torrent's owner/moderator
* Fix #1478 moved /add to old api behavior
2017-09-04 08:40:08 +10:00
kilo 0c241dfda5 Add translation string for alternating color in setting & specify the font will not be bold anymore (#1490)
* Add translation string

* Add translation string & be more clear about what does it do
2017-09-04 08:26:09 +10:00
akuma06 49d8ca0c01 Fix RSS Link (#1495)
Fix #1486
2017-09-04 08:11:16 +10:00
kilo c42efa0ae8 Prettier modal tag design (#1492)
* Add class for input & remove redundant text

* add class to modal body containing tag form
2017-09-03 23:43:47 +10:00
kilo cdb90050b3 Fix wrong vgmdb input name & wrong input type (#1485)
* Fix wrong vgmdb input name

* Fix wrong search link

* Fix wrong dlsite URL

* fix wrong url yet again
2017-09-03 20:45:57 +10:00
kilo 4f33ae5f6e Fix wrong VGMDB url (#1476) 2017-09-03 18:06:24 +10:00
kilo d7a649c35b Fix torrent_item JS that missed " " for a string (#1470)
* Forgot to put the translation text into a string

* Fix torrent_item.jet.html

* Remove useless spacing
2017-09-03 14:03:04 +10:00
kilo a01cb17e4c Add new refine translation strings (#1469)
* Add missing translation strings in refine

* Add new refine translation strings
2017-09-03 13:21:37 +10:00
akuma06 50a6e844db Fix adding tag form (nojs) + miscalleneous (#1468)
* Fix search Status
Should fix #1428 ?s=2 and others. Reason: the sql query wasn't correct when filtering (status >= ? = ?)

* Fix adding tag form (nojs) + miscalleneous
* Fix #1423 by checking http method before finding the tags.
* Form is now like other tags form
* New Middleware LoggedInMiddleware to protect routes to logged user only
* Display of Non-Accepted tags in torrent view improved by translating tagtype values

* Update tag.jet.html
2017-09-03 10:30:30 +10:00
kilo 1ff78cbc43 Remove ' (#1465) 2017-09-02 12:15:02 +10:00
akuma06 46c30a88bf Fix #1461 (#1463) 2017-09-02 03:24:22 +02:00
kilo 3ccfef7eb0 Move video quality row under all the tags instead of between accepted & non-accepted tags 2017-09-01 07:27:18 +02:00
kilo 70c2856bbe Whole tag text is clickeable instead of just the ID 2017-09-01 07:21:52 +02:00
kilo df82737824 display: none on these inputs that do nothing at the moment but will in the future 2017-09-01 07:17:55 +02:00
kilo 1362a12432 Remove inline styling 2017-09-01 07:15:03 +02:00
kilo 99dcbc6555 Same but for preview torrents 2017-09-01 06:56:42 +02:00
kilo 3b4197aa15 Same but for JS torrents 2017-09-01 06:56:32 +02:00
kilo 2f1549dec2 Add title when hovering comment count to indicate that it is a comment count 2017-09-01 06:54:48 +02:00
kilo 9d4bf36231 Add container class to pagination (#1456) 2017-08-31 20:59:35 +10:00
kilo 424e26d476 Fix file list indent (#1450)
* Fix file list indent

* Lower indent
2017-08-31 09:49:59 +10:00
kilo 6209dfbfb2 Load query.js in base as theme toggler JS requires it (#1449)
* Have to include query.js in very page because of theme toggler

* Remove query from other files

* remove query

* Remove kebab

* better color
2017-08-30 21:29:52 +10:00
kilo 5a184bfb50 "Alternating Colors" option in settings (#1440)
* Non-bold torrent name when using alternating background colors

* Add alternating colors for g.css

* Add alternating colors for classic.css

* Add alternating colors for tomorreuw

* Update classic.css

* Add alternating colors to settings page

* Add alt-colors class to tbody if enabled

* Add GetAltColorsFromRequest() function to get AltColors cookie value

* Create AltColors variable for usage in listing

* Make settings handle altColors input

* Add AltColors in user struct

* Returned the wrong variable here

* Turn function return value into bool

* Condition checks variable like a bool

* ditto

* better color for g.css

* even better color

* better

* Last change for g.css

* Improvement for tomorrow

* Update classic.css

* add alt-colors class to upload preview

* Add alt-colors to user profile

* more vivid color for g

* Fix typo

* Remove browser outline for refine when clicked on

* remove browser outline

* Fix rules that didn't apply and category icon being way too small on user profile thanks to usage of percentage

* Remove show-xs class for search inputs

* Turn refine button back into position: absolute to pin at very bottom of refine

* Alternating colors for g's trusted, remake & aplus

* Update tomorrow.css

* attempt at fixing travis

* test (will have to rollback that change)

* rollback

* will have to rollback

* will have to rollback

* will have to rollback

* will have to rollback

* add AltColors variable to template test

* rollback

* rollback

* rollback

* rollback
2017-08-30 15:21:45 +10:00
akuma06 3e04f16c21 Fix tag() function (#1446)
Seems like I forgot to commit this file in my previous PR.
2017-08-30 10:31:58 +10:00
kilo 469375435c Toggle theme JS now also do a query to save new theme settings for logged-in users (#1443)
* Set user theme through query in toggle

* Create UserID JS variable

* remove useless shit
2017-08-29 21:15:37 +10:00
kilo 75fae3c8fe Update search.jet.html (#1441) 2017-08-29 20:46:25 +10:00
kilo b41ea25728 Remove useless shit (#1439)
* Remove useless shit

* Fix refine button on IE

* Fix header being bigger than it should

* Fix various issues with header when logged as admin

* More cleanup & small fixes

* Remove useless inline styling

* Forgot a number

* Update main.css

* Remove useless <link>
2017-08-29 15:43:34 +10:00
kilo 2088f8a1c1 Remove workaround (#1438)
* remove workaround class from html

* remove workaround class from css
2017-08-29 12:06:06 +10:00
akuma06 9bb26a7dbe Add username search (#1434)
* Add username search

Quite simple, you need to provide ?user=xxxx

* Add userID search + Changed name of input field

Now ?user=xxx can also search userID.
For that you need to prefix it with "#".
Example:
* ?user=akuma06 would search torrents based on username akuma06
* ?user=#123 would search torrents based on userID 123 (be aware that you have to encode the "#" in url format %23)

* Update search.jet.html (#1436)

* Update main.css (#1435)
2017-08-29 11:06:16 +10:00
akuma06 e6f0a56f65 Update README.md (#1432) 2017-08-28 20:46:13 +02:00
kilo c1901431d0 Add title for tag inputs & some random css stuff (#1429)
* Add title for tag inputs

* Turn the cursor into a pointer when hovering search icon

* Remove space separating search input & refine button

* Remove now useless css rules

* Proper padding for header searchbox

Some text was hidden by the search icon because of too low padding

* Fix language list position on IE

* Fix placeholder display for firefox

2px smaller than regular text
2017-08-28 23:52:05 +10:00
kilo ce8c3d93e3 Add markdown css to <head> (#1427) 2017-08-28 23:38:37 +10:00
kilo cc8b2fcbc4 Add missing "form-input" classname to inputs (#1426) 2017-08-28 23:16:57 +10:00
kilo 4eea2fc0fd Fix wrong classname (#1422) 2017-08-28 13:26:50 +10:00
kilo 3ea9e7230d Update tag.jet.html (#1421) 2017-08-28 13:05:56 +10:00
kilo bdda5dcd4f Add DLsite input and missing quality options (#1418)
* Add DLsite input and missing quality options

* Smaller inputs to have room for 4 inputs

* Update main.css

* add translation string
2017-08-28 11:57:56 +10:00
kilo 4e361ccce0 Prettier tags on upload (#1420)
* HTML changes to have tags in one div

* Add form-input class to tags inputs in upload

to have them look like regular inputs

* CSS changes to make tags inline

* Add changes to torrent edit

* Add changes to admin torrent edit

* attempt at fixing travis

* rollback admin edit in an attempt to fix travis

* Fix tags being visually broken in one very specific resolution

* fuck this shit
2017-08-28 11:42:38 +10:00
kilo 3f709f571b Some refine input & design changes changes (#1408)
* Fix missing class & change refine-container-2 inputs

* CSS changes to go along

* 1 pixel

* 2px

* -1px

* fix firefox select misalignement
2017-08-27 14:11:40 +10:00
kilo e07df15f6e add classic theme to user edit (#1409) 2017-08-27 12:55:33 +10:00
yiiT 81e9a8a1a1 Add RSS Feed Information to FAQ (#1356)
* Add RSS Feed Information to FAQ

* Update faq.jet.html

* Add TL strings
2017-08-27 11:42:27 +10:00
kilo de1ace1624 Add tag inputs to refine search (#1394)
* Avoid language list being higher than 59px in refine

Otherwise that would break the visual for the future anidb & tag inputs on some very specific res

* CSS to make the new input look pretty & responsive

* HTML of the new inputs

* -1px
2017-08-27 11:21:00 +10:00
kilo 73a5277b6f Move exclude input (#1402)
* Move exclude input

* Update search.jet.html

* Update main.css

* Update main.css

* Update search.jet.html
2017-08-27 11:05:42 +10:00
kilo 1475da3cc0 Fix refine date inputs being too small (#1405)
* add refine-date class

* set refine-date width in css

* !important width for refine date as to avoid responsive css to change it

* remove size for date inputs
2017-08-27 10:51:19 +10:00
akuma06 53ba669ba6 Add remember me checkbox back (#1397)
I tried locally and I'm kept logged in. @ewhal check after update that you do have the same hash set in both nyaa and sukebei. If you do, just change the domain name (".pantsu.cat") in the functions getDomainName() to the subdomain. Because I don't see why it wouldn't work otherwise
2017-08-26 12:57:02 +10:00
akuma06 0e4f194b32 Exclude User Search argument (#1399)
Now you can exclude a particular user from search by putting in the url ?nuserID=xxxx
As asked in #528
2017-08-26 12:28:34 +10:00
akuma06 b3e3ec6083 Fix Navigation Admin Panel (#1398)
* Fix Navigation Admin Panel

* Fix broken html on reassign page

* fix user link in comment list

* Fix Unknown bytes

* Fix switch file upload/magnet

* fix modtools background white + width

* fix /mod/ redirection url

* Fix last torrents on modpanel

* empty torrent file input

* Add hidden class to h3
2017-08-26 12:15:28 +10:00
akuma06 2b4731d16c Dbidlinks (#1396)
* Add Anidb, Vndb, Vgmdb links

* Anidb, Vndb, Vgmdb and Dlsite links into tag design
* Add external links to Anidb, Vndb, Vgmdb and dlsite

* Add filter links to tags

* Filter string translation already exists

* Fix display tags

* Update translation changelog

* Do not display tag type when default
2017-08-26 11:42:12 +10:00
akuma06 eea581bae9 Removing SearchType and SearchOrder + Move to new date search behaviour (#1395)
* Update search.go

* Update helpers.go

* Update search.jet.html

* Update search.jet.html

* Removing SortOrder and SortType from template's Search struct. Since we already have them in main torrentParam search struct and we don't need to overwrite them.

* Replaced old date search filter behaviour
2017-08-26 11:24:25 +10:00
akuma06 c49fba015c Removing filter on listing.jet.html (#1393)
Filtering here would mean giving random number of results instead of showing constant number. And can mislead people to think that there are no results and also force people to switch pages more often.
For example, if there are 48 hentai results on the 50 results. It will display only 2 results on the page. People would therefore think that there are only two results for the search or would make them changing the page every two (or more) results instead of 50.
Finally this doesn't fix at all the results in the RSS feeds & the API endpoint.

The hentai results should be fixed in the scrapper.
2017-08-25 10:30:09 +10:00
kilo bce96c86c7 Update search.jet.html (#1391) 2017-08-23 08:41:29 +10:00
akuma06 c6168be8b1 Tag Search + Tests + Search slight refactor [DONE] (#1342)
* Tag Search + Tests + Search slight refactor

First commit improving search. Different struct have their own file with their tests. This way of separating struct by files is inspired by the go packages I've seen so far.

Added new behaviour as discussed in #1334

* fix fallback to ES

* Added some comments to explain PG fallback + log err moved

* Refactored search

Nearly fully covered
WhereParams struct has disappeared for Query struct instead
In DB model, we use an interface implementing Query struct methods

* 1rst Refactor of Tags (WTF already?!)

Prepare Tags for the refactored system. Now there will be descriptive tags for a particular release (ecchi, BDSM, ....) and typed tags.
Typed tags are tags relevant to all torrents and can be limited to some input value. For example, video quality is a typed tag limited to some values (hd, full hd, sd, ...). In the same way, anidbid is also a typed tag but doesn't have default values.

Furthermore, the location storage of tags have changed, now accepted descriptive tags are stored in the torrents table in the column "tags" and they are separated by commas.
In the opposite, accepted typed tags can have have their own column in the torrents table. For example, anidbid, vndbid will populate the column DbID when accepted. On the other hand, videoquality will populate the same way as descriptive tags.

This behaviour depends on the callbackOnType function in tag/helpers.go

* fix for modtools :')

* Added anidb, vndb, dlsite & vmdb id fields in torrent model.
Tags don't have an accepted field anymore.
Accepted Tags are in torrent.AcceptedTags and non-accepted ones in torrrent.Tags.

New Helper + New Changelog for translation string.

* New upload/edit form for torrent tags.
Now the inputs are dynamically generated by the helper tag_form.
No more modal window in those form, only inputs.
Support of tags in API
New translation string for the  link to the modal on torrent view.
More comments in the functions for tags

* Improving how config for tags work. Adding a test on them with understandable messages.
Config for tags have now a Field attribute which is linked to the Torrent model. For example anidbid tag type has now a AnidbID field in config which is the name of the field in torrent model (AnidbID). Every new tag type need to have a field attribute with its counterpart in torrent Model.
Fixing some errors

* Fix compile error + Tests Errors

* Improve performance by caching the list of tags with an index
Adding/removing tags works/tested
New translation strings

TODO: test/fix adding tag on upload/edit

* Mini fix to display video quality
+ tags works/tested on modo edit

* Fix editing tags on modpanel

* Edit tags works

* Add translation string

* Add search backend for tags.
?tags=xxx,eee,ddd
?anidb=21
?vndb=23
?vgmdb=24
?vq=full_hd

* Fix Ajax tag Removal&Add

* Added form for descriptive tags

* Forgot to add the link between database and form for descriptive tags.

* Adding the increase/decrease pantsu for descriptive tags

* Fix #1370

* When you actually forgot to commit files after having forgotten commits
2017-08-22 11:48:10 +10:00
kilo 1a0f8e6604 Add failsafe to prevent theme1 & theme2 being dentical at time (#1385)
* Add failsafe for theme toggle

* remove unneeded /
2017-08-22 10:49:43 +10:00
kilo cd4154cf7f Remove hentai keyword if not sukebei (#1383) 2017-08-21 11:00:19 +10:00
kilo bda181ee54 Add toggle dark theme for non-JS users (#1381)
* Add themeToggle handler to router.go

* Create themeToggle/router.go & ThemeToggle.go

* Add link to /dark in footer, remove display = none on toggle dark mode

* Remove JS that ordered toggle dark mode link to show as it is now constantly visible

* Rollback to fix errors

* Add some comments

* Create redirectUrl variable & set it's content then use it to redirect user

* Remove useless log

* Remove usage of fmt

* Add redirect get parameter to toggle link

* Add another url for toggleTheme

* wooo

* Update base.jet.html

* Update base.jet.html
2017-08-21 10:48:17 +10:00
akuma06 f3eaa2285b Information on how to use nyaa template system (#1384) 2017-08-21 10:30:47 +10:00
kilo b31e420397 Add missing <br /> (#1382) 2017-08-20 23:42:06 +02:00
kilo ed0f320159 Add nyoo.moe & sukebei.nyoo.moe links to FAQ (#1378)
* Add nyoo.moe mirror to FAQ

* oh shit totally forgot about ""
2017-08-20 00:00:27 +10:00
kilo 2052f2370c Put right css class and remove tag styling (#1377) 2017-08-17 11:13:18 +10:00
kilo 199d2b3b85 Add "sort by" inputs in refine on low res (#1369)
* Add HTML for sorting by name etc

* Add CSS to hide inputs for sorting in refine

* Set value of SortOrder on true if on true (wew)

* Add SortOrder & SortType variables

* change translation strings

* add translation strings

* forgot a missing { and change ascending value
2017-08-14 15:56:45 +10:00
kilo d51eb1ba60 Fixed width for text in refine, make smaller header apply at 500px wide devices & under (#1368)
* Fixed width for text in refine

* make smaller header apply at 500px & under

* remove useless line

* hide notification count if no new notification
2017-08-14 15:37:37 +10:00
kilo d0efb33749 Lower title (h3) margins in refine & some small other stuff (#1367)
* Fix rule that didn't apply and change it's value

* Remove css rule from html

* one pixel higher margin

* smaller category in refine, bigger minimu msize for searchbox

* fix for too big searchbox at some very specific resolution

* lower height level for log-in icon

* add "sign in" text when hovering log-in link
2017-08-12 17:20:47 +10:00
kilo 99f93a83be Remove unused stuff (#1365)
* remove no-torrent class

* remove no-torrent from css

* remove no-torrent from preview JS

* remove no-torrent from auto-updating JS
2017-08-12 16:36:44 +10:00