diff --git a/public/css/classic.css b/public/css/classic.css index 51b9c661..df0006f0 100644 --- a/public/css/classic.css +++ b/public/css/classic.css @@ -1,85 +1,162 @@ /* This is a placeholder so the classic theme can be used */ + + /* Ideally, the decorative parts of main.css would be here instead of there. This will have to do for now though */ -body { color: #333; background: #ededed; } -.header, .box, .pagination li, .user-menu { box-shadow: 1px 3px 4px rgba(0,0,0,0.1) } +body { + color: #333; + background: #ededed; +} +.header, .box, .pagination li, .user-menu { + box-shadow: 1px 3px 4px rgba(0, 0, 0, 0.1) +} a { - color: #196759; - pointer-events: auto; + color: #196759; + pointer-events: auto; +} + +a:hover { + color: #238BC7; } -a:hover { color: #238BC7; } .header { - background: #111; /* Old browsers */ - background: -moz-linear-gradient(bottom, #222 0%, #111 100%); - background: -webkit-linear-gradient(bottom, #222 0%, #111 100%); - background: linear-gradient(to top, #222 0%, #111 100%); - border-color: #444; + background: #111; + /* Old browsers */ + background: -moz-linear-gradient(bottom, #222 0%, #111 100%); + background: -webkit-linear-gradient(bottom, #222 0%, #111 100%); + background: linear-gradient(to top, #222 0%, #111 100%); + border-color: #444; +} + +.header .nav-btn { + color: #ccc; +} + +.header .nav-btn:hover { + color: #d5d5d5; } -.header .nav-btn { color: #ccc; } -.header .nav-btn:hover { color: #d5d5d5; } .box, .pagination li { - background: rgba(255,255,255, 0.8); - border-color: #BBC9CF !important; + background: rgba(255, 255, 255, 0.8); + border-color: #BBC9CF !important; } +.form-input { + border-color: #BBC9CF !important; + background: #fafafa; + color: #666; +} -.form-input { border-color: #BBC9CF !important; background: #fafafa; color: #666; } - -.btn:hover, .up-btn:hover { background: rgba(192,192,192,0.2); } - -.form-input:focus { box-shadow: 0 0 5px #fff; } +.btn:hover, .up-btn:hover { + background: rgba(192, 192, 192, 0.2); +} +.form-input:focus { + box-shadow: 0 0 5px #fff; +} select:after { - content: "AAAAA"; + content: "AAAAA"; } .header .h-user .user-avatar { - background: #111; - border-color: #444; + background: #111; + border-color: #444; } -table thead { background: #fff; } +table thead { + background: #fff; +} +th a { + color: #6E96AA; +} -th a { color: #6E96AA; } -th { border-color: #ddd !important; } -td { border-color: #ccc !important; } +th { + border-color: #ddd !important; +} -td.tr-se, .success-text { color: #22A243; } -td.tr-le, .error-text { color: #E84C4C; } +td { + border-color: #ccc !important; +} + +td.tr-se, .success-text { + color: #22A243; +} + +td.tr-le, .error-text { + color: #E84C4C; +} .btn-red { - background-color: #E84C4C; - color: #E8E8E8!important; + background-color: #E84C4C; + color: #E8E8E8!important; } .btn-red:hover { - color: #E8E8E8; + color: #E8E8E8; } -.torrent-info-box > p > a, .torrent-info-box > div > a, #description-box a { +.torrent-info-box>p>a, .torrent-info-box>div>a, #description-box a { color: #1fa4d0; } -.torrent-info-box > p > a:hover, .torrent-info-box > div > a:hover, #description-box a:hover { color: #1fa4d0; } + +.torrent-info-box>p>a:hover, .torrent-info-box>div>a:hover, #description-box a:hover { + color: #1fa4d0; +} + /* Original Nyaa colors, do NOT change! */ -.aplus, .btn-blue { background: #60B0F0; } -.trusted, .btn-green { background: #98D9A8; } -.remake, .btn-orange { background: #F0B080; } -.pagination .active { background: #d5d5d5; color: #222; } -.pagination .disabled { color: #d5d5d5; cursor: unset; } +.aplus, .btn-blue { + background: #60B0F0; +} -.sukebei { color: #9C7575; } -.sukebei a { color: #893636; } -.sukebei a:hover { color: #C7235D; } -.sukebei th { color: #9C7575; } -.sukebei th a { color: #893636; } -.sukebei #mascot { background-image: url('/img/mafuyu.svg'); background-size: 100%; } +.trusted, .btn-green { + background: #98D9A8; +} -.form-input.language { background-color: #f5f5f5; } +.remake, .btn-orange { + background: #F0B080; +} + +.pagination .active { + background: #d5d5d5; + color: #222; +} + +.pagination .disabled { + color: #d5d5d5; + cursor: unset; +} + +.sukebei { + color: #9C7575; +} + +.sukebei a { + color: #893636; +} + +.sukebei a:hover { + color: #C7235D; +} + +.sukebei th { + color: #9C7575; +} + +.sukebei th a { + color: #893636; +} + +.sukebei #mascot { + background-image: url('/img/mafuyu.svg'); + background-size: 100%; +} + +.form-input.language { + background-color: #f5f5f5; +} diff --git a/public/css/flags/flags.css b/public/css/flags/flags.css index 1a3f045d..72b20abf 100644 --- a/public/css/flags/flags.css +++ b/public/css/flags/flags.css @@ -9,7 +9,6 @@ background: url('flags.png') no-repeat; } - .flag.flag-zh { background-position: -16px 0; } diff --git a/public/css/g.css b/public/css/g.css index 8e2ec7ec..3cd550d0 100644 --- a/public/css/g.css +++ b/public/css/g.css @@ -1,92 +1,190 @@ -body { color: #373737; background: url('theme_g_anon/bg-body.png'); } +body { + color: #373737; + background: url('theme_g_anon/bg-body.png'); +} -.header, .user-menu { box-shadow: 1px 3px 4px hsla(200,20%,20%,0.15) } -.box, .pagination li { box-shadow: 1px 3px 4px hsla(270,20%,20%,0.15) } +.header, .user-menu { + box-shadow: 1px 3px 4px hsla(200, 20%, 20%, 0.15) +} -#mascot { background-image: url('/img/renchon.svg'); } -a { color: #676767; } -a:hover { color: #444; } +.box, .pagination li { + box-shadow: 1px 3px 4px hsla(270, 20%, 20%, 0.15) +} + +#mascot { + background-image: url('/img/renchon.svg'); +} + +a { + color: #676767; +} + +a:hover { + color: #444; +} .header { - background: #bfe3f3 url('theme_g_anon/bg-header-tile.png') repeat-x; - border-color: #1d6d90; + background: #bfe3f3 url('theme_g_anon/bg-header-tile.png') repeat-x; + border-color: #1d6d90; } -.header .nav-btn { color: #1d6d90; } -.header .nav-btn:hover { color: #2586B0; } -.box, .pagination li { background: hsla(198, 63%, 97%, 0.85); border-color: #cbbdd7 !important; } +.header .nav-btn { + color: #1d6d90; +} -.form-input { border-color: #c4c4c4 !important; background: #fff; color: #676767; } +.header .nav-btn:hover { + color: #2586B0; +} + +.box, .pagination li { + background: hsla(198, 63%, 97%, 0.85); + border-color: #cbbdd7 !important; +} + +.form-input { + border-color: #c4c4c4 !important; + background: #fff; + color: #676767; +} .header .h-user .user-avatar { - background: #99BFD0; - border-color: #a3c7d3; + background: #99BFD0; + border-color: #a3c7d3; } + .sukebei .header .h-user .user-avatar { - background: #bf99d0; - border-color: #d3a3d1; + background: #bf99d0; + border-color: #d3a3d1; } .header .h-user .user-menu { - background: #BDE0EF; - background: -moz-linear-gradient(top, #BDE0EF 0%, #ABCFDF 100%); - background: -webkit-linear-gradient(top, #BDE0EF 0%, #ABCFDF 100%); - background: linear-gradient(to bottom, #BDE0EF 0%, #ABCFDF 100%); - border-color: #1d6d90; + background: #BDE0EF; + background: -moz-linear-gradient(top, #BDE0EF 0%, #ABCFDF 100%); + background: -webkit-linear-gradient(top, #BDE0EF 0%, #ABCFDF 100%); + background: linear-gradient(to bottom, #BDE0EF 0%, #ABCFDF 100%); + border-color: #1d6d90; +} + +.header .h-user button:focus { + background-color: rgba(0, 100, 200, 0.15); } -.header .h-user button:focus {background-color: rgba(0,100,200, 0.15);} table thead { - background: #dcccea !important; /* Old browsers */ - background: -moz-linear-gradient(top, #dcccea 0%, #d7c6e7 100%) !important; - background: -webkit-linear-gradient(top, #dcccea 0%,#d7c6e7 100%) !important; - background: linear-gradient(to bottom, #dcccea 0%,#d7c6e7 100%) !important; + background: #dcccea !important; + /* Old browsers */ + background: -moz-linear-gradient(top, #dcccea 0%, #d7c6e7 100%) !important; + background: -webkit-linear-gradient(top, #dcccea 0%, #d7c6e7 100%) !important; + background: linear-gradient(to bottom, #dcccea 0%, #d7c6e7 100%) !important; } -th { color: #9b85ae; } -th a { color: #7A5C94; } +th { + color: #9b85ae; +} -th { border-color: #cbbdd7 !important; } -td { border-color: #e6eff4 !important; } +th a { + color: #7A5C94; +} -td.tr-se, .success-text { color: #22A243; } -td.tr-le, .error-text { color: #E84C4C; } +th { + border-color: #cbbdd7 !important; +} + +td { + border-color: #e6eff4 !important; +} + +td.tr-se, .success-text { + color: #22A243; +} + +td.tr-le, .error-text { + color: #E84C4C; +} .btn-red { - background-color: #E84C4C; - color: #E8E8E8!important; + background-color: #E84C4C; + color: #E8E8E8!important; } -.btn-red:hover { color: #E8E8E8; } +.btn-red:hover { + color: #E8E8E8; +} -.aplus, .btn-blue { background: hsla(200, 100%, 50%, 0.2) !important; } -.trusted, .btn-green { background: hsla(100, 100%, 50%, 0.2) !important; } -.remake, .btn-orange { background: hsla(30, 100%, 50%, 0.2) !important; } +.aplus, .btn-blue { + background: hsla(200, 100%, 50%, 0.2) !important; +} -.pagination .active { background: #cbbdd7; color: #444; } +.trusted, .btn-green { + background: hsla(100, 100%, 50%, 0.2) !important; +} -.pagination .disabled { color: #cbbdd7; cursor: unset; } +.remake, .btn-orange { + background: hsla(30, 100%, 50%, 0.2) !important; +} -.torrent-info-box > p > a, .torrent-info-box > div > a, #description-box a { +.pagination .active { + background: #cbbdd7; + color: #444; +} + +.pagination .disabled { + color: #cbbdd7; + cursor: unset; +} + +.torrent-info-box>p>a, .torrent-info-box>div>a, #description-box a { color: #1fa4d0; } -.torrent-info-box > p > a:hover, .torrent-info-box > div > a:hover, #description-box a:hover { color: #1fa4d0; } -.sukebei { color: #373737; } -.sukebei .header { background-image: url('theme_g_anon/s_bg-header-tile.png'); border-color: #C48CBE; } -.sukebei .header .nav-btn { color: #C48CBE; } -.sukebei .header .nav-btn:hover { color: #AD6CA6; } -.sukebei a { color: #676767; } -.sukebei a:hover { color: #444; } -.sukebei th { color: #9b85ae; } -.sukebei th a { color: #7A5C94; } -.sukebei tr:nth-child(2n+1) { background: hsla(330, 100%, 91%, 0.2); } -.sukebei .header .h-user button:focus {background-color: rgba(150,100,255, 0.16);} +.torrent-info-box>p>a:hover, .torrent-info-box>div>a:hover, #description-box a:hover { + color: #1fa4d0; +} + +.sukebei { + color: #373737; +} + +.sukebei .header { + background-image: url('theme_g_anon/s_bg-header-tile.png'); + border-color: #C48CBE; +} + +.sukebei .header .nav-btn { + color: #C48CBE; +} + +.sukebei .header .nav-btn:hover { + color: #AD6CA6; +} + +.sukebei a { + color: #676767; +} + +.sukebei a:hover { + color: #444; +} + +.sukebei th { + color: #9b85ae; +} + +.sukebei th a { + color: #7A5C94; +} + +.sukebei tr:nth-child(2n+1) { + background: hsla(330, 100%, 91%, 0.2); +} + +.sukebei .header .h-user button:focus { + background-color: rgba(150, 100, 255, 0.16); +} .sukebei .header .h-user .user-menu { - background: #EFDCF0; - background: -moz-linear-gradient(top, #EFDCF0 0%, #EBCFEC 100%); - background: -webkit-linear-gradient(top, #EFDCF0 0%, #EBCFEC 100%); - background: linear-gradient(to bottom, #EFDCF0 0%, #EBCFEC 100%); - border-color: #C48CBE; + background: #EFDCF0; + background: -moz-linear-gradient(top, #EFDCF0 0%, #EBCFEC 100%); + background: -webkit-linear-gradient(top, #EFDCF0 0%, #EBCFEC 100%); + background: linear-gradient(to bottom, #EFDCF0 0%, #EBCFEC 100%); + border-color: #C48CBE; } diff --git a/public/css/main.css b/public/css/main.css index 0db5eaf7..b44907d4 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -1,398 +1,578 @@ /* Main */ -* { box-sizing: border-box; } -.hide { display: none; } -a { text-decoration: none; } +* { + box-sizing: border-box; +} + +.hide { + display: none; +} + +a { + text-decoration: none; +} + .header, .pagination { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; } body { - font-size: 14px; - font-family: 'Noto Sans', Arial, sans-serif; - -webkit-text-size-adjust: 100%; + font-size: 14px; + font-family: 'Noto Sans', Arial, sans-serif; + -webkit-text-size-adjust: 100%; } -#mascot { background: url('/img/renchon.svg') no-repeat right bottom transparent; } -.sukebei #mascot { background-image: url('/img/mafuyu.svg'); background-size: 100%; } #mascot { - position: fixed; - z-index: 1; - bottom: 0; - right: 0; - width: 60vh; - max-width: 100%; - height: 60vh; - -webkit-tap-highlight-color: transparent; - pointer-events: auto; - cursor: pointer; + background: url('/img/renchon.svg') no-repeat right bottom transparent; +} + +.sukebei #mascot { + background-image: url('/img/mafuyu.svg'); + background-size: 100%; +} + +#mascot { + position: fixed; + z-index: 1; + bottom: 0; + right: 0; + width: 60vh; + max-width: 100%; + height: 60vh; + -webkit-tap-highlight-color: transparent; + pointer-events: auto; + cursor: pointer; } #mascot.custom-mascot { - background-size: contain; + background-size: contain; } .header { - z-index: 3; - position: fixed; - width: 100%; - top: 0; left: 0; - height: 60px; - border-bottom: 1px solid; + z-index: 3; + position: fixed; + width: 100%; + top: 0; + left: 0; + height: 60px; + border-bottom: 1px solid; } + .container { - max-width: 1080px; - margin: 0 auto; + max-width: 1080px; + margin: 0 auto; } + .content { - position: relative; - z-index: 2; + position: relative; + z-index: 2; } .header .container { - position: relative; - width: auto; + position: relative; + width: auto; } -.header .container > div { - line-height: 60px; - vertical-align: middle; - padding: 0 1rem; +.header .container>div { + line-height: 60px; + vertical-align: middle; + padding: 0 1rem; } -.h-right > div { -float: right; } +.h-right>div { + float: right; +} .h-left { - position: absolute; - left: 0; - text-align: left; + position: absolute; + left: 0; + text-align: left; } + .h-right { - position: absolute; - right: 0; - text-align: right; + position: absolute; + right: 0; + text-align: right; } -.h-logo { height: 60px; } + +.h-logo { + height: 60px; +} + .h-logo, .h-nav { - display: inline-block; - float: left; - /* Property is ignored due to the display. With 'display: inline-block', float properties have no effect. */ + display: inline-block; + float: left; + /* Property is ignored due to the display. With 'display: inline-block', float properties have no effect. */ } + .header .h-logo img { - height: 60px; - padding: 5px; + height: 60px; + padding: 5px; } .header .nav-btn { - display: inline-block; - vertical-align: middle; - padding: 0 10px; - text-decoration: none; - background: none; - border: none; + display: inline-block; + vertical-align: middle; + padding: 0 10px; + text-decoration: none; + background: none; + border: none; } +.header .h-search { + margin-right: 8px; +} -.header .h-search { margin-right: 8px; } -.header .h-search .form-input { font-size: 80%; line-height: 18px; } +.header .h-search .form-input { + font-size: 80%; + line-height: 18px; +} -.header .h-search select.form-input { max-width: 110px !important; } +.header .h-search select.form-input { + max-width: 110px !important; +} .form-input { - border-radius: 3px; - padding: 5px 5px ; - height: 30px; - border: 1px solid; + border-radius: 3px; + padding: 5px 5px; + height: 30px; + border: 1px solid; } select.form-input { - -webkit-appearance: none; - -moz-appearance: none; - padding-right: 1.5rem; - background-image: url('data:image/svg+xml;charset=UTF-8,'); - background-position: right center; - background-repeat: no-repeat; - background-size: auto 40%; + -webkit-appearance: none; + -moz-appearance: none; + padding-right: 1.5rem; + background-image: url('data:image/svg+xml;charset=UTF-8,'); + background-position: right center; + background-repeat: no-repeat; + background-size: auto 40%; } .form-icon { - background: none ; - border-color: transparent !important; - box-shadow: none; - pointer-events: none; + background: none; + border-color: transparent !important; + box-shadow: none; + pointer-events: none; } -.form-input.search-box { margin-right: -20px; padding-right: 20px; } -.form-input.search-box + .icon-search { - left: -5px; - top: -1px; - position: relative; - padding: 0; - width: 16px; - height: 24px; - box-shadow: none; - border: none; - vertical-align: middle; +.form-input.search-box { + margin-right: -20px; + padding-right: 20px; } -.form-input.refine { - border-radius: 0 3px 3px 0; - border-left: none; - margin-left:-4px; +.form-input.search-box+.icon-search { + left: -5px; + top: -1px; + position: relative; + padding: 0; + width: 16px; + height: 24px; + box-shadow: none; + border: none; + vertical-align: middle; +} + +.form-input.refine { + border-radius: 0 3px 3px 0; + border-left: none; + margin-left: -4px; } .form-input.language { - max-width: 426px; - height: auto; - border-radius: 5px; - background-color: #F7F8F9; - padding: 10px 4px 9px 7px; + max-width: 426px; + height: auto; + border-radius: 5px; + background-color: #F7F8F9; + padding: 10px 4px 9px 7px; } -.language span.input-group { display: inline-block; padding-right: 4px; } -.language span.input-group.highlighted { - border: 1px solid #c4c4c4; - background-color: hsla(30, 100%, 50%, 0.2) !important; - padding-right: 2px; - border-radius: 5px; +.language span.input-group { + display: inline-block; + padding-right: 4px; +} + +.language span.input-group.highlighted { + border: 1px solid #c4c4c4; + background-color: hsla(30, 100%, 50%, 0.2) !important; + padding-right: 2px; + border-radius: 5px; +} + +.language span.input-group span { + display: none; +} + +.language .input-group label { + margin-bottom: 1px; +} + +.language .input-group input { + margin-right: 4px; } -.language span.input-group span { display: none; } -.language .input-group label { margin-bottom: 1px; } -.language .input-group input { margin-right: 4px; } .not-important { - font-size: 9pt; - margin: 2px 3px; - color: #8a8a8a; + font-size: 9pt; + margin: 2px 3px; + color: #8a8a8a; } .header .h-user { - display: inline-block; - width: 150px; + display: inline-block; + width: 150px; } .header .h-user .nav-btn { - float: right; - padding: 0; - height: 60px; - width: 150px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; + float: right; + padding: 0; + height: 60px; + width: 150px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } -.header .h-user button:focus {outline:none; background-color: rgba(0,0,0, 0.3);}::-moz-focus-inner {border:0;} +.header .h-user button:focus { + outline: none; + background-color: rgba(0, 0, 0, 0.3); +} + +::-moz-focus-inner { + border: 0; +} .header .h-user .user-avatar { - float: right; - height: 40px; width: 40px; - margin: 10px 5px 10px 10px; - border: 1px solid; - } + float: right; + height: 40px; + width: 40px; + margin: 10px 5px 10px 10px; + border: 1px solid; +} .header .h-user .user-menu { - display: none; - border: 1px solid; - border-top: none; - border-radius: 0 0 5px 5px; - width:150px; + display: none; + border: 1px solid; + border-top: none; + border-radius: 0 0 5px 5px; + width: 150px; } + .header .h-user .user-menu { - background: #222; /* Old browsers */ - background: -moz-linear-gradient(bottom, #333 0%, #222 100%); - background: -webkit-linear-gradient(bottom, #333 0%, #222 100%); - background: linear-gradient(to top, #333 0%, #222 100%); - border-color: #444; - position: relative; + background: #222; + /* Old browsers */ + background: -moz-linear-gradient(bottom, #333 0%, #222 100%); + background: -webkit-linear-gradient(bottom, #333 0%, #222 100%); + background: linear-gradient(to top, #333 0%, #222 100%); + border-color: #444; + position: relative; } .header .h-user .user-menu .nav-btn { - float: none; - display: block; - padding: 0px 10px; - height: 43px; - line-height: 40px; - text-align: left; + float: none; + display: block; + padding: 0px 10px; + height: 43px; + line-height: 40px; + text-align: left; } -.header .h-user .nav-btn:focus + .user-menu, -.header .h-user .user-menu:hover { - display: inline-block; +.header .h-user .nav-btn:focus+.user-menu, .header .h-user .user-menu:hover { + display: inline-block; } .header .h-user .user-info { - font-size: 10pt; - font-weight: bold; - display: block; - float: right; - height: 60px; - line-height: 60px; - /* Property is ignored due to the display. With 'display: block', vertical-align should not be used. */ - vertical-align: middle; - /* Hardcoded so the div always fills up all available space while floating right */ - max-width: 91px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - padding-right: 0; + font-size: 10pt; + font-weight: bold; + display: block; + float: right; + height: 60px; + line-height: 60px; + /* Property is ignored due to the display. With 'display: block', vertical-align should not be used. */ + vertical-align: middle; + /* Hardcoded so the div always fills up all available space while floating right */ + max-width: 91px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + padding-right: 0; +} + +.h-user .nav-btn.notif>.badge { + font-weight: bold; } -.h-user .nav-btn.notif > .badge { font-weight: bold; } .user-avatar { - border-radius: 3px; - overflow: hidden; -} -.user-avatar img { - max-width: 100%; - max-height: 100%; - width: auto; - height: auto; + border-radius: 3px; + overflow: hidden; } -#content { position: relative; top: 70px;} +.user-avatar img { + max-width: 100%; + max-height: 100%; + width: auto; + height: auto; +} + +#content { + position: relative; + top: 70px; +} + + /* #content { padding-top: 70px; } */ -.content { border-radius: 3px; padding: 5px 10px; pointer-events: auto; } + +.content { + border-radius: 3px; + padding: 5px 10px; + pointer-events: auto; +} .box { - overflow: hidden; - border-radius: 4px; - border: 1px solid; - padding: 10px; - text-align: center; + overflow: hidden; + border-radius: 4px; + border: 1px solid; + padding: 10px; + text-align: center; } -.box.refine { text-align: left; } -.box.refine > h3 { - margin-top: 5px; - margin-bottom: 11px; +.box.refine { + text-align: left; } -.box.refine input[type="number"] { width: 49px; } -.box.refine input[type="number"].refine-userid { width: 65px; } -.form-refine { margin-bottom: 10px; width: 100%; display:inline-block; } -.form-refine input.spacing, .form-refine select.spacing { margin-right: 8px; } -.form-refine span.spacing { min-width: 100px; display: inline-block; } -.form-refine .refine-searchbox { border-radius: 3px 0 0 3px; width: 21%; } -.form-refine .refine-category { border-left: none; border-radius: 0 3px 3px 0; } +.box.refine>h3 { + margin-top: 5px; + margin-bottom: 11px; +} + +.box.refine input[type="number"] { + width: 49px; +} + +.box.refine input[type="number"].refine-userid { + width: 65px; +} + +.form-refine { + margin-bottom: 10px; + width: 100%; + display: inline-block; +} + +.form-refine input.spacing, .form-refine select.spacing { + margin-right: 8px; +} + +.form-refine span.spacing { + min-width: 100px; + display: inline-block; +} + +.form-refine .refine-searchbox { + border-radius: 3px 0 0 3px; + width: 21%; +} + +.form-refine .refine-category { + border-left: none; + border-radius: 0 3px 3px 0; +} .categories a { - display: inline-block; - width: 115px; - padding: 10px 5px; + display: inline-block; + width: 115px; + padding: 10px 5px; } -.results { padding: 0!important; } +.results { + padding: 0!important; +} table { - border-collapse:collapse; - width: 100%; - table-layout: fixed; + border-collapse: collapse; + width: 100%; + table-layout: fixed; } -th,.home-td,.user-td { - height: 37px; - text-align: center; - padding: 2px 5px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; +th, .home-td, .user-td { + height: 37px; + text-align: center; + padding: 2px 5px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } -.user-td.tr-cat { - padding: 4px 5px 4px 1px; - min-width: 74px!important; +.user-td.tr-cat { + padding: 4px 5px 4px 1px; + min-width: 74px!important; } -th, .home-td { border-bottom: 1px solid; } +th, .home-td { + border-bottom: 1px solid; +} .tr-cat div.nyaa-cat { - position: relative; - text-align: left; - border: 1px solid #696868!important; - border-radius: 4px; + position: relative; + text-align: left; + border: 1px solid #696868!important; + border-radius: 4px; } -.tr-cat a.category { - width: 100%; - height: 100%; - display: block; + +.tr-cat a.category { + width: 100%; + height: 100%; + display: block; } + .tr-cat .nyaa-cat img { - position: absolute; - bottom: -4px; - display: block; - left: 8px; -} -.nyaa-cat > a > img.flag:hover { - -webkit-filter: brightness(1.2); - filter: brightness(1.2); + position: absolute; + bottom: -4px; + display: block; + left: 8px; } +.nyaa-cat>a>img.flag:hover { + -webkit-filter: brightness(1.2); + filter: brightness(1.2); +} -th { border-bottom-width: 2px; } +th { + border-bottom-width: 2px; +} -.hidden { opacity: 0.475; } -.tr-cat { width: 90px; text-align: center; } -.tr-flag { white-space: initial!important; } -.tr-name { width: auto; text-align: left; white-space: normal; word-break: break-word; font-weight: bold; } -.tr-links { width: 48px; overflow:initial; text-align: left; padding: 0 2px!important; } -.tr-cs { width: 15px; overflow: initial; text-overflow: initial; padding: 0; } -.tr-cs .comment-icon { margin-bottom: 4px; } -.tr-size { width: 90px; } -.tr-se, .tr-le { font-weight: bold; } -.tr-se, .tr-le, .tr-dl { width: 50px; } -.tr-date { width: 124px; } +.hidden { + opacity: 0.475; +} -.tr-links >a > div { width: 18px; } -.tr-se > a > .sort-arrows, -.tr-le > a > .sort-arrows, -.tr-dl > a > .sort-arrows { margin-left: 0; } +.tr-cat { + width: 90px; + text-align: center; +} + +.tr-flag { + white-space: initial!important; +} + +.tr-name { + width: auto; + text-align: left; + white-space: normal; + word-break: break-word; + font-weight: bold; +} + +.tr-links { + width: 48px; + overflow: initial; + text-align: left; + padding: 0 2px!important; +} + +.tr-cs { + width: 15px; + overflow: initial; + text-overflow: initial; + padding: 0; +} + +.tr-cs .comment-icon { + margin-bottom: 4px; +} + +.tr-size { + width: 90px; +} + +.tr-se, .tr-le { + font-weight: bold; +} + +.tr-se, .tr-le, .tr-dl { + width: 50px; +} + +.tr-date { + width: 124px; +} + +.tr-links>a>div { + width: 18px; +} + +.tr-se>a>.sort-arrows, .tr-le>a>.sort-arrows, .tr-dl>a>.sort-arrows { + margin-left: 0; +} + +.sort-arrows { + margin-left: 0.2rem; +} -.sort-arrows { margin-left: 0.2rem; } .sort-arrows span { - font-size: 100%; - letter-spacing: -0.3rem; + font-size: 100%; + letter-spacing: -0.3rem; +} + +.sort-arrows .sortarrowdim { + opacity: 0.25; +} + +.sort-arrows a:hover { + opacity: 0.8; +} + +.sort-arrows .active { + opacity: 1; } -.sort-arrows .sortarrowdim { opacity: 0.25; } -.sort-arrows a:hover { opacity: 0.8; } -.sort-arrows .active { opacity: 1; } .pagination { - text-align: center; - padding: 1rem 1rem 0 1rem; - position: relative; - z-index: 2; + text-align: center; + padding: 1rem 1rem 0 1rem; + position: relative; + z-index: 2; } + .pagination li { - border: 1px solid; - display: inline-block; - padding: 0.4rem; - border-right-width: 0; - list-style-type: none; - text-align: center; - min-width: 35px; + border: 1px solid; + display: inline-block; + padding: 0.4rem; + border-right-width: 0; + list-style-type: none; + text-align: center; + min-width: 35px; } -.pagination a:first-child li { border-radius: 3px 0 0 3px; } -.pagination a:nth-last-child(2) li { border-radius: 0 3px 3px 0; border-right-width: 1px !important} +.pagination a:first-child li { + border-radius: 3px 0 0 3px; +} -textarea { max-width: 100%; } +.pagination a:nth-last-child(2) li { + border-radius: 0 3px 3px 0; + border-right-width: 1px !important +} -#footer { width: 100%; bottom: 0; left: 0; } +textarea { + max-width: 100%; +} + +#footer { + width: 100%; + bottom: 0; + left: 0; +} .footer { - text-align: center; - padding: 1rem 0 1.2rem 0; - position: relative; - z-index: 2; - } + text-align: center; + padding: 1rem 0 1.2rem 0; + position: relative; + z-index: 2; +} .footer-opt { - bottom: 0; - font-size: 90%; - margin-bottom: 1.2rem; + bottom: 0; + font-size: 90%; + margin-bottom: 1.2rem; } #commit.new:after { @@ -405,349 +585,478 @@ textarea { max-width: 100%; } } html, body { - height: 100%; + height: 100%; } + /* Global icon formmating */ + [class^="icon-"], [class*=" icon-"] { - display: inline-block; - vertical-align: middle; -} -.torrent-buttons a [class^="icon-"], .torrent-buttons a [class*=" icon-"],a.form-input.btn-green > div[class^="icon-"], a.form-input.btn-green > div[class*="icon-"] { - vertical-align: initial; + display: inline-block; + vertical-align: middle; } +.torrent-buttons a [class^="icon-"], .torrent-buttons a [class*=" icon-"], a.form-input.btn-green>div[class^="icon-"], a.form-input.btn-green>div[class*="icon-"] { + vertical-align: initial; +} -#mascotKeepHide { pointer-events: auto; } +#mascotKeepHide { + pointer-events: auto; +} /* holy fucking shit fuck responsive design */ + /* hide the username */ -@media (max-width: 1100px) { - .header .h-user { width: 58px; } - .header .h-user .user-menu { right: 100px; } - .header .h-user .user-info { display: none; } - .header .h-user > .nav-btn { padding: 0px; width: 50px; } + +@media (max-width: 1100px) { + .header .h-user { + width: 58px; + } + .header .h-user .user-menu { + right: 100px; + } + .header .h-user .user-info { + display: none; + } + .header .h-user>.nav-btn { + padding: 0px; + width: 50px; + } } -@media (min-width: 960px) { .visible-md { display: none } } - -@media (max-width: 960px) { - .hide-md { display: none; } - .visible-md { display: block } +@media (min-width: 960px) { + .visible-md { + display: none + } } -.results.box > table > thead.torrent-info > tr { height: 40px; } +@media (max-width: 960px) { + .hide-md { + display: none; + } + .visible-md { + display: block + } +} + +.results.box>table>thead.torrent-info>tr { + height: 40px; +} @media (max-width: 810px) { - .torrent-info-row > td { - display: block; - } - .torrent-info-td { - width: 100% !important; - } - td.torrent-view-td.torrent-info-data { - padding-left: 5px; - } - .profile-main { - display: inline-grid !important; - } - .profile-panel, .profile-content { - border-radius: 4px; - border-right: 1px solid; - width: 100% !important; - margin-bottom: 20px; - } - .hide-xs { - display: none !important; - } - #description-box img { - width: 100%; - height: auto; - } - .header .h-user { width: 46px; } - .box { padding: 7px; } - .tr-cat { width: 71px; } - .torrent-preview-table .tr-cat { width: 74px; } - .tr-se, .tr-le { width: 36px; } - .tr-links { width: 48px; } - .header .h-search input { width: 90px !important; } - .header .h-search input:focus { width: 150px !important; } - .box { padding: 8px; } - th, .home-td, .user-td { padding: 2px 2px; } + .torrent-info-row>td { + display: block; + } + .torrent-info-td { + width: 100% !important; + } + td.torrent-view-td.torrent-info-data { + padding-left: 5px; + } + .profile-main { + display: inline-grid !important; + } + .profile-panel, .profile-content { + border-radius: 4px; + border-right: 1px solid; + width: 100% !important; + margin-bottom: 20px; + } + .hide-xs { + display: none !important; + } + #description-box img { + width: 100%; + height: auto; + } + .header .h-user { + width: 46px; + } + .box { + padding: 7px; + } + .tr-cat { + width: 71px; + } + .torrent-preview-table .tr-cat { + width: 74px; + } + .tr-se, .tr-le { + width: 36px; + } + .tr-links { + width: 48px; + } + .header .h-search input { + width: 90px !important; + } + .header .h-search input:focus { + width: 150px !important; + } + .box { + padding: 8px; + } + th, .home-td, .user-td { + padding: 2px 2px; + } } @media (max-width: 520px) { - .form-input.language { width: 281px; } - .form-input.refine { display: none; } - .tr-links { width: 44px; } - .hide-smol { display: none!important; } + .form-input.language { + width: 281px; + } + .form-input.refine { + display: none; + } + .tr-links { + width: 44px; + } + .hide-smol { + display: none!important; + } } .up-input { - width: 100%; - margin-bottom: 10px; + width: 100%; + margin-bottom: 10px; } + .input-label { - font-size: large; - font-weight: bold; + font-size: large; + font-weight: bold; } + .up-btn { - margin: 10px 0; + margin: 10px 0; } .profile-sidebar { - display: inline-block; - text-align: center; -} -.profile-usertitle { - margin-top: 5px; - border-radius: 3px; + display: inline-block; + text-align: center; } -.profile-usertitle-name { margin-bottom: 2px; } -.profile-usertitle-uploadcount span { font-weight: bold; margin-left: 2px;} -.profile-usertitle-job { font-style: italic; margin: 0; } +.profile-usertitle { + margin-top: 5px; + border-radius: 3px; +} + +.profile-usertitle-name { + margin-bottom: 2px; +} + +.profile-usertitle-uploadcount span { + font-weight: bold; + margin-left: 2px; +} + +.profile-usertitle-job { + font-style: italic; + margin: 0; +} .profile-userpic img { - border-radius: 6px; + border-radius: 6px; } + .profile-usermenu { - display: inline-grid; + display: inline-grid; } + .profile-userbuttons { - display: inline-flex; - margin-bottom: 5px; + display: inline-flex; + margin-bottom: 5px; } .torrent-hr { - font-size: large; - font-weight: bold; + font-size: large; + font-weight: bold; } .torrent-info-label { - width: 15%; - vertical-align: top; - font-weight: bold; + width: 15%; + vertical-align: top; + font-weight: bold; } .torrent-info-data { - width: 50%; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; + width: 50%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } -.torrent-info-data > span { - margin-right: 3px; - display: inline-block; + +.torrent-info-data>span { + margin-right: 3px; + display: inline-block; } -.torrent-info-data > span.big { - width: 31%; - min-width: 160px; + +.torrent-info-data>span.big { + width: 31%; + min-width: 160px; } -.torrent-info-data > span > img { - margin-right: 2px; + +.torrent-info-data>span>img { + margin-right: 2px; } + .torrent-info-row { - text-align: left; + text-align: left; } + .torrent-info-td { - padding: 4px 4px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; + padding: 4px 4px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .torrent-info-box { - border: 1px solid #ccc; - border-radius: 4px; + border: 1px solid #ccc; + border-radius: 4px; } + .torrent-info-box img { - max-width: 100%; - max-height: 100%; + max-width: 100%; + max-height: 100%; } -.torrent-info-box > p > a, .torrent-info-box > div > a, #description-box a { + +.torrent-info-box>p>a, .torrent-info-box>div>a, #description-box a { text-decoration: underline; } -#filelist > p { - padding-right: 14px; +#filelist>p { + padding-right: 14px; padding-left: 14px; } -.comment-box blockquote > p { opacity: 0.5; } -.comment-box blockquote > p:before { content: ">"; } +.comment-box blockquote>p { + opacity: 0.5; +} + +.comment-box blockquote>p:before { + content: ">"; +} + .comment-box { - margin-top: 10px; - padding-left: 7px; - padding-right: 7px; - margin-right: 30px; - margin-left: 30px; - word-break: break-word; - text-align: justify; + margin-top: 10px; + padding-left: 7px; + padding-right: 7px; + margin-right: 30px; + margin-left: 30px; + word-break: break-word; + text-align: justify; } + .comment-form { - margin-left: 10px; - margin-top: 10px; - margin-right: 10px; - padding-bottom: 5px; + margin-left: 10px; + margin-top: 10px; + margin-right: 10px; + padding-bottom: 5px; } + .comment-index { - margin-right: 5px; - margin-top: 5px; - float: right; + margin-right: 5px; + margin-top: 5px; + float: right; } + .torrent-buttons { - margin-top: 20px; - margin-right: 10px; - text-align: right; + margin-top: 20px; + margin-right: 10px; + text-align: right; } .profile-panel { - width: 23%; - border-right: none; - border-radius: 4px 0 0 4px; -} -.profile-main { - display: flex; -} -.profile-content { - width: 77%; - border-radius: 0 4px 4px 0; - text-align: left; - padding: 10px 10px 15px 10px; -} -.profile-content h3 { margin-bottom: 6px; margin-top: 4px;} -.profile-content .pagination { margin-bottom: 9px;} -div.profile-content.box > nav > ul > a > li { width: 100%; } -div.profile-content.box > nav > ul > a > li, nav.adminNav > ul > li { - border-right-width: 1px; + width: 23%; + border-right: none; + border-radius: 4px 0 0 4px; } +.profile-main { + display: flex; +} + +.profile-content { + width: 77%; + border-radius: 0 4px 4px 0; + text-align: left; + padding: 10px 10px 15px 10px; +} + +.profile-content h3 { + margin-bottom: 6px; + margin-top: 4px; +} + +.profile-content .pagination { + margin-bottom: 9px; +} + +div.profile-content.box>nav>ul>a>li { + width: 100%; +} + +div.profile-content.box>nav>ul>a>li, nav.adminNav>ul>li { + border-right-width: 1px; +} + + /* Filelist */ + .filelist-control { - cursor: pointer; + cursor: pointer; } + .filelist-control::before { - content: "\25B6 "; + content: "\25B6 "; } -input#show-filelist:checked ~ .filelist-control::before { - content: "\25BC "; + +input#show-filelist:checked~.filelist-control::before { + content: "\25BC "; } input#show-filelist { - display: none; + display: none; } #filelist { - display: none; + display: none; } -input#show-filelist:checked ~ #filelist { - display: block; +input#show-filelist:checked~#filelist { + display: block; } #filelist tr { - background: none; /* Striped lines will look really ugly due to how it's drawn */ + background: none; + /* Striped lines will look really ugly due to how it's drawn */ } + .table-filelist { - width: 100%; + width: 100%; } -thead.torrentinfo tr { min-height: 40px; } + +thead.torrentinfo tr { + min-height: 40px; +} + .tr-filelist { - --nest-level: 0; + --nest-level: 0; } + .caret-down-icon { - background: url('data:image/svg+xml;charset=UTF-8,') no-repeat center center; - background-size: 24px; - vertical-align: middle; + background: url('data:image/svg+xml;charset=UTF-8,') no-repeat center center; + background-size: 24px; + vertical-align: middle; } + .tr-filelist td { - padding: 4px 4px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; + padding: 4px 4px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } + + /* The margin that gives the tree-like effect, based on the nest-level */ + .tr-filelist td:first-child::before { - margin-left: calc(var(--nest-level) * 2rem); - margin-right: 0.5rem; + margin-left: calc(var(--nest-level) * 2rem); + margin-right: 0.5rem; } + + /* Filesize column */ + .tr-filelist td:nth-child(2) { - width: 20%; - text-align: center; + width: 20%; + text-align: center; } + + /* Input that show/hides each folder */ + input.filelist-checkbox { - display: none; + display: none; } -input.filelist-checkbox:checked + table.table-filelist { - display: none; + +input.filelist-checkbox:checked+table.table-filelist { + display: none; } .tr-folder label { - cursor: pointer; + cursor: pointer; } + + /* The folder or file icon */ + .tr-folder td:first-child::before { - content: " "; - display: inline-block; - background-image: url('data:image/svg+xml;charset=UTF-8,'); - background-size: 24px; - width: 24px; - height: 24px; - vertical-align: middle; + content: " "; + display: inline-block; + background-image: url('data:image/svg+xml;charset=UTF-8,'); + background-size: 24px; + width: 24px; + height: 24px; + vertical-align: middle; } + .tr-file td:first-child::before { - content: " "; - display: inline-block; - background-image: url('data:image/svg+xml;charset=UTF-8,'); - background-size: 24px; - width: 24px; - height: 24px; - vertical-align: middle; + content: " "; + display: inline-block; + background-image: url('data:image/svg+xml;charset=UTF-8,'); + background-size: 24px; + width: 24px; + height: 24px; + vertical-align: middle; } #torrent-name { - height: 100%; - display: flex; - flex-direction: column; - font-weight: bold; - word-wrap: break-word; + height: 100%; + display: flex; + flex-direction: column; + font-weight: bold; + word-wrap: break-word; } .user-form { - margin-right: 30%; - margin-left: 30%; + margin-right: 30%; + margin-left: 30%; } #description-box { - padding-right: 14px; - padding-left: 14px; - margin-bottom: 10px; + padding-right: 14px; + padding-left: 14px; + margin-bottom: 10px; } #description-box div { - margin-top: 14px; - margin-bottom: 14px; + margin-top: 14px; + margin-bottom: 14px; } + /* Markdown editor fixes */ + .editor-toolbar.fullscreen { - top: 60px; -} -.CodeMirror-fullscreen { - top: 110px; -} -.editor-preview-side { - top: 110px; + top: 60px; } +.CodeMirror-fullscreen { + top: 110px; +} + +.editor-preview-side { + top: 110px; +} + + /* Mod Tools */ + .modtools { - position: fixed; + position: fixed; top: 65px; padding: 5px 10px; max-width: 1060px; @@ -757,86 +1066,132 @@ input.filelist-checkbox:checked + table.table-filelist { height: 50px; border-radius: 5px; } + .tr-cb { - width: 20px; - text-align: left; + width: 20px; + text-align: left; } + .modtools .actions { - display: none; + display: none; } + .modtools span.btn-group { margin-left: 20px; } + .modtools .cb_action, .toolbar .cb_action { - height: 100%; + height: 100%; } -.modtools #show_actions { margin-top: 4px; } -.mod-open .tr-cat { width: 73px; } -.mod-open .th, .mod-open .home-td, .mod-open .user-td { padding: 2px 2px; } -.mod-open .tr-cat .nyaa-cat img { left: 4px; } + +.modtools #show_actions { + margin-top: 4px; +} + +.mod-open .tr-cat { + width: 73px; +} + +.mod-open .th, .mod-open .home-td, .mod-open .user-td { + padding: 2px 2px; +} + +.mod-open .tr-cat .nyaa-cat img { + left: 4px; +} + /* Modal box */ + + /* The Modal (background) */ + .modal { - display: none; /* Hidden by default */ - position: fixed; /* Stay in place */ - z-index: 4; /* Sit on top */ + display: none; + /* Hidden by default */ + position: fixed; + /* Stay in place */ + z-index: 4; + /* Sit on top */ left: 0; top: 0; - width: 100%; /* Full width */ - height: 100%; /* Full height */ - overflow: auto; /* Enable scroll if needed */ - background-color: rgb(0,0,0); /* Fallback color */ - background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ + width: 100%; + /* Full width */ + height: 100%; + /* Full height */ + overflow: auto; + /* Enable scroll if needed */ + background-color: rgb(0, 0, 0); + /* Fallback color */ + background-color: rgba(0, 0, 0, 0.4); + /* Black w/ opacity */ } + /* Modal Content/Box */ + + /* Modal Header */ + .modal-header { padding: 2px 16px; - background: #111; /* Old browsers */ - background: -moz-linear-gradient(bottom, #222 0%, #111 100%); - background: -webkit-linear-gradient(bottom, #222 0%, #111 100%); - background: linear-gradient(to top, #222 0%, #111 100%); + background: #111; + /* Old browsers */ + background: -moz-linear-gradient(bottom, #222 0%, #111 100%); + background: -webkit-linear-gradient(bottom, #222 0%, #111 100%); + background: linear-gradient(to top, #222 0%, #111 100%); color: white; } + /* Modal Body */ -.modal-body {padding: 2px 16px;} + +.modal-body { + padding: 2px 16px; +} + /* Modal Footer */ + .modal-footer { padding: 2px 16px; - background: #222; /* Old browsers */ - background: -moz-linear-gradient(bottom, #111 0%, #222 100%); - background: -webkit-linear-gradient(bottom, #111 0%, #222 100%); - background: linear-gradient(to top, #111 0%, #222 100%); + background: #222; + /* Old browsers */ + background: -moz-linear-gradient(bottom, #111 0%, #222 100%); + background: -webkit-linear-gradient(bottom, #111 0%, #222 100%); + background: linear-gradient(to top, #111 0%, #222 100%); color: white; } + .modal-footer span { - float: right; - margin-right: 20px; -} -.modal-footer span button { - margin-right: 5px; - padding: 1em 2em; - background: none; - border: 1px solid white; - border-radius: 3px; - color: white; - font-weight: bold; -} -.modal-footer span .close { - font-size: 1em; - float: none; - background: #E84C4C; -} -.modal-footer span #confirm_changes { - font-size: 1em; - background: #98D9A8; + float: right; + margin-right: 20px; } +.modal-footer span button { + margin-right: 5px; + padding: 1em 2em; + background: none; + border: 1px solid white; + border-radius: 3px; + color: white; + font-weight: bold; +} + +.modal-footer span .close { + font-size: 1em; + float: none; + background: #E84C4C; +} + +.modal-footer span #confirm_changes { + font-size: 1em; + background: #98D9A8; +} + + /* Modal Content */ + .modal-content { position: relative; background-color: #fefefe; @@ -844,231 +1199,365 @@ input.filelist-checkbox:checked + table.table-filelist { padding: 0; border: 1px solid #888; width: 80%; - margin-top: 20%; - max-width: 1000px; - box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19); + margin-top: 20%; + max-width: 1000px; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); -webkit-animation-name: animatetop; -webkit-animation-duration: 0.4s; animation-name: animatetop; animation-duration: 0.4s } + .modal .close { - float: right; + float: right; font-size: 2em; cursor: pointer; } .modal a.icon { - width: 16px; - height: 16px; + width: 16px; + height: 16px; } .modal .edit_list { - background: #98D9A8; + background: #98D9A8; padding: 0.3em; - margin-bottom: 3px; + margin-bottom: 3px; } .modal .delete_list { - background: #E84C4C; + background: #E84C4C; padding: 0.3em; - margin-bottom: 3px; + margin-bottom: 3px; } .modal .delete_item { - font-weight: bold; + font-weight: bold; padding: 3px; -} +} .modal .edit_item { - font-weight: bold; + font-weight: bold; padding: 3px; -} -.delete_item a, .delete_item span.infos, .edit_item a, .edit_item span.infos { - float: right; } + +.delete_item a, .delete_item span.infos, .edit_item a, .edit_item span.infos { + float: right; +} + .delete_list span.infos, .edit_list span.infos { float: right; margin-top: 1em; } + .modal-body div .title h3 { - cursor: pointer; + cursor: pointer; } + .modal .list { - border: 1px solid #222; - margin-bottom: 0.5em; - display: none; + border: 1px solid #222; + margin-bottom: 0.5em; + display: none; +} + +.modal .list .delete_item:nth-child(even), .modal .list .edit_item:nth-child(even) { + background: #CCC +} + +.modal .list .delete_item:nth-child(odd), .modal .list .edit_item:nth-child(odd) { + background: #FFF } -.modal .list .delete_item:nth-child(even), .modal .list .edit_item:nth-child(even) {background: #CCC} -.modal .list .delete_item:nth-child(odd), .modal .list .edit_item:nth-child(odd) {background: #FFF} .modal-footer button { - cursor: pointer; + cursor: pointer; } .modal .close:hover, .modal-footer span button:hover, .modal a.icon:hover { - opacity: 0.7; + opacity: 0.7; } + /* Add Animation */ + @-webkit-keyframes animatetop { - from {top: -300px; opacity: 0} - to {top: 0; opacity: 1} + from { + top: -300px; + opacity: 0 + } + to { + top: 0; + opacity: 1 + } } @keyframes animatetop { - from {top: -300px; opacity: 0} - to {top: 0; opacity: 1} + from { + top: -300px; + opacity: 0 + } + to { + top: 0; + opacity: 1 + } } + .progress-bar { - height:1.5em; - width: 100%; - background: #333; - padding: 0; + height: 1.5em; + width: 100%; + background: #333; + padding: 0; } .progress-green { - height: 100%; - margin: 0; - background: #22A243; - text-align: right; - padding-right: 2px; - color: white; - padding-top: 0.25em; + height: 100%; + margin: 0; + background: #22A243; + text-align: right; + padding-right: 2px; + color: white; + padding-top: 0.25em; } .logs_mess { - background: #ddd; - height: 100px; - overflow: auto; - padding: 3px; - font-style: italic; + background: #ddd; + height: 100px; + overflow: auto; + padding: 3px; + font-style: italic; } .logs_mess div.success { - color: #22A243; + color: #22A243; } .logs_mess div.error { - color: #893636; + color: #893636; } .error-text, .success-text { - text-align: center; + text-align: center; } .header-admin { - height: 120px; + height: 120px; } .float-right { - float:right; + float: right; } .header-admin .user-menu { - width: 155px!important; - z-index: 10; + width: 155px!important; + z-index: 10; } #content.content-admin { - top:110px; + top: 110px; } -.tr-actions .form-input{ - display: inline-block; +.tr-actions .form-input { + display: inline-block; } .tr-actions { - width: 150px; + width: 150px; } .toolbar { - height: 40px; - padding: 5px; - text-align: left; + height: 40px; + padding: 5px; + text-align: left; } -.toolbar > div.float-right { - margin-top: 5px; +.toolbar>div.float-right { + margin-top: 5px; } .content-admin .form-box form { - text-align: left; - padding: 0 10px 10px; + text-align: left; + padding: 0 10px 10px; } + .btn-blue:hover, .btn-red:hover, .btn-green:hover, .btn-orange:hover { - opacity: 0.7; + opacity: 0.7; } + .btn-blue, .btn-red, .btn-green, .btn-orange { - font-weight: bold; - color: white; + font-weight: bold; + color: white; } + input.nav-btn { - cursor: pointer; + cursor: pointer; } .comment-captcha { - width: 240px; + width: 240px; } -.download { - padding: 0.3em; -} -#faq .rules-drop {margin-bottom: 20px; width: 500px; } -.rules-drop { - display: flex; - user-select: none; - vertical-align: bottom; - width: 435px; - max-width: 100%; -} -.rules-drop > summary { - cursor: pointer; -} -.rules-drop > div { - height: auto; - padding: 10px 0; - border-top: none; -} -.rules-drop > div > ul { margin: 0; margin-right: 15px; } -summary { display: block; } -summary::-webkit-details-marker { display: none } -summary:after { - vertical-align: middle; - float: left; - margin: -3px 5px 0 0; - content: "+"; - font-size: 1.5em; - font-weight: bold; -} -details[open] summary:after { - content: "-"; - margin: -1% 5px 0 0; -} -.refine-btn { width: 30%; } -.torrent-preview-table > table { border: 3px solid #dfdeeb; } -.nyaa-cat { background: url('/img/categories.png') no-repeat; background-position-x: right!important; max-width: 80px; min-width: 67px; height: 28px; display: block; } -.nyaa-cat-1 { background-position: 0 -26px; } -.nyaa-cat-2 { background-position: 0 -52px; } -.nyaa-cat-4 { background-position: 0 -78px; } -.nyaa-cat-3 { background-position: 0 -104px; } -.nyaa-cat-6 { background-position: 0 -130px; } -.nyaa-cat-5 { background-position: 0 -156px; } -.nyaa-cat-8 { background-position: 0 -182px; } -.nyaa-cat-7 { background-position: 0 -208px; } -.nyaa-cat-9 { background-position: 0 -234px; } -.nyaa-cat-10 { background-position: 0 -260px; } -.nyaa-cat-11 { background-position: 0 -286px; } -.nyaa-cat-12 { background-position: 0 -312px; } -.nyaa-cat-13 { background-position: 0 -338px; } -.nyaa-cat-14 { background-position: 0 -364px; } -.nyaa-cat-15 { background-position: 0 -390px; } -.nyaa-cat-16 { background-position: 0 -416px; } -.nyaa-cat-18 { background-position: 0 -442px; } -.sukebei-cat-11 { background-position: 0 -468px; } -.sukebei-cat-12 { background-position: 0 -494px; } -.sukebei-cat-13 { background-position: 0 -520px; } -.sukebei-cat-14 { background-position: 0 -546px; } -.sukebei-cat-15 { background-position: 0 -572px; } -.sukebei-cat-21 { background-position: 0 -598px; } -.sukebei-cat-22 { background-position: 0 -624px; } +.download { + padding: 0.3em; +} + +#faq .rules-drop { + margin-bottom: 20px; + width: 500px; +} + +.rules-drop { + display: flex; + user-select: none; + vertical-align: bottom; + width: 435px; + max-width: 100%; +} + +.rules-drop>summary { + cursor: pointer; +} + +.rules-drop>div { + height: auto; + padding: 10px 0; + border-top: none; +} + +.rules-drop>div>ul { + margin: 0; + margin-right: 15px; +} + +summary { + display: block; +} + +summary::-webkit-details-marker { + display: none +} + +summary:after { + vertical-align: middle; + float: left; + margin: -3px 5px 0 0; + content: "+"; + font-size: 1.5em; + font-weight: bold; +} + +details[open] summary:after { + content: "-"; + margin: -1% 5px 0 0; +} + +.refine-btn { + width: 30%; +} + +.torrent-preview-table>table { + border: 3px solid #dfdeeb; +} + +.nyaa-cat { + background: url('/img/categories.png') no-repeat; + background-position-x: right!important; + max-width: 80px; + min-width: 67px; + height: 28px; + display: block; +} + +.nyaa-cat-1 { + background-position: 0 -26px; +} + +.nyaa-cat-2 { + background-position: 0 -52px; +} + +.nyaa-cat-4 { + background-position: 0 -78px; +} + +.nyaa-cat-3 { + background-position: 0 -104px; +} + +.nyaa-cat-6 { + background-position: 0 -130px; +} + +.nyaa-cat-5 { + background-position: 0 -156px; +} + +.nyaa-cat-8 { + background-position: 0 -182px; +} + +.nyaa-cat-7 { + background-position: 0 -208px; +} + +.nyaa-cat-9 { + background-position: 0 -234px; +} + +.nyaa-cat-10 { + background-position: 0 -260px; +} + +.nyaa-cat-11 { + background-position: 0 -286px; +} + +.nyaa-cat-12 { + background-position: 0 -312px; +} + +.nyaa-cat-13 { + background-position: 0 -338px; +} + +.nyaa-cat-14 { + background-position: 0 -364px; +} + +.nyaa-cat-15 { + background-position: 0 -390px; +} + +.nyaa-cat-16 { + background-position: 0 -416px; +} + +.nyaa-cat-18 { + background-position: 0 -442px; +} + +.sukebei-cat-11 { + background-position: 0 -468px; +} + +.sukebei-cat-12 { + background-position: 0 -494px; +} + +.sukebei-cat-13 { + background-position: 0 -520px; +} + +.sukebei-cat-14 { + background-position: 0 -546px; +} + +.sukebei-cat-15 { + background-position: 0 -572px; +} + +.sukebei-cat-21 { + background-position: 0 -598px; +} + +.sukebei-cat-22 { + background-position: 0 -624px; +} diff --git a/public/css/nyacon.css b/public/css/nyacon.css index ed21bf8b..7fef9d34 100644 --- a/public/css/nyacon.css +++ b/public/css/nyacon.css @@ -1,16 +1,18 @@ @font-face { - font-family: 'nyacon'; - src: url('./font/nyacon.eot?1588873'); - src: url('./font/nyacon.eot?1588873#iefix') format('embedded-opentype'), - url('./font/nyacon.woff2?1588873') format('woff2'), - url('./font/nyacon.woff?1588873') format('woff'), - url('./font/nyacon.ttf?1588873') format('truetype'), - url('./font/nyacon.svg?1588873#nyacon') format('svg'); - font-weight: normal; - font-style: normal; + font-family: 'nyacon'; + src: url('./font/nyacon.eot?1588873'); + src: url('./font/nyacon.eot?1588873#iefix') format('embedded-opentype'), url('./font/nyacon.woff2?1588873') format('woff2'), url('./font/nyacon.woff?1588873') format('woff'), url('./font/nyacon.ttf?1588873') format('truetype'), url('./font/nyacon.svg?1588873#nyacon') format('svg'); + font-weight: normal; + font-style: normal; } + + /* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ + + /* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ + + /* @media screen and (-webkit-min-device-pixel-ratio:0) { @font-face { @@ -20,50 +22,114 @@ } */ - [class^="icon-"]:before, [class*=" icon-"]:before { - font-family: "nyacon"; - font-style: normal; - font-weight: normal; - speak: none; - - display: inline-block; - text-decoration: inherit; - width: 1em; - margin-right: .2em; - text-align: center; - /* opacity: .8; */ - - /* For safety - reset parent styles, that can break glyph codes*/ - font-variant: normal; - text-transform: none; - - /* fix buttons height, for twitter bootstrap */ - line-height: 1em; - - /* Animation center compensation - margins should be symmetric */ - /* remove if not needed */ - margin-left: .2em; - - /* you can be more comfortable with increased icons size */ - /* font-size: 120%; */ - - /* Font smoothing. That was taken from TWBS */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - - /* Uncomment for 3D effect */ - /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ +[class^="icon-"]:before, [class*=" icon-"]:before { + font-family: "nyacon"; + font-style: normal; + font-weight: normal; + speak: none; + display: inline-block; + text-decoration: inherit; + width: 1em; + margin-right: .2em; + text-align: center; + /* opacity: .8; */ + /* For safety - reset parent styles, that can break glyph codes*/ + font-variant: normal; + text-transform: none; + /* fix buttons height, for twitter bootstrap */ + line-height: 1em; + /* Animation center compensation - margins should be symmetric */ + /* remove if not needed */ + margin-left: .2em; + /* you can be more comfortable with increased icons size */ + /* font-size: 120%; */ + /* Font smoothing. That was taken from TWBS */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + /* Uncomment for 3D effect */ + /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ } -.icon-heart:before { content: '\e800'; } /* '' */ -.icon-help-circled:before { content: '\e801'; } /* '' */ -.icon-magnet:before { content: '\e802'; } /* '' */ -.icon-upload:before { content: '\e803'; } /* '' */ -.icon-search:before { content: '\e804'; } /* '' */ -.icon-floppy:before { content: '\e805'; } /* '' */ -.icon-users:before { content: '\e806'; } /* '' */ -.icon-chat:before { content: '\e807'; } /* '' */ -.icon-attention:before { content: '\e808'; } /* '' */ -.icon-rss-squared:before { content: '\f143'; } /* '' */ -.icon-trash:before { content: '\f1f8'; } /* '' */ -.icon-user-plus:before { content: '\f234'; } /* '' */ \ No newline at end of file +.icon-heart:before { + content: '\e800'; +} + + +/* '' */ + +.icon-help-circled:before { + content: '\e801'; +} + + +/* '' */ + +.icon-magnet:before { + content: '\e802'; +} + + +/* '' */ + +.icon-upload:before { + content: '\e803'; +} + + +/* '' */ + +.icon-search:before { + content: '\e804'; +} + + +/* '' */ + +.icon-floppy:before { + content: '\e805'; +} + + +/* '' */ + +.icon-users:before { + content: '\e806'; +} + + +/* '' */ + +.icon-chat:before { + content: '\e807'; +} + + +/* '' */ + +.icon-attention:before { + content: '\e808'; +} + + +/* '' */ + +.icon-rss-squared:before { + content: '\f143'; +} + + +/* '' */ + +.icon-trash:before { + content: '\f1f8'; +} + + +/* '' */ + +.icon-user-plus:before { + content: '\f234'; +} + + +/* '' */ diff --git a/public/css/tomorrow.css b/public/css/tomorrow.css index b2af3dcd..083890cb 100644 --- a/public/css/tomorrow.css +++ b/public/css/tomorrow.css @@ -1,103 +1,187 @@ -body { color: #c5c8c6; background: #1d1f21 ; } +body { + color: #c5c8c6; + background: #1d1f21; +} -.header, .box, .pagination li, .user-menu { box-shadow: 1px 3px 4px rgba(0,0,0,0.2) } +.header, .box, .pagination li, .user-menu { + box-shadow: 1px 3px 4px rgba(0, 0, 0, 0.2) +} -#mascot { background-image: url('/img/megumin.svg'); } +#mascot { + background-image: url('/img/megumin.svg'); +} -a { color: #81a2be; } -a:hover { color: #5F89AC; } +a { + color: #81a2be; +} + +a:hover { + color: #5F89AC; +} .header { - background: #282A2E; - border-color: #000; + background: #282A2E; + border-color: #000; } -.header .nav-btn { color: #c5c8c6; } -.header .nav-btn:hover { color: #eee; } -.box, .pagination li { background: hsla(222, 8%, 20%, 0.85); border-color: #141517 !important; } +.header .nav-btn { + color: #c5c8c6; +} -.form-input { border-color: #0C0D0E !important; background: #141517; color: #c5c8c6; } +.header .nav-btn:hover { + color: #eee; +} + +.box, .pagination li { + background: hsla(222, 8%, 20%, 0.85); + border-color: #141517 !important; +} + +.form-input { + border-color: #0C0D0E !important; + background: #141517; + color: #c5c8c6; +} .header .h-user .user-avatar { - background: #99BFD0; - border-color: #282A2E; + background: #99BFD0; + border-color: #282A2E; } + .header .h-user .user-menu { - background: #282A2E; - background: -moz-linear-gradient(top, #282A2E 0%, #34373C 100%); - background: -webkit-linear-gradient(top, #282A2E 0%, #34373C 100%); - background: linear-gradient(to bottom, #282A2E 0%, #34373C 100%); - border-color: #282A2E; + background: #282A2E; + background: -moz-linear-gradient(top, #282A2E 0%, #34373C 100%); + background: -webkit-linear-gradient(top, #282A2E 0%, #34373C 100%); + background: linear-gradient(to bottom, #282A2E 0%, #34373C 100%); + border-color: #282A2E; } -table thead { background: #141517 !important; } +table thead { + background: #141517 !important; +} -th { color: #838B98; } -th a { color: #c5c8c6; } +th { + color: #838B98; +} -th, td { border-color: #141517 !important; } +th a { + color: #c5c8c6; +} -td.tr-se, .success-text { color: #b5bd68; } -td.tr-le, .error-text { color: #cc6666; } +th, td { + border-color: #141517 !important; +} + +td.tr-se, .success-text { + color: #b5bd68; +} + +td.tr-le, .error-text { + color: #cc6666; +} .btn-red { - background-color: #cc6666; + background-color: #cc6666; } -.aplus, .btn-blue { background: hsla(180, 50%, 50%, 0.2) !important; } -.trusted, .btn-green { background: hsla(90, 50%, 50%, 0.2) !important; } -.remake, .btn-orange { background: hsla(40, 50%, 50%, 0.2) !important; } +.aplus, .btn-blue { + background: hsla(180, 50%, 50%, 0.2) !important; +} -.pagination .active { background: #141517; color: #c5c8c6; } -.pagination .disabled { color: #141517; cursor: unset; } +.trusted, .btn-green { + background: hsla(90, 50%, 50%, 0.2) !important; +} -.sukebei { color: #c5c8c6; } -.sukebei a { color: #cc6666; } -.sukebei a:hover { color: #c82829; } -.sukebei th, .sukebei th a { color: #c5c8c6; } +.remake, .btn-orange { + background: hsla(40, 50%, 50%, 0.2) !important; +} + +.pagination .active { + background: #141517; + color: #c5c8c6; +} + +.pagination .disabled { + color: #141517; + cursor: unset; +} + +.sukebei { + color: #c5c8c6; +} + +.sukebei a { + color: #cc6666; +} + +.sukebei a:hover { + color: #c82829; +} + +.sukebei th, .sukebei th a { + color: #c5c8c6; +} .captcha-container img { - background: #fff; - border-radius: .4em .4em 0 0; - border-bottom: .5em solid #fff; - margin-bottom: -.5em; + background: #fff; + border-radius: .4em .4em 0 0; + border-bottom: .5em solid #fff; + margin-bottom: -.5em; } + /* Markdown editor */ + .editor-toolbar a { - color: #fff !important; + color: #fff !important; } + .editor-toolbar a.active, .editor-toolbar a:hover { - background: #666; - border-color: #828282; + background: #666; + border-color: #828282; } + .editor-toolbar { - background: #000 !important; + background: #000 !important; } + .editor-toolbar.fullscreen::before, .editor-toolbar.fullscreen::after { - display: none; + display: none; } + .editor-preview, .editor-preview-side, .editor-toolbar.disabled-for-preview a:not(.no-disable) { - background: #141517; + background: #141517; } + .CodeMirror { - color: #fff; - background: #141517; + color: #fff; + background: #141517; } + .CodeMirror-cursor { - border-color: #fff; + border-color: #fff; } + .CodeMirror .CodeMirror-selected { - background: #585858; + background: #585858; } + .CodeMirror-focused .CodeMirror-selected, .CodeMirror-line::selection, .CodeMirror-line>span::selection, .CodeMirror-line>span>span::selection { - background: #454545; + background: #454545; } + .CodeMirror-line::-moz-selection, .CodeMirror-line>span::-moz-selection, .CodeMirror-line>span>span::-moz-selection { - background: #454545; + background: #454545; } -.form-input.language { background-color: #35363c; } +.form-input.language { + background-color: #35363c; +} -.torrent-info-box > p > a, .torrent-info-box > div > a, #description-box a { text-decoration: none; } -.torrent-info-box { border-color: #53565e; } +.torrent-info-box>p>a, .torrent-info-box>div>a, #description-box a { + text-decoration: none; +} + +.torrent-info-box { + border-color: #53565e; +} diff --git a/public/js/kilo.js b/public/js/kilo.js index e8754f1e..89cb3833 100644 --- a/public/js/kilo.js +++ b/public/js/kilo.js @@ -30,17 +30,23 @@ var Kilo = function (params) { } // Private variables - var Keywords_flags= [ - ["vostfr","vosfr", "[ita]", "[eng]", " eng ","[english]","[english sub]", "engsub", "[jp]","[jpn]","[japanese]", "[jav]"], - ["fr","fr", "it", "en","en","en","en","en", "ja","ja","ja","ja"] + var Keywords_flags = [ + ["vostfr", "vosfr", "[ita]", "[eng]", " eng ", "[english]", "[english sub]", "engsub", "[jp]", "[jpn]", "[japanese]", "[jav]"], + ["fr", "fr", "it", "en", "en", "en", "en", "en", "ja", "ja", "ja", "ja"] ] var Keywords_categories = [ - [["[jav]","[h-games]"], [7,3]], - [[""], [0]] + [ + ["[jav]", "[h-games]"], + [7, 3] + ], + [ + [""], + [0] + ] ] // Parsing categories - document.querySelectorAll(".form-torrent-category option").forEach(function(el) { + document.querySelectorAll(".form-torrent-category option").forEach(function (el) { var subcat if (self.sukebei) { subcat = el.value.replace("_", "") @@ -56,7 +62,7 @@ var Kilo = function (params) { // Displaying the block and set the locale timestamp document.getElementsByClassName('torrent-preview-table')[0].style.display = 'block' document.getElementsByClassName('table-torrent-date')[0].innerText = new Date(Date.now()).toISOString() - + // Adding listener events for (var langIndex = 0; langIndex < document.getElementsByName(this.langSelect).length; langIndex++) { document.getElementsByName(this.langSelect)[langIndex].addEventListener('change', updateTorrentLang) @@ -81,7 +87,7 @@ var Kilo = function (params) { this.setCategory(formCategory.selectedIndex) updateTorrentLang() - //Adding the torrent under and above the previewed one. + //Adding the torrent under and above the previewed one. if (this.listContext) { Query.Get('/api/search?limit=2', function (data) { torrents = data.torrents @@ -122,40 +128,41 @@ var Kilo = function (params) { tableCategory.className = 'nyaa-cat table-torrent-category ' + (this.sukebei ? 'sukebei' : 'nyaa') + '-cat-' + this.categories[index] tableCategory.title = document.getElementsByClassName('form-torrent-category')[0].querySelectorAll("option")[index].textContent } - // - this.addKeywordFlags = function(value) { + // + this.addKeywordFlags = function (value) { var torrentLowerCaseName = value.toLowerCase() var updateLang = false - - for(var KeywordIndex = 0; KeywordIndex < Keywords_flags[0].length; KeywordIndex++) - if(torrentLowerCaseName.includes(Keywords_flags[0][KeywordIndex])) { - document.getElementById("upload-lang-" + Keywords_flags[1][KeywordIndex]).checked = true - updateLang = true + + for (var KeywordIndex = 0; KeywordIndex < Keywords_flags[0].length; KeywordIndex++) + if (torrentLowerCaseName.includes(Keywords_flags[0][KeywordIndex])) { + document.getElementById("upload-lang-" + Keywords_flags[1][KeywordIndex]).checked = true + updateLang = true } - - if(updateLang) updateTorrentLang() + + if (updateLang) updateTorrentLang() } // - this.addKeywordCategories = function(value) { - if(document.getElementsByClassName('form-torrent-category')[0].selectedIndex != 0) + this.addKeywordCategories = function (value) { + if (document.getElementsByClassName('form-torrent-category')[0].selectedIndex != 0) return - + var torrentLowerCaseName = value.toLowerCase(), IsOnSukebei = params.sukebei ? 0 : 1; - for(var KeywordIndex = 0; KeywordIndex < Keywords_categories[IsOnSukebei][0].length; KeywordIndex++) - if(torrentLowerCaseName.includes(Keywords_categories[IsOnSukebei][0][KeywordIndex])) { + for (var KeywordIndex = 0; KeywordIndex < Keywords_categories[IsOnSukebei][0].length; KeywordIndex++) + if (torrentLowerCaseName.includes(Keywords_categories[IsOnSukebei][0][KeywordIndex])) { document.getElementsByClassName('form-torrent-category')[0].selectedIndex = Keywords_categories[IsOnSukebei][1][KeywordIndex]; this.setCategory(document.getElementsByClassName('form-torrent-category')[0].selectedIndex) break - } + } } // Helper to prevent the functions on keyup/keydown to slow the user typing this.debounce = function (func, wait, immediate) { var timeout - return function() { - var context = this, args = arguments - var later = function() { + return function () { + var context = this, + args = arguments + var later = function () { timeout = null if (!immediate) func.apply(context, args) } @@ -176,7 +183,7 @@ var Kilo = function (params) { var updatePreviewTorrentName = function (e) { var el = e.target self.setName(el.value) - self.debounce(function(value) { + self.debounce(function (value) { self.addKeywordFlags(value) self.addKeywordCategories(value) }, 300)(el.value) diff --git a/public/js/languages.js b/public/js/languages.js index 0f66416a..82cfe610 100644 --- a/public/js/languages.js +++ b/public/js/languages.js @@ -2,15 +2,15 @@ // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat function loadLanguages() { var xhr = new XMLHttpRequest(); - xhr.onreadystatechange = function() { + xhr.onreadystatechange = function () { if (xhr.readyState == 4 && xhr.status == 199) { var selector = document.getElementById("bottom_language_selector"); selector.hidden = false /* Response format is - * { "current": "(user current language)", - * "languages": { - * "(language_code)": "(language_name"), - * }} */ + * { "current": "(user current language)", + * "languages": { + * "(language_code)": "(language_name"), + * }} */ var response = JSON.parse(xhr.responseText); for (var language in response.languages) { if (!response.languages.hasOwnProperty(language)) continue; diff --git a/public/js/main.js b/public/js/main.js index ad65f3c7..8004184b 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -59,33 +59,33 @@ parseAllDates() { //Get current lang, mascot & theme cookies //TODO - + //Remove all cookies: var cookies = document.cookie.split(";"); var excludedCookies = ["mascot", "theme", "mascot_url", "lang"]; - + for (var i = 0; i < cookies.length; i++) { var cookieName = (cookies[i].split("=")[0]).trim(); //Remove spaces because some cookie names have it if(excludedCookies.includes(cookieName)) continue; document.cookie = cookieName + "=;expires=Thu, 01 Jan 1970 00:00:00 UTC;"; } - + //Set new version in cookie document.cookie = "version=" + Version; - + //Apply back lang, mascot & theme cookie //TODO //Add fancy "new" text at bottom of page document.getElementById("commit").className = "new"; } - + /*Fixed-Navbar offset fix*/ -if(document.getElementsByClassName("search-box")[0] !== undefined) - startupCode() -else +if(document.getElementsByClassName("search-box")[0] !== undefined) + startupCode() +else document.addEventListener("DOMContentLoaded", function(event) { startupCode() }) diff --git a/public/js/modal.js b/public/js/modal.js index e404b36d..e14d8920 100644 --- a/public/js/modal.js +++ b/public/js/modal.js @@ -10,17 +10,17 @@ var Modal = { } else { var nbEl = elements.length - for (var i=0; i < nbEl; i++) { + for (var i = 0; i < nbEl; i++) { var modal = elements[i]; this.addModal(modal, button, i, params.before, params.after, params.close) } } }, - addModal: function(modal, btn, i, before_callback, after_callback, close_callback) { + addModal: function (modal, btn, i, before_callback, after_callback, close_callback) { var isBtnArray = false; // Get the button that opens the modal if (!btn) { - btn = document.getElementById("modal_btn_"+modal.id) + btn = document.getElementById("modal_btn_" + modal.id) } else if (btn.match(/^#/)) { btn = document.getElementById(btn.substr(1)); } else if (btn.match(/^\./)) { @@ -31,7 +31,7 @@ var Modal = { return } if ((isBtnArray) && (i > 0) && (btn.length > 0) && (btn.length > i)) { - btn[i].addEventListener("click", function(e) { + btn[i].addEventListener("click", function (e) { if (before_callback != undefined) before_callback() modal.style.display = "block"; Modal.active = modal; @@ -41,7 +41,7 @@ var Modal = { } else { btn = (isBtnArray) ? btn[0] : btn; // When the user clicks on the button, open the modal - btn.addEventListener("click", function(e) { + btn.addEventListener("click", function (e) { if (before_callback != undefined) before_callback() modal.style.display = "block"; Modal.active = modal; @@ -50,16 +50,16 @@ var Modal = { }); } // Get the element that closes the modal - var span = document.querySelectorAll("#"+modal.id+" .close")[0] + var span = document.querySelectorAll("#" + modal.id + " .close")[0] // When the user clicks on (x), close the modal - span.addEventListener("click", function(e) { + span.addEventListener("click", function (e) { modal.style.display = "none"; Modal.active = 0; if (close_callback != undefined) close_callback() e.preventDefault(); }); // When the user clicks anywhere outside of the modal, close it - window.addEventListener("click", function(event) { + window.addEventListener("click", function (event) { if (event.target == modal) { modal.style.display = "none"; Modal.active = 0; @@ -67,19 +67,19 @@ var Modal = { } }); }, - CloseActive: function() { + CloseActive: function () { if (this.active != 0) { - this.active.style.display= "none"; + this.active.style.display = "none"; this.active = 0; } }, - GetActive: function() { + GetActive: function () { return this.active; }, - Open: function(q) { + Open: function (q) { var modal = document.querySelector(q); if (modal != undefined) { - modal.style.display= "none"; + modal.style.display = "none"; this.active = modal; } } diff --git a/public/js/query.js b/public/js/query.js index 2cecb283..ccdd736e 100644 --- a/public/js/query.js +++ b/public/js/query.js @@ -1,13 +1,13 @@ // @source https://github.com/NyaaPantsu/nyaa/tree/dev/public/js // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat var Query = { - Failed:0, + Failed: 0, MaxFail: 10, - Get: function(url, renderer, callback) { + Get: function (url, renderer, callback) { var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.responseType = 'json'; - xhr.onload = function(e) { + xhr.onload = function (e) { if (this.status == 200) { Query.Failed = 0; renderer(this.response); @@ -15,26 +15,26 @@ var Query = { } else { console.log("Error when refresh") Query.Failed++; - console.log("Attempt to refresh "+Query.Failed+"..."); + console.log("Attempt to refresh " + Query.Failed + "..."); if ((Query.MaxFail == -1) || (Query.Failed < Query.MaxFail)) Query.Get(url, renderer, callback); else console.error("Too many attempts, stopping...") } }; xhr.send(); }, - Post: function(url, postArgs, callback) { + Post: function (url, postArgs, callback) { var xhr = new XMLHttpRequest(); xhr.open('POST', url, true); xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhr.responseType = 'json'; - xhr.onload = function(e) { + xhr.onload = function (e) { if (this.status == 200) { Query.Failed = 0; if (callback != undefined) callback(this.response); } else { console.log("Error when refresh") Query.Failed++; - console.log("Attempt to refresh "+Query.Failed+"..."); + console.log("Attempt to refresh " + Query.Failed + "..."); if ((Query.MaxFail == -1) || (Query.Failed < Query.MaxFail)) Query.Post(url, postArgs, callback); else console.error("Too many attempts, stopping...") } diff --git a/public/js/selectAll.js b/public/js/selectAll.js index 6bb47da5..cda8fc83 100644 --- a/public/js/selectAll.js +++ b/public/js/selectAll.js @@ -1,8 +1,8 @@ // @source https://github.com/NyaaPantsu/nyaa/tree/dev/public/js // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat -document.querySelector("[data-selectall='checkbox']").addEventListener("change", function(e) { +document.querySelector("[data-selectall='checkbox']").addEventListener("change", function (e) { var cbs = document.querySelectorAll("input[type='checkbox'].selectable"); var l = cbs.length; - for (var i=0; i= 0; i--) { + ApplyItemListRenderer: function (params) { + return function (models) { + for (var i = models.length - 1; i >= 0; i--) { var object = Templates.Render(params.templateName, models[i]); if (params.method == "append") { params.element.innerHTML = params.element.innerHTML + object @@ -25,21 +25,21 @@ var Templates = { } }; }, - EncodeEntities: function(value) { + EncodeEntities: function (value) { return value. replace(/&/g, '&'). - replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, function(value) { + replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, function (value) { var hi = value.charCodeAt(0); var low = value.charCodeAt(1); return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';'; }). - replace(/([^\#-~| |!])/g, function(value) { + replace(/([^\#-~| |!])/g, function (value) { return '&#' + value.charCodeAt(0) + ';'; }). replace(//g, '>'); }, - FlagCode: function(language) { + FlagCode: function (language) { var split = language.split("-") if (split.length > 1) { return split[1] diff --git a/public/js/torrents.js b/public/js/torrents.js index acd01429..f33cf27b 100644 --- a/public/js/torrents.js +++ b/public/js/torrents.js @@ -7,38 +7,42 @@ var Torrents = { SearchURL: "/api/search", Method: "prepend", LastID: 0, - StopRefresh: function() { + StopRefresh: function () { clearTimeout(this.timeout) this.timeout = undefined this.CanRefresh = false }, - Refresh: function() { + Refresh: function () { if (this.CanRefresh) { - this.timeout = setTimeout(function() { + this.timeout = setTimeout(function () { var searchArgs = (window.location.search != "") ? window.location.search.substr(1) : "" - searchArgs = (Torrents.LastID > 0) ? "?fromID="+Torrents.LastID+"&"+searchArgs : "?"+searchArgs - Query.Get(Torrents.SearchURL+searchArgs, - function(data) { + searchArgs = (Torrents.LastID > 0) ? "?fromID=" + Torrents.LastID + "&" + searchArgs : "?" + searchArgs + Query.Get(Torrents.SearchURL + searchArgs, + function (data) { var torrents = data.torrents Templates.ApplyItemListRenderer({ - templateName: "torrents.item", method: "prepend", element: document.getElementById("torrentListResults") + templateName: "torrents.item", + method: "prepend", + element: document.getElementById("torrentListResults") })(torrents) - for (var i =0; i < torrents.length; i++) { if (Torrents.LastID < torrents[i].id) Torrents.LastID = torrents[i].id; } + for (var i = 0; i < torrents.length; i++) { + if (Torrents.LastID < torrents[i].id) Torrents.LastID = torrents[i].id; + } parseAllDates() Torrents.Refresh() }); - }, this.Seconds*1000); + }, this.Seconds * 1000); } }, - StartRefresh: function() { + StartRefresh: function () { this.CanRefresh = true this.Refresh() } } -document.addEventListener("DOMContentLoaded", function() { // if Torrents.CanRefresh is enabled, refresh is automatically done (no need to start it anually) +document.addEventListener("DOMContentLoaded", function () { // if Torrents.CanRefresh is enabled, refresh is automatically done (no need to start it anually) if (Torrents.CanRefresh) { Torrents.StartRefresh() } }) - // @license-end +// @license-end diff --git a/public/js/torrentsMod.js b/public/js/torrentsMod.js index e597fedd..482e0b2f 100644 --- a/public/js/torrentsMod.js +++ b/public/js/torrentsMod.js @@ -16,20 +16,20 @@ var TorrentsMod = { // Internal variables used for processing the request selected: [], queued: [], - unique_id:1, - error_count:0, + unique_id: 1, + error_count: 0, progress_count: 0, progress_max: 0, pause: false, enabled: false, // Init method - Create: function() { + Create: function () { var sh_btn = document.getElementById(TorrentsMod.show_hide_button); var btn_actions = document.getElementsByClassName(this.btn_class_action) var btn_submit = document.getElementsByClassName(this.btn_class_submit) btn_submit[0].disabled = true; - for (var i=0; i < btn_actions.length; i++) { + for (var i = 0; i < btn_actions.length; i++) { btn_actions[i].disabled = true; switch (btn_actions[i].id) { case this.delete_btn: @@ -45,22 +45,22 @@ var TorrentsMod = { break; } } - for (var i=0; i < this.checkboxes.length; i++) { + for (var i = 0; i < this.checkboxes.length; i++) { var checkbox = this.checkboxes[i]; checkbox.addEventListener("change", this.checkboxEventHandler) } - sh_btn.addEventListener("click", function(e) { + sh_btn.addEventListener("click", function (e) { var divActions = this.nextElementSibling; if (divActions.style.display == "inline") { TorrentsMod.enabled = false; document.getElementsByClassName("results box mod-open")[0].className = "results box"; - } else { - TorrentsMod.enabled = true; - document.getElementsByClassName("results box")[0].className = "results box mod-open"; + } else { + TorrentsMod.enabled = true; + document.getElementsByClassName("results box")[0].className = "results box mod-open"; } divActions.style.display = (TorrentsMod.enabled) ? "inline" : "none"; var td_cbs = document.getElementsByClassName("tr-cb") - for (var i=0; i < td_cbs.length; i++) { + for (var i = 0; i < td_cbs.length; i++) { td_cb = td_cbs[i]; td_cb.style.display = (TorrentsMod.enabled) ? "table-cell" : "none"; } @@ -70,99 +70,102 @@ var TorrentsMod = { }); }, // generate a unique id for a query - getId: function(){ + getId: function () { return this.unique_id++; }, // UI Methods - selectAll: function(bool) { + selectAll: function (bool) { var l = TorrentsMod.checkboxes.length; for (var i = 0; i < l; i++) { TorrentsMod.checkboxes[i].checked = bool; TorrentsMod.checkboxEventHandlerFunc(TorrentsMod.checkboxes[i]); } }, - disableBtnActions: function() { + disableBtnActions: function () { var btn_actions = document.getElementsByClassName(this.btn_class_action) - for (var i=0; i < btn_actions.length; i++) { + for (var i = 0; i < btn_actions.length; i++) { btn_actions[i].disabled = true; } }, - enableBtnActions: function() { + enableBtnActions: function () { var btn_actions = document.getElementsByClassName(this.btn_class_action) - for (var i=0; i < btn_actions.length; i++) { + for (var i = 0; i < btn_actions.length; i++) { btn_actions[i].disabled = false; } }, - enableBtnSubmit: function() { + enableBtnSubmit: function () { var btn_submit = document.getElementsByClassName(this.btn_class_submit) btn_submit[0].disabled = false; }, - enableApplyChangesBtn: function() { + enableApplyChangesBtn: function () { var btn_apply_changes = document.getElementById("confirm_changes"); - btn_apply_changes.disabled=false; + btn_apply_changes.disabled = false; }, - disableBtnSubmit: function() { + disableBtnSubmit: function () { var btn_submit = document.getElementsByClassName(this.btn_class_submit) btn_submit[0].disabled = true; }, - disableApplyChangesBtn: function() { + disableApplyChangesBtn: function () { var btn_apply_changes = document.getElementById("confirm_changes"); - btn_apply_changes.disabled=true; + btn_apply_changes.disabled = true; }, - removeDivFromList: function(i) { + removeDivFromList: function (i) { var queueAction = this.queued[i]; var parentDiv = document.getElementById(queueAction.unique_id).parentNode; parentDiv.removeChild(document.getElementById(queueAction.unique_id)); }, - removeFromParent: function(el) { + removeFromParent: function (el) { var parentDiv = el.parentNode; parentDiv.removeChild(el); }, - generatingModal: function() { + generatingModal: function () { var listLength = this.queued.length; - var div = {"edit": "", "delete": ""}; - for (var i=0; i < listLength; i++) { + var div = { + "edit": "", + "delete": "" + }; + for (var i = 0; i < listLength; i++) { var listHTML = ""; - for(key in this.queued[i].selection) { + for (key in this.queued[i].selection) { var selection = this.queued[i].selection[key]; selection.key = i; - listHTML += Templates.Render("torrents."+this.queued[i].action+".item", selection); + listHTML += Templates.Render("torrents." + this.queued[i].action + ".item", selection); } this.queued[i].list = listHTML; this.queued[i].key = i; - div[this.queued[i].action] += Templates.Render("torrents."+this.queued[i].action+".block", this.queued[i]); + div[this.queued[i].action] += Templates.Render("torrents." + this.queued[i].action + ".block", this.queued[i]); } this.progress_count = 0; this.progress_max = listLength; document.querySelector(".modal .edit_changes").innerHTML = div["edit"]; document.querySelector(".modal .delete_changes").innerHTML = div["delete"]; }, - toggleList: function(el) { + toggleList: function (el) { el.parentNode.nextSibling.style.display = (el.parentNode.nextSibling.style.display != "block") ? "block" : "none" }, - addToLog: function(type, msg) { + addToLog: function (type, msg) { var logDiv = document.querySelector(".modal .logs_mess"); if (logDiv.style.display == "none") logDiv.style.display = "block" - logDiv.innerHTML += Templates.Render("torrents.logs."+type, msg); + logDiv.innerHTML += Templates.Render("torrents.logs." + type, msg); }, - updateProgressBar: function() { - document.querySelector("#"+this.progress_bar_id).style.display = "block"; - var progress_green = document.querySelector("#"+this.progress_bar_id+" .progress-green"); - var perc = this.progress_count/this.progress_max*100; - progress_green.style.width=perc+"%"; - progress_green.innerText = this.progress_count+"/"+this.progress_max; + updateProgressBar: function () { + document.querySelector("#" + this.progress_bar_id).style.display = "block"; + var progress_green = document.querySelector("#" + this.progress_bar_id + " .progress-green"); + var perc = this.progress_count / this.progress_max * 100; + progress_green.style.width = perc + "%"; + progress_green.innerText = this.progress_count + "/" + this.progress_max; }, - resetModal: function() { + resetModal: function () { var logDiv = document.querySelector(".modal .logs_mess"); logDiv.style.display = "none"; - document.querySelector("#"+this.progress_bar_id).style.display = "none"; + document.querySelector("#" + this.progress_bar_id).style.display = "none"; logDiv.innerHTML = ""; document.querySelector(".modal .edit_changes").innerHTML = ""; document.querySelector(".modal .delete_changes").innerHTML = ""; this.enableApplyChangesBtn(); }, - statusToClassName: function(status) { + statusToClassName: function (status) { var className = ["", "normal", "remake", "trusted", "aplus", ""] return className[status]; }, @@ -171,7 +174,7 @@ var TorrentsMod = { addToSelection: function (torrent) { this.selected[torrent.id] = torrent; }, - removeFromSelection: function(torrent) { + removeFromSelection: function (torrent) { delete this.selected[torrent.id]; for (var t in this.selected) { return @@ -180,45 +183,45 @@ var TorrentsMod = { }, // Query Queue Management Methods - AddToQueue: function(QueueAction) { + AddToQueue: function (QueueAction) { QueueAction.unique_id = this.getId(); // used for DOM interaction this.queued.push(QueueAction); this.enableBtnSubmit() }, - RemoveFromQueueAfterItems: function(i) { + RemoveFromQueueAfterItems: function (i) { for (t in this.queued[i].selection) { this.RemoveItemFromQueue(i, t); } }, - RemoveFromQueue: function(i) { - this.progress_max = (this.progress_max - 1 >= 0) ? this.progress_max-1 : 0; + RemoveFromQueue: function (i) { + this.progress_max = (this.progress_max - 1 >= 0) ? this.progress_max - 1 : 0; this.RemoveFromQueueAction(i) return false; }, - RemoveFromQueueAction: function(i) { - this.removeFromParent(document.getElementById("list_"+this.queued[i].unique_id)); + RemoveFromQueueAction: function (i) { + this.removeFromParent(document.getElementById("list_" + this.queued[i].unique_id)); this.queued.splice(i, 1); if (this.queued.length == 0) { this.disableBtnSubmit(); - if (this.progress_max>0) { + if (this.progress_max > 0) { this.disableApplyChangesBtn(); } else { Modal.CloseActive(); } } }, - formatSelectionToQuery: function(selection) { + formatSelectionToQuery: function (selection) { var format = ""; for (var s in selection) { - format += "&torrent_id="+selection[s].id + format += "&torrent_id=" + selection[s].id } return (format != "") ? format.substr(1) : "" }, - RemoveItemFromQueue: function(i, id) { - this.removeFromParent(document.getElementById("list_item_"+id)); + RemoveItemFromQueue: function (i, id) { + this.removeFromParent(document.getElementById("list_item_" + id)); delete this.queued[i].selection[id]; - document.getElementById("torrent_cb_"+id).checked=false; - document.getElementById("torrent_"+id).style.display=""; + document.getElementById("torrent_cb_" + id).checked = false; + document.getElementById("torrent_" + id).style.display = ""; var test = 0; for (t in this.queued[i].selection) { test++ @@ -227,9 +230,9 @@ var TorrentsMod = { if (test == 0) this.RemoveFromQueue(i); return false; }, - newQueryAttempt: function(queryUrl, queryPost, callback) { + newQueryAttempt: function (queryUrl, queryPost, callback) { Query.Post(queryUrl, queryPost, function (response) { - if ((response.length == 0)||(!response.ok)) { // Query has failed + if ((response.length == 0) || (!response.ok)) { // Query has failed var errorMsg = response.errors.join("
"); TorrentsMod.addToLog("error", errorMsg); TorrentsMod.error_count++; @@ -250,7 +253,7 @@ var TorrentsMod = { } }); }, - QueryQueue: function(i, callback) { + QueryQueue: function (i, callback) { if (this.queued.length > 0) { var QueueAction = this.queued[i]; // we clone it so we can delete it safely this.RemoveFromQueueAction(i); @@ -258,29 +261,29 @@ var TorrentsMod = { var queryUrl = "/mod/api/torrents"; QueueAction.queryPost = TorrentsMod.formatSelectionToQuery(QueueAction.selection) if (QueueAction.action == "delete") { - queryPost="action="+QueueAction.action; - queryPost+="&withreport="+QueueAction.withReport; - queryPost += "&status="+((QueueAction.status != undefined) ? QueueAction.status : ""); - queryPost += "&"+QueueAction.queryPost; // we add torrent id + queryPost = "action=" + QueueAction.action; + queryPost += "&withreport=" + QueueAction.withReport; + queryPost += "&status=" + ((QueueAction.status != undefined) ? QueueAction.status : ""); + queryPost += "&" + QueueAction.queryPost; // we add torrent id } else if (QueueAction.action == "edit") { - queryPost="action=multiple"; - queryPost += "&status="+QueueAction.status; - queryPost += "&owner="+QueueAction.owner; - queryPost += "&category="+QueueAction.category; - queryPost += "&"+QueueAction.queryPost; // we add torrent id + queryPost = "action=multiple"; + queryPost += "&status=" + QueueAction.status; + queryPost += "&owner=" + QueueAction.owner; + queryPost += "&category=" + QueueAction.category; + queryPost += "&" + QueueAction.queryPost; // we add torrent id } TorrentsMod.newQueryAttempt(queryUrl, queryPost, callback) } else { TorrentsMod.addToLog("success", T.r("all_operations_done")) if (TorrentsMod.refreshTimeout > 0) { - TorrentsMod.addToLog("success", T.r("refreshing_in", TorrentsMod.refreshTimeout/1000)) - setTimeout(function(){ + TorrentsMod.addToLog("success", T.r("refreshing_in", TorrentsMod.refreshTimeout / 1000)) + setTimeout(function () { window.location.reload() }, TorrentsMod.refreshTimeout); } } }, - QueryLoop: function() { + QueryLoop: function () { if (TorrentsMod.progress_count <= TorrentsMod.progress_max) { TorrentsMod.updateProgressBar() TorrentsMod.progress_count++; @@ -290,53 +293,62 @@ var TorrentsMod = { }, // Event Handlers - checkboxEventHandler: function(e) { + checkboxEventHandler: function (e) { var el = e.target; TorrentsMod.checkboxEventHandlerFunc(el); }, - checkboxEventHandlerFunc: function(el) { + checkboxEventHandlerFunc: function (el) { var name = el.dataset.name; var id = el.value; - if (el.checked) TorrentsMod.addToSelection({name:name, id:id}); - else TorrentsMod.removeFromSelection({name:name, id:id}); + if (el.checked) TorrentsMod.addToSelection({ + name: name, + id: id + }); + else TorrentsMod.removeFromSelection({ + name: name, + id: id + }); if (TorrentsMod.selected.length > 0) TorrentsMod.enableBtnActions(); else TorrentsMod.disableBtnActions(); }, // Action Methods - DeleteHandler: function(locked) { + DeleteHandler: function (locked) { var withReport = confirm(T.r("delete_reports_with_torrents")) var selection = TorrentsMod.selected; if (locked) - TorrentsMod.AddToQueue({ action: "delete", + TorrentsMod.AddToQueue({ + action: "delete", withReport: withReport, selection: selection, queryPost: "", infos: T.r("with_st", T.r("lock")) + ((withReport) ? T.r("and_reports") : ""), - status: "5" }); + status: "5" + }); else TorrentsMod.AddToQueue({ action: "delete", withReport: withReport, selection: selection, infos: (withReport) ? T.r("with_st", T.r("reports")) : "", - queryPost: ""}); - for (i in selection) document.getElementById("torrent_"+i).style.display="none"; + queryPost: "" + }); + for (i in selection) document.getElementById("torrent_" + i).style.display = "none"; TorrentsMod.selected = [] TorrentsMod.disableBtnActions(); }, - Delete: function(e) { + Delete: function (e) { TorrentsMod.DeleteHandler(false); e.preventDefault(); }, - LockDelete: function(e) { + LockDelete: function (e) { TorrentsMod.DeleteHandler(true); e.preventDefault(); }, - Edit: function(e) { + Edit: function (e) { var selection = TorrentsMod.selected; - var status = document.querySelector(".modtools *[name='"+TorrentsMod.status_input_name+"']").value; - var owner_id = document.querySelector(".modtools *[name='"+TorrentsMod.owner_input_name+"']").value; - var category = document.querySelector(".modtools *[name='"+TorrentsMod.category_input_name+"']").value; + var status = document.querySelector(".modtools *[name='" + TorrentsMod.status_input_name + "']").value; + var owner_id = document.querySelector(".modtools *[name='" + TorrentsMod.owner_input_name + "']").value; + var category = document.querySelector(".modtools *[name='" + TorrentsMod.category_input_name + "']").value; var infos = ""; infos += (status != "") ? T.r("status_js", status) : ""; infos += (owner_id != "") ? T.r("owner_id_js", owner_id) : ""; @@ -345,26 +357,27 @@ var TorrentsMod = { action: "edit", selection: selection, queryPost: "", // We don't format now, we wait until the query is sent - infos: (infos != "" ) ? T.r("with_st", infos) : T.r("no_changes"), + infos: (infos != "") ? T.r("with_st", infos) : T.r("no_changes"), status: status, category: category, - owner: owner_id }); + owner: owner_id + }); if (status != "") { - for (i in selection) document.getElementById("torrent_"+i).className="torrent-info "+TorrentsMod.statusToClassName(status); + for (i in selection) document.getElementById("torrent_" + i).className = "torrent-info " + TorrentsMod.statusToClassName(status); } TorrentsMod.selected = [] TorrentsMod.disableBtnActions(); e.preventDefault(); }, - ApplyChanges: function() { + ApplyChanges: function () { this.pause = false; this.QueryLoop(); } }; - // Load torrentMods when DOM is ready -document.addEventListener("DOMContentLoaded", function() { - TorrentsMod.checkboxes = document.querySelectorAll("input[name='torrent_id']"); +// Load torrentMods when DOM is ready +document.addEventListener("DOMContentLoaded", function () { + TorrentsMod.checkboxes = document.querySelectorAll("input[name='torrent_id']"); TorrentsMod.Create(); }); - // @license-end +// @license-end diff --git a/public/js/translation.js b/public/js/translation.js index 06b111c6..f47b5e6a 100644 --- a/public/js/translation.js +++ b/public/js/translation.js @@ -2,7 +2,7 @@ // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat function Translations() { var translations = {}; - this.Add = function(tr, val) { + this.Add = function (tr, val) { trans = {} if (val != undefined) { trans[tr] = val; @@ -11,7 +11,7 @@ function Translations() { } Object.assign(translations, trans); }; - this.r = function(string, ...args) { + this.r = function (string, ...args) { if ((string != undefined) && (translations[string] != undefined)) { if (args != undefined) { return this.format(translations[string], ...args); @@ -21,12 +21,11 @@ function Translations() { console.error("No translation string for %s! Please check!", string); return ""; }; - this.format = function(format, ...args) { - return format.replace(/{(\d+)}/g, function(match, number) { - return typeof args[number] != 'undefined' - ? args[number] - : match - ; + this.format = function (format, ...args) { + return format.replace(/{(\d+)}/g, function (match, number) { + return typeof args[number] != 'undefined' ? + args[number] : + match; }); }; } diff --git a/templates/layouts/partials/menu/site.jet.html b/templates/layouts/partials/menu/site.jet.html index cbdbcc68..857d00ea 100644 --- a/templates/layouts/partials/menu/site.jet.html +++ b/templates/layouts/partials/menu/site.jet.html @@ -1,28 +1,44 @@ -{{ import "layouts/partials/helpers/search" }} -{{ block rss_link()}}{{end}} +{{ import "layouts/partials/helpers/search" }} {{ block rss_link()}}{{end}}
-
- -
-
{{ T("upload") }}
-
RSS
-
{{ T("faq") }}
- {{if Sukebei()}} -
{{ T("fun") }}
- {{else}} -
{{ T("fap") }}
- {{end}} -
+
+ -
- {{ include "layouts/partials/helpers/badgemenu" }} - + +
+
+ {{ include "layouts/partials/helpers/badgemenu" }} + +