From 875ba241b568b3c55a6db8bca91008d6245f7913 Mon Sep 17 00:00:00 2001 From: Boruch Baum Date: Sun, 13 Jan 2019 16:35:25 -0500 Subject: [PATCH 1/9] Extract css from cookies,menu,options html; put into dedicated files --- src/cookies.css | 260 ++++++++++++++++++++++++++++++++++++++++++++++++ src/menu.css | 24 +++++ src/options.css | 89 +++++++++++++++++ 3 files changed, 373 insertions(+) create mode 100644 src/cookies.css create mode 100644 src/menu.css create mode 100644 src/options.css diff --git a/src/cookies.css b/src/cookies.css new file mode 100644 index 0000000..5d18848 --- /dev/null +++ b/src/cookies.css @@ -0,0 +1,260 @@ +.container { + width: 100%; +} +/* Force lists to fit in the browser viewport */ +#list_and_details { + height: calc(100vh - 100px); +} +.row .list { + height: inherit; +} +#domain-list, #cookie-list { + height: calc(100% - 30px); + overflow-y: auto; +} +.central-col { + /* Reset padding to get more space in this column */ + padding-left: 0px; + padding-right: 0px; +} +h2 { + font-size: 1.2em; + margin: 4px; +} +.list-group-item { + overflow: hidden; + text-overflow: ellipsis; + /*word-wrap: break-word; */ +} +#value { + height: 166px; + width: 100%; + max-width: 100%; +} +.store-badge { + width: 18px; + height: 18px; + vertical-align: middle; + float:right; + margin-right: 3px; +} +.cookie-badge { + width: 15px; + height: 15px; + display: inline-block; + position: absolute; + left: 0px; + top: 6px; +} +.lock-badge { + font-size: 13px; + position: absolute; + right: 0px; + top: 8px; +} +.cookie-expired, .cookie-expired.active, .cookie-expired.active:hover, .button-error { + color: red; +} +.list-group-item { + /* bootstrap: padding: 10px 15px; */ + padding: 3px 17px; +} +.navbar { + margin-bottom: 0px; +} +.navbar-left { + /* bootstrap correction: Increase space between elements in the navbar */ + margin-left: 10px; +} +.navbar-form .input-group { + /* Fix the position of additional buttons next to the domain search input */ + float: left; +} +.dropdown-toggle-split{ + /* backport of BS4 class to center the carret and reduce the horizontal size of the button */ + padding: 6px 8px; +} +#search_domain { + width: 250px; +} +.search_filter_block { + /* position of items in the filter dropdown menu */ + display: inline-block; + width: 100%; + min-width: 250px; +} +#search_filter { + /* position of items in the filter dropdown menu */ + display: inline-block; + margin: 4px 6px; + width: calc(100% - 12px); +} +#search_store { + padding-left: 7px; +} +.form-group { + /* Reduce space between input lines in cookie details */ + margin-bottom: 1px; +} +form label { + color: grey; + font-weight: normal; +} +.dropup-custom { + display: inline-block; +} +#toggle_buttons { + float: left; + margin-bottom: -40px; + margin-top: 15px; + margin-left: 15px; +} +#toggle_url, #toggle_b64 { + font-size: 0.7em; + padding: 0px; + /* Position under "Value" text, with the same padding + position: relative; + left: 15px; + bottom: 145px; */ +} +.down { + border-color: #00ff00; +} +#clipboard_textarea { + height: 320px; + max-width: 100%; +} +.navbar-checkbox label { + font-weight: normal; + margin-bottom: -1px; + vertical-align: middle; +} +#donate_button, .btc-color { + color: rgb(247, 148, 19); +} +#contribute-content ul { + padding-left: 15px; +} +.popover { + max-width: 500px; +} +.dropup .btn .caret { + position: absolute; + top: 3px; + right: calc(50% - 4px); +} +.glyphicon-unlock { + /* workaround to add missing glyphicon-unlock from bootstrap font */ + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAOCAQAAABTaC4eAAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfiAQIRNgZ9qgwVAAAAGXRFWHRDb21tZW50AENyZWF0ZWQgd2l0aCBHSU1QV4EOFwAAAIVJREFUGNNjZGD4Lygb9DLgNwMDAwMDK4PShhvrGN8zMzDsDb0S/I8BAv4xvNXY+/vRJQYGBrbNDJuT1kCEk9YwbGbbDGFvZoAyEDwWBgYGXwYMwMSAFTCiGAAB/xkYkVTzIZQiDFH9/clX9TeG2T/+QDCa8GtOCEYT/slQvvAnXpfgdjcAIaImqpRhrMMAAAAASUVORK5CYII='); + height: 14px; + width: 14px; + background-repeat: no-repeat; + display: inline-block; + line-height: 14px; +} +.glyphicon-store { + /* Used to display icons of stores/containers + background-color and mask rules are dynamic */ + height: 14px; + width: 14px; + display: inline-block; + margin-right: 3px; +} +.top-buttons { + position: absolute; + top: 0px; + right: 5px; + cursor: pointer; +} +.top-buttons span:hover { + color: red; +} +/* ContextMenu */ +.context-menu-icon::before { + /* blue to grey */ + color: #333; + /* context-menu-icons.woff2 to Bootstrap font */ + font-family: "Glyphicons Halflings"; + font-size: 12px; +} +.context-menu-item.context-menu-icon-unlock:before { + content:""; + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAOCAQAAABTaC4eAAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfiAQIRNgZ9qgwVAAAAGXRFWHRDb21tZW50AENyZWF0ZWQgd2l0aCBHSU1QV4EOFwAAAIVJREFUGNNjZGD4Lygb9DLgNwMDAwMDK4PShhvrGN8zMzDsDb0S/I8BAv4xvNXY+/vRJQYGBrbNDJuT1kCEk9YwbGbbDGFvZoAyEDwWBgYGXwYMwMSAFTCiGAAB/xkYkVTzIZQiDFH9/clX9TeG2T/+QDCa8GtOCEYT/slQvvAnXpfgdjcAIaImqpRhrMMAAAAASUVORK5CYII='); + height: 14px; + width: 14px; + background-repeat: no-repeat; + left: 7px; +} +.context-menu-item.context-menu-icon-lock:before {content:"\e033";} +.context-menu-item.context-menu-icon-trash:before {content:"\e020";} +.context-menu-item.context-menu-icon-duplicate:before {content:"\e224";} +.context-menu-item.context-menu-icon-save:before {content:"\e166";} +.context-menu-item.context-menu-icon-copy:before {content:"\e205";} +.context-menu-item.context-menu-icon-quit:before {content:"\e014";} + +@media only screen and (max-width: 768px) { + /* Force and fix height of lists */ + #list_and_details { + height: 100%; + } + #domain-list, #cookie-list { + height: 150px; + } + .central-col { + padding-left: 15px; + padding-right: 15px; + } + .navbar-left { + margin-left: 0px; + } + #toggle_buttons { + float: right; + margin: 0; + margin-right: 15px; + } + .col-sm-4 button { + margin-top: 3px; + } + /* Fix the position of additional search buttons next to the search input */ + .navbar-form .input-group { + float: none; + width: 100%; + } + .navbar-form .input-group-btn { + display: inline-block; + } + #search_domain { + widsth: 210px; /* workaround: complex to move buttons on the left */ + width: calc(100% - 63px); + } + /* Space adjustment with context select box */ + #actualize_button { + margin-top: 5px; + } + /* Move domains related buttons under the domains list */ + #domain-list { + margin-bottom: 54px; /* 20 (normal padding) + 34 (buttons height) */ + } + .row .col-sm-8 { + position: absolute; + top: 375px; + z-index: 2; + } + /* Add some space after the last element of the page */ + body { + margin-bottom: 5px; + } + /* Cookie details: flags: Fix positions of checkbox and labels on the same line + even during mous hover and tooltip display */ + div.row:nth-child(7) > div:nth-child(1) label, + div.form-group:nth-child(8) label, + div.form-group:nth-child(9) label { + width: 100px; + } + div.row:nth-child(7) > div:nth-child(1), + div.form-group:nth-child(8), + div.form-group:nth-child(9) { + display: flex; + justify-content: flex-start; + } +} diff --git a/src/menu.css b/src/menu.css new file mode 100644 index 0000000..cb021f5 --- /dev/null +++ b/src/menu.css @@ -0,0 +1,24 @@ +.panel { + background: black; + color: white; +} +a, a:visited{ + padding: 5px 10px; + display: block; + text-decoration: none; + color: white; +} +a:hover { + box-shadow:0px 1px 1px gray inset; + background-color: #404040; +} +.favicon { + display: inline-block; + height: 16px; + width: 16px; + margin-right: 5px; + vertical-align: bottom; +} +.hidden_item { + display: None; +} diff --git a/src/options.css b/src/options.css new file mode 100644 index 0000000..d2607bc --- /dev/null +++ b/src/options.css @@ -0,0 +1,89 @@ +body { + color: white; + background: black; + min-height: 400px; + font-size: 1.5em; +} +#shortcuts { + max-width: 510px; +} +#addon-name { + display: inline-block; + margin-top: 10px; + vertical-align: top; + font-weight: bold; +} +#dynamic-tab { + display: inline-block; + background: #303030; +} +h2 { + font-size: larger; + margin-bottom: 5px; + margin-top: 5px; + margin-right: 15px; +} +.form-control { + color: white; + background: #202020; +} +.form-group { + /* Reduce space between input lines in cookie details */ + margin-bottom: 5px; + margin-left: 30px; +} +form label { + font-weight: normal; +} +form input { + vertical-align: bottom; +} +#select_skin, #select_template { + padding-left: 0; +} +#skin, #template { + width: 200px; +} +#paragraph { + padding-left: 30px; +} +button { + /* black theme fix */ + color: buttonText; + background: #303030; +} +/* Fix checkbox vertical alignement with label */ +input[type="checkbox"] { + vertical-align: text-bottom; +} +.ask_info { + padding-left: 15px; + cursor: pointer; + opacity: 0.4; +} +.ask_info:hover { + opacity: 1; +} +.info { + margin-left: 15px; + padding: 5px; + max-width: 450px; + font-size: 0.85em; + font-style: italic; + background-color: black; + display: none; +} +kbd { + font-weight: 700; +} +#protected-cookie-tree { + width: 350px; + margin-top: 20px; +} +#protected-cookie-tree .list-group-item { + padding: 5px 15px; + background: #202020; +} +#changelog span { + padding-left: 20px; +} From b03775b46f0e1e7fbf3dbc73399dbc440abcad8b Mon Sep 17 00:00:00 2001 From: Boruch Baum Date: Sun, 13 Jan 2019 17:27:34 -0500 Subject: [PATCH 2/9] Extract css from menu,options html; put into dedicated files --- src/cookies.html | 269 +---------------------------------------------- src/menu.html | 28 +---- src/options.html | 83 +-------------- 3 files changed, 5 insertions(+), 375 deletions(-) diff --git a/src/cookies.html b/src/cookies.html index 8014b09..c7e1151 100644 --- a/src/cookies.html +++ b/src/cookies.html @@ -6,274 +6,9 @@ + Cookie Quick Manager - @@ -592,4 +327,4 @@