cockpit-navigator/navigator/style.css

701 lines
12 KiB
CSS
Raw Permalink Normal View History

2021-05-27 20:21:49 +02:00
/*
2021-05-27 20:24:35 +02:00
Cockpit Navigator - A File System Browser for Cockpit.
2021-05-27 20:21:49 +02:00
Copyright (C) 2021 Josh Boudreau <jboudreau@45drives.com>
Copyright (C) 2021 Sam Silver <ssilver@45drives.com>
This file is part of Cockpit Navigator.
Cockpit Navigator is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Cockpit Navigator is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Cockpit Navigator. If not, see <https://www.gnu.org/licenses/>.
*/
2021-05-26 23:44:38 +02:00
:root {
/* white style */
--container: #fff;
--border: #bebebe;
2021-05-28 17:17:42 +02:00
--navigation: #fff;
2021-05-26 23:44:38 +02:00
--font: #1c1c1c;
2021-06-07 22:00:42 +02:00
--selected: #eeeeee;
2021-05-26 23:44:38 +02:00
--toggle-light: #151515;
--toggle-dark: #ccc;
--scrollbar-thumb: var(--border);
--scrollbar-bg: var(--navigation);
--scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-bg);
--loading-bg-color: rgba(255, 255, 255, 0.5);
2021-05-27 21:04:43 +02:00
--textarea-bg: var(--navigation);
--logo-45: #333;
2021-05-28 18:51:10 +02:00
--nav-entry-color: #555F6E;
2021-05-28 17:17:42 +02:00
--nav-border-radius: 4px;
2021-05-28 19:50:06 +02:00
--symlink-symbol-color: var(--navigation);
--list-view-header: var(--selected);
--outline-color: black;
2021-05-26 23:44:38 +02:00
}
[data-theme="dark"] {
/* Dark style */
--container: #212427;
--border: #3c3f42;
--navigation: #151515;
--font: #fff;
--selected: #191a1b;
--scrollbar-thumb: var(--container);
--scrollbar-bg: var(--navigation);
--scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-bg);
--loading-bg-color: rgba(33, 36, 39, 0.5);
2021-05-27 21:04:43 +02:00
--textarea-bg: var(--navigation);
--logo-45: #fff;
2021-05-28 18:51:10 +02:00
--nav-entry-color: #555F6E;
2021-05-28 19:50:06 +02:00
--symlink-symbol-color: var(--navigation);
--list-view-header: var(--container);
--outline-color: white;
}
button {
outline-color: var(--outline-color) !important;
2021-05-26 23:44:38 +02:00
}
2021-05-28 22:18:32 +02:00
html {
height: 100%;
}
body {
height: 100%;
}
2021-07-14 19:57:15 +02:00
.modal-content {
background-color: var(--container) !important;
color: var(--font) !important;
}
.modal-header {
background-color: var(--container) !important;
}
.modal-body {
background-color: var(--container) !important;
}
[data-theme="dark"] .pf-c-button:disabled {
background-color: var(--container) !important;
border: 1px solid var(--border) !important;
}
.nav-loader-container {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: var(--loading-bg-color);
z-index: 10;
}
.nav-loader-centerer {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 27%;
display: flex;
align-items: center;
align-content: center;
}
.nav-loader {
margin: auto;
border: 6px solid rgba(0,0,0,0);
border-radius: 50%;
border-top: 6px solid var(--border);
width: 100px;
height: 100px;
-webkit-animation: spin 2s linear infinite; /* Safari */
animation: spin 2s linear infinite;
}
/* Safari */
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
2021-07-15 18:26:17 +02:00
::-webkit-scrollbar {
width: 11px;
}
body {
scrollbar-width: thin;
scrollbar-color: var(--scrollbar-color);
}
2021-07-15 18:26:17 +02:00
::-webkit-scrollbar-track {
background: var(--scrollbar-bg);
2021-07-15 18:26:17 +02:00
border-radius: var(--nav-border-radius);
}
2021-07-15 18:26:17 +02:00
::-webkit-scrollbar-thumb {
background-color: var(--scrollbar-thumb) ;
border-radius: 6px;
border: 3px solid var(--scrollbar-bg);
}
.no-select {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Old versions of Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
}
2021-05-20 21:55:49 +02:00
.flex-row {
display: flex;
flex-direction: row;
}
.flex-col {
display: flex;
flex-direction: column;
}
.space-between {
justify-content: space-between;
}
2021-05-20 21:55:49 +02:00
.horizontal-spacer {
margin-right: 1em;
}
2021-05-27 18:32:53 +02:00
.horizontal-spacer-sm {
margin-right: 0.25em;
}
2021-05-20 21:55:49 +02:00
.vertical-spacer {
margin-bottom: 1em;
}
.flex-grow {
2021-05-27 21:22:08 +02:00
flex-grow: 1;
}
.nav-hidden {
display: none;
}
2021-05-20 21:55:49 +02:00
.outer-container {
height: 100%;
2021-05-26 23:44:38 +02:00
background-color: var(--container);
color: var(--font);
2021-05-20 21:55:49 +02:00
padding: 1em;
2021-05-27 21:22:08 +02:00
padding-bottom: 0;
2021-05-20 21:55:49 +02:00
}
.nav-header {
align-items: baseline;
}
input[type="text"] {
2021-05-26 23:44:38 +02:00
background-color: var(--container);
color: inherit;
2021-05-20 21:55:49 +02:00
padding: 0.25em 1em 0.25em 1em;
2021-05-26 23:44:38 +02:00
border: 1px solid var(--border);
2021-05-20 21:55:49 +02:00
border-radius: 4px;
min-width: 30px;
}
.navigation-bar {
flex-basis: 0;
flex-grow: 5;
}
.search-bar {
flex-basis: 0;
flex-grow: 2;
}
.search-bar + i {
position: relative;
right: 30px;
width: 0;
2021-05-20 21:55:49 +02:00
}
.inner-container {
height: 100%;
flex-grow: 1;
overflow: hidden;
}
.contents-view {
height: 100%;
flex-basis: 0;
2021-05-25 19:37:59 +02:00
flex-grow: 8;
2021-05-26 23:44:38 +02:00
background-color: var(--navigation);
border: 1px solid var(--border);
2021-05-28 17:17:42 +02:00
border-radius: var(--nav-border-radius);
2021-05-20 21:55:49 +02:00
display: flex;
justify-content: flex-start;
align-content: flex-start;
overflow: auto;
2021-06-03 18:34:52 +02:00
position: relative;
2021-05-20 21:55:49 +02:00
}
2021-06-07 22:00:42 +02:00
.contents-view-grid {
flex-flow: row wrap;
align-items: flex-start;
padding: 0.5em;
}
.contents-view-list {
flex-flow: column nowrap;
align-items: stretch;
}
.contents-view-grid > .nav-item {
2021-05-25 21:41:03 +02:00
margin: 2px;
padding: 3px;
2021-05-20 21:55:49 +02:00
flex: 0;
display: flex;
flex-direction: column;
align-items: center;
cursor: pointer;
box-sizing: border-box;
}
2021-06-07 22:00:42 +02:00
.contents-view-grid > .nav-item > .nav-item-title {
text-align: center;
overflow-wrap: anywhere;
}
.contents-view-grid > .nav-item > .nav-item-icon {
position: relative;
text-align: center;
width: 100px;
font-size: 80px;
color: var(--nav-entry-color);
}
.contents-view-grid > .nav-item-selected {
2021-05-26 23:44:38 +02:00
background-color: var(--selected);
border: 1px solid var(--border);
2021-05-28 17:17:42 +02:00
border-radius: var(--nav-border-radius);
box-sizing: border-box;
2021-05-25 21:41:03 +02:00
padding: 2px;
2021-05-20 21:55:49 +02:00
}
2021-06-07 22:00:42 +02:00
.contents-view-grid > .nav-item > .nav-item-icon > .nav-item-symlink-symbol-dir {
position: absolute;
color: var(--symlink-symbol-color);
font-size: 20%;
bottom: 19%;
right: 15%;
}
.contents-view-grid > .nav-item > .nav-item-icon > .nav-item-symlink-symbol-file {
position: absolute;
color: var(--symlink-symbol-color);
font-size: 20%;
bottom: 6%;
right: 25%;
}
.contents-view-grid > .contents-view-list-header {
display: none;
}
.contents-view-list-header {
background-color: var(--list-view-header);
cursor: default !important;
2021-06-08 19:00:44 +02:00
position: sticky;
top: 0;
z-index: 10;
}
.contents-view-list-header > div {
cursor: pointer;
position: relative;
}
.contents-view-list-header > div > i {
position: absolute;
right: 10px;
top: 0.25em;
2021-06-07 22:00:42 +02:00
}
.contents-view-list > .nav-item {
padding: 3px;
flex: 0;
display: flex;
flex: row nowrap;
align-items: baseline;
justify-content: flex-start;
cursor: pointer;
box-sizing: border-box;
}
.contents-view-list > .nav-item:nth-child(even) {
background-color: var(--selected);
}
.contents-view-list > .nav-item > .nav-item-title {
margin-left: 5px;
padding-right: 5px;
}
2021-06-07 22:00:42 +02:00
.contents-view-list > .nav-item > .nav-item-icon {
2021-05-28 19:50:06 +02:00
position: relative;
2021-05-25 21:41:03 +02:00
text-align: center;
2021-06-07 22:00:42 +02:00
width: 20px;
2021-05-28 17:17:42 +02:00
color: var(--nav-entry-color);
}
2021-06-07 22:00:42 +02:00
.contents-view-list > .nav-item-selected {
background-color: var(--selected);
border: 1px solid var(--border);
border-radius: var(--nav-border-radius);
box-sizing: border-box;
padding: 2px;
}
.contents-view-list > .nav-item > .nav-item-icon > .nav-item-symlink-symbol-dir {
2021-05-28 19:50:06 +02:00
position: absolute;
color: var(--symlink-symbol-color);
2021-06-07 22:00:42 +02:00
font-size: 40%;
2021-05-28 20:53:57 +02:00
bottom: 19%;
2021-05-28 19:50:06 +02:00
right: 15%;
}
2021-06-07 22:00:42 +02:00
.contents-view-list > .nav-item > .nav-item-icon > .nav-item-symlink-symbol-file {
2021-05-28 19:50:06 +02:00
position: absolute;
color: var(--symlink-symbol-color);
2021-06-07 22:00:42 +02:00
font-size: 40%;
2021-05-28 20:53:57 +02:00
bottom: 6%;
2021-05-28 19:50:06 +02:00
right: 25%;
}
2021-06-07 22:00:42 +02:00
.contents-view-list > .nav-item > div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex-basis: 0;
flex-grow: 1;
}
.contents-view-list > .nav-item > div:first-of-type {
flex-basis: 0;
flex-grow: 2;
}
2021-11-29 17:51:09 +01:00
.contents-view-list > .nav-item > #sort-modified-btn, #sort-created-btn {
flex-basis: 0;
flex-grow: 2;
}
.nav-info-column {
2021-05-26 23:44:38 +02:00
background-color: var(--container);
2021-05-20 21:55:49 +02:00
flex-basis: 0;
2021-05-25 19:37:59 +02:00
flex-grow: 3;
2021-05-20 21:55:49 +02:00
padding: 1em;
2021-05-26 23:44:38 +02:00
border: 1px solid var(--border);
2021-05-28 17:17:42 +02:00
border-radius: var(--nav-border-radius);
2021-05-20 21:55:49 +02:00
}
2021-05-25 19:37:59 +02:00
.min-width-0 {
min-width: 0;
}
2021-05-25 19:37:59 +02:00
.nav-info-column-filename {
margin: 0 12px 0 12px;
font-weight: bolder;
font-size: 150%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
2021-05-25 19:37:59 +02:00
}
.nav-property-pair {
margin: 2px 12px 2px 12px;
2021-05-25 19:37:59 +02:00
display: flex;
flex-flow: row nowrap;
align-items: baseline;
}
.nav-property-pair-key {
font-weight: bold;
flex-basis: 0;
flex: 2;
padding-right: 5px;
}
.nav-property-pair-value {
2021-05-26 23:44:38 +02:00
font-family: "Courier New", Courier, monospace;
2021-05-25 19:37:59 +02:00
font-size: 85%;
flex-basis: 0;
flex: 3;
}
.nav-property-pair > input[type="text"] {
flex-grow: 3;
flex-basis: 0;
padding: 0px 12px 0px 12px;
}
.grid-container {
margin: 0 24px 2px 24px;
display: grid;
grid-template-columns: 2fr 1fr 1fr 1fr;
justify-items: center;
row-gap: 4px;
}
.grid-label {
font-weight: bold;
flex-basis: 0;
font-size: 90%;
}
.grid-row-label {
justify-self: start;
padding-right: 5px;
padding-left: 50%;
}
#selected-files-list-header {
margin-left: 12px;
font-weight: bold;
}
#selected-files-list {
margin-left: 12px;
}
2021-07-15 18:26:17 +02:00
.monospace {
font-family: 'Courier New', Courier, monospace;
}
.monospace-sm {
font-family: 'Courier New', Courier, monospace;
font-size: 80%;
}
.nav-btn-group {
display: flex;
flex-flow: row nowrap;
justify-content: flex-end;
2021-05-26 17:52:45 +02:00
align-items: flex-start;
2021-05-26 22:15:28 +02:00
}
.editor-header {
font-weight: bold;
}
.edit-file-contents {
height: 100%;
flex-basis: 0;
flex-grow: 8;
flex-flow: column nowrap;
align-items: stretch;
}
.edit-file-contents > textarea {
flex-grow: 1;
white-space: pre;
overflow: auto;
resize: none;
2021-05-27 20:36:14 +02:00
border: 1px solid var(--border);
2021-05-28 17:17:42 +02:00
border-radius: var(--nav-border-radius);
2021-05-27 20:36:14 +02:00
outline: none;
padding: 5px;
2021-05-27 21:04:43 +02:00
color: var(--font);
background-color: var(--textarea-bg);
font-family: 'Courier New', Courier, monospace;
}
2021-05-27 21:22:08 +02:00
.nav-footer {
flex: 1;
align-items: baseline;
justify-content: space-between;
2021-05-27 21:22:08 +02:00
padding: 5px;
}
.nav-footer > a > img {
height: 1.25em;
width: auto;
margin-bottom: 4px;
}
.nav-footer > a > .logo-45 {
font-weight: 900;
color: var(--logo-45);
}
.nav-footer > a > .logo-drives {
font-weight: 600;
color: #981c20;
}
2021-05-26 23:44:38 +02:00
.nav-toggle {
2021-05-27 21:22:08 +02:00
justify-self: flex-end;
2021-05-26 23:44:38 +02:00
}
.switch {
position: relative;
display: inline-block;
2021-05-27 18:32:53 +02:00
width: 30px;
height: 17px;
2021-05-26 23:44:38 +02:00
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: var(--toggle-light);
-webkit-transition: 0.4s;
transition: 0.4s;
}
.slider:before {
position: absolute;
content: "";
2021-05-27 18:32:53 +02:00
height: 13px;
width: 13px;
left: 2px;
bottom: 2px;
2021-05-26 23:44:38 +02:00
background-color: white;
-webkit-transition: 0.4s;
transition: 0.4s;
}
input:checked + .slider {
background-color: var(--toggle-dark);
}
input:focus + .slider {
box-shadow: 0 0 1px var(--toggle-dark);
}
input:checked + .slider:before {
2021-05-27 18:32:53 +02:00
-webkit-transform: translateX(13px);
-ms-transform: translateX(13px);
transform: translateX(13px);
2021-05-26 23:44:38 +02:00
}
.slider.round {
2021-05-27 18:32:53 +02:00
border-radius: 17px;
2021-05-26 23:44:38 +02:00
}
.slider.round:before {
border-radius: 50%;
}
2021-05-31 15:32:22 +02:00
.nav-icon-decorated {
position: relative;
}
.nav-icon-decoration {
position: absolute;
font-size: 60%;
top: -10%;
left: -30%;
}
2021-06-07 22:00:42 +02:00
.clickable {
cursor: pointer;
}
.nav-context-menu {
display: none;
position: absolute;
background-color: var(--container);
border: 1px solid var(--border);
color: var(--font);
}
.nav-context-menu-item {
2021-06-03 22:21:14 +02:00
padding: 0 12px 0 0;
cursor: pointer;
2021-06-03 22:21:14 +02:00
display: flex;
flex-flow: row nowrap;
align-items: baseline;
}
.nav-context-menu-item:hover {
background-color: var(--border);
}
2021-06-03 18:34:52 +02:00
2021-06-03 22:21:14 +02:00
.nav-context-menu-item > div {
width: 40px;
display: flex;
flex-flow: row nowrap;
justify-content: center;
}
2021-06-03 18:34:52 +02:00
.drag-enter {
border: 1px dashed var(--border);
}
.nav-notifications {
position: absolute;
bottom: 0;
right: 10px;
2021-06-03 18:34:52 +02:00
padding: 5px;
display: flex;
flex-flow: column-reverse nowrap;
align-items: stretch;
max-height: 50%;
overflow-y: auto;
2021-06-03 18:34:52 +02:00
}
.nav-notification {
margin: 5px;
position: relative;
display: none;
flex-flow: column nowrap;
align-items: stretch;
2021-06-03 18:34:52 +02:00
z-index: 10;
flex-grow: 0;
padding: 5px;
background-color: var(--container);
border-radius: var(--nav-border-radius);
2021-06-03 18:34:52 +02:00
color: var(--font);
}
/* .nav-notification-header {
position: relative;
z-index: 10;
2021-06-03 18:34:52 +02:00
font-weight: bold;
} */
/* .nav-notification-header > progress {
position: relative;
z-index: 10;
} */
.nav-notification-header > p {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.no-border {
border: none;
2021-11-29 17:51:09 +01:00
}