De weebify & strip down site
@ -1,227 +0,0 @@
 | 
			
		||||
import os
 | 
			
		||||
import re
 | 
			
		||||
 | 
			
		||||
DEBUG = True
 | 
			
		||||
 | 
			
		||||
######################
 | 
			
		||||
## Maintenance mode ##
 | 
			
		||||
######################
 | 
			
		||||
 | 
			
		||||
# A read-only maintenance mode, in which the database is not modified
 | 
			
		||||
MAINTENANCE_MODE = False
 | 
			
		||||
# A maintenance message (used in layout.html template)
 | 
			
		||||
MAINTENANCE_MODE_MESSAGE = 'Site is currently in read-only maintenance mode.'
 | 
			
		||||
# Allow logging in during maintenance (without updating last login date)
 | 
			
		||||
MAINTENANCE_MODE_LOGINS = True
 | 
			
		||||
 | 
			
		||||
# Block *anonymous* uploads completely
 | 
			
		||||
RAID_MODE_LIMIT_UPLOADS = False
 | 
			
		||||
# Message prepended to the full error message (account.py)
 | 
			
		||||
RAID_MODE_UPLOADS_MESSAGE = 'Anonymous uploads are currently disabled.'
 | 
			
		||||
 | 
			
		||||
# Require manual activation for newly registered accounts
 | 
			
		||||
RAID_MODE_LIMIT_REGISTER = False
 | 
			
		||||
# Message prepended to the full error message (account.py)
 | 
			
		||||
RAID_MODE_REGISTER_MESSAGE = 'Registration is currently being limited.'
 | 
			
		||||
 | 
			
		||||
#############
 | 
			
		||||
## General ##
 | 
			
		||||
#############
 | 
			
		||||
 | 
			
		||||
# What the site identifies itself as. This affects templates, not database stuff.
 | 
			
		||||
SITE_NAME = 'Nyaa'
 | 
			
		||||
# What the both sites are labeled under (used for eg. email subjects)
 | 
			
		||||
GLOBAL_SITE_NAME = 'Nyaa.si'
 | 
			
		||||
 | 
			
		||||
# General prefix for running multiple sites, eg. most database tables are site-prefixed
 | 
			
		||||
SITE_FLAVOR = 'nyaa' # 'nyaa' or 'sukebei'
 | 
			
		||||
# Full external urls to both sites, used for site-change links
 | 
			
		||||
EXTERNAL_URLS = {'fap':'***', 'main':'***'}
 | 
			
		||||
 | 
			
		||||
# Secret keys for Flask
 | 
			
		||||
CSRF_SESSION_KEY = '***'
 | 
			
		||||
SECRET_KEY = '***'
 | 
			
		||||
 | 
			
		||||
# Present a recaptcha for anonymous uploaders
 | 
			
		||||
USE_RECAPTCHA = False
 | 
			
		||||
# Require email validation
 | 
			
		||||
USE_EMAIL_VERIFICATION = False
 | 
			
		||||
# Use MySQL or Sqlite3 (mostly deprecated)
 | 
			
		||||
USE_MYSQL = True
 | 
			
		||||
# Show seeds/peers/completions in torrent list/page
 | 
			
		||||
ENABLE_SHOW_STATS = True
 | 
			
		||||
 | 
			
		||||
# Enable password recovery (by reset link to given email address)
 | 
			
		||||
# Depends on email support!
 | 
			
		||||
ALLOW_PASSWORD_RESET = True
 | 
			
		||||
 | 
			
		||||
# A list of strings or compiled regexes to deny registering emails by.
 | 
			
		||||
# Regexes will be .search()'d against emails,
 | 
			
		||||
# while strings will be a simple 'string in email.lower()' check.
 | 
			
		||||
# Leave empty to disable the blacklist.
 | 
			
		||||
EMAIL_BLACKLIST = (
 | 
			
		||||
    # Hotmail completely rejects "untrusted" emails,
 | 
			
		||||
    # so it's less of a headache to blacklist them as users can't receive the mails anyway.
 | 
			
		||||
    # (Hopefully) complete list of Microsoft email domains follows:
 | 
			
		||||
    re.compile(r'(?i)@hotmail\.(co|co\.uk|com|de|dk|eu|fr|it|net|org|se)'),
 | 
			
		||||
    re.compile(r'(?i)@live\.(co|co.uk|com|de|dk|eu|fr|it|net|org|se|no)'),
 | 
			
		||||
    re.compile(r'(?i)@outlook\.(at|be|cl|co|co\.(id|il|nz|th)|com|com\.(ar|au|au|br|gr|pe|tr|vn)|cz|de|de|dk|dk|es|eu|fr|fr|hu|ie|in|it|it|jp|kr|lv|my|org|ph|pt|sa|se|sg|sk)'),
 | 
			
		||||
    re.compile(r'(?i)@(msn\.com|passport\.(com|net))'),
 | 
			
		||||
    # '@dodgydomain.tk'
 | 
			
		||||
)
 | 
			
		||||
EMAIL_SERVER_BLACKLIST = (
 | 
			
		||||
    # Bad mailserver IPs here (MX server.com -> A mail.server.com > 11.22.33.44)
 | 
			
		||||
    # '1.2.3.4', '11.22.33.44'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Recaptcha keys (https://www.google.com/recaptcha)
 | 
			
		||||
RECAPTCHA_PUBLIC_KEY = '***'
 | 
			
		||||
RECAPTCHA_PRIVATE_KEY = '***'
 | 
			
		||||
 | 
			
		||||
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
 | 
			
		||||
if USE_MYSQL:
 | 
			
		||||
    SQLALCHEMY_DATABASE_URI = ('mysql://test:test123@localhost/nyaav2?charset=utf8mb4')
 | 
			
		||||
else:
 | 
			
		||||
    SQLALCHEMY_DATABASE_URI = (
 | 
			
		||||
        'sqlite:///' + os.path.join(BASE_DIR, 'test.db') + '?check_same_thread=False')
 | 
			
		||||
 | 
			
		||||
###########
 | 
			
		||||
## EMAIL ##
 | 
			
		||||
###########
 | 
			
		||||
 | 
			
		||||
# 'smtp' or 'mailgun'
 | 
			
		||||
MAIL_BACKEND = 'mailgun'
 | 
			
		||||
MAIL_FROM_ADDRESS = 'Sender Name <sender@domain.com>'
 | 
			
		||||
 | 
			
		||||
# Mailgun settings
 | 
			
		||||
MAILGUN_API_BASE = 'https://api.mailgun.net/v3/YOUR_DOMAIN_NAME'
 | 
			
		||||
MAILGUN_API_KEY = 'YOUR_API_KEY'
 | 
			
		||||
 | 
			
		||||
# SMTP settings
 | 
			
		||||
SMTP_SERVER = '***'
 | 
			
		||||
SMTP_PORT = 587
 | 
			
		||||
SMTP_USERNAME = '***'
 | 
			
		||||
SMTP_PASSWORD = '***'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# The maximum number of files a torrent can contain
 | 
			
		||||
# until the site says "Too many files to display."
 | 
			
		||||
MAX_FILES_VIEW = 1000
 | 
			
		||||
 | 
			
		||||
# Verify uploaded torrents have the given tracker in them?
 | 
			
		||||
ENFORCE_MAIN_ANNOUNCE_URL = False
 | 
			
		||||
MAIN_ANNOUNCE_URL = 'http://127.0.0.1:6881/announce'
 | 
			
		||||
 | 
			
		||||
# Tracker API integration - don't mind this
 | 
			
		||||
TRACKER_API_URL = 'http://127.0.0.1:6881/api'
 | 
			
		||||
TRACKER_API_AUTH = 'topsecret'
 | 
			
		||||
 | 
			
		||||
#############
 | 
			
		||||
## Account ##
 | 
			
		||||
#############
 | 
			
		||||
 | 
			
		||||
# Limit torrent upload rate
 | 
			
		||||
RATELIMIT_UPLOADS = True
 | 
			
		||||
RATELIMIT_ACCOUNT_AGE = 7 * 24 * 3600
 | 
			
		||||
# After uploading MAX_UPLOAD_BURST torrents within UPLOAD_BURST_DURATION,
 | 
			
		||||
# the following uploads must be at least UPLOAD_TIMEOUT seconds after the previous upload.
 | 
			
		||||
MAX_UPLOAD_BURST = 5
 | 
			
		||||
UPLOAD_BURST_DURATION = 45 * 60
 | 
			
		||||
UPLOAD_TIMEOUT = 15 * 60
 | 
			
		||||
 | 
			
		||||
# Torrents uploaded without an account must be at least this big in total (bytes)
 | 
			
		||||
# Set to 0 to disable
 | 
			
		||||
MINIMUM_ANONYMOUS_TORRENT_SIZE = 1 * 1024 * 1024
 | 
			
		||||
 | 
			
		||||
# Minimum age for an account not to be served a captcha (seconds)
 | 
			
		||||
# Relies on USE_RECAPTCHA. Set to 0 to disable.
 | 
			
		||||
ACCOUNT_RECAPTCHA_AGE = 7 * 24 * 3600  # A week
 | 
			
		||||
 | 
			
		||||
# Seconds after which an IP is allowed to register another account
 | 
			
		||||
# (0 disables the limitation)
 | 
			
		||||
PER_IP_ACCOUNT_COOLDOWN = 24 * 3600
 | 
			
		||||
 | 
			
		||||
# Backup original .torrent uploads
 | 
			
		||||
BACKUP_TORRENT_FOLDER = 'torrents'
 | 
			
		||||
 | 
			
		||||
############
 | 
			
		||||
## Search ##
 | 
			
		||||
############
 | 
			
		||||
 | 
			
		||||
# How many results should a page contain. Applies to RSS as well.
 | 
			
		||||
RESULTS_PER_PAGE = 75
 | 
			
		||||
 | 
			
		||||
# How many pages we'll return at most
 | 
			
		||||
MAX_PAGES = 100
 | 
			
		||||
 | 
			
		||||
# How long and how many entries to cache for count queries
 | 
			
		||||
COUNT_CACHE_SIZE = 256
 | 
			
		||||
COUNT_CACHE_DURATION = 30
 | 
			
		||||
 | 
			
		||||
# Use baked queries for database search
 | 
			
		||||
USE_BAKED_SEARCH = False
 | 
			
		||||
 | 
			
		||||
# Use better searching with ElasticSearch
 | 
			
		||||
# See README.MD on setup!
 | 
			
		||||
USE_ELASTIC_SEARCH = False
 | 
			
		||||
# Highlight matches (for debugging)
 | 
			
		||||
ENABLE_ELASTIC_SEARCH_HIGHLIGHT = False
 | 
			
		||||
 | 
			
		||||
# Max ES search results, do not set over 10000
 | 
			
		||||
ES_MAX_SEARCH_RESULT = 1000
 | 
			
		||||
# ES index name generally (nyaa or sukebei)
 | 
			
		||||
ES_INDEX_NAME = SITE_FLAVOR
 | 
			
		||||
# ES hosts
 | 
			
		||||
ES_HOSTS = ['localhost:9200']
 | 
			
		||||
 | 
			
		||||
################
 | 
			
		||||
## Commenting ##
 | 
			
		||||
################
 | 
			
		||||
 | 
			
		||||
# Time limit for editing a comment after it has been posted (seconds)
 | 
			
		||||
# Set to 0 to disable
 | 
			
		||||
EDITING_TIME_LIMIT = 0
 | 
			
		||||
 | 
			
		||||
# Whether to use Gravatar or just always use the default avatar
 | 
			
		||||
# (Useful if run as development instance behind NAT/firewall)
 | 
			
		||||
ENABLE_GRAVATAR = True
 | 
			
		||||
 | 
			
		||||
##########################
 | 
			
		||||
## Trusted Requirements ##
 | 
			
		||||
##########################
 | 
			
		||||
 | 
			
		||||
# Minimum number of uploads the user needs to have in order to apply for trusted
 | 
			
		||||
TRUSTED_MIN_UPLOADS = 10
 | 
			
		||||
# Minimum number of cumulative downloads the user needs to have across their
 | 
			
		||||
# torrents in order to apply for trusted
 | 
			
		||||
TRUSTED_MIN_DOWNLOADS = 10000
 | 
			
		||||
# Number of days an applicant needs to wait before re-applying
 | 
			
		||||
TRUSTED_REAPPLY_COOLDOWN = 90
 | 
			
		||||
 | 
			
		||||
###########
 | 
			
		||||
## Cache ##
 | 
			
		||||
###########
 | 
			
		||||
 | 
			
		||||
# Interesting types include "simple", "redis" and "uwsgi"
 | 
			
		||||
# See https://pythonhosted.org/Flask-Caching/#configuring-flask-caching
 | 
			
		||||
CACHE_TYPE = "simple"
 | 
			
		||||
 | 
			
		||||
# Maximum number of items the cache will store
 | 
			
		||||
# Only applies to "simple" and "filesystem" cache types
 | 
			
		||||
CACHE_THRESHOLD = 8192
 | 
			
		||||
 | 
			
		||||
# If you want to use redis, try this
 | 
			
		||||
# CACHE_TYPE = "redis"
 | 
			
		||||
# CACHE_REDIS_HOST = "127.0.0.1"
 | 
			
		||||
# CACHE_KEY_PREFIX = "catcache_"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
###############
 | 
			
		||||
## Ratelimit ##
 | 
			
		||||
###############
 | 
			
		||||
 | 
			
		||||
# To actually make this work across multiple worker processes, use redis
 | 
			
		||||
# RATELIMIT_STORAGE_URL="redis://host:port"
 | 
			
		||||
RATELIMIT_KEY_PREFIX="nyaaratelimit_"
 | 
			
		||||
							
								
								
									
										14
									
								
								db_create.py
									
									
									
									
									
								
							
							
						
						@ -7,18 +7,14 @@ from nyaa.extensions import db
 | 
			
		||||
app = create_app('config')
 | 
			
		||||
 | 
			
		||||
NYAA_CATEGORIES = [
 | 
			
		||||
    ('Anime', ['Anime Music Video', 'English-translated', 'Non-English-translated', 'Raw']),
 | 
			
		||||
    ('Audio', ['Lossless', 'Lossy']),
 | 
			
		||||
    ('Literature', ['English-translated', 'Non-English-translated', 'Raw']),
 | 
			
		||||
    ('Live Action', ['English-translated', 'Idol/Promotional Video', 'Non-English-translated', 'Raw']),
 | 
			
		||||
    ('Pictures', ['Graphics', 'Photos']),
 | 
			
		||||
    ('Software', ['Applications', 'Games']),
 | 
			
		||||
    ('Books', ['Fiction', 'Non-Fiction']),
 | 
			
		||||
    ('Media', ['Audio', 'Video', 'Images']),
 | 
			
		||||
    ('Software', ['Misc', 'Games']),
 | 
			
		||||
    ('NSFW', ['Pictures', 'Videos', 'Audio']),
 | 
			
		||||
    ('Misc', ['Other']),
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
SUKEBEI_CATEGORIES = [
 | 
			
		||||
    ('Art', ['Anime', 'Doujinshi', 'Games', 'Manga', 'Pictures']),
 | 
			
		||||
    ('Real Life', ['Photobooks / Pictures', 'Videos']),
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -89,6 +89,7 @@ table.torrent-list tbody .comments {
 | 
			
		||||
    font-size: small;
 | 
			
		||||
    background-color: #ffffff;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
table.torrent-list tbody .comments i {
 | 
			
		||||
    padding-right: 2px;
 | 
			
		||||
}
 | 
			
		||||
@ -96,14 +97,17 @@ table.torrent-list tbody .comments i {
 | 
			
		||||
table.torrent-list td:first-child {
 | 
			
		||||
    padding: 0 4px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
table.torrent-list td:nth-child(4) {
 | 
			
		||||
    white-space: nowrap;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
table.torrent-list td:nth-child(6),
 | 
			
		||||
body.dark table.torrent-list > tbody > tr.success > td:nth-child(6),
 | 
			
		||||
body.dark table.torrent-list > tbody > tr.danger > td:nth-child(6) {
 | 
			
		||||
    color: green;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
table.torrent-list td:nth-child(7),
 | 
			
		||||
body.dark table.torrent-list > tbody > tr.success > td:nth-child(7),
 | 
			
		||||
body.dark table.torrent-list > tbody > tr.danger > td:nth-child(7) {
 | 
			
		||||
@ -226,8 +230,7 @@ body.dark table.torrent-list > tbody > tr.danger > td:nth-child(7) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Upload page drop zone */
 | 
			
		||||
#upload-drop-zone
 | 
			
		||||
{
 | 
			
		||||
#upload-drop-zone {
 | 
			
		||||
    visibility: hidden;
 | 
			
		||||
    opacity: 0;
 | 
			
		||||
    position: absolute;
 | 
			
		||||
@ -245,8 +248,7 @@ body.dark table.torrent-list > tbody > tr.danger > td:nth-child(7) {
 | 
			
		||||
    font: bold 42px Tahoma, sans-serif;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#upload-drop-zone span
 | 
			
		||||
{
 | 
			
		||||
#upload-drop-zone span {
 | 
			
		||||
    display: table-cell;
 | 
			
		||||
    text-align: center;
 | 
			
		||||
    vertical-align: middle;
 | 
			
		||||
@ -273,13 +275,16 @@ ul.nav-tabs#profileTabs {
 | 
			
		||||
    margin-top: 10px;
 | 
			
		||||
    margin-bottom: 10px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.comment-panel .panel-body {
 | 
			
		||||
    padding-top: 10px;
 | 
			
		||||
    padding-bottom: 10px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.comment-panel .col-md-2 p {
 | 
			
		||||
    margin-bottom: 5px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.comment-panel:target {
 | 
			
		||||
    border-color: black;
 | 
			
		||||
    border-width: 2px;
 | 
			
		||||
@ -305,6 +310,7 @@ a.text-purple:hover, a.text-purple:active, a.text-purple:focus {
 | 
			
		||||
.comment-content {
 | 
			
		||||
    overflow-wrap: break-word;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.comment-content img {
 | 
			
		||||
    max-width: 100%;
 | 
			
		||||
    max-height: 600px;
 | 
			
		||||
@ -448,6 +454,7 @@ h6:hover .header-anchor {
 | 
			
		||||
    visibility: visible;
 | 
			
		||||
    display: inline-block;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.trusted-form textarea {
 | 
			
		||||
    height: 12em;
 | 
			
		||||
}
 | 
			
		||||
@ -519,13 +526,16 @@ body.dark .torrent-list > tbody > tr.success > td {
 | 
			
		||||
    color: inherit;
 | 
			
		||||
    background-color: rgba(60, 206, 0, 0.12);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
body.dark .torrent-list > tbody > tr.success:hover > td {
 | 
			
		||||
    background-color: rgba(60, 206, 0, 0.18);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
body.dark div.panel-success,
 | 
			
		||||
body.dark div.panel-success > .panel-heading {
 | 
			
		||||
    border-color: #33452c; /* == trusted entry in torrent list */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
body.dark div.panel-success > .panel-heading {
 | 
			
		||||
    background-color: #56704b; /* == trusted entry in torrent list + hover */
 | 
			
		||||
}
 | 
			
		||||
@ -535,14 +545,17 @@ body.dark .torrent-list > tbody > tr.danger > td {
 | 
			
		||||
    color: inherit;
 | 
			
		||||
    background-color: rgba(208, 0, 0, 0.12);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
body.dark .torrent-list > tbody > tr.danger:hover > td {
 | 
			
		||||
    color: inherit;
 | 
			
		||||
    background-color: rgba(208, 0, 0, 0.18);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
body.dark div.panel-danger,
 | 
			
		||||
body.dark div.panel-danger > .panel-heading {
 | 
			
		||||
    border-color: #452c2c; /* == remake entry in torrent list */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
body.dark div.panel-danger > .panel-heading {
 | 
			
		||||
    background-color: #714b4b; /* == remake entry in torrent list + hover */
 | 
			
		||||
}
 | 
			
		||||
@ -551,9 +564,11 @@ body.dark div.panel-danger > .panel-heading {
 | 
			
		||||
body.dark .torrent-list > tbody > tr.deleted > td {
 | 
			
		||||
    background-color: rgba(255, 255, 255, 0.20);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
body.dark .torrent-list > tbody > tr.deleted:hover > td {
 | 
			
		||||
    background-color: rgba(255, 255, 255, 0.26);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
body.dark .panel-deleted > .panel-heading {
 | 
			
		||||
    color: #232323;
 | 
			
		||||
}
 | 
			
		||||
@ -577,7 +592,9 @@ body.dark .panel-deleted > .panel-heading {
 | 
			
		||||
 | 
			
		||||
    .torrent-list .hdr-date,
 | 
			
		||||
    .torrent-list .hdr-downloads,
 | 
			
		||||
	.torrent-list td: nth-of-type(5),
 | 
			
		||||
    .torrent-list td:
 | 
			
		||||
 | 
			
		||||
nth-of-type(5),
 | 
			
		||||
    .torrent-list td:nth-of-type(8) {
 | 
			
		||||
        display: none;
 | 
			
		||||
    }
 | 
			
		||||
@ -680,3 +697,90 @@ blockquote {
 | 
			
		||||
        height: auto;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navbar-inverse {
 | 
			
		||||
    background-color: #ee6e73;
 | 
			
		||||
    border: none;
 | 
			
		||||
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navbar-inverse .navbar-nav > li > a {
 | 
			
		||||
    color: #EEEEEE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navbar-inverse .navbar-brand {
 | 
			
		||||
    color: #EEEEEE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus {
 | 
			
		||||
    color: #fff;
 | 
			
		||||
    background-color: #eb595f;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus {
 | 
			
		||||
    background-color: #eb595f;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.btn-primary {
 | 
			
		||||
    background-color: #56adaa;
 | 
			
		||||
    border-color: #4fa2a0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.btn-primary:hover {
 | 
			
		||||
    background-color: #4fa2a0;
 | 
			
		||||
    border-color: #4fa2a0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus {
 | 
			
		||||
    background-color: #4fa2a0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
a {
 | 
			
		||||
    color: #4fa2a0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
table.torrent-list tbody tr td a:visited {
 | 
			
		||||
    color: #4fa2a0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
 | 
			
		||||
    color: #EEEEEE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navbar-inverse .navbar-toggle {
 | 
			
		||||
    border-color: #ef7d82;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navbar-inverse .navbar-toggle:hover, .navbar-inverse .navbar-toggle:focus {
 | 
			
		||||
    background-color: #eb595f;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navbar-form {
 | 
			
		||||
    margin-bottom: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form {
 | 
			
		||||
    border-color: #eb595f;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@media (min-width: 1000px) {
 | 
			
		||||
    .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
 | 
			
		||||
        color: #111111;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.table > tbody > tr > td, .table > thead > tr > th {
 | 
			
		||||
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
td, th {
 | 
			
		||||
    padding: 15px 10px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
table.torrent-list td:nth-child(7), body.dark table.torrent-list > tbody > tr.success > td:nth-child(7), body.dark table.torrent-list > tbody > tr.danger > td:nth-child(7) {
 | 
			
		||||
    color: #e57373;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
table.torrent-list td:nth-child(6), body.dark table.torrent-list > tbody > tr.success > td:nth-child(7), body.dark table.torrent-list > tbody > tr.danger > td:nth-child(7) {
 | 
			
		||||
    color: #66BB6A;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								nyaa/static/img/icons/nyaa/1_1.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| 
		 Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 723 B  | 
							
								
								
									
										
											BIN
										
									
								
								nyaa/static/img/icons/nyaa/1_2.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| 
		 Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 851 B  | 
| 
		 Before Width: | Height: | Size: 2.7 KiB  | 
| 
		 Before Width: | Height: | Size: 3.3 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								nyaa/static/img/icons/nyaa/2_1.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| 
		 Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 622 B  | 
							
								
								
									
										
											BIN
										
									
								
								nyaa/static/img/icons/nyaa/2_2.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| 
		 Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 671 B  | 
							
								
								
									
										
											BIN
										
									
								
								nyaa/static/img/icons/nyaa/2_3.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 625 B  | 
							
								
								
									
										
											BIN
										
									
								
								nyaa/static/img/icons/nyaa/3_1.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| 
		 Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 746 B  | 
							
								
								
									
										
											BIN
										
									
								
								nyaa/static/img/icons/nyaa/3_2.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| 
		 Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.5 KiB  | 
| 
		 Before Width: | Height: | Size: 4.1 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								nyaa/static/img/icons/nyaa/4_1.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| 
		 Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 8.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								nyaa/static/img/icons/nyaa/4_2.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| 
		 Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 608 B  | 
							
								
								
									
										
											BIN
										
									
								
								nyaa/static/img/icons/nyaa/4_3.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| 
		 Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.8 KiB  | 
| 
		 Before Width: | Height: | Size: 3.1 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								nyaa/static/img/icons/nyaa/5_1.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| 
		 Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 870 B  | 
| 
		 Before Width: | Height: | Size: 3.9 KiB  | 
| 
		 Before Width: | Height: | Size: 3.2 KiB  | 
| 
		 Before Width: | Height: | Size: 3.2 KiB  | 
@ -28,9 +28,9 @@
 | 
			
		||||
  {# prev and next are only show if a symbol has been passed. #}
 | 
			
		||||
  {% if prev != None -%}
 | 
			
		||||
    {% if pagination.has_prev %}
 | 
			
		||||
    <li><a rel="prev" href="{{_arg_url_for(endpoint, url_args, p=pagination.prev_num)}}">{{prev}}</a></li>
 | 
			
		||||
    <li><a rel="prev" href="{{_arg_url_for(endpoint, url_args, p=pagination.prev_num)}}"><i class="fa fa-chevron-left"></i></a></li>
 | 
			
		||||
    {% else %}
 | 
			
		||||
    <li class="disabled"><a href="#">{{prev}}</a></li>
 | 
			
		||||
    <li class="disabled"><a href="#"><i class="fa fa-chevron-left"></i></a></li>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
  {%- endif -%}
 | 
			
		||||
 | 
			
		||||
@ -48,9 +48,9 @@
 | 
			
		||||
 | 
			
		||||
  {% if next != None -%}
 | 
			
		||||
    {% if pagination.has_next %}
 | 
			
		||||
    <li><a rel="next" href="{{_arg_url_for(endpoint, url_args, p=pagination.next_num)}}">{{next}}</a></li>
 | 
			
		||||
    <li><a rel="next" href="{{_arg_url_for(endpoint, url_args, p=pagination.next_num)}}"><i class="fa fa-chevron-right"></i></a></li>
 | 
			
		||||
    {% else %}
 | 
			
		||||
    <li class="disabled"><a href="#">{{next}}</a></li>
 | 
			
		||||
    <li class="disabled"><a href="#"><i class="fa fa-chevron-right"></i></a></li>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
  {%- endif -%}
 | 
			
		||||
  </ul>
 | 
			
		||||
 | 
			
		||||
@ -95,7 +95,7 @@
 | 
			
		||||
<hr>
 | 
			
		||||
 | 
			
		||||
<div class="row">
 | 
			
		||||
	<div class="col-md-5"">
 | 
			
		||||
	<div class="col-md-5">
 | 
			
		||||
		<div class="panel panel-danger">
 | 
			
		||||
			<div class="panel-heading">
 | 
			
		||||
				<h3 class="panel-title">Danger Zone</h3>
 | 
			
		||||
 | 
			
		||||
@ -9,7 +9,8 @@
 | 
			
		||||
    <link rel="shortcut icon" type="image/png" href="{{ url_for('static', filename='favicon.png') }}">
 | 
			
		||||
    <link rel="icon" type="image/png" href="{{ url_for('static', filename='favicon.png') }}">
 | 
			
		||||
    <link rel="mask-icon" href="{{ url_for('static', filename='pinned-tab.svg') }}" color="#3582F7">
 | 
			
		||||
		<link rel="alternate" type="application/rss+xml" href="{% if rss_filter %}{{ url_for('main.home', page='rss', _external=True, **rss_filter) }}{% else %}{{ url_for('main.home', page='rss', _external=True) }}{% endif %}" />
 | 
			
		||||
    <link rel="alternate" type="application/rss+xml" href="
 | 
			
		||||
            {% if rss_filter %}{{ url_for('main.home', page='rss', _external=True, **rss_filter) }}{% else %}{{ url_for('main.home', page='rss', _external=True) }}{% endif %}"/>
 | 
			
		||||
 | 
			
		||||
    <meta property="og:site_name" content="{{ config.SITE_NAME }}">
 | 
			
		||||
    <meta property="og:title" content="{{ self.title() }}">
 | 
			
		||||
@ -33,17 +34,38 @@
 | 
			
		||||
        This theme changer script needs to be inline and right under the above stylesheet link to prevent FOUC (Flash Of Unstyled Content)
 | 
			
		||||
        Development version is commented out in static/js/main.js at the bottom of the file
 | 
			
		||||
    -->
 | 
			
		||||
		<script>function toggleDarkMode(){"dark"===localStorage.getItem("theme")?setThemeLight():setThemeDark()}function setThemeDark(){bsThemeLink.href="{{ bootstrap_dark }}",localStorage.setItem("theme","dark"),document.body!==null&&document.body.classList.add('dark')}function setThemeLight(){bsThemeLink.href="{{ bootstrap_light }}",localStorage.setItem("theme","light"),document.body!==null&&document.body.classList.remove('dark')}if("undefined"!=typeof Storage){var bsThemeLink=document.getElementById("bsThemeLink");"dark"===localStorage.getItem("theme")&&setThemeDark()}</script>
 | 
			
		||||
		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.2/css/bootstrap-select.min.css" integrity="sha256-an4uqLnVJ2flr7w0U74xiF4PJjO2N5Df91R2CUmCLCA=" crossorigin="anonymous" />
 | 
			
		||||
		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
 | 
			
		||||
    <script>function toggleDarkMode() {
 | 
			
		||||
        "dark" === localStorage.getItem("theme") ? setThemeLight() : setThemeDark()
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    function setThemeDark() {
 | 
			
		||||
        bsThemeLink.href = "{{ bootstrap_dark }}", localStorage.setItem("theme", "dark"), document.body !== null && document.body.classList.add('dark')
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    function setThemeLight() {
 | 
			
		||||
        bsThemeLink.href = "{{ bootstrap_light }}", localStorage.setItem("theme", "light"), document.body !== null && document.body.classList.remove('dark')
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if ("undefined" != typeof Storage) {
 | 
			
		||||
        var bsThemeLink = document.getElementById("bsThemeLink");
 | 
			
		||||
        "dark" === localStorage.getItem("theme") && setThemeDark()
 | 
			
		||||
    }</script>
 | 
			
		||||
    <link rel="stylesheet"
 | 
			
		||||
          href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.2/css/bootstrap-select.min.css"
 | 
			
		||||
          integrity="sha256-an4uqLnVJ2flr7w0U74xiF4PJjO2N5Df91R2CUmCLCA=" crossorigin="anonymous"/>
 | 
			
		||||
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
 | 
			
		||||
          integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous"/>
 | 
			
		||||
 | 
			
		||||
    <!-- Custom styles for this template -->
 | 
			
		||||
    <link href="{{ static_cachebuster('css/main.css') }}" rel="stylesheet">
 | 
			
		||||
 | 
			
		||||
    <!-- Core JavaScript -->
 | 
			
		||||
		<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
 | 
			
		||||
		<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
 | 
			
		||||
		<script src="https://cdnjs.cloudflare.com/ajax/libs/markdown-it/8.3.1/markdown-it.min.js" integrity="sha256-3WZyZQOe+ql3pLo90lrkRtALrlniGdnf//gRpW0UQks=" crossorigin="anonymous"></script>
 | 
			
		||||
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"
 | 
			
		||||
            integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
 | 
			
		||||
    <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"
 | 
			
		||||
            integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
 | 
			
		||||
    <script src="https://cdnjs.cloudflare.com/ajax/libs/markdown-it/8.3.1/markdown-it.min.js"
 | 
			
		||||
            integrity="sha256-3WZyZQOe+ql3pLo90lrkRtALrlniGdnf//gRpW0UQks=" crossorigin="anonymous"></script>
 | 
			
		||||
    <!-- Modified to not apply border-radius to selectpickers and stuff so our navbar looks cool -->
 | 
			
		||||
    {% assets "bs_js" %}
 | 
			
		||||
        <script src="{{ static_cachebuster('js/bootstrap-select.min.js') }}"></script>
 | 
			
		||||
@ -61,7 +83,8 @@
 | 
			
		||||
    {% if config.SITE_FLAVOR == 'nyaa' %}
 | 
			
		||||
        <link rel="search" type="application/opensearchdescription+xml" title="Nyaa.si" href="/static/search.xml">
 | 
			
		||||
    {% elif config.SITE_FLAVOR == 'sukebei' %}
 | 
			
		||||
		<link rel="search" type="application/opensearchdescription+xml" title="Sukebei (Nyaa.si)" href="/static/search-sukebei.xml">
 | 
			
		||||
        <link rel="search" type="application/opensearchdescription+xml" title="Sukebei (Nyaa.si)"
 | 
			
		||||
              href="/static/search-sukebei.xml">
 | 
			
		||||
    {% endif %}
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
@ -69,7 +92,8 @@
 | 
			
		||||
<nav class="navbar navbar-default navbar-static-top navbar-inverse">
 | 
			
		||||
    <div class="container">
 | 
			
		||||
        <div class="navbar-header">
 | 
			
		||||
					<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
 | 
			
		||||
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
 | 
			
		||||
                    aria-expanded="false" aria-controls="navbar">
 | 
			
		||||
                <span class="sr-only">Toggle navigation</span>
 | 
			
		||||
                <span class="icon-bar"></span>
 | 
			
		||||
                <span class="icon-bar"></span>
 | 
			
		||||
@ -81,35 +105,38 @@
 | 
			
		||||
        {% set search_placeholder = 'Search {} torrents...'.format(search_username) if user_page else 'Search...' %}
 | 
			
		||||
        <div id="navbar" class="navbar-collapse collapse">
 | 
			
		||||
            <ul class="nav navbar-nav">
 | 
			
		||||
						<li {% if request.path == url_for('torrents.upload') %}class="active"{% endif %}><a href="{{ url_for('torrents.upload') }}">Upload</a></li>
 | 
			
		||||
						<li class="dropdown">
 | 
			
		||||
							<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
 | 
			
		||||
								Info
 | 
			
		||||
								<span class="caret"></span>
 | 
			
		||||
							</a>
 | 
			
		||||
							<ul class="dropdown-menu">
 | 
			
		||||
								<li {% if request.path == url_for('site.rules') %}class="active"{% endif %}><a href="{{ url_for('site.rules') }}">Rules</a></li>
 | 
			
		||||
								<li {% if request.path == url_for('site.help') %}class="active"{% endif %}><a href="{{ url_for('site.help') }}">Help</a></li>
 | 
			
		||||
								<li {% if request.path == url_for('site.trusted') %}class="active"{% endif %}><a href="{{ url_for('site.trusted') }}">Trusted</a></li>
 | 
			
		||||
							</ul>
 | 
			
		||||
                <li {% if request.path == url_for('torrents.upload') %}class="active"{% endif %}><a
 | 
			
		||||
                        href="{{ url_for('torrents.upload') }}">Upload</a></li>
 | 
			
		||||
                {#						<li class="dropdown">#}
 | 
			
		||||
                {#							<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">#}
 | 
			
		||||
                {#								Info#}
 | 
			
		||||
                {#								<span class="caret"></span>#}
 | 
			
		||||
                {#							</a>#}
 | 
			
		||||
                {#							<ul class="dropdown-menu">#}
 | 
			
		||||
                {#								<li {% if request.path == url_for('site.rules') %}class="active"{% endif %}><a href="{{ url_for('site.rules') }}">Rules</a></li>#}
 | 
			
		||||
                {#								<li {% if request.path == url_for('site.help') %}class="active"{% endif %}><a href="{{ url_for('site.help') }}">Help</a></li>#}
 | 
			
		||||
                {#								<li {% if request.path == url_for('site.trusted') %}class="active"{% endif %}><a href="{{ url_for('site.trusted') }}">Trusted</a></li>#}
 | 
			
		||||
                {#							</ul>#}
 | 
			
		||||
                {#						</li>#}
 | 
			
		||||
                <li><a href="
 | 
			
		||||
                        {% if rss_filter %}{{ url_for('main.home', page='rss', **rss_filter) }}{% else %}{{ url_for('main.home', page='rss') }}{% endif %}">RSS</a>
 | 
			
		||||
                </li>
 | 
			
		||||
						<li><a href="{% if rss_filter %}{{ url_for('main.home', page='rss', **rss_filter) }}{% else %}{{ url_for('main.home', page='rss') }}{% endif %}">RSS</a></li>
 | 
			
		||||
						{% if config.SITE_FLAVOR == 'nyaa' %}
 | 
			
		||||
						<li><a href="//{{ config.EXTERNAL_URLS['fap'] }}">Fap</a></li>
 | 
			
		||||
						{% elif config.SITE_FLAVOR == 'sukebei' %}
 | 
			
		||||
						<li><a href="//{{ config.EXTERNAL_URLS['main'] }}">Fun</a></li>
 | 
			
		||||
						{% endif %}
 | 
			
		||||
                {% if g.user.is_moderator %}
 | 
			
		||||
                    <li class="dropdown">
 | 
			
		||||
							<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
 | 
			
		||||
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
 | 
			
		||||
                           aria-expanded="false">
 | 
			
		||||
                            Admin
 | 
			
		||||
                            <span class="caret"></span>
 | 
			
		||||
                        </a>
 | 
			
		||||
                        <ul class="dropdown-menu">
 | 
			
		||||
								<li {% if request.path == url_for('admin.reports') %}class="active"{% endif %}><a href="{{ url_for('admin.reports') }}">Reports</a></li>
 | 
			
		||||
								<li {% if request.path == url_for('admin.log') %}class="active"{% endif %}><a href="{{ url_for('admin.log') }}">Log</a></li>
 | 
			
		||||
								<li {% if request.path == url_for('admin.bans') %}class="active"{% endif %}><a href="{{ url_for('admin.bans') }}">Bans</a></li>
 | 
			
		||||
								<li {% if request.path == url_for('admin.trusted') %}class="active"{% endif %}><a href="{{ url_for('admin.trusted') }}">Trusted</a></li>
 | 
			
		||||
                            <li {% if request.path == url_for('admin.reports') %}class="active"{% endif %}><a
 | 
			
		||||
                                    href="{{ url_for('admin.reports') }}">Reports</a></li>
 | 
			
		||||
                            <li {% if request.path == url_for('admin.log') %}class="active"{% endif %}><a
 | 
			
		||||
                                    href="{{ url_for('admin.log') }}">Log</a></li>
 | 
			
		||||
                            <li {% if request.path == url_for('admin.bans') %}class="active"{% endif %}><a
 | 
			
		||||
                                    href="{{ url_for('admin.bans') }}">Bans</a></li>
 | 
			
		||||
                            <li {% if request.path == url_for('admin.trusted') %}class="active"{% endif %}><a
 | 
			
		||||
                                    href="{{ url_for('admin.trusted') }}">Trusted</a></li>
 | 
			
		||||
                        </ul>
 | 
			
		||||
                    </li>
 | 
			
		||||
                {% endif %}
 | 
			
		||||
@ -118,12 +145,14 @@
 | 
			
		||||
            <ul class="nav navbar-nav navbar-right">
 | 
			
		||||
                {% if g.user %}
 | 
			
		||||
                    <li class="dropdown">
 | 
			
		||||
							<a href="#" class="dropdown-toggle visible-lg visible-sm visible-xs" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
 | 
			
		||||
                        <a href="#" class="dropdown-toggle visible-lg visible-sm visible-xs" data-toggle="dropdown"
 | 
			
		||||
                           role="button" aria-haspopup="true" aria-expanded="false">
 | 
			
		||||
                            <i class="fa fa-user fa-fw"></i>
 | 
			
		||||
                            {{ g.user.username }}
 | 
			
		||||
                            <span class="caret"></span>
 | 
			
		||||
                        </a>
 | 
			
		||||
							<a href="#" class="dropdown-toggle hidden-lg hidden-sm hidden-xs" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
 | 
			
		||||
                        <a href="#" class="dropdown-toggle hidden-lg hidden-sm hidden-xs" data-toggle="dropdown"
 | 
			
		||||
                           role="button" aria-haspopup="true" aria-expanded="false">
 | 
			
		||||
                            <i class="fa fa-user fa-fw"></i>
 | 
			
		||||
                            <span class="caret"></span>
 | 
			
		||||
                        </a>
 | 
			
		||||
@ -156,12 +185,14 @@
 | 
			
		||||
                    </li>
 | 
			
		||||
                {% else %}
 | 
			
		||||
                    <li class="dropdown">
 | 
			
		||||
							<a href="#" class="dropdown-toggle visible-lg visible-sm visible-xs" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
 | 
			
		||||
                        <a href="#" class="dropdown-toggle visible-lg visible-sm visible-xs" data-toggle="dropdown"
 | 
			
		||||
                           role="button" aria-haspopup="true" aria-expanded="false">
 | 
			
		||||
                            <i class="fa fa-user fa-fw"></i>
 | 
			
		||||
                            Guest
 | 
			
		||||
                            <span class="caret"></span>
 | 
			
		||||
                        </a>
 | 
			
		||||
							<a href="#" class="dropdown-toggle hidden-lg hidden-sm hidden-xs" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
 | 
			
		||||
                        <a href="#" class="dropdown-toggle hidden-lg hidden-sm hidden-xs" data-toggle="dropdown"
 | 
			
		||||
                           role="button" aria-haspopup="true" aria-expanded="false">
 | 
			
		||||
                            <i class="fa fa-user fa-fw"></i>
 | 
			
		||||
                            <span class="caret"></span>
 | 
			
		||||
                        </a>
 | 
			
		||||
@ -182,73 +213,60 @@
 | 
			
		||||
                    </li>
 | 
			
		||||
                {% endif %}
 | 
			
		||||
            </ul>
 | 
			
		||||
					{% set nyaa_cats = [('1_0', 'Anime', 'Anime'),
 | 
			
		||||
						('1_1', '- Anime Music Video', 'Anime - AMV'),
 | 
			
		||||
						('1_2', '- English-translated', 'Anime - English'),
 | 
			
		||||
						('1_3', '- Non-English-translated', 'Anime - Non-English'),
 | 
			
		||||
						('1_4', '- Raw', 'Anime - Raw'),
 | 
			
		||||
						('2_0', 'Audio', 'Audio'),
 | 
			
		||||
						('2_1', '- Lossless', 'Audio - Lossless'),
 | 
			
		||||
						('2_2', '- Lossy', 'Audio - Lossy'),
 | 
			
		||||
						('3_0', 'Literature', 'Literature'),
 | 
			
		||||
						('3_1', '- English-translated', 'Literature - English'),
 | 
			
		||||
						('3_2', '- Non-English-translated', 'Literature - Non-English'),
 | 
			
		||||
						('3_3', '- Raw', 'Literature - Raw'),
 | 
			
		||||
						('4_0', 'Live Action', 'Live Action'),
 | 
			
		||||
						('4_1', '- English-translated', 'Live Action - English'),
 | 
			
		||||
						('4_2', '- Idol/Promotional Video', 'Live Action - Idol/PV'),
 | 
			
		||||
						('4_3', '- Non-English-translated', 'Live Action - Non-English'),
 | 
			
		||||
						('4_4', '- Raw', 'Live Action - Raw'),
 | 
			
		||||
						('5_0', 'Pictures', 'Pictures'),
 | 
			
		||||
						('5_1', '- Graphics', 'Pictures - Graphics'),
 | 
			
		||||
						('5_2', '- Photos', 'Pictures - Photos'),
 | 
			
		||||
						('6_0', 'Software', 'Software'),
 | 
			
		||||
						('6_1', '- Applications', 'Software - Apps'),
 | 
			
		||||
						('6_2', '- Games', 'Software - Games')]
 | 
			
		||||
					%}
 | 
			
		||||
 | 
			
		||||
					{% set suke_cats = [('1_0', 'Art', 'Art'),
 | 
			
		||||
						('1_1', '- Anime', 'Art - Anime'),
 | 
			
		||||
						('1_2', '- Doujinshi', 'Art - Doujinshi'),
 | 
			
		||||
						('1_3', '- Games', 'Art - Games'),
 | 
			
		||||
						('1_4', '- Manga', 'Art - Manga'),
 | 
			
		||||
						('1_5', '- Pictures', 'Art - Pictures'),
 | 
			
		||||
						('2_0', 'Real Life', 'Real Life'),
 | 
			
		||||
						('2_1', '- Photobooks and Pictures', 'Real Life - Pictures'),
 | 
			
		||||
						('2_2', '- Videos', 'Real Life - Videos')]
 | 
			
		||||
					%}
 | 
			
		||||
 | 
			
		||||
					{% if config.SITE_FLAVOR == 'nyaa' %}
 | 
			
		||||
						{% set used_cats = nyaa_cats %}
 | 
			
		||||
					{% elif config.SITE_FLAVOR == 'sukebei' %}
 | 
			
		||||
						{% set used_cats = suke_cats %}
 | 
			
		||||
					{% endif %}
 | 
			
		||||
            {% set used_cats = [('1_0', 'Books', 'Books'),
 | 
			
		||||
                                        ('1_1', '- Fiction', 'Books - Fiction'),
 | 
			
		||||
                                        ('1_2', '- Non-Fiction', 'Books - Non-Fiction'),
 | 
			
		||||
                                        ('2_0', 'Media', 'Media'),
 | 
			
		||||
                                        ('2_1', '- Audio', 'Media - Audio'),
 | 
			
		||||
                                        ('2_2', '- Video', 'Media - Video'),
 | 
			
		||||
                                        ('2_2', '- Images', 'Media - Images'),
 | 
			
		||||
                                        ('3_0', 'Software', 'Software'),
 | 
			
		||||
                                        ('3_1', '- Misc', 'Software - Misc'),
 | 
			
		||||
                                        ('3_2', '- Games', 'Software - Games'),
 | 
			
		||||
                                        ('4_0', 'NSFW', 'NSFW'),
 | 
			
		||||
                                        ('4_1', '- Pictures', 'NSFW - Pictures'),
 | 
			
		||||
                                        ('4_2', '- Videos', 'NSFW - Videos'),
 | 
			
		||||
                                        ('4_2', '- Audio', 'NSFW - Audio'),
 | 
			
		||||
                                        ('5_0', 'Misc', 'Misc'),
 | 
			
		||||
                                        ('5_1', '- Other', 'Misc - Other')] %}
 | 
			
		||||
 | 
			
		||||
            <div class="search-container visible-xs visible-sm">
 | 
			
		||||
                {# The mobile menu #}
 | 
			
		||||
                {% if user_page %}
 | 
			
		||||
						<form class="navbar-form navbar-right form" action="{{ url_for('users.view_user', user_name=user.username) }}" method="get">
 | 
			
		||||
                    <form class="navbar-form navbar-right form"
 | 
			
		||||
                          action="{{ url_for('users.view_user', user_name=user.username) }}" method="get">
 | 
			
		||||
                {% else %}
 | 
			
		||||
                    <form class="navbar-form navbar-right form" action="{{ url_for('main.home') }}" method="get">
 | 
			
		||||
                {% endif %}
 | 
			
		||||
 | 
			
		||||
							<input type="text" class="form-control" name="q" placeholder="{{ search_placeholder }}" value="{{ search["term"] if search is defined else '' }}">
 | 
			
		||||
                <input type="text" class="form-control" name="q" placeholder="{{ search_placeholder }}"
 | 
			
		||||
                       value="{{ search["term"] if search is defined else '' }}">
 | 
			
		||||
                <br>
 | 
			
		||||
 | 
			
		||||
                <select class="form-control" title="Filter" data-width="120px" name="f">
 | 
			
		||||
								<option value="0" title="No filter" {% if search is defined and search["quality_filter"] == "0" %}selected{% else %}selected{% endif %}>No filter</option>
 | 
			
		||||
								<option value="1" title="No remakes" {% if search is defined and search["quality_filter"] == "1" %}selected{% endif %}>No remakes</option>
 | 
			
		||||
								<option value="2" title="Trusted only" {% if search is defined and search["quality_filter"] == "2" %}selected{% endif %}>Trusted only</option>
 | 
			
		||||
                    <option value="0" title="No filter"
 | 
			
		||||
                            {% if search is defined and search["quality_filter"] == "0" %}selected{% else %}selected{% endif %}>
 | 
			
		||||
                        No filter
 | 
			
		||||
                    </option>
 | 
			
		||||
                    <option value="1" title="No remakes"
 | 
			
		||||
                            {% if search is defined and search["quality_filter"] == "1" %}selected{% endif %}>No remakes
 | 
			
		||||
                    </option>
 | 
			
		||||
                    <option value="2" title="Trusted only"
 | 
			
		||||
                            {% if search is defined and search["quality_filter"] == "2" %}selected{% endif %}>Trusted
 | 
			
		||||
                        only
 | 
			
		||||
                    </option>
 | 
			
		||||
                </select>
 | 
			
		||||
 | 
			
		||||
                <br>
 | 
			
		||||
 | 
			
		||||
                <select class="form-control" title="Category" data-width="200px" name="c">
 | 
			
		||||
								<option value="0_0" title="All categories" {% if search is defined and search["category"] == "0_0" %}selected{% else %}selected{% endif %}>
 | 
			
		||||
                    <option value="0_0" title="All categories"
 | 
			
		||||
                            {% if search is defined and search["category"] == "0_0" %}selected{% else %}selected{% endif %}>
 | 
			
		||||
                        All categories
 | 
			
		||||
                    </option>
 | 
			
		||||
                    {% for cat_id, cat_name, cat_title in used_cats %}
 | 
			
		||||
								<option value="{{ cat_id }}" title="{{ cat_title }}" {% if search is defined and search.category == cat_id %}selected{% endif %}>
 | 
			
		||||
                        <option value="{{ cat_id }}" title="{{ cat_title }}"
 | 
			
		||||
                                {% if search is defined and search.category == cat_id %}selected{% endif %}>
 | 
			
		||||
                            {{ cat_name }}
 | 
			
		||||
                        </option>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
@ -263,16 +281,27 @@
 | 
			
		||||
            </div><!--/.search-container -->
 | 
			
		||||
 | 
			
		||||
            {% if user_page %}
 | 
			
		||||
					<form class="navbar-form navbar-right form" action="{{ url_for('users.view_user', user_name=user.username) }}" method="get">
 | 
			
		||||
                <form class="navbar-form navbar-right form hidden-xs hidden-sm"
 | 
			
		||||
                      action="{{ url_for('users.view_user', user_name=user.username) }}" method="get">
 | 
			
		||||
            {% else %}
 | 
			
		||||
					<form class="navbar-form navbar-right form" action="{{ url_for('main.home') }}" method="get">
 | 
			
		||||
                <form class="navbar-form navbar-right form hidden-xs hidden-sm" action="{{ url_for('main.home') }}"
 | 
			
		||||
                      method="get">
 | 
			
		||||
            {% endif %}
 | 
			
		||||
						<div class="input-group search-container hidden-xs hidden-sm">
 | 
			
		||||
            <div class="input-group search-container">
 | 
			
		||||
                <div class="input-group-btn nav-filter" id="navFilter-criteria">
 | 
			
		||||
                    <select class="selectpicker show-tick" title="Filter" data-width="120px" name="f">
 | 
			
		||||
									<option value="0" title="No filter" {% if search is defined and search["quality_filter"] == "0" %}selected{% else %}selected{% endif %}>No filter</option>
 | 
			
		||||
									<option value="1" title="No remakes" {% if search is defined and search["quality_filter"] == "1" %}selected{% endif %}>No remakes</option>
 | 
			
		||||
									<option value="2" title="Trusted only" {% if search is defined and search["quality_filter"] == "2" %}selected{% endif %}>Trusted only</option>
 | 
			
		||||
                        <option value="0" title="No filter"
 | 
			
		||||
                                {% if search is defined and search["quality_filter"] == "0" %}selected{% else %}selected{% endif %}>
 | 
			
		||||
                            No filter
 | 
			
		||||
                        </option>
 | 
			
		||||
                        <option value="1" title="No remakes"
 | 
			
		||||
                                {% if search is defined and search["quality_filter"] == "1" %}selected{% endif %}>No
 | 
			
		||||
                            remakes
 | 
			
		||||
                        </option>
 | 
			
		||||
                        <option value="2" title="Trusted only"
 | 
			
		||||
                                {% if search is defined and search["quality_filter"] == "2" %}selected{% endif %}>
 | 
			
		||||
                            Trusted only
 | 
			
		||||
                        </option>
 | 
			
		||||
                    </select>
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
@ -294,17 +323,20 @@
 | 
			
		||||
								</select>
 | 
			
		||||
								#}
 | 
			
		||||
                    <select class="selectpicker show-tick" title="Category" data-width="130px" name="c">
 | 
			
		||||
									<option value="0_0" title="All categories" {% if search is defined and search["category"] == "0_0" %}selected{% else %}selected{% endif %}>
 | 
			
		||||
                        <option value="0_0" title="All categories"
 | 
			
		||||
                                {% if search is defined and search["category"] == "0_0" %}selected{% else %}selected{% endif %}>
 | 
			
		||||
                            All categories
 | 
			
		||||
                        </option>
 | 
			
		||||
                        {% for cat_id, cat_name, cat_title in used_cats %}
 | 
			
		||||
									<option value="{{ cat_id }}" title="{{ cat_title }}" {% if search is defined and search.category == cat_id %}selected{% endif %}>
 | 
			
		||||
                            <option value="{{ cat_id }}" title="{{ cat_title }}"
 | 
			
		||||
                                    {% if search is defined and search.category == cat_id %}selected{% endif %}>
 | 
			
		||||
                                {{ cat_name }}
 | 
			
		||||
                            </option>
 | 
			
		||||
                        {% endfor %}
 | 
			
		||||
                    </select>
 | 
			
		||||
                </div>
 | 
			
		||||
							<input type="text" class="form-control search-bar" name="q" placeholder="{{ search_placeholder }}" value="{{ search['term'] if search is defined else '' }}" />
 | 
			
		||||
                <input type="text" class="form-control search-bar" name="q" placeholder="{{ search_placeholder }}"
 | 
			
		||||
                       value="{{ search['term'] if search is defined else '' }}"/>
 | 
			
		||||
                <div class="input-group-btn search-btn">
 | 
			
		||||
                    <button class="btn btn-primary" type="submit">
 | 
			
		||||
                        <i class="fa fa-search fa-fw"></i>
 | 
			
		||||
@ -328,11 +360,11 @@
 | 
			
		||||
    {% block body %}{% endblock %}
 | 
			
		||||
</div> <!-- /container -->
 | 
			
		||||
 | 
			
		||||
		<footer style="text-align: center;">
 | 
			
		||||
			<p>Dark Mode: <a href="#" id="themeToggle">Toggle</a></p>
 | 
			
		||||
			{% if config.COMMIT_HASH %}
 | 
			
		||||
			<p>Commit: <a href="https://github.com/nyaadevs/nyaa/tree/{{ config.COMMIT_HASH }}">{{ config.COMMIT_HASH[:7] }}</a></p>
 | 
			
		||||
			{% endif %}
 | 
			
		||||
		</footer>
 | 
			
		||||
{#		<footer style="text-align: center;">#}
 | 
			
		||||
{#			<p>Dark Mode: <a href="#" id="themeToggle">Toggle</a></p>#}
 | 
			
		||||
{#			{% if config.COMMIT_HASH %}#}
 | 
			
		||||
{#			<p>Commit: <a href="https://github.com/nyaadevs/nyaa/tree/{{ config.COMMIT_HASH }}">{{ config.COMMIT_HASH[:7] }}</a></p>#}
 | 
			
		||||
{#			{% endif %}#}
 | 
			
		||||
{#		</footer>#}
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
 | 
			
		||||
@ -19,7 +19,7 @@
 | 
			
		||||
 | 
			
		||||
{% if (use_elastic and torrent_query.hits.total.value > 0) or (torrent_query.items) %}
 | 
			
		||||
<div class="table-responsive">
 | 
			
		||||
	<table class="table table-bordered table-hover table-striped torrent-list">
 | 
			
		||||
	<table class="table torrent-list">
 | 
			
		||||
		<thead>
 | 
			
		||||
			<tr>
 | 
			
		||||
				{%+ call render_column_header("hdr-category", "width:80px;", center_text=True) -%}
 | 
			
		||||
@ -58,7 +58,7 @@
 | 
			
		||||
			{% set icon_dir = config.SITE_FLAVOR %}
 | 
			
		||||
			{% set torrents = torrent_query if use_elastic else torrent_query.items %}
 | 
			
		||||
			{% for torrent in torrents %}
 | 
			
		||||
			<tr class="{% if torrent.deleted %}deleted{% elif torrent.hidden %}warning{% elif torrent.remake %}danger{% elif torrent.trusted %}success{% else %}default{% endif %}">
 | 
			
		||||
			<tr class="{% if torrent.deleted %}deleted{% elif torrent.hidden %}warning{% elif torrent.remake %}danger{% elif torrent.trusted %}default{% else %}default{% endif %}">
 | 
			
		||||
				{% set cat_id = use_elastic and ((torrent.main_category_id|string) + '_' + (torrent.sub_category_id|string)) or torrent.sub_category.id_as_string %}
 | 
			
		||||
				<td>
 | 
			
		||||
					{% if use_elastic %}
 | 
			
		||||
 | 
			
		||||
@ -18,7 +18,7 @@
 | 
			
		||||
	{{ upload_form.csrf_token }}
 | 
			
		||||
 | 
			
		||||
	{% if config.ENFORCE_MAIN_ANNOUNCE_URL %}<p><strong>Important:</strong> Please include <kbd>{{ config.MAIN_ANNOUNCE_URL }}</kbd> in your trackers.</p>{% endif %}
 | 
			
		||||
	<p><strong>Important:</strong> Make sure you have read <strong><a href="{{ url_for('site.rules') }}">the rules</a></strong> before uploading!</p>
 | 
			
		||||
{#	<p><strong>Important:</strong> Make sure you have read <strong><a href="{{ url_for('site.rules') }}">the rules</a></strong> before uploading!</p>#}
 | 
			
		||||
	<br>
 | 
			
		||||
 | 
			
		||||
	{% if show_ratelimit %}
 | 
			
		||||
 | 
			
		||||