diff --git a/public/css/main.css b/public/css/main.css index 061fc5e4..da812ab0 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -124,11 +124,7 @@ body { } .header .h-search { - margin-right: 8px; -} - -.header .h-search { - margin-right: 2px; + margin-right: 6px; } .header .h-search .form-input { @@ -279,7 +275,7 @@ select.form-input { .header .h-user .user-menu .nav-btn { float: none; display: block; - padding: 0px 10px; + padding: 0px 10px!important; height: 43px; line-height: 40px; text-align: left; @@ -376,14 +372,17 @@ select.form-input { display: inline-block; } +.form-refine .refine-searchbox::placeholder { opacity: 0; } .form-refine .refine-searchbox { border-radius: 3px 0 0 3px; width: 21%; + min-width: 170px; } .form-refine .refine-category { border-left: none; border-radius: 0 3px 3px 0; + max-width: 50%; } .categories a { @@ -411,6 +410,7 @@ th, .home-td, .user-td { text-overflow: ellipsis; } +.user-td { padding: 2px 0; } .user-td.tr-cat { padding: 4px 5px 4px 1px; min-width: 74px!important; @@ -582,7 +582,7 @@ textarea { margin-bottom: 1.2rem; } -#commit.new:after { +#commit.new:after,#commit.wew:after { content: "new"; color: red; font-size: 10pt; @@ -590,6 +590,7 @@ textarea { line-height: 5px; margin-left: 1px; } +#commit.wew:after { content: "wew"; } html, body { height: 100%; @@ -611,6 +612,9 @@ html, body { pointer-events: auto; } +.results.box>table>thead.torrent-info>tr { + height: 40px; +} /* holy fucking shit fuck responsive design */ @@ -651,10 +655,8 @@ html, body { .visible-md { display: block } -} - -.results.box>table>thead.torrent-info>tr { - height: 40px; + .user-td.tr-date { width: 100px; } + .user-td.tr-size { width: 77px; } } @media (max-width: 810px) { @@ -681,10 +683,6 @@ html, body { .hide-xs { display: none !important; } - #description-box img { - width: 100%; - height: auto; - } .header .h-user { width: 46px; } @@ -714,12 +712,14 @@ html, body { } @media (max-width: 565px) { + .header .h-search { margin-right: 0; } .header .h-search input { width: 90px !important; } - .form-input.language { - width: 281px; - } .form-input.refine { - display: none; + position: fixed; + border: 1px solid black; + bottom: 0; + width: 50%; + left: 25%; } .tr-links { width: 44px; @@ -729,7 +729,14 @@ html, body { } .header .nav-btn { padding: 0px 6px!important;} .form-input.form-category { width: 50px; margin-right: -5px;} + span.spacing { display: none!important; } + .form-refine .refine-category { width: 50%; } + .form-refine .refine-searchbox { width: 48%; } + .form-refine .refine-searchbox::placeholder { opacity: 1; } + .language { width: 350px; } + #footer { margin-bottom: 25px; } } + @media (max-width: 440px) { .header .nav-btn { padding: 0px 3px!important;} } @@ -833,11 +840,6 @@ html, body { border-radius: 4px; } -.torrent-info-box img { - max-width: 100%; - max-height: 100%; -} - .torrent-info-box>p>a, .torrent-info-box>div>a, #description-box a { text-decoration: underline; } @@ -979,8 +981,7 @@ thead.torrentinfo tr { /* 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-right: 0.4rem; } @@ -1048,11 +1049,16 @@ input.filelist-checkbox:checked+table.table-filelist { margin-bottom: 10px; } -#description-box div { +#description-box div, #description-box p { margin-top: 14px; margin-bottom: 14px; } +#description-box img { + max-width: 100%; + max-height: 100%; +} + /* Markdown editor fixes */ diff --git a/public/css/tomorrow.css b/public/css/tomorrow.css index d2e74adb..bda8d764 100644 --- a/public/css/tomorrow.css +++ b/public/css/tomorrow.css @@ -187,7 +187,7 @@ td.tr-le, .error-text { } .torrent-info-box { - border-color: #53565e; + border-color: #515456; } .tr-cat div.nyaa-cat { border-color: #232324!important; } .torrent-preview-table > table { border: 2px solid #1a1a1d; } diff --git a/public/js/main.js b/public/js/main.js index f69b5c30..4b7a775e 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -102,6 +102,7 @@ else startupCode() }) + var UserTheme function startupCode() { var shiftWindow = function () { @@ -124,7 +125,28 @@ function startupCode() { } if (document.cookie.includes("newVersion")) - document.getElementById("commit").className = "new"; + document.getElementById("commit").className = document.getElementById("commit").innerHTML != "unknown" ? "new" : "wew"; + + document.getElementById("dark-toggle").style.display = "inline-block"; + document.getElementById("dark-toggle").addEventListener("click", toggleTheme); + + + var CurrentTheme = document.getElementById("theme").href; + UserTheme = [CurrentTheme.substring(CurrentTheme.indexOf("/css/") + 5, CurrentTheme.indexOf(".css")), "tomorrow"] + if(UserTheme[0] == UserTheme[1]) + UserTheme[1] = "g" +} + +function toggleTheme() { + var CurrentTheme = document.getElementById("theme").href + CurrentTheme = CurrentTheme.substring(CurrentTheme.indexOf("/css/") + 5, CurrentTheme.indexOf(".css")) + CurrentTheme = (CurrentTheme == UserTheme[0] ? UserTheme[1] : UserTheme[0]) + + document.getElementById("theme").href = "/css/" + CurrentTheme + ".css"; + + var farFuture = new Date() + farFuture.setTime(farFuture.getTime() + 50 * 36000 * 15000) + document.cookie = "theme=" + CurrentTheme + ";path=/;expires=" + farFuture.toUTCString() } function playVoice() { diff --git a/templates/layouts/partials/base.jet.html b/templates/layouts/partials/base.jet.html index 5c12b51d..ae9ba235 100644 --- a/templates/layouts/partials/base.jet.html +++ b/templates/layouts/partials/base.jet.html @@ -84,7 +84,7 @@