From 3c35f02cac2d9b1aa1297ebefefd64dc5066ff8f Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 14 Mar 2021 15:18:45 +0100 Subject: [PATCH] Code cosmetics --- cps/static/css/main.css | 165 +++++++++++++++++------------------ cps/static/js/filter_grid.js | 6 +- 2 files changed, 85 insertions(+), 86 deletions(-) diff --git a/cps/static/css/main.css b/cps/static/css/main.css index 94b04ce0..a753c959 100644 --- a/cps/static/css/main.css +++ b/cps/static/css/main.css @@ -72,6 +72,21 @@ body { padding: 3px; } +.list_item.currentChapter > a, +.list_item a:hover { + color: #f1f1f1; +} + +#panels a { + visibility: hidden; + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + color: #ccc; + margin-left: 6px; +} + #titlebar a:active { opacity: 1; color: rgba(0, 0, 0, 0.6); @@ -189,19 +204,14 @@ body { #title-controls { float: right; } -#panels a { - visibility: hidden; - width: 18px; - height: 20px; - overflow: hidden; - display: inline-block; - color: #ccc; - margin-left: 6px; -} - #panels a::before { visibility: visible; } #panels a:hover { color: #aaa; } +.list_item a { + color: #aaa; + text-decoration: none; +} + #panels a:active { color: #aaa; margin: 1px 0 -1px 6px; @@ -296,11 +306,6 @@ input:-moz-placeholder { color: #454545; } list-style: none; } -.list_item a { - color: #aaa; - text-decoration: none; -} - .list_item a.chapter { font-size: 1em; } @@ -309,11 +314,6 @@ input:-moz-placeholder { color: #454545; } font-size: 0.8em; } -.list_item.currentChapter > a, -.list_item a:hover { - color: #f1f1f1; -} - /* #tocView li.openChapter > a, */ .list_item a:hover { color: #e2e2e2; @@ -350,8 +350,8 @@ input:-moz-placeholder { color: #454545; } margin-right: -4px; } -.currentChapter > .toc_toggle:before, -.openChapter > .toc_toggle:before { +.currentChapter > .toc_toggle::before, +.openChapter > .toc_toggle::before { content: '▾'; } @@ -619,7 +619,7 @@ input:-moz-placeholder { color: #454545; } } @media only screen and (max-width: 550px) { - #viewer{ + #viewer { width: 80%; margin-left: 10%; } @@ -654,11 +654,6 @@ input:-moz-placeholder { color: #454545; } -ms-transform: translate(260px, 0); } - #titlebar { - /* font-size: 16px; */ - /* margin: 0 50px 0 50px; */ - } - #metainfo { font-size: 10px; } @@ -678,21 +673,22 @@ input:-moz-placeholder { color: #454545; } /* For iPad portrait layouts only */ @media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: portrait) { - #viewer iframe { - width: 460px; - height: 740px; - } + #viewer iframe { + width: 460px; + height: 740px; + } } @media only screen -and (min-device-width : 768px) -and (max-device-width : 1024px) +and (min-device-width: 768px) +and (max-device-width: 1024px) and (orientation : landscape) /*and (-webkit-min-device-pixel-ratio: 2)*/ { #viewer { width: 80%; margin-left: 10%; } + #divider, #divider.show { display: none; @@ -701,71 +697,74 @@ and (orientation : landscape) /*For iPad landscape layouts only */ @media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: landscape) { - #viewer iframe { - width: 960px; - height: 515px; - } + #viewer iframe { + width: 960px; + height: 515px; + } } /* For iPhone 6\6s portrait layouts only */ -@media only screen and (min-device-width : 375px) and (max-device-width : 667px) and (orientation: portrait) { - #viewer { - width: 300px; - height: 480px; - } - #viewer iframe { - width: 300px; - height: 480px; - } +@media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (orientation: portrait) { + #viewer { + width: 300px; + height: 480px; + } + + #viewer iframe { + width: 300px; + height: 480px; + } } /* For iPhone 6\6s landscape layouts only */ -@media only screen and (min-device-width : 375px) and (max-device-width : 667px) and (orientation: landscape) { - #viewer { - width: 450px; - height: 300px; - } - #viewer iframe { - width: 450px; - height: 300px; - } +@media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (orientation: landscape) { + #viewer { + width: 450px; + height: 300px; + } + + #viewer iframe { + width: 450px; + height: 300px; + } } /* For iPhone portrait layouts only */ @media only screen and (max-device-width: 374px) and (orientation: portrait) { - #viewer { - width: 256px; - height: 432px; - } - #viewer iframe { - width: 256px; - height: 432px; - } + #viewer { + width: 256px; + height: 432px; + } + + #viewer iframe { + width: 256px; + height: 432px; + } } /* For iPhone landscape layouts only */ @media only screen and (max-device-width: 374px) and (orientation: landscape) { - #viewer iframe { - width: 256px; - height: 124px; - } + #viewer iframe { + width: 256px; + height: 124px; + } } -[class^="icon-"]:before, [class*=" icon-"]:before { - font-family: "fontello", serif; - font-style: normal; - font-weight: normal; - speak: none; - display: inline-block; - text-decoration: inherit; - width: 1em; - margin-right: 0.2em; - text-align: center; - /* For safety - reset parent styles, that can break glyph codes*/ - font-variant: normal; - text-transform: none; - /* you can be more comfortable with increased icons size */ - font-size: 112%; +[class^="icon-"]::before, [class*=" icon-"]:before { + font-family: "fontello", serif; + font-style: normal; + font-weight: normal; + speak: none; + display: inline-block; + text-decoration: inherit; + width: 1em; + margin-right: 0.2em; + text-align: center; + /* For safety - reset parent styles, that can break glyph codes*/ + font-variant: normal; + text-transform: none; + /* you can be more comfortable with increased icons size */ + font-size: 112%; } .icon-search:before { content: '\e807'; } /* '' */ diff --git a/cps/static/js/filter_grid.js b/cps/static/js/filter_grid.js index f5ccd3de..1603f641 100644 --- a/cps/static/js/filter_grid.js +++ b/cps/static/js/filter_grid.js @@ -56,15 +56,15 @@ $("#asc").click(function() { $("#all").click(function() { // go through all elements and make them visible $list.isotope({ filter: function() { - return true; - } + return true; + } }); }); $(".char").click(function() { var character = this.innerText; $list.isotope({ filter: function() { - return this.attributes["data-id"].value.charAt(0).toUpperCase() == character; + return this.attributes["data-id"].value.charAt(0).toUpperCase() == character; } }); });