cryptpad/www/drive/file.less

458 lines
9.4 KiB
Text
Raw Normal View History

2017-01-26 13:52:34 +00:00
@tree-bg: #fff;
2017-01-26 11:56:19 +00:00
@tree-fg: #000;
@tree-lines-col: #888;
@content-bg: @tree-bg;
@content-bg-ro: darken(@content-bg, 10%);
2017-01-26 11:56:19 +00:00
@content-fg: @tree-fg;
@info-box-bg: #ddddff;
@info-box-border: #bbb;
2017-01-26 13:52:34 +00:00
@table-header-fg: #555;
@table-header-bg: #e8e8e8;
2017-01-26 11:56:19 +00:00
@toolbar-bg: #ddd;
@toolbar-fg: #555;
@toolbar-border-col: #ccc;
@toolbar-button-bg: #888;
@toolbar-button-fg: #eee;
@toolbar-path-bg: #fff;
@toolbar-path-border: #888;
2017-01-25 15:21:46 +00:00
/* PAGE */
html, body {
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 0;
margin: 0;
position: relative;
font-size: 20px;
overflow: auto;
}
body {
display: flex;
flex-flow: column;
}
2017-01-26 11:56:19 +00:00
.unselectable {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
2017-01-25 15:21:46 +00:00
.app-container {
flex: 1;
overflow: auto;
width: 100%;
display: flex;
flex-flow: row;
}
.fa {
/*min-width: 17px;*/
margin-right: 3px;
font-family: FontAwesome;
}
ul {
list-style: none;
2017-01-26 11:56:19 +00:00
padding-left: 0px; // Remove the default padding
2017-01-25 15:21:46 +00:00
}
li {
padding: 0px 5px;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.folder, .file {
margin-right: 5px;
}
.contextMenu {
display: none;
position: absolute;
2017-01-30 13:45:02 +00:00
li {
padding: 0;
font-size: 16px;
}
2017-01-25 15:21:46 +00:00
}
.droppable {
background-color: #FE9A2E;
color: #222;
}
.selected {
border: 1px dotted #bbb;
background: #666;
color: #eee;
margin: -1px;
}
span {
&.fa-folder, &.fa-folder-open {
color: #FEDE8B;
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}
}
2017-01-25 15:21:46 +00:00
/* TREE */
#tree {
border-right: 1px solid #ccc;
box-sizing: border-box;
2017-01-26 11:56:19 +00:00
background: @tree-bg;
2017-01-25 15:21:46 +00:00
overflow: auto;
resize: horizontal;
width: 250px;
white-space: nowrap;
max-width: 500px;
min-width: 200px;
padding: 10px 0px;
2017-01-26 11:56:19 +00:00
color: @tree-fg;
2017-01-25 15:21:46 +00:00
li {
cursor: auto;
2017-01-26 11:56:19 +00:00
&:hover > span.element {
2017-01-25 15:21:46 +00:00
text-decoration: underline;
}
&.collapsed ul {
display: none;
}
input {
width: calc(100% - 30px);
}
}
span.element {
cursor: pointer;
}
.active {
text-decoration: underline;
}
.category2 {
margin-top: 2em;
2017-01-26 11:56:19 +00:00
.root {
&> .fa {
min-width: 30px;
cursor: pointer;
}
}
2017-01-25 15:21:46 +00:00
}
.fa.expcol {
margin-left: -10px;
font-size: 14px;
position: absolute;
left: -20px;
top: 9px;
width: auto;
height: 11px;
padding: 0;
margin: 0;
background: white;
z-index: 10;
cursor: default;
&:before {
position:relative;
top: -1px;
}
}
// Expand/collapse lines
ul {
margin: 0px 0px 0px 10px;
list-style: none;
2017-01-26 11:56:19 +00:00
padding-left: 10px;
2017-01-25 15:21:46 +00:00
li {
position: relative;
&:before {
position: absolute;
left: -15px;
top: -0.25em;
content: '';
display: block;
2017-01-26 11:56:19 +00:00
border-left: 1px solid @tree-lines-col;
2017-01-25 15:21:46 +00:00
height: 1em;
2017-01-26 11:56:19 +00:00
border-bottom: 1px solid @tree-lines-col;
2017-01-25 15:21:46 +00:00
width: 17.5px;
}
&:after {
position: absolute;
left: -15px;
bottom: -7px;
content: '';
display: block;
2017-01-26 11:56:19 +00:00
border-left: 1px solid @tree-lines-col;
2017-01-25 15:21:46 +00:00
height: 100%;
}
&.root {
margin: 0px 0px 0px -10px;
&:before {
display: none;
}
&:after {
display: none;
}
}
&:last-child:after {
display: none;
}
}
}
}
/* CONTENT */
#content {
box-sizing: border-box;
2017-01-26 11:56:19 +00:00
background: @content-bg;
color: @content-fg;
2017-01-25 15:21:46 +00:00
overflow: auto;
flex: 1;
display: flex;
flex-flow: column;
&.readonly {
background: @content-bg-ro;
}
2017-01-25 15:21:46 +00:00
h1 {
padding-left: 10px;
margin-top: 10px;
}
.info-box {
2017-01-26 11:56:19 +00:00
height: 40px;
line-height: 40px;
padding-left: 10px;
margin: 10px auto;
background: @info-box-bg;
border: 1px solid @info-box-border;
2017-01-25 15:21:46 +00:00
border-radius: 5px;
span {
cursor: pointer;
margin-left: 10px;
float: right;
}
}
li {
&:not(.header) {
*:not(input) {
/*pointer-events: none;*/
2017-01-25 15:21:46 +00:00
}
&:hover {
.name {
text-decoration: underline;
}
}
}
}
div.grid {
2017-01-26 11:56:19 +00:00
padding: 20px;
2017-01-25 15:21:46 +00:00
li {
display: inline-block;
margin: 10px 10px;
width: 140px;
text-align: center;
vertical-align: top;
.name {
width: 100%;
}
input {
width: 100%;
}
.fa {
display: block;
margin: auto;
font-size: 40px;
text-align: center;
&.listonly {
display: none;
}
}
}
.listElement {
display: none;
}
}
.list {
// Make it act as a table!
ul {
display: table;
width: 100%;
2017-01-26 11:56:19 +00:00
padding: 0px 10px;
}
2017-01-25 15:21:46 +00:00
li {
display: table-row;
&> span {
padding: 0 5px;
display: table-cell;
2017-01-25 15:21:46 +00:00
}
}
li {
2017-01-25 15:21:46 +00:00
&.header {
cursor: default;
2017-01-26 11:56:19 +00:00
color: @table-header-fg;
span {
&:not(.fa) {
text-align: left;
}
&.sortasc, &.sortdesc {
float: right;
2017-01-25 15:21:46 +00:00
}
}
&> span {
2017-01-26 11:56:19 +00:00
padding: 15px 5px;
&.active {
font-weight: bold;
}
&.clickable {
cursor: pointer;
&:hover {
2017-01-26 11:56:19 +00:00
background: @table-header-bg;
}
2017-01-25 15:21:46 +00:00
}
}
}
}
.element {
span {
overflow: hidden;
white-space: nowrap;
box-sizing: border-box;
&.icon {
width: 30px;
2017-01-25 15:21:46 +00:00
}
&.type, &.atime, &.ctime {
width: 175px;
}
&.title {
width: 250px;
@media screen and (max-width: 1200px) {
display: none;
}
}
&.folders, &.files {
width: 150px;
}
}
}
}
}
.parentFolder {
cursor: pointer;
margin-left: 10px;
&:hover {
text-decoration: underline;
}
}
#folderContent {
padding-right: 10px;
flex: 1;
}
/* Toolbar */
#driveToolbar {
2017-01-26 11:56:19 +00:00
background: @toolbar-bg;
color: @toolbar-fg;
2017-01-25 15:21:46 +00:00
height: 40px;
2017-01-26 11:56:19 +00:00
display: flex;
flex-flow: row;
border-top: 1px solid @toolbar-border-col;
border-bottom: ;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
z-index: 100;
box-sizing: content-box;
2017-01-25 15:21:46 +00:00
.newPadContainer {
display: inline-block;
height: 100%;
}
2017-01-26 11:56:19 +00:00
button {
height: 30px;
2017-01-26 11:56:19 +00:00
&.element {
border-radius: 2px;
background: @toolbar-button-bg;
color: @toolbar-button-fg;
font-size: 16px;
border: none;
font-weight: bold;
&:hover {
box-shadow: 0px 0px 2px #000;
}
}
&.new {
padding: 0 20px;
2017-01-25 15:21:46 +00:00
}
}
/* The container <div> - needed to position the dropdown content */
.dropdown-bar {
2017-01-26 11:56:19 +00:00
margin: 5px 5px;
line-height: 1em;
2017-01-25 15:21:46 +00:00
position: relative;
display: inline-block;
&.right {
float: right;
/* Right-side buttons */
button {
display: inline-block;
&.active {
display: none;
}
.fa {
margin-right: 0px;
}
}
}
}
.dropdown-bar-content {
margin-right: 2px;
}
2017-01-26 11:56:19 +00:00
.leftside {
width: 250px;
margin: 0;
padding: 0;
}
.rightside {
margin: 0;
padding: 0;
flex: 1;
}
.path {
display: inline-block;
height: 100%;
line-height: 40px;
cursor: default;
.element {
padding: 5px;
border: 1px solid @toolbar-bg;
border-radius: 2px;
box-sizing: border-box;
&.clickable {
cursor: pointer;
&:hover {
background: @toolbar-path-bg;
border: 1px solid @toolbar-path-border;
}
}
}
}
2017-01-25 15:21:46 +00:00
}