From 3b40c83314fbde774a3c3f5b7885c10c1abf18e5 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Tue, 8 Jan 2019 07:58:22 +0100 Subject: [PATCH] Code cleaning code cosmetics deleted unused file caliBlur fixed custom error page --- cps/static/css/caliBlur-style.css | 2292 ----------------------------- cps/static/js/archive.js | 8 +- cps/static/js/main.js | 19 +- cps/static/js/table.js | 33 +- cps/static/js/unrar.js | 65 +- cps/static/js/unzip.js | 148 +- cps/templates/http_error.html | 2 +- cps/web.py | 14 +- 8 files changed, 142 insertions(+), 2439 deletions(-) delete mode 100644 cps/static/css/caliBlur-style.css diff --git a/cps/static/css/caliBlur-style.css b/cps/static/css/caliBlur-style.css deleted file mode 100644 index ddff69bc7..000000000 --- a/cps/static/css/caliBlur-style.css +++ /dev/null @@ -1,2292 +0,0 @@ -#have_read_form { - width: 1px; - height: 1px; - position: fixed; - top: 5px; - right: 185px; -} -#have_read_form input[type="checkbox" i] { - visibility: hidden; -} -#have_read_form input[type="checkbox" i]:hover:before { - cursor: pointer; - color: #fff; -} -#have_read_form input[type="checkbox" i]:before { - content: "\e106"; - position: fixed; - width: 60px; - height: 60px; - background: transparent; - top: 0; - right: 180px; - visibility: visible; - border-right: 2px solid rgba(0,0,0,.3); - border-left: 2px solid rgba(0,0,0,.3); - padding: 20px 39px 40px 19px; - color: hsla(0,0%,100%,.7); - z-index: 999; -} -#have_read_form input[type="checkbox" i]:checked:before { - content: "\e105"; - position: fixed; - width: 60px; - height: 60px; - background: transparent; - top: 0; - right: 180px; - visibility: visible; - color: var(--color-primary); - padding: 20px 39px 40px 19px; - z-index: 999; -} -.col-sm-10 #have_read_form input[type="checkbox" i]:before, -.col-sm-10 #have_read_form input[type="checkbox" i]:checked:before { - top: 60px; -} -#have_read_form input[type="checkbox" i]:checked:hover:before { - color: #fff; -} -#have_read_form span { - display: none; -} -#have_read_cb { - - font-family: 'Glyphicons Halflings'; - font-style: normal; - font-size: 18px; - font-weight: 400; - line-height: 1; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -.book { - width: 225px; - max-width: 225px; -} - -#infscr-loading img { - display: none; -} -#infscr-loading:before { - content: ''; - -webkit-box-sizing: border-box; - box-sizing: border-box; - border: 2px solid transparent; - border-radius: 50%; - border-top: 2px solid var(--color-secondary); - width: 24px; - height: 24px; - -webkit-animation: spin 0.5s linear infinite; - animation: spin 0.5s linear infinite; - display: block; - margin: 20px auto; - position: fixed; - top: calc(50% - 12px); - left: calc(50% - 12px); - z-index: 999999; -} -@-webkit-keyframes spin { - 0% { - -webkit-transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - } -} -@keyframes spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -a { - color: hsla(0, 0%, 100%, .45); -} -a:hover { - transition: color 0.2s; - color: #fff; -} -body > div.navbar.navbar-default.navbar-static-top > div > div.navbar-header > a { - margin: 60px auto auto !important; - width: 240px; - height: 60px; - text-align: center; - color: var(--color-primary) !important; - line-height: 60px; - padding-top: 0; - font-size: 15px; - font-family: Open Sans Bold,Helvetica Neue,Helvetica,Arial,sans-serif; - font-stretch: normal; - font-style: normal; - font-variant-caps: normal; - font-variant-ligatures: normal; - font-variant-numeric: normal; - font-weight: 600; - letter-spacing: normal; - text-shadow: none; - text-size-adjust: 100%; - text-transform: none; - user-select: none; - word-spacing: 0; - writing-mode: horizontal-tb; - -webkit-box-direction: normal; - -webkit-font-smoothing: antialiased; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - padding-bottom: 0; - padding-left: 40px; - padding-right: 40px; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - background: rgba(0,0,0,.45); -} -body > div.navbar.navbar-default.navbar-static-top > div > div.navbar-header > a:before { - background: url("https://raw.githubusercontent.com/leram84/layer.Cake/master/Resources/home-gray.png"); - background-size: cover; - background-repeat: no-repeat; - position: absolute; - display: block; - overflow: visible; - width: 25px; - height: 25px; - top: 16.5px; - left: 18px; - content: ''; -} -body > div.navbar.navbar-default.navbar-static-top > div > div.navbar-header > a:hover:after { - background: url("https://raw.githubusercontent.com/leram84/layer.Cake/master/Resources/home-white.png"); - background-size: cover; - background-repeat: no-repeat; - position: absolute; - display: block; - overflow: visible; - width: 25px; - height: 25px; - top: 16.5px; - left: 18px; - content: ''; -} -/* body > div.navbar.navbar-default.navbar-static-top > div > div.navbar-header > a:hover { - background: rgba(0,0,0,.45); - color: #fff !important; -} */ - :root { - --color-background: #474747; - --color-primary: #F9BE03; - --color-secondary: #CC7B19; - --color-secondary-hover: #E59029; -} -/* Root For Emby */ -/* :root { - --color-background: #333333; - --color-primary: #22aadc; - --color-secondary: #52b54b; - --color-secondary-hover: #71c26b; -} color: hsla(0,0%,100%,.45);*/ - -/* Blur Background */ -body { - background-image: url(https://raw.githubusercontent.com/leram84/layer.Cake/master/Resources/blur-noise.png), url("https://raw.githubusercontent.com/leram84/layer.Cake/master/Resources/blur-light.png") !important; - background-repeat: repeat, no-repeat !important; - background-attachment: fixed, fixed !important; - background-position: center center, center center !important; - background-size: auto, cover !important; - -webkit-background-size: auto, cover !important; - -moz-background-size: auto, cover !important; - -o-background-size: auto, cover !important; -} -.navbar-default { - background-color: rgba(0,0,0,.7) !important; - border: none; - position: fixed; - width: 100%; - height: 60px; - z-index: -9; -} -body { - background: url(https://raw.githubusercontent.com/leram84/layer.Cake/master/Resources/blur-noise.png), var(--color-background); - color: hsla(0, 0%, 100%, .45); - font-family: Open Sans Regular, Helvetica Neue, Helvetica, Arial, sans-serif; - font-weight: 600; - overflow: hidden; - margin: 0; -} -body > div.navbar.navbar-default.navbar-static-top > div > form > div { - width: 360px; -} -#btn-upload { - min-width: 1px; - min-height: 1px; - width: 60px; - height: 60px; - left: 0; - line-height: 1; - font-size: 1px; -} -#btn-upload:hover { - cursor: pointer !important; -} -#main-nav > li:nth-child(1) { - float: right; - -} -#form-upload { - position: relative; - float: right; - width: 60px; - margin: 0; - padding: 0; - height: 60px; - margin-right: 0; -} - -#form-upload .form-group .btn { - color: rgba(0,0,0,0); - background: transparent; - border: 0; - text-transform: uppercase; - font-weight: 600; - margin: 0; - padding: 0; - height: 60px; -} -#form-upload:hover .form-group .btn:after { - color: var(--color-secondary-hover); -} -#form-upload:hover .form-group .btn:before { - -webkit-box-shadow: inset 0 0 0 2px #fff; - box-shadow: inset 0 0 0 2px #fff; - background: var(--color-secondary-hover); - color: #fff; -} -#form-upload .form-group .btn:before { - content: "\e043"; - font-family: 'Glyphicons Halflings'; - font-style: normal; - font-weight: 400; - line-height: 1; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - color: #eee; - font-size: 20px; - background: var(--color-secondary); - border-radius: 50%; - line-height: 35px; - width: 35px; - height: 35px; - position: fixed; - top: 12.5px; - right: 25px; - margin: 0; - padding: 0 2px 0 0; - z-index: -9; -} -#form-upload .form-group .btn:after { - content: "+"; - font-size: 14px; - color: var(--color-secondary); - background: transparent; - border-radius: 50%; - padding: 0; - z-index: 9; - position: fixed; - line-height: 12px; - width: 12px; - height: 12px; - top: 26px; - right: 38px; - /* - content: "+"; - font-size: 14px; - color: #fff; - background: var(--color-secondary); - border-radius: 50%; - padding: 0; - z-index: 9; - position: fixed; - line-height: 14px; - width: 14px; - height: 14px; - top: 10px; - right: 20px; - */ -} -.form-control { - background-image: none; - display: block; - width: 100%; - height: 38px; - padding: 6px 12px; - font-weight: 100; - font-family: "Open Sans Semibold", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 13px !important; - font-stretch: 100%; - font-style: normal; - font-variant-caps: normal; - font-variant-east-asian: normal; - font-variant-ligatures: normal; - font-variant-numeric: normal; - font-weight: 400; - letter-spacing: normal; - line-height: 22.2857px !important; - color: #eee; - vertical-align: middle; - background-color: hsla(0, 0%, 100%, .25); - border-radius: 3px; - border: 0 !important; - -webkit-box-shadow: none; - box-shadow: none; - -webkit-transition: background-color 0.2s; - transition: background-color 0.2s; -} -.form-control:focus { - border-color: transparent; - outline: 0; - -webkit-box-shadow: none; - box-shadow: none; - background: #eee !important; - color: #555; -} -.form-control.tt-hint { - background: hsla(0, 0%, 100%, .25) !important; -} - -body > div.navbar.navbar-default.navbar-static-top > div > form > div > span > button { - background-color: hsla(0, 0%, 100%, .25); - color: #eee; - border: none; - -} - -body > div.navbar.navbar-default.navbar-static-top > div > form { - margin-left: -167px; - padding: 0; - margin-top: 15px; - margin-bottom: 15px; -} -body > div.navbar.navbar-default.navbar-static-top > div > form > .form-group > input { - border-radius: 4px 0 0 4px; -} -#main-nav { - margin-right: 15px; -} -body > div.navbar.navbar-default.navbar-static-top > div > div.navbar-collapse.collapse > ul { - height: 60px; - -} -body > div.navbar.navbar-default.navbar-static-top > div > div.navbar-collapse.collapse > ul > li { - height: 60px; - -} -body > div.navbar.navbar-default.navbar-static-top > div > div.navbar-collapse.collapse > ul > li > a { - height: 60px; - padding: 20px 10px; - color: #999; -} -body > div.navbar.navbar-default.navbar-static-top > div > div.navbar-collapse.collapse > ul:nth-child(1) {} -.author > a:hover { - color: #fff !important; -} -.row { - margin: 0; -} -body > div.container-fluid > div > div.col-sm-10 > div > form > h2 { - font-size: 15px; - color: var(--color-primary); - border-top: 1px solid rgba(0,0,0,.3); - padding-top: 60px; - margin-top: 50px; - margin-bottom: 30px; -} -/* clean up */ -.navigation .nav-head:nth-child(1n+2) { - border-top: none; - padding-top: 0; -} -.btn-default { - border-color: var(--color-secondary); - color: #fff; - background-color: var(--color-secondary); - -webkit-transition: background-color 0.1s; - transition: background-color 0.1s; -} -.btn-default:hover { - border-color: var(--color-secondary-hover); - color: #fff; - background-color: var(--color-secondary-hover); -} -body > div.container-fluid > div > div.col-sm-10 > div > form > a { - background-color: hsla(0,0%,100%,.25); - color: #fff; -} -body > div.container-fluid > div > div.col-sm-10 > div > form > a:hover { - background-color: hsla(0,0%,100%,.3); - color: #fff; -} -.btn { - display: inline-block; - padding: 6px 16px; - font-family: Open Sans Bold,Helvetica Neue,Helvetica,Arial,sans-serif; - text-transform: uppercase; - border: 0; - margin-bottom: 0; - font-size: 14px; - font-weight: 400; - line-height: 1.71428571; - text-align: center; - vertical-align: middle; - cursor: pointer; - border-radius: 3px; - white-space: nowrap; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - -o-user-select: none; - user-select: none; -} -.btn-primary { - color: #fff; - background-color: hsla(0,0%,100%,.25); - border-color: hsla(0,0%,100%,.25); -} -.btn-primary:hover { - background-color: hsla(0,0%,100%,.3); - border-color: hsla(0,0%,100%,.3); -} -.btn-default.focus, .btn-default:focus { - border-color: var(--color-secondary-hover); - color: #fff; - background-color: var(--color-secondary-hover); -} -.btn-default.active, .btn-default:active, .open>.dropdown-toggle.btn-default { - border-color: var(--color-secondary-hover); - color: #fff; - background-color: var(--color-secondary-hover); -} - -.form-group > label { - font-weight: 100; - color: #fff; -} -.navbar > .container-fluid { - margin: 0; - padding: 0; - height: 60px; -} -.navigation .nav-head { - text-transform: uppercase; - margin: 0; - color: hsla(0,0%,100%,.3); - text-transform: uppercase; - font-size: 12px; - font-family: Open Sans Bold,Helvetica Neue,Helvetica,Arial,sans-serif; - line-height: 45px; - padding-left: 25px; -} -.navigation li a { - color: hsla(0,0%,100%,.7); - text-decoration: none; - padding: 4px 0; - font-size: 13px; - height: 30px; - line-height: 21px; - width: 100%; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; -} -.navigation li { - min-height: 30px; - border-radius: 0 4px 4px 0; - max-width: 265px; - padding: 0 25px; - overflow: visible; -} -.navigation li:hover { - background-color: hsla(0,0%,100%,.08); - -} -.navigation li.nav-head:hover { - background-color: transparent; -} -.navigation li a:hover { - background: transparent; - color: #fff; -} -.navigation .create-shelf a { - - width: 150px; - color: #fff !important; - background-color: hsla(0, 0%, 100%, .25); - padding: 2px 7px; - font-size: 12px; - line-height: 1.2; - border-radius: 3px; - font-family: Open Sans Bold, Helvetica Neue, Helvetica, Arial, sans-serif; - border: 0; - -webkit-transition: background-color 0.1s; - transition: background-color 0.1s; - font-weight: 600; - white-space: nowrap; - margin: auto; - text-transform: uppercase; - max-height: 20px; -} -#scnd-nav .dropdown-menu > li > a:hover { - color: #fff; - background: transparent; -} -#scnd-nav .dropdown-menu { - left: 5px; -} -.navigation .create-shelf a:hover { - background-color: hsla(0, 0%, 100%, .3); - border-radius: 3px; -} -.navigation .create-shelf a:before { - content: "+"; - font-size: 120%; - padding-right: 10px; -} -.navigation .create-shelf { - width: auto; - margin: 30px auto; - min-height: auto; -} -.navigation .create-shelf:hover { - background: transparent; -} - -.container-fluid .book .meta .title { - font-weight: 600; - font-size: 13px; - font-family: Open Sans Semibold,Helvetica Neue,Helvetica,Arial,sans-serif; - -webkit-font-smoothing: antialiased; - color: #fff; - line-height: 20px; - -} -.container-fluid .book .meta .author { - font-weight: 600; - font-size: 13px; - font-family: Open Sans Semibold,Helvetica Neue,Helvetica,Arial,sans-serif; - -webkit-font-smoothing: antialiased; - color: hsla(0,0%,100%,.45); - line-height: 20px; -} -.container-fluid .book .meta .author > a { - font-weight: 600; - font-size: 13px; - font-family: Open Sans Semibold,Helvetica Neue,Helvetica,Arial,sans-serif; - -webkit-font-smoothing: antialiased; - color: hsla(0,0%,100%,.45); - line-height: 20px; -} -.container-fluid .book .cover img { - border: none; - -webkit-box-shadow: 0 0 2px rgba(0,0,0,.35); - -moz-box-shadow: 0 0 2px rgba(0,0,0,.35); - box-shadow: 0 0 2px rgba(0,0,0,.35); - position: relative; - z-index: -9; -} -.container-fluid .book .cover img:hover .container-fluid .book .cover:before {} - -#books > .cover > a, -#books_rand > .cover > a, -.book.isotope-item > .cover > a, -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.discover > form > div.col-sm-12 > div.col-sm-12 > div.col-sm-2 > a { - display: inline-block; - width: auto; - height: 100%; - -} -#books > .cover > a:hover, -#books_rand > .cover > a:hover, -.book.isotope-item > .cover > a:hover, -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.discover > form > div.col-sm-12 > div.col-sm-12 > div.col-sm-2 > a:hover { - outline: 2px solid var(--color-secondary); - font-size: 50px; - background: -webkit-radial-gradient(50% 50% farthest-corner,rgba(50,50,50,.5) 0,#323232 100%); - background: radial-gradient(farthest-corner at 50% 50%,rgba(50,50,50,.5) 50%,#323232 100%); - font-family: serif; - font-style: italic; -} -#books > .cover > a:hover:before, -#books_rand > .cover > a:hover:before, -.book.isotope-item > .cover > a:hover:before, -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.discover > form > div.col-sm-12 > div.col-sm-12 > div.col-sm-2 > a:hover:before { - content: "i"; - display: inline-block; - position: absolute; - background: var(--color-secondary); - color: #fff; - border-radius: 50%; - font-weight: 600; - font-size: 40px; - line-height: 50px; - width: 50px; - height: 50px; - padding-left: 19px; - left: 0; - right: 0; - top: 0; - bottom: 0; - margin: auto; -} -.container-fluid .book .cover { - width: auto; - display: inline-block; -} -.navbar { - margin-bottom: 0; - border: none; -} -.navbar-collapse.collapse { - height: 60px !important; - padding-bottom: 0; - overflow: visible!important; -} -.btn.active.focus, -.btn.active:focus, -.btn.focus, -.btn:active.focus, -.btn:active:focus, -.btn:focus { - outline: none; - outline-offset: 0; -} -.container-fluid .discover { - margin-bottom: 0; -} -.badge { - display: inline-block; - min-width: 10px; - padding: 3px 7px; - font-size: 12px; - font-weight: 700; - line-height: 1; - color: #fff; - text-align: center; - white-space: nowrap; - vertical-align: middle; - background-color: rgba(0,0,0,.15); - border-radius: 3px; -} -/* clean up */ - -app-loading-container { - background: #3f4245; -} -.app-loading>span { - display: none; -} -.app-loading { - margin: auto; - color: #fff !important; - text-align: center; - font-size: 20px; -} -.app-loading:before { - content: ''; - -webkit-box-sizing: border-box; - box-sizing: border-box; - border: 2px solid transparent; - border-radius: 50%; - border-top: 2px solid var(--color-secondary); - width: 24px; - height: 24px; - -webkit-animation: spin 0.5s linear infinite; - animation: spin 0.5s linear infinite; - display: block; - margin: 20px auto; -} -@-webkit-keyframes spin { - 0% { - -webkit-transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - } -} -@keyframes spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -body > div.container-fluid > div > div.col-sm-10::-webkit-scrollbar, -body > div.container-fluid > div.row-fluid > div.col-sm-2::-webkit-scrollbar { - width: 14px; - max-height: calc(100% - 60px); -} -#meta-info::-webkit-scrollbar, -#description::-webkit-scrollbar, -.book-meta::-webkit-scrollbar { - width: 14px; -} -body > div.container-fluid > div > div.col-sm-10::-webkit-scrollbar-track, -body > div.container-fluid > div.row-fluid > div.col-sm-2::-webkit-scrollbar-track { - background-color: transparent; - max-height: calc(100% - 60px); -} -#meta-info::-webkit-scrollbar-track { - background-color: #202020; -} -#description::-webkit-scrollbar-track, -.book-meta::-webkit-scrollbar-track { - background-color: transparent; -} -body > div.container-fluid > div > div.col-sm-10::-webkit-scrollbar-thumb, -body > div.container-fluid > div.row-fluid > div.col-sm-2::-webkit-scrollbar-thumb { - min-height: 110px; - border: 3px solid transparent; - border-radius: 8px; - background-color: hsla(0,0%,100%,.2); - background-clip: padding-box; - max-height: calc(100% - 60px); -} -#meta-info::-webkit-scrollbar-thumb, -#description::-webkit-scrollbar-thumb, -.book-meta::-webkit-scrollbar-thumb { - min-height: 50px; - border: 3px solid transparent; - border-radius: 8px; - background-color: hsla(0,0%,100%,.2); - background-clip: padding-box; -} -body > div.container-fluid > div > div.col-sm-10::-webkit-scrollbar-thumb:hover, -body > div.container-fluid > div.row-fluid > div.col-sm-2::-webkit-scrollbar-thumb:hover, -#meta-info::-webkit-scrollbar-thumb:hover, -#description::-webkit-scrollbar-thumb:hover, -.book-meta::-webkit-scrollbar-thumb:hover { - background-color: hsla(0,0%,100%,.3); -} -::-webkit-scrollbar-corner { - background: transparent; -} -.pace-progress { - display: none; -} -.pace .pace-activity { - border: 2px solid transparent; - border-radius: 50%; - border-top: 2px solid var(--color-secondary); - width: 24px; - height: 24px; - right: auto; - left: 8px; - top: 17px; -} -body > .container-fluid { - margin: 0; - padding: 0; - width: calc(100%); - height: calc(100vh - 60px); - position: fixed; - top: 60px; - left: 0; - min-height: 1px; - min-width: 1px; -} -body > div.container-fluid > div.row-fluid > div.col-sm-2 { - position: fixed; - width: 240px; - height: calc(100vh - 120px); - left: 0; - top: 120px; - background: rgba(0,0,0,.15); - padding: 0 5px 20px 0; - overflow-y: auto; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 { - width: calc(100vw - 240px); - height: calc(100vh - 120px); - padding: 0; - position: fixed; - min-height: 1px; - min-width: 1px; - top: 120px; - right: 0; - overflow-y: scroll !important; -} - -body > div.container-fluid > div > div.col-sm-10 > div.discover > div { - overflow: visible !important; - width: 100%; - margin: 0; -} -body > div.container-fluid > div > div.col-sm-10 > div.discover { - height: auto; - width: calc(100vw - 254px); - margin: 40px 0 !important; - padding: 0 0 0 25px !important; - -} -body > div.container-fluid > div > div.col-sm-10 > div.single { - height: auto; - width: calc(100vw - 254px); - margin: 0 !important; - padding: 15px !important; - -} -body > div.container-fluid > div > div.col-sm-10 > div.discover { - margin-top: 0; -} -body > div.container-fluid > div > div.col-sm-10 > div.discover > h2 { - color: #eee !important; - font-size: 15px !important; - font-family: Open Sans Bold,Helvetica Neue,Helvetica,Arial,sans-serif !important; - line-height: 24px !important; - overflow: hidden!important; - min-width: 0; - width: 100% !important; - max-width: 100% !important; - text-overflow: ellipsis !important; - white-space: nowrap!important; - text-transform: uppercase !important; - font-weight: 600 !important; - padding-left: 15px !important; - margin-bottom: 0 !important; - position: relative !important; - top: 0 !important; - left: 0 !important; - height: auto !important; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.discover > form > div.col-sm-12 > div.col-sm-12 > h2 { - color: #eee; - font-size: 15px; - font-family: Open Sans Bold,Helvetica Neue,Helvetica,Arial,sans-serif; - line-height: 24px; - overflow: hidden; - min-width: 0; - width: 100%; - max-width: 100%; - text-overflow: ellipsis; - white-space: nowrap; - text-transform: uppercase; - font-weight: 600; - padding-left: 15px; - margin-bottom: 20px; - margin-top: 40px; - position: relative; - top: 0; - left: 0; - height: auto; -} -body > div.container-fluid > div > div.col-sm-10 > h3:not(:first-of-type) { - color: #eee; - width: calc(100% - 30px); - max-width: 800px; - margin: 20px auto 10px; - text-align: right; -} -body > div.container-fluid > div > div.col-sm-10 > p { - margin: 40px 0 0 15px; -} -body > div.container-fluid > div > div.col-sm-10 > p > a { - color: var(--color-secondary); -} -body > div.container-fluid > div > div.col-sm-10 > p > a:hover { - color: #fff; -} -body > div.container-fluid > div > div.col-sm-10 > h3:first-of-type { - content: "About"; - width: calc(100vw - 240px); - height: 60px; - margin: 0; - padding-left: 25px; - color: hsla(0,0%,100%,.7); - font-family: "Open Sans Semibold", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 15px; - line-height: 60px; - text-size-adjust: 100%; - white-space: nowrap; - -webkit-box-direction: normal; - -webkit-font-smoothing: antialiased; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - font-weight: 600; - -webkit-margin-before: 0; - -webkit-margin-after: 0; - position: fixed; - top: 60px; - left: 240px; - text-align: left; -} -body > div.container-fluid > div > div.col-sm-10 > div > div > div.col-sm-9.col-lg-9.book-meta > h2:before { - content: "Book Details"; - width: calc(100vw - 540px); - height: 60px; - margin: 0; - padding-left: 25px; - /* background: rgba(0,0,0,.15); */ - color: hsla(0,0%,100%,.7); - font-family: "Open Sans Semibold", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 15px; - line-height: 60px; - text-size-adjust: 100%; - white-space: nowrap; - -webkit-box-direction: normal; - -webkit-font-smoothing: antialiased; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - font-weight: 600; - -webkit-margin-before: 0; - -webkit-margin-after: 0; - position: fixed; - top: 60px; - left: 240px; -} -body > div.container-fluid > div > div.col-sm-10 > div:nth-of-type(2) > h2:before { - content: "Books"; - width: calc(100vw - 240px); - height: 60px; - margin: 0; - padding-left: 25px; - /* background: rgba(0,0,0,.15); */ - color: hsla(0,0%,100%,.7); - font-family: "Open Sans Semibold", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 15px; - line-height: 60px; - text-size-adjust: 100%; - white-space: nowrap; - -webkit-box-direction: normal; - -webkit-font-smoothing: antialiased; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - font-weight: 600; - -webkit-margin-before: 0; - -webkit-margin-after: 0; - position: fixed; - top: 60px; - left: 240px; -} -/* body > div.container-fluid > div > div.col-sm-10 > div > div > div.col-sm-9.col-lg-9.book-meta > h2, */ -.well > h2, -body > div.container-fluid > div > div.col-sm-10 > div.discover:only-of-type > h2 { - width: calc(100vw - 240px) !important; - height: 60px !important; - margin: 0; - padding-left: 25px !important; - color: hsla(0,0%,100%,.7) !important; - font-family: "Open Sans Semibold", "Helvetica Neue", Helvetica, Arial, sans-serif !important; - font-size: 15px !important; - line-height: 60px !important; - text-size-adjust: 100%; - white-space: nowrap !important; - -webkit-box-direction: normal; - -webkit-font-smoothing: antialiased; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - font-weight: 600 !important; - -webkit-margin-before: 0; - -webkit-margin-after: 0; - position: fixed !important; - top: 60px !important; - left: 240px !important; - text-overflow: ellipsis !important; - max-width: calc(100vw - 550px) !important; - overflow: hidden !important; -} -body > div.container-fluid > div > div.col-sm-10 > h2 { - width: calc(100vw - 240px) !important; - height: 60px !important; - margin: 0; - padding-left: 25px !important; - color: hsla(0,0%,100%,.7) !important; - font-family: "Open Sans Semibold", "Helvetica Neue", Helvetica, Arial, sans-serif !important; - font-size: 15px !important; - line-height: 60px !important; - text-size-adjust: 100%; - white-space: nowrap !important; - -webkit-box-direction: normal; - -webkit-font-smoothing: antialiased; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - font-weight: 600 !important; - -webkit-margin-before: 0; - -webkit-margin-after: 0; - position: fixed !important; - top: 60px !important; - left: 240px !important; - text-overflow: ellipsis !important; - max-width: calc(100vw - 550px) !important; - overflow: hidden !important; -} -/* body > div.container-fluid > div > div.col-sm-10 > div > div > div.col-sm-9.col-lg-9.book-meta > h2:before, -.well > h2:before */ -body > div.container-fluid > div.row-fluid > div.col-sm-10:before { - width: 100%; - height: 60px; - background: rgba(0,0,0,.15); - display: block; - content: ''; - position: fixed; - top: 60px; - left: 240px; -} -body > div.container-fluid > div > div.col-sm-10 > div.discover > h2, -body > div.container-fluid > div > div.col-sm-10 > h1, -body > div.container-fluid > div > div.col-sm-10 > div.discover > h1, -body > div.container-fluid > div > div.col-sm-10 > div.col-sm-6.col-lg-6.col-xs-6 > h2 { - width: calc(100vw - 240px); - height: 60px; - margin: 0; - padding-left: 25px; - /* background: rgba(0,0,0,.15); */ - color: hsla(0,0%,100%,.7); - font-family: "Open Sans Semibold", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 15px; - line-height: 60px; - text-size-adjust: 100%; - white-space: nowrap; - -webkit-box-direction: normal; - -webkit-font-smoothing: antialiased; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - font-weight: 600; - -webkit-margin-before: 0; - -webkit-margin-after: 0; - position: fixed; - top: 60px; - left: 240px; -} -body > div.container-fluid > div > div.col-sm-10 > div.discover > h1:first-letter { - text-transform: uppercase; -} -body > div.container-fluid > div > div.col-sm-10 > div.discover > form > .btn.btn-default { - float: right; - margin: 0 0 0 10px; -} -.pagination { - display: block !important; - position: fixed; - top: 60px; - right: 0; - min-width: 1px; - min-height: 1px; - overflow: visible; - cursor: default; - height: 60px; - margin: 0; - line-height: 60px; - font-size: 15px; - z-index: 99999; -} -.pagination > a { - color: hsla(0,0%,100%,.7); -} -.pagination > a:hover { - color: #fff; - text-decoration: none; -} -.pagination > .ellipsis { - color: hsla(0,0%,100%,.7); -} -.navbar-default .navbar-nav>li>a:focus, -.navbar-default .navbar-nav>li>a:hover { - color: #fff !important; -} -body > div.container-fluid > div > div.col-sm-10 > div.pagination > a.next { - color: rgba(0,0,0,0); - font-family: 'Glyphicons Halflings'; - font-style: normal; - font-weight: 100; - margin-left: 0px; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - line-height: 60px; - height: 60px; - padding: 0; - font-size: 15px; - position: absolute; - top: 0; - right: 0; -} -body > div.container-fluid > div > div.col-sm-10 > div.pagination > a.previous { - color: rgba(0,0,0,0); - font-family: 'Glyphicons Halflings'; - font-style: normal; - font-weight: 100; - margin-left: 0px; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - line-height: 60px; - height: 60px; - width: 65px; - padding: 0; - font-size: 15px; - position: absolute; - top: 0; - right: 65px; -} -body > div.container-fluid > div > div.col-sm-10 > div.pagination > a.next:before { - content: "\e092"; - visibility: visible; - color: hsla(0,0%,100%,.35); - height: 60px; - line-height: 60px; - border-left: 2px solid rgba(0,0,0,.3); - font-size: 15px; - padding: 20px 0 20px 25px; - margin-right: -27px; -} -body > div.container-fluid > div > div.col-sm-10 > div.pagination > a.previous:before { - content: "\e091"; - visibility: visible; - color: hsla(0,0%,100%,.65); - height: 60px; - line-height: 60px; - - font-size: 15px; - padding: 20px 25px 20px 25px; - margin-right: ; -} -body > div.container-fluid > div > div.col-sm-10 > div.pagination > a.next:hover:before { - color: #fff; -} -body > div.container-fluid > div > div.col-sm-10 > div.pagination > a.previous:hover:before { - color: #fff; -} -.pagination > strong { - display: none; -} -.pagination:after { - content: "\e092"; - position: relative; - top: 0; - right: 0; - display: inline-block; - color: hsla(0,0%,100%,.55); - line-height: 60px; - - font-size: 15px; - padding: 0 25px; - font-family: 'Glyphicons Halflings'; - font-style: normal; - font-weight: 100; - margin-left: 20px; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - line-height: 60px; - height: 60px; - z-index: -1; -} -.pagination > .ellipsis { - display: none; -} -.pagination > a:nth-last-of-type(2) { - display: none; -} -body > div.container-fluid > div > div.col-sm-10 > div.container { - margin: 60px auto 120px; - border-top: 2px solid rgba(0,0,0,.3); - border-bottom: 2px solid rgba(0,0,0,.3); - background: hsla(0,0%,100%,.02); - padding: 0; - max-width: calc(100% - 30px); -} -body > div.container-fluid > div > div.col-sm-10 > div.container > div { - padding: 0; -} -body > div.container-fluid > div > div.col-sm-10 > div.container > div > .row { - padding: 4px 0; -} -body > div.container-fluid > div > div.col-sm-10 > div.container > div > .row:nth-of-type(odd) { - background: hsla(0,0%,100%,.02); -} -body > div.container-fluid > div > div.col-sm-10 > div.container > div > .row > .col-xs-6 { - width: calc(91.666% - 30px); - overflow: hidden; - text-overflow: ellipsis; - color: hsla(0, 0%, 100%, .45); -} -body > div.container-fluid > div > div.col-sm-10 > div.container > div > .row > .col-xs-6 > a { - text-overflow: ellipsis; - white-space: nowrap; - transition: all 0s; -} -/* Login */ -.well { - max-height: 520px; - height: auto; - background-color: transparent; - border: none; - border-radius: 0; - -webkit-box-shadow: none; - box-shadow: none; - min-width: 600px; - max-width: 700px; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - margin: 0 auto; - padding: 60px; -} -/* .well > h2 { - color: #eee; - text-align: center; -} */ -.well > form { - background: rgba(0,0,0,.4); - color: hsla(0,0%,100%,.45); - text-transform: uppercase; - padding: 60px; - margin-top: 60px; -} -.checkbox { - text-transform: none; -} -.well > form > .btn { - display: inline-block; - overflow: hidden; - border-radius: 4px; - color: #fff; - vertical-align: middle; - text-align: center; - text-transform: uppercase; - white-space: nowrap; - font-family: Open Sans Bold,Helvetica Neue,Helvetica,Arial,sans-serif; - -webkit-transition: background-color 0.2s,color 0.2s; - transition: background-color 0.2s,color 0.2s; - padding: 6px 30px 5px; - font-size: 15px; - font-weight: 600; - background-color: var(--color-secondary); - border: none; - width: 100%; - text-rendering: auto; - letter-spacing: normal; - word-spacing: normal; - text-indent: 0; - text-shadow: none; - margin-top: 20px; -} -.well > form > .btn:hover { - background-color: var(--color-secondary-hover); -} -/* Login */ - -/* Alert */ -body > div.row-fluid { - margin-top: 0 !important; -} -.alert { - position: fixed; - top: auto; - bottom: 20px; - left: 50%; - width: 50%; - margin: 0; - -webkit-transform: translate(-50%); - -ms-transform: translate(-50%); - transform: translate(-50%); - opacity: 1 !important; - right: 0; - border-radius: 10px; - - background-color: #000; - color: #eee; - border: 0; - -webkit-box-shadow: 0 4px 12px rgba(0,0,0,.5); - box-shadow: 0 4px 12px rgba(0,0,0,.5); - -webkit-transition: all 0.5s; - transition: all 0.5s; - - height: 34px; - line-height: 1.71428571 !important; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - font-size: 14px; - padding: 5px 0; - - z-index: 99999; - -moz-animation: cssAnimation 0s ease-in 10s forwards; - /* Firefox */ - -webkit-animation: cssAnimation 0s ease-in 10s forwards; - /* Safari and Chrome */ - -o-animation: cssAnimation 0s ease-in 10s forwards; - /* Opera */ - animation: cssAnimation 0s ease-in 10s forwards; - -webkit-animation-fill-mode: forwards; - animation-fill-mode: forwards; - -} -@keyframes cssAnimation { - to { - width: 0; - height: 0; - overflow: hidden; - } -} -@-webkit-keyframes cssAnimation { - to { - width: 0; - height: 0; - visibility: hidden; - } -} - -.alert-danger { - background-color: rgba(255,85,51,.3); - color: #fff; -} -/* Alert */ - -.table>thead>tr>th { - border-bottom: 0; -} -.table>tbody>tr>td, -.table>tbody>tr>th, -.table>tfoot>tr>td, -.table>tfoot>tr>th, -.table>thead>tr>td, -.table>thead>tr>th { - border-top: 1px solid rgba(0,0,0,.3); - background: rgba(0,0,0,.15); -} -#stats, -#libs { - margin: auto; - width: calc(100% - 30px); - max-width: 800px; - color: hsla(0,0%,100%,.75); - border-bottom: 2px solid rgba(0,0,0,.3); - border-top: 2px solid rgba(0,0,0,.2); -} -#libs { - margin-bottom: 40px; -} -#stats > tbody > tr > th, -#libs > tbody > tr > th, -#libs > thead > tr > th:first-child { - color: hsla(0,0%,100%,.45); -} -#books .cover img, -#books_rand .cover img, -.book .cover img { - width: auto; -} -.container-fluid img { - display: block; - width: 100%; - height: auto; - max-width: 195px; - margin: auto; -} -.container-fluid .single .cover img { - border: 0; - border-radius: 0; - -webkit-box-shadow: 0 0 2px rgba(0,0,0,.35); - -moz-box-shadow: 0 0 2px rgba(0,0,0,.35); - box-shadow: 0 0 2px rgba(0,0,0,.35); - background-color: rgba(0,0,0,.45); -} - - -body > div.container-fluid > div > div.col-sm-10 > div > div > div.col-sm-3.col-lg-3, -body > div.container-fluid > div > div.col-sm-10 > div.col-sm-3.col-lg-3.col-xs-12 { - max-width: calc(25% - 75px); - position: fixed; -} -body > div.container-fluid > div > div.col-sm-10 > div.col-sm-3.col-lg-3.col-xs-12 { - padding-top: 40px; - padding-bottom: 40px; -} -body > div.container-fluid > div > div.col-sm-10 > div > div > div.col-sm-9.col-lg-9.book-meta, -body > div.container-fluid > div > div.col-sm-10 > div.col-sm-8 { - margin-left: calc(25% + 3.3333px); - width: calc(75% + 10.5px); -} -body > div.container-fluid > div > div.col-sm-10 > div.col-sm-8 { - padding-top: 40px; - padding-bottom: 40px; -} -body > div.container-fluid > div > div.col-sm-10 > div.col-sm-8 > form > div > span > input.form-control.typeahead.tt-hint { - background: hsla(0, 0%, 100%, .25) !important; -} -body > div.container-fluid > div > div.col-sm-10 > div.col-sm-8 > form > div > span > input.form-control:focus { - background: #fff !important; -} -.glyphicon-star { - color: #fff; -} -.rating-input .glyphicon:hover { - cursor: pointer; -} -.rating-input:hover { - cursor: default; -} -.rating-input { - padding-left: 0; -} -body > div.container-fluid > div > div.col-sm-10 > div.col-sm-8 > form > .btn.btn-default { - float: right; - margin: 0 0 0 10px; -} -#get_meta { - float: left; - margin: 0; -} -textarea { - resize: none; - /* Safari */ - resize: vertical; - /* Chrome */ -} -.modal-backdrop.in { - display: none; -} -#metaModal, -.modal.fade.in {} -#metaModal { - top: 0; - overflow: hidden; - padding-top: 60px; - left: 0; - right: 0; - bottom: 0; - background: rgba(0,0,0,.5); -} -#metaModal > .modal-dialog > .modal-content { - z-index: 9999999999999999999999; -} -#metaModal > .modal-dialog > .modal-content { - max-height: calc(100vh - 90px); - -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5); - box-shadow: 0 5px 15px rgba(0,0,0,.5); - border-radius: 3px; -} -#metaModal > .modal-dialog > .modal-content > .modal-header { - padding: 0; - background: #282828; - border-radius: 3px 3px 0 0; -} -#metaModal > .modal-dialog > .modal-content > .modal-header > h4 { - border-bottom: 0; - background: #323232; - height: 65px; - - padding: 15px 0 0 15px; - font-size: 20px; - text-overflow: ellipsis; - white-space: nowrap; - line-height: 1.71428571; - font-family: Open Sans Regular,Helvetica Neue,Helvetica,Arial,sans-serif; - font-weight: 400; - color: #eee; - border-radius: 3px 3px 0 0; - margin-bottom: 0; -} -#metaModal > .modal-dialog > .modal-content > .modal-header > h4:before { - content: "\E025"; - font: normal normal normal 16px/1 Glyphicons Halflings; - color: #999; - - padding-right: 10px; -} -#metaModal > .modal-dialog > .modal-content > .modal-header > .close { - color: #eee; - opacity: 0.2; - font-size: 20px; - text-shadow: none; - margin: 20px; -} -#metaModal > .modal-dialog > .modal-content > .modal-header > .close:hover { - opacity: 0.5; -} -#metaModal > .modal-dialog > .modal-content > .modal-header > #meta-search { - margin: 25px 0 0 0; - -} -#metaModal > .modal-dialog > .modal-content > .modal-header > #meta-search > .input-group { - max-width: 100%; -} -#metaModal > .modal-dialog > .modal-content > .modal-header > #meta-search > .input-group > input { - width: calc(100% - 51px); - border-radius: 0; - background-color: hsla(0, 0%, 100%, .15); -} -#metaModal > .modal-dialog > .modal-content > .modal-header > #meta-search > .input-group { - width: 100%; -} -#metaModal > .modal-dialog > .modal-content > .modal-header > #meta-search > .input-group > span > button { - height: 38px; - width: 50px; - padding: 0; - font-weight: 100; - font-family: "Open Sans Semibold", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 13px !important; - font-stretch: 100%; - font-style: normal; - font-variant-caps: normal; - font-variant-east-asian: normal; - font-variant-ligatures: normal; - font-variant-numeric: normal; - font-weight: 400; - letter-spacing: normal; - line-height: 22.2857px !important; - color: #eee; - vertical-align: middle; - background-color: hsla(0, 0%, 100%, .15); - border-radius: 0; - margin: 0 0 0 -1px; -} -#metaModal > .modal-dialog > .modal-content > .modal-header > #meta-search > .input-group > span { - float: right; - text-align: right; - width: 50px; - - margin: 0; -} -#metaModal > .modal-dialog > .modal-content > .modal-header > div { - font-family: Open Sans Regular,Helvetica Neue,Helvetica,Arial,sans-serif; - font-size: 12px; - line-height: 1.71428571; - color: var(--color-primary); - font-weight: 100; - text-align: right; - position: absolute; - right: 0; - padding: 12.5px; -} -#metaModal > .modal-dialog > .modal-content > .modal-body { - padding: 0; -} -#metaModal > .modal-dialog > .modal-content > .modal-body > .text-center { - text-align: left; - margin-bottom: 0; - padding-top: 10px; -} -#metaModal > .modal-dialog > .modal-content > .modal-body > #book-list { - margin-bottom: 0; -} -input.pill:checked + label { - background-color: transparent; - border-color: transparent; - color: var(--color-secondary); -} - -input.pill + label { - border: 0; - border-radius: 0; - color: hsla(0,0%,100%,.25); - cursor: pointer; - display: inline-block; - padding: 3px 15px; - user-select: none; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -input.pill + label:hover { - color: var(--color-secondary-hover); -} - - -#meta-info { - max-height: calc(100vh - 357px); - overflow-y: scroll; - background: #282828 !important; - padding: 0; - margin: 0; -} -#meta-info #book-list .media > .media-body { - font-family: "Open Sans Regular", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 24px; - color: #999; - font-weight: 100; - padding-left: 15px; -} -#meta-info #book-list .media > img { - padding: 0; -} -#meta-info #book-list .media > .media-body > h4 > a { - color: #eee; -} -#meta-info #book-list .media > .media-body > h4 > a:hover { - color: #fff; -} -#meta-info #book-list { - width: 100%; - margin: 0; -} -#meta-info #book-list .media:nth-of-type(odd) { - background: hsla(0, 0%, 100%, .02); -} - -#meta-info #book-list .media { - margin-top: 0; - padding: 20px 15px 5px; -} -#meta-info #book-list .media > .media-body > p > a { - color: var(--color-secondary); - padding-left: 10px; -} -#meta-info #book-list .media > .media-body > p > a:hover { - color: #fff; -} - -.modal-content { - position: relative; - background-color: #323232; - -webkit-background-clip: padding-box; - background-clip: padding-box; - border: 0; - border-radius: 0 0 3px 3px; - outline: 0; - -webkit-box-shadow: 0 3px 9px rgba(0,0,0,.5); - box-shadow: 0 3px 9px rgba(0,0,0,.5); -} -.modal-footer { - padding: 15px; - text-align: right; - border-top: 0; -} -.modal-header { - padding: 15px; - border-bottom: 0; -} -#meta-info #book-list .media > img:hover { - cursor: pointer; - outline: 2px solid var(--color-secondary); - filter:brightness(90%); -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > form > div.col-sm-9 > div:nth-child(10) > label:before { - content: "Edit Metadata"; - width: calc(100vw - 240px); - height: 60px; - margin: 0; - padding-left: 25px; - background: transparent; - color: hsla(0,0%,100%,.7); - font-family: "Open Sans Semibold", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 15px; - line-height: 60px; - text-size-adjust: 100%; - white-space: nowrap; - -webkit-box-direction: normal; - -webkit-font-smoothing: antialiased; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - font-weight: 600; - -webkit-margin-before: 0; - -webkit-margin-after: 0; - position: fixed; - top: 60px; - left: 240px; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > form > div.col-xs-12 { - margin: 50px 0; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.col-sm-8 > form > #test:before { - content: "Advanced Search"; - width: calc(100vw - 240px); - height: 60px; - margin: 0; - padding-left: 25px; - background: transparent; - color: hsla(0,0%,100%,.7); - font-family: "Open Sans Semibold", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 15px; - line-height: 60px; - text-size-adjust: 100%; - white-space: nowrap; - -webkit-box-direction: normal; - -webkit-font-smoothing: antialiased; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - font-weight: 600; - -webkit-margin-before: 0; - -webkit-margin-after: 0; - position: fixed; - top: 60px; - left: 240px; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.col-sm-8 > form > #test { - border-top: 2px solid rgba(0,0,0,.3); - margin-top: -50px; - padding-top: 50px; - padding-left: 33.33%; - margin-left: -33.33%; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.col-sm-8 > form > .form-group > .btn-toolbar-lg > label.btn { - margin: 2px 3px 0 0; - padding: 0 10px; - background: hsla(0,0%,100%,.25); -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.col-sm-8 > form > .form-group > .btn-toolbar-lg > label.btn:hover { - background: hsla(0,0%,100%,.3); -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.col-sm-8 > form > .form-group > .btn-toolbar-lg > label.btn-danger:hover { - background: #ce3d2a; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.col-sm-8 > form > .form-group > .btn-toolbar-lg > label.btn-danger.active { - background: #ac3323; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.col-sm-8 > form > .form-group > .btn-toolbar-lg > label.btn-danger.active:hover { - background: #ce3d2a; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.col-sm-8 > form > .form-group > .btn-toolbar-lg > label.btn-primary:hover { - background: var(--color-secondary-hover); -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.col-sm-8 > form > .form-group > .btn-toolbar-lg > label.btn-primary.active { - background: var(--color-secondary); -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.col-sm-8 > form > .form-group > .btn-toolbar-lg > label.btn-primary.active:hover { - background: var(--color-secondary-hover); -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.col-sm-8 > form > .form-group > .btn-toolbar-lg { - margin-left: -33.33%; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.col-sm-8 > form > label { - margin-left: -33.33%; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.col-sm-8 > form > label:first-of-type { - padding-top: 40px; -} - - - - - -#bookDetailsModal .modal-header > .close { - display: none; -} -#bookDetailsModal .modal-footer { - /* width: 100px; - position: fixed; - top: 800px; - left: 0; */ - display: none; -} -a:focus { - outline: none; - outline-offset: 0; -} - -#bookDetailsModal { - width: calc(100vw - 240px); - height: calc(100vh - 60px); - padding: 0; - position: fixed; - min-height: 1px; - min-width: 1px; - top: 60px; - left: 240px; - - background-image: url(https://raw.githubusercontent.com/leram84/layer.Cake/master/Resources/blur-noise.png), url("https://raw.githubusercontent.com/leram84/layer.Cake/master/Resources/blur-light.png"); - background-repeat: repeat, no-repeat; - background-attachment: fixed, fixed; - background-position: center center, center center; - background-size: auto, cover !important; - -webkit-background-size: auto, cover; - -moz-background-size: auto, cover; - -o-background-size: auto, cover; -} -#bookDetailsModal > .modal-dialog.modal-lg { - padding: 0; - margin: 0; - width: 100%; - height: 100%; - - -} -#bookDetailsModal > .modal-dialog.modal-lg > .modal-content { - background-color: transparent; - border-radius: 0; - -webkit-box-shadow: none; - box-shadow: none; -} -#bookDetailsModal > .modal-dialog.modal-lg > .modal-content > .modal-header { - width: 100%; - height: 60px; - margin: 0; - padding: 0 0 0 25px; - background: rgba(0,0,0,.15); - color: hsla(0,0%,100%,.7); - font-family: "Open Sans Semibold", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 15px; - line-height: 60px; - text-size-adjust: 100%; - white-space: nowrap; - -webkit-box-direction: normal; - -webkit-font-smoothing: antialiased; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - font-weight: 600; - -webkit-margin-before: 0; - -webkit-margin-after: 0; - position: fixed; - top: 0; - left: 0; -} -#bookDetailsModal > .modal-dialog.modal-lg > .modal-content > .modal-header > h4 { - width: 100%; - max-width: calc(100% - 340px); - height: 60px; - line-height: 60px; -} -#bookDetailsModal > .modal-dialog.modal-lg > .modal-content > .modal-body { - width: calc(100vw - 240px); - height: calc(100vh - 120px); - position: fixed; - min-height: 1px; - min-width: 1px; - top: 60px; - left: 0; - padding: 0; -} -#bookDetailsModal > .modal-dialog.modal-lg > .modal-content > .modal-body > .container-fluid { - padding: 0; -} -#bookDetailsModal > .modal-dialog.modal-lg > .modal-content > .modal-body> div > div > div > div.col-sm-3.col-lg-3.col-xs-5 { - padding: 30px 15px 15px 30px; - height: 300px; -} -body > div.container-fluid > div > div.col-sm-10 > div > div > div.col-sm-3.col-lg-3.col-xs-5 { - padding: 15px; - height: 300px; -} -#bookDetailsModal > .modal-dialog.modal-lg > .modal-content > .modal-body> div > div > div > div.col-sm-3.col-lg-3.col-xs-5 > div.cover, -body > div.container-fluid > div > div.col-sm-10 > div > div > div.col-sm-3.col-lg-3.col-xs-5 > div.cover { - margin: 0; - width: 100%; - height: 100%; - -} -#bookDetailsModal > .modal-dialog.modal-lg > .modal-content > .modal-body> div > div > div > div.col-sm-3.col-lg-3.col-xs-5 > div.cover > img, -body > div.container-fluid > div > div.col-sm-10 > div > div > div.col-sm-3.col-lg-3.col-xs-5 > div.cover > img { - margin: 0; - max-height: 300px; -} - - - - - - - - - - - - - - - - -#bookDetailsModal .book-meta > h2 { - margin-top: 15px; -} - -.book-meta > h2 { - font-size: 24px; - font-family: Open Sans Bold,Helvetica Neue,Helvetica,Arial,sans-serif; - color: #eee; - font-weight: 600; - line-height: 1; - margin: 0; - max-width: calc(100% - 100px); - padding: 15px 0; -} -.book-meta > .author:before { - content: "Author:"; - padding-right: 4px; - color: #eee; -} -.book-meta > .author > a { - color: #eee; -} -.book-meta > .rating { - float: right; - position: relative; - margin-top: -60px; - z-index: -1; -} -.book-meta > p { - color: hsla(0, 0%, 100%, .45); -} -.book-meta > .rating > p > .glyphicon-star { - color: #eee; -} -.book-meta > .languages > p > .label-default { - background: transparent; - color: hsla(0, 0%, 100%, .45); - padding: 0; - font-size: 14px; -} -.book-meta > .languages > p:first-letter { - text-transform: uppercase; -} -.book-meta > .tags .btn-info { - background-color: rgba(0,0,0,.15); - color: hsla(0,0%,100%,.7); - padding: 0 10px; - font-size: 13px; - display: inline-block; - overflow: hidden; - border-radius: 4px; - vertical-align: middle; - text-align: center; - white-space: nowrap; - font-family: Open Sans Bold,Helvetica Neue,Helvetica,Arial,sans-serif; - -webkit-transition: background-color 0.2s,color 0.2s; - transition: background-color 0.2s,color 0.2s; - margin: 2px 3px 0 0; -} -.book-meta > .tags .btn-info:hover { - color: #fff; - text-decoration: underline; -} -.book-meta > .tags { - padding-left: 40px; -} -.book-meta > .tags a{ - max-width: 100%; - text-overflow: ellipsis; -} -.book-meta > .tags .glyphicon-tags { - margin-left: -40px; - margin-right: 17px; - color: hsla(0, 0%, 100%, .45); -} -.book-meta > h3:first-of-type { - font-size: 14px; - font-weight: 600; - text-transform: uppercase; - margin-top: -20px; - border-top: 2px solid rgba(0,0,0,.3); - padding-top: 20px; - margin-top: 20px; -} -.book-meta > div { - color: hsla(0,0%,100%,.65); -} -.more-stuff { - margin-top: 0; - padding-top: 0; - border-top: 0; -} -.book-meta > .more-stuff > br { - display: none; -} -.book-meta > .more-stuff > .btn-toolbar:not(#shelf-actions) { - position: fixed; - top: 0; - right: 240px; -} -.col-sm-10 .book-meta > .more-stuff > .btn-toolbar:not(#shelf-actions) { - position: fixed; - top: 60px; - right: 240px; -} -#shelf-actions { - position: fixed; - top: 415px; - left: 0; - padding: 0 15px 0 30px; - margin: 0; - width: calc(25%); -} -.col-sm-10 #shelf-actions { - left: 240px; - top: 475px; - width: calc(25% - 60px); -} -#shelf-actions .btn-group { - width: 100%; -} -.book-meta > .more-stuff > .btn-toolbar { - -} -.book-meta > .more-stuff > .btn-toolbar:nth-of-type(2) { - -} -.book-meta .btn-toolbar > .btn-group > .btn-warning, -.btn-toolbar > .btn-group > .btn-group > #btnGroupDrop2, -#btnGroupDrop1, -#sendbtn, -#read-in-browser, -.btn-toolbar > .btn-group > #btnGroupDrop2, -.book-meta .btn-toolbar > .btn-group > .btn-group:nth-child(1) > a:first-of-type { - background: transparent; - color: transparent; - width: 60px; - height: 60px; - margin: 0; - overflow: hidden; - -} -.book-meta .btn-toolbar > .btn-group > .btn-warning > span, -.btn-toolbar > .btn-group > .btn-group > #btnGroupDrop2 > span, -#btnGroupDrop1 > span, -#sendbtn > span, -#read-in-browser > span, -.btn-toolbar > .btn-group > #btnGroupDrop2 > span, -.book-meta .btn-toolbar > .btn-group > .btn-group:nth-child(1) > a:first-of-type > span { - color: hsla(0,0%,100%,.7); - -} -.book-meta .btn-toolbar > .btn-group > .btn-warning:hover > span, -.btn-toolbar > .btn-group > .btn-group > #btnGroupDrop2:hover > span, -#btnGroupDrop1:hover > span, -#sendbtn:hover > span, -#read-in-browser:hover > span, -.btn-toolbar > .btn-group > #btnGroupDrop2:hover > span, -.book-meta .btn-toolbar > .btn-group > .btn-group:nth-child(1) > a:first-of-type:hover > span { - color: #fff; -} -.btn-toolbar > .btn-group > .btn-group > #btnGroupDrop2 > span.caret { - margin-left: -135px; - padding-bottom: 5px; -} -.btn-toolbar > .btn-group > #btnGroupDrop2 > span.caret, -#read-in-browser > span.caret { - margin-left: -135px; - padding-bottom: 5px; -} -#btnGroupDrop1 > span.caret { - margin-left: -85px; - padding-bottom: 5px; -} -.book-meta .btn-toolbar > .btn-group { - margin: 0; -} -.book-meta > div.btn-toolbar > div > div:nth-child(1) > button:not(#btnGroupDrop1) { - display: none; -} -.book-meta .btn-toolbar > .btn-group > .btn-warning > span.glyphicon-edit, -#sendbtn > span, -.book-meta .btn-toolbar > .btn-group > .btn-group:nth-child(1) > a:first-of-type > span { - font-size: 18px; - line-height: 42px; - width: 100%; - -} -.btn-toolbar > .btn-group > .btn-group > #btnGroupDrop2 > span.glyphicon-eye-open:before, -#read-in-browser > span.glyphicon-eye-open:before { - content: "\e164"; - font-size: 18px; -} -.btn-toolbar > .btn-group > #btnGroupDrop2 > span.glyphicon-list:before, -#read-in-browser > span.glyphicon-list:before { - font-size: 18px; -} -#btnGroupDrop1 > span.glyphicon-download:before { - font-size: 18px; -} -.book-meta > div.btn-toolbar { - position: fixed; - top: 0; - right: 0; - margin: 0; -} -.col-sm-10 .book-meta > div.btn-toolbar { - position: fixed; - top: 60px; - right: 0; - margin: 0; -} -.book-meta > div.btn-toolbar ul.dropdown-menu { - margin-left: -110px; -} -#bookDetailsModal > div > div > div.modal-body > div > div > div > div.col-sm-9.col-lg-9.book-meta > div.btn-toolbar > div > div.btn-group.open > div.dropdown-backdrop { - display: none; -} -#add-to-shelf { - margin-bottom: 0; - padding: 6px 7px; - line-height: 1.2; - border-radius: 3px; - font-family: Open Sans Bold, Helvetica Neue, Helvetica, Arial, sans-serif; - border: 0; - -webkit-transition: background-color 0.1s; - transition: background-color 0.1s; - font-weight: 600; - white-space: nowrap; - max-width: 100%; - overflow: hidden; - text-overflow: ellipsis; -} -#add-to-shelf > span.glyphicon.glyphicon-list:before { - content: "+"; - font-weight: 100 !important; - font-size: 12px; - padding: 0 3px; -} -.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open .dropdown-toggle.btn-primary { - background-color: hsla(0, 0%, 100%, .3); -} -.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover, .btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover, .open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus, .open>.dropdown-toggle.btn-primary:hover { - color: #fff; - background-color: hsla(0, 0%, 100%, .3); - border-color: transparent; -} - -.book-meta > div.more-stuff > .btn-toolbar > .btn-group > .btn-group > .dropdown-menu { - margin-left: -100px; -} -.book-meta .btn-toolbar > .btn-group > ul.dropdown-menu { - margin-left: -200px; - max-width: 200px; -} -.book-meta .btn-toolbar > .btn-group > ul.dropdown-menu { - margin-left: 0px; - max-width: 200px; - overflow: hidden; -} -.book-meta .btn-toolbar > .btn-group > ul.dropdown-menu > li > a { - max-width: 200px; - text-overflow: ellipsis; - overflow: hidden; -} -.dropdown-menu { - background-color: #020a0e !important; - -webkit-box-shadow: 0 4px 10px rgba(0, 0, 0, .35); - box-shadow: 0 4px 10px rgba(0, 0, 0, .35); - border-radius: 4px !important; -} -.dropdown-menu > li > a { - color: hsla(0,0%,100%,.7); - font-size: 13px; - font-stretch: 100%; - font-style: normal; - font-variant-caps: normal; - font-variant-east-asian: normal; - font-variant-ligatures: normal; - font-variant-numeric: normal; - font-weight: 600; -} -.dropdown-menu > li > a:hover { - color: #fff; - background: hsla(0, 0%, 100%, .08); -} -.btn-group.open .dropdown-toggle { - -webkit-box-shadow: none; - box-shadow: none; -} -.book-meta > .identifiers > p > .btn-success { - background-color: rgba(0,0,0,.15); - color: hsla(0,0%,100%,.7); - padding: 0 10px; - font-size: 13px; - display: inline-block; - overflow: hidden; - border-radius: 4px; - vertical-align: middle; - text-align: center; - white-space: nowrap; - font-family: Open Sans Bold,Helvetica Neue,Helvetica,Arial,sans-serif; - -webkit-transition: background-color 0.2s,color 0.2s; - transition: background-color 0.2s,color 0.2s; - margin: 2px 3px 0 22px; -} -.book-meta > .identifiers > p > .btn-success:hover { - color: #fff; - text-decoration: underline; -} -#bookDetailsModal .book-meta { - color: hsla(0,0%,100%,.7); - height: calc(100vh - 120px); - overflow-x: hidden; - overflow-y: scroll; -} -.book-meta .publishers { - color: hsla(0,0%,100%,.45); -} -.book-meta > .identifiers > p > .glyphicon-link { - color: hsla(0,0%,100%,.45); -} -.rating .glyphicon-star.good { - color: var(--color-primary); -} -body > div.container-fluid > div > div.col-sm-10 > div.discover > .btn-danger { - background: #ac3323; - width: auto; -} -body > div.container-fluid > div > div.col-sm-10 > div.discover > .btn-danger:hover { - background: #ce3d2a; -} -body > div.container-fluid > div > div.col-sm-10 > div.discover > .btn-primary:first-of-type { - background: hsla(0, 0%, 100%, .25); -} -body > div.container-fluid > div > div.col-sm-10 > div.discover > .btn-primary:first-of-type:hover { - background: hsla(0, 0%, 100%, .3); -} -body > div.container-fluid > div > div.col-sm-10 > div.discover > .btn-primary:last-of-type { - background: var(--color-secondary); -} -body > div.container-fluid > div > div.col-sm-10 > div.discover > .btn-primary:last-of-type:hover { - background: var(--color-secondary-hover); -} -.book-meta > div.more-stuff > .btn-toolbar > .btn-group[aria-label="Remove from shelves"] { - max-width: 100%; - -} -.book-meta > div.more-stuff > .btn-toolbar > .btn-group[aria-label="Remove from shelves"] > a { - max-width: 100%; - overflow: hidden; - text-overflow: ellipsis; - margin: 20px 0 0 0 !important; - border-radius: 3px; - background: hsla(0, 0%, 100%, .25); - text-transform: none; - padding: 0px 10px 0px 10px; - text-align: left; - line-height: 1.5; -} -.book-meta > div.more-stuff > .btn-toolbar > .btn-group[aria-label="Remove from shelves"] > a:hover { - background: #ce3d2a; - color: #fff; -} -.book-meta > div.more-stuff > .btn-toolbar > .btn-group[aria-label="Remove from shelves"] > a > .glyphicon-remove { - font-size: 12px; - padding-right: 3px; - -} -/* body > div.container-fluid > div > div.col-sm-10 > div.single > div.row > div.col-sm-3.col-lg-3.col-xs-5 > div.cover > img { - max-height: 300px; - max-width: 100%; - width: auto; - margin: 0; -} */ -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.discover > form { - padding-right: 25px; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.discover > form > div.form-group { - max-width: 800px; - padding-left: 15px; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.discover > form > div.col-sm-12 > div.col-sm-12 { - padding: 0; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.discover > form > div.col-sm-12 { - padding: 0; - margin-bottom: 60px; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.discover > form > div.col-sm-12 > #submit { - float: left; - margin-left: calc(100vw - 400px) -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.discover > form > div.col-sm-12 > div.col-sm-12 > div.col-sm-2 { - -} -.dropdown-backdrop { - display: none; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > form > div.col-sm-9.col-xs-12 > button.btn.btn-default { - float: right; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > form > div.col-sm-9.col-xs-12 > a:last-of-type { - float: right; - background: hsla(0, 0%, 100%, .25); - margin-right: 10px; -} -body > div.container-fluid > div.row-fluid > div.col-sm-10 > form > div.col-sm-9.col-xs-12 > a:last-of-type:hover { - background: hsla(0, 0%, 100%, .3); -} diff --git a/cps/static/js/archive.js b/cps/static/js/archive.js index b859513f5..3a0ceef3a 100644 --- a/cps/static/js/archive.js +++ b/cps/static/js/archive.js @@ -277,8 +277,6 @@ bitjs.archive = bitjs.archive || {}; if (e.type === bitjs.archive.UnarchiveEvent.Type.FINISH) { this.worker_.terminate(); } - } else { - console.log(e); } }; @@ -292,15 +290,11 @@ bitjs.archive = bitjs.archive || {}; this.worker_ = new Worker(scriptFileName); this.worker_.onerror = function(e) { - console.log("Worker error: message = " + e.message); throw e; }; this.worker_.onmessage = function(e) { - if (typeof e.data === "string") { - // Just log any strings the workers pump our way. - console.log(e.data); - } else { + if (typeof e.data !== "string") { // Assume that it is an UnarchiveEvent. Some browsers preserve the 'type' // so that instanceof UnarchiveEvent returns true, but others do not. me.handleWorkerEvent_(e.data); diff --git a/cps/static/js/main.js b/cps/static/js/main.js index 3a8674181..76eba3137 100644 --- a/cps/static/js/main.js +++ b/cps/static/js/main.js @@ -105,7 +105,7 @@ $(function() { var buttonText = $this.html(); $this.html("..."); $("#update_error").addClass("hidden"); - if($("#message").length){ + if ($("#message").length){ $("#message").alert("close"); } $.ajax({ @@ -114,8 +114,8 @@ $(function() { success: function success(data) { $this.html(buttonText); - var cssClass = ''; - var message = '' + var cssClass = ""; + var message = ""; if (data.success === true) { if (data.update === true) { @@ -125,19 +125,20 @@ $(function() { .removeClass("hidden") .find("span").html(data.commit); - data.history.reverse().forEach(function(entry, index) { + data.history.reverse().forEach(function(entry) { $("" + entry[0] + "" + entry[1] + "").appendTo($("#update_table")); }); - cssClass = 'alert-warning'; + cssClass = "alert-warning"; } else { - cssClass = 'alert-success'; + cssClass = "alert-success"; } } else { - cssClass = 'alert-danger'; + cssClass = "alert-danger"; } - message = '
×' + data.message + '
'; + message = "
×" + + data.message + "
"; $(message).insertAfter($("#update_table")); } diff --git a/cps/static/js/table.js b/cps/static/js/table.js index 3c51b74d5..6218d38b2 100644 --- a/cps/static/js/table.js +++ b/cps/static/js/table.js @@ -1,6 +1,6 @@ $(function() { - $("#domain_submit").click(function(event){ + $("#domain_submit").click(function(event) { event.preventDefault(); $("#domain_add").ajaxForm(); $(this).closest("form").submit(); @@ -14,44 +14,45 @@ $(function() { } }); }); - $('#domain-table').bootstrapTable({ - formatNoMatches: function () { - return ''; - }, - striped: false + $("#domain-table").bootstrapTable({ + formatNoMatches: function () { + return ""; + }, + striped: false }); $("#btndeletedomain").click(function() { //get data-id attribute of the clicked element - var domainId = $(this).data('domainId'); + var domainId = $(this).data("domainId"); $.ajax({ method:"post", url: window.location.pathname + "/../../ajax/deletedomain", data: {"domainid":domainId} }); - $('#DeleteDomain').modal('hide'); + $("#DeleteDomain").modal("hide"); $.ajax({ method:"get", url: window.location.pathname + "/../../ajax/domainlist", async: true, timeout: 900, success:function(data){ - $('#domain-table').bootstrapTable("load", data); + $("#domain-table").bootstrapTable("load", data); } }); }); //triggered when modal is about to be shown - $('#DeleteDomain').on('show.bs.modal', function(e) { + $("#DeleteDomain").on("show.bs.modal" function(e) { //get data-id attribute of the clicked element and store in button - var domainId = $(e.relatedTarget).data('domain-id'); - $(e.currentTarget).find("#btndeletedomain").data('domainId',domainId); + var domainId = $(e.relatedTarget).data("domain-id"); + $(e.currentTarget).find("#btndeletedomain").data("domainId", domainId); }); }); function TableActions (value, row, index) { return [ - '', - '', - '' - ].join(''); + "", + "", + "" + ].join(""); } diff --git a/cps/static/js/unrar.js b/cps/static/js/unrar.js index 3bf3bf2a4..c43dbd1dc 100644 --- a/cps/static/js/unrar.js +++ b/cps/static/js/unrar.js @@ -269,7 +269,7 @@ var RD = { //rep decode var rBuffer; // read in Huffman tables for RAR -function RarReadTables(bstream) { +function rarReadTables(bstream) { var BitLength = new Array(rBC), Table = new Array(rHuffTableSize); var i; @@ -480,7 +480,7 @@ function Unpack20(bstream) { //, Solid) { continue; } if (num < 270) { - var Distance = rSDDecode[num -= 261] + 1; + Distance = rSDDecode[num -= 261] + 1; if ((Bits = rSDBits[num]) > 0) { Distance += bstream.readBits(Bits); } @@ -513,9 +513,9 @@ function rarReadTables20(bstream) { var BitLength = new Array(rBC20); var Table = new Array(rMC20 * 4); var TableSize, N, I; + var i; bstream.readBits(1); if (!bstream.readBits(1)) { - var i; for (i = UnpOldTable20.length; i--;) UnpOldTable20[i] = 0; } TableSize = rNC20 + rDC20 + rRC20; @@ -553,25 +553,26 @@ function rarReadTables20(bstream) { } -function Unpack29(bstream, Solid) { +function Unpack29(bstream) { // lazy initialize rDDecode and rDBits var DDecode = new Array(rDC); var DBits = new Array(rDC); - + var Distance = 0; + var Length = 0; var Dist = 0, BitLength = 0, Slot = 0; var I; - for (I = 0; I < rDBitLengthCounts.length; I++,BitLength++) { - for (var J = 0; J < rDBitLengthCounts[I]; J++,Slot++,Dist+=(1<= 271) { - var Length = rLDecode[num -= 271] + 3; + Length = rLDecode[num -= 271] + 3; if ((Bits = rLBits[num]) > 0) { Length += bstream.readBits(Bits); } var DistNumber = rarDecodeNumber(bstream, DD); - var Distance = DDecode[DistNumber]+1; + Distance = DDecode[DistNumber] + 1; if ((Bits = DBits[DistNumber]) > 0) { if (DistNumber > 9) { if (Bits > 4) { @@ -625,19 +626,19 @@ function Unpack29(bstream, Solid) { Length++; } } - RarInsertOldDist(Distance); - RarInsertLastMatch(Length, Distance); + rarInsertOldDist(Distance); + rarInsertLastMatch(Length, Distance); rarCopyString(Length, Distance); continue; } if (num === 256) { - if (!RarReadEndOfBlock(bstream)) break; + if (!rarReadEndOfBlock(bstream)) break; continue; } if (num === 257) { //console.log("READVMCODE"); - if (!RarReadVMCode(bstream)) break; - continue; + if (!rarReadVMCode(bstream)) break; + continue; } if (num === 258) { if (lastLength != 0) { @@ -647,29 +648,29 @@ function Unpack29(bstream, Solid) { } if (num < 263) { var DistNum = num - 259; - var Distance = rOldDist[DistNum]; + Distance = rOldDist[DistNum]; for (var I = DistNum; I > 0; I--) { - rOldDist[I] = rOldDist[I-1]; + rOldDist[I] = rOldDist[I - 1]; } rOldDist[0] = Distance; var LengthNumber = rarDecodeNumber(bstream, RD); - var Length = rLDecode[LengthNumber] + 2; + Length = rLDecode[LengthNumber] + 2; if ((Bits = rLBits[LengthNumber]) > 0) { Length += bstream.readBits(Bits); } - RarInsertLastMatch(Length, Distance); + rarInsertLastMatch(Length, Distance); rarCopyString(Length, Distance); continue; } if (num < 272) { - var Distance = rSDDecode[num -= 263] + 1; + Distance = rSDDecode[num -= 263] + 1; if ((Bits = rSDBits[num]) > 0) { Distance += bstream.readBits(Bits); } - RarInsertOldDist(Distance); - RarInsertLastMatch(2, Distance); + rarInsertOldDist(Distance); + rarInsertLastMatch(2, Distance); rarCopyString(2, Distance); continue; } @@ -677,9 +678,9 @@ function Unpack29(bstream, Solid) { rarUpdateProgress() } -function RarReadEndOfBlock(bstream) { +function rarReadEndOfBlock(bstream) { - rarUpdateProgress() + rarUpdateProgress(); var NewTable = false, NewFile = false; if (bstream.readBits(1)) { @@ -689,11 +690,11 @@ function RarReadEndOfBlock(bstream) { NewTable = !!bstream.readBits(1); } //tablesRead = !NewTable; - return !(NewFile || NewTable && !RarReadTables(bstream)); + return !(NewFile || NewTable && !rarReadTables(bstream)); } -function RarReadVMCode(bstream) { +function rarReadVMCode(bstream) { var FirstByte = bstream.readBits(8); var Length = (FirstByte & 7) + 1; if (Length === 7) { @@ -717,12 +718,12 @@ function RarAddVMCode(firstByte, vmCode, length) { return true; } -function RarInsertLastMatch(length, distance) { +function rarInsertLastMatch(length, distance) { lastDist = distance; lastLength = length; } -function RarInsertOldDist(distance) { +function rarInsertOldDist(distance) { rOldDist.splice(3,1); rOldDist.splice(0,0,distance); } @@ -768,7 +769,7 @@ function unpack(v) { break; case 29: // rar 3.x compression case 36: // alternative hash - Unpack29(bstream, Solid); + Unpack29(bstream); break; } // switch(method) diff --git a/cps/static/js/unzip.js b/cps/static/js/unzip.js index 2b5be91a9..c90cf446b 100644 --- a/cps/static/js/unzip.js +++ b/cps/static/js/unzip.js @@ -9,7 +9,7 @@ * ZIP format: http://www.pkware.com/documents/casestudies/APPNOTE.TXT * DEFLATE format: http://tools.ietf.org/html/rfc1951 */ -/* global bitjs */ +/* global bitjs, importScripts, Uint8Array*/ // This file expects to be invoked as a Worker (see onmessage below). importScripts("io.js"); @@ -44,12 +44,10 @@ var zLocalFileHeaderSignature = 0x04034b50; var zArchiveExtraDataSignature = 0x08064b50; var zCentralFileHeaderSignature = 0x02014b50; var zDigitalSignatureSignature = 0x05054b50; -var zEndOfCentralDirSignature = 0x06064b50; -var zEndOfCentralDirLocatorSignature = 0x07064b50; // takes a ByteStream and parses out the local file information var ZipLocalFile = function(bstream) { - if (typeof bstream != typeof {} || !bstream.readNumber || typeof bstream.readNumber != typeof function(){}) { + if (typeof bstream != typeof {} || !bstream.readNumber || typeof bstream.readNumber != typeof function() {}) { return null; } @@ -112,7 +110,7 @@ ZipLocalFile.prototype.unzip = function() { // Zip Version 1.0, no compression (store only) if (this.compressionMethod == 0 ) { - info("ZIP v"+this.version+", store only: " + this.filename + " (" + this.compressedSize + " bytes)"); + info("ZIP v" + this.version + ", store only: " + this.filename + " (" + this.compressedSize + " bytes)"); currentBytesUnarchivedInFile = this.compressedSize; currentBytesUnarchived += this.compressedSize; } @@ -158,7 +156,7 @@ var unzip = function(arrayBuffer) { totalFilesInArchive = localFiles.length; // got all local files, now sort them - localFiles.sort(function(a,b) { + localFiles.sort(function(a, b) { var aname = a.filename.toLowerCase(); var bname = b.filename.toLowerCase(); return aname > bname ? 1 : -1; @@ -239,7 +237,7 @@ var unzip = function(arrayBuffer) { postProgress(); postMessage(new bitjs.archive.UnarchiveFinishEvent()); } -} +}; // returns a table of Huffman codes // each entry's index is its code and its value is a JavaScript object @@ -253,7 +251,7 @@ function getHuffmanCodes(bitLengths) { // Reference: http://tools.ietf.org/html/rfc1951#page-8 var numLengths = bitLengths.length, - bl_count = [], + blCount = [], MAX_BITS = 1; // Step 1: count up how many codes of each length we have @@ -265,22 +263,22 @@ function getHuffmanCodes(bitLengths) { return null; } // increment the appropriate bitlength count - if (bl_count[length] == undefined) bl_count[length] = 0; + if (blCount[length] == undefined) blCount[length] = 0; // a length of zero means this symbol is not participating in the huffman coding - if (length > 0) bl_count[length]++; + if (length > 0) blCount[length]++; if (length > MAX_BITS) MAX_BITS = length; } // Step 2: Find the numerical value of the smallest code for each code length - var next_code = [], + var nextCode = [], code = 0; for (var bits = 1; bits <= MAX_BITS; ++bits) { - var length = bits-1; + var length = bits - 1; // ensure undefined lengths are zero - if (bl_count[length] == undefined) bl_count[length] = 0; - code = (code + bl_count[bits-1]) << 1; - next_code[bits] = code; + if (blCount[length] == undefined) blCount[length] = 0; + code = (code + blCount[bits - 1]) << 1; + nextCode [bits] = code; } // Step 3: Assign numerical values to all codes @@ -288,9 +286,9 @@ function getHuffmanCodes(bitLengths) { for (var n = 0; n < numLengths; ++n) { var len = bitLengths[n]; if (len != 0) { - table[next_code[len]] = { length: len, symbol: n }; //, bitstring: binaryValueToString(next_code[len],len) }; + table[nextCode [len]] = { length: len, symbol: n }; //, bitstring: binaryValueToString(nextCode [len],len) }; tableLength++; - next_code[len]++; + nextCode [len]++; } } table.maxLength = tableLength; @@ -321,7 +319,8 @@ function getFixedLiteralTable() { // create once if (!fixedHCtoLiteral) { var bitlengths = new Array(288); - for (var i = 0; i <= 143; ++i) bitlengths[i] = 8; + var i; + for (i = 0; i <= 143; ++i) bitlengths[i] = 8; for (i = 144; i <= 255; ++i) bitlengths[i] = 9; for (i = 256; i <= 279; ++i) bitlengths[i] = 7; for (i = 280; i <= 287; ++i) bitlengths[i] = 8; @@ -335,7 +334,9 @@ function getFixedDistanceTable() { // create once if (!fixedHCtoDistance) { var bitlengths = new Array(32); - for (var i = 0; i < 32; ++i) { bitlengths[i] = 5; } + for (var i = 0; i < 32; ++i) { + bitlengths[i] = 5; + } // get huffman code table fixedHCtoDistance = getHuffmanCodes(bitlengths); @@ -347,13 +348,12 @@ function getFixedDistanceTable() { // then return that symbol function decodeSymbol(bstream, hcTable) { var code = 0, len = 0; - var match = false; // loop until we match for (;;) { // read in next bit var bit = bstream.readBits(1); - code = (code<<1) | bit; + code = (code << 1) | bit; ++len; // check against Huffman Code table and break if found @@ -372,47 +372,47 @@ function decodeSymbol(bstream, hcTable) { var CodeLengthCodeOrder = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - /* - Extra Extra Extra - Code Bits Length(s) Code Bits Lengths Code Bits Length(s) - ---- ---- ------ ---- ---- ------- ---- ---- ------- - 257 0 3 267 1 15,16 277 4 67-82 - 258 0 4 268 1 17,18 278 4 83-98 - 259 0 5 269 2 19-22 279 4 99-114 - 260 0 6 270 2 23-26 280 4 115-130 - 261 0 7 271 2 27-30 281 5 131-162 - 262 0 8 272 2 31-34 282 5 163-194 - 263 0 9 273 3 35-42 283 5 195-226 - 264 0 10 274 3 43-50 284 5 227-257 - 265 1 11,12 275 3 51-58 285 0 258 - 266 1 13,14 276 3 59-66 +/* + Extra Extra Extra +Code Bits Length(s) Code Bits Lengths Code Bits Length(s) +---- ---- ------ ---- ---- ------- ---- ---- ------- + 257 0 3 267 1 15,16 277 4 67-82 + 258 0 4 268 1 17,18 278 4 83-98 + 259 0 5 269 2 19-22 279 4 99-114 + 260 0 6 270 2 23-26 280 4 115-130 + 261 0 7 271 2 27-30 281 5 131-162 + 262 0 8 272 2 31-34 282 5 163-194 + 263 0 9 273 3 35-42 283 5 195-226 + 264 0 10 274 3 43-50 284 5 227-257 + 265 1 11,12 275 3 51-58 285 0 258 + 266 1 13,14 276 3 59-66 - */ +*/ var LengthLookupTable = [ - [0,3], [0,4], [0,5], [0,6], - [0,7], [0,8], [0,9], [0,10], - [1,11], [1,13], [1,15], [1,17], - [2,19], [2,23], [2,27], [2,31], - [3,35], [3,43], [3,51], [3,59], - [4,67], [4,83], [4,99], [4,115], - [5,131], [5,163], [5,195], [5,227], - [0,258] + [0,3], [0,4], [0,5], [0,6], + [0,7], [0,8], [0,9], [0,10], + [1,11], [1,13], [1,15], [1,17], + [2,19], [2,23], [2,27], [2,31], + [3,35], [3,43], [3,51], [3,59], + [4,67], [4,83], [4,99], [4,115], + [5,131], [5,163], [5,195], [5,227], + [0,258] ]; - /* - Extra Extra Extra - Code Bits Dist Code Bits Dist Code Bits Distance - ---- ---- ---- ---- ---- ------ ---- ---- -------- - 0 0 1 10 4 33-48 20 9 1025-1536 - 1 0 2 11 4 49-64 21 9 1537-2048 - 2 0 3 12 5 65-96 22 10 2049-3072 - 3 0 4 13 5 97-128 23 10 3073-4096 - 4 1 5,6 14 6 129-192 24 11 4097-6144 - 5 1 7,8 15 6 193-256 25 11 6145-8192 - 6 2 9-12 16 7 257-384 26 12 8193-12288 - 7 2 13-16 17 7 385-512 27 12 12289-16384 - 8 3 17-24 18 8 513-768 28 13 16385-24576 - 9 3 25-32 19 8 769-1024 29 13 24577-32768 - */ +/* + Extra Extra Extra + Code Bits Dist Code Bits Dist Code Bits Distance + ---- ---- ---- ---- ---- ------ ---- ---- -------- + 0 0 1 10 4 33-48 20 9 1025-1536 + 1 0 2 11 4 49-64 21 9 1537-2048 + 2 0 3 12 5 65-96 22 10 2049-3072 + 3 0 4 13 5 97-128 23 10 3073-4096 + 4 1 5,6 14 6 129-192 24 11 4097-6144 + 5 1 7,8 15 6 193-256 25 11 6145-8192 + 6 2 9-12 16 7 257-384 26 12 8193-12288 + 7 2 13-16 17 7 385-512 27 12 12289-16384 + 8 3 17-24 18 8 513-768 28 13 16385-24576 + 9 3 25-32 19 8 769-1024 29 13 24577-32768 +*/ var DistLookupTable = [ [0,1], [0,2], [0,3], [0,4], [1,5], [1,7], @@ -446,10 +446,9 @@ function inflateBlockData(bstream, hcLiteralTable, hcDistanceTable, buffer) { stream, and copy length bytes from this position to the output stream. */ - var numSymbols = 0, blockSize = 0; + var blockSize = 0; for (;;) { var symbol = decodeSymbol(bstream, hcLiteralTable); - ++numSymbols; if (symbol < 256) { // copy literal byte to output buffer.insertByte(symbol); @@ -461,7 +460,7 @@ function inflateBlockData(bstream, hcLiteralTable, hcDistanceTable, buffer) { break; } else { - var lengthLookup = LengthLookupTable[symbol-257], + var lengthLookup = LengthLookupTable[symbol - 257], length = lengthLookup[1] + bstream.readBits(lengthLookup[0]), distLookup = DistLookupTable[decodeSymbol(bstream, hcDistanceTable)], distance = distLookup[1] + bstream.readBits(distLookup[0]); @@ -479,13 +478,13 @@ function inflateBlockData(bstream, hcLiteralTable, hcDistanceTable, buffer) { // loop for each character var ch = buffer.ptr - distance; blockSize += length; - if(length > distance) { - var data = buffer.data; - while (length--) { - buffer.insertByte(data[ch++]); - } + if (length > distance) { + var data = buffer.data; + while (length--) { + buffer.insertByte(data[ch++]); + } } else { - buffer.insertBytes(buffer.data.subarray(ch, ch + length)) + buffer.insertBytes(buffer.data.subarray(ch, ch + length)); } } // length-distance pair @@ -516,11 +515,11 @@ function inflate(compressedData, numDecompressedBytes) { if (bType == 0) { // skip remaining bits in this byte while (bstream.bitPtr != 0) bstream.readBits(1); - var len = bstream.readBits(16), - nlen = bstream.readBits(16); - // TODO: check if nlen is the ones-complement of len? + var len = bstream.readBits(16); + bstream.readBits(16); + // TODO: check if nlen is the ones-complement of len? - if(len > 0) buffer.insertBytes(bstream.readBytes(len)); + if (len > 0) buffer.insertBytes(bstream.readBytes(len)); blockSize = len; } // fixed Huffman codes @@ -593,9 +592,8 @@ function inflate(compressedData, numDecompressedBytes) { var hcLiteralTable = getHuffmanCodes(literalCodeLengths), hcDistanceTable = getHuffmanCodes(distanceCodeLengths); blockSize = inflateBlockData(bstream, hcLiteralTable, hcDistanceTable, buffer); - } - // error - else { + } else { + // error err("Error! Encountered deflate block of type 3"); return null; } diff --git a/cps/templates/http_error.html b/cps/templates/http_error.html index 8167ddf3d..8078d32ca 100644 --- a/cps/templates/http_error.html +++ b/cps/templates/http_error.html @@ -13,7 +13,7 @@ {% if g.user.get_theme == 1 %} - + {% endif %} diff --git a/cps/web.py b/cps/web.py index d8a5b2f55..1a8192e6c 100644 --- a/cps/web.py +++ b/cps/web.py @@ -944,14 +944,14 @@ def check_valid_domain(domain_text): return len(result) -''' POST /post - name: 'username', //name of field (column in db) - pk: 1 //primary key (record id) - value: 'superuser!' //new value''' @app.route("/ajax/editdomain", methods=['POST']) @login_required @admin_required def edit_domain(): + ''' POST /post + name: 'username', //name of field (column in db) + pk: 1 //primary key (record id) + value: 'superuser!' //new value''' vals = request.form.to_dict() answer = ub.session.query(ub.Registration).filter(ub.Registration.id == vals['pk']).first() # domain_name = request.args.get('domain') @@ -1061,7 +1061,7 @@ def get_authors_json(): json_dumps = json.dumps([dict(name=r.name.replace('|',',')) for r in entries]) return json_dumps - + @app.route("/get_publishers_json", methods=['GET', 'POST']) @login_required_if_no_ano def get_publishers_json(): @@ -1160,8 +1160,8 @@ def get_update_status(): r = requests.get(repository_url + '/git/refs/heads/master') r.raise_for_status() commit = r.json() - except requests.exceptions.HTTPError as ex: - status['message'] = _(u'HTTP Error') + ' ' + str(ex) + except requests.exceptions.HTTPError as e: + status['message'] = _(u'HTTP Error') + ' ' + str(e) except requests.exceptions.ConnectionError: status['message'] = _(u'Connection error') except requests.exceptions.Timeout: