insomnia/app/ui/css/components/sidebar.less

368 lines
7.0 KiB
Plaintext
Raw Normal View History

2016-05-01 19:56:30 +00:00
@import '../constants/dimensions';
@import '../constants/colors';
.sidebar {
2016-06-19 01:24:49 +00:00
position: relative;
2016-05-01 19:56:30 +00:00
display: grid;
Sync Proof of Concept (#33) * Maybe working POC * Change to use remote url * Other URL too * Some logic * Got the push part working * Made some updates * Fix * Update * Add status code check * Stuff * Implemented new sync api * A bit more robust * Debounce changes * Change timeout * Some fixes * Remove .less * Better error handling * Fix base url * Support for created vs updated docs * Try silent * Silence removal too * Small fix after merge * Fix test * Stuff * Implement key generation algorithm * Tidy * stuff * A bunch of stuff for the new API * Integrated the session stuff * Stuff * Just started on encryption * Lots of updates to encryption * Finished createResourceGroup function * Full encryption/decryption working (I think) * Encrypt localstorage with sessionID * Some more * Some extra checks * Now uses separate DB. Still needs to be simplified a LOT * Fix deletion bug * Fixed unicode bug with encryption * Simplified and working * A bunch of polish * Some stuff * Removed some workspace meta properties * Migrated a few more meta properties * Small changes * Fix body scrolling and url cursor jumping * Removed duplication of webpack port * Remove workspaces reduces * Some small fixes * Added sync modal and opt-in setting * Good start to sync flow * Refactored modal footer css * Update sync status * Sync logger * A bit better logging * Fixed a bunch of sync-related bugs * Fixed signup form button * Gravatar component * Split sync modal into tabs * Tidying * Some more error handling * start sending 'user agent * Login/signup error handling * Use real UUIDs * Fixed tests * Remove unused function * Some extra checks * Moved cloud sync setting to about page * Some small changes * Some things
2016-10-21 17:20:36 +00:00
grid-template-rows: @height-nav auto auto minmax(0, 1fr) auto;
2016-09-15 22:45:08 +00:00
grid-template-columns: 100%;
2016-11-26 00:37:59 +00:00
z-index: 10;
2016-05-01 19:56:30 +00:00
2016-08-29 17:58:59 +00:00
background-color: @bg-dark;
color: @font-dark-bg;
2016-05-01 19:56:30 +00:00
2016-06-19 00:40:14 +00:00
width: 100%;
2016-05-01 19:56:30 +00:00
height: 100%;
// Don't collapse direct children, but their children
&.sidebar--collapsed > * > * {
opacity: 0;
transition: opacity 0.5s;
}
&.sidebar--hidden {
2016-09-13 21:18:22 +00:00
// Can't be display: none because it screws up the grid
opacity: 0;
}
&:focus {
outline: none;
}
2016-05-01 19:56:30 +00:00
// ~~~~~~~~~~~~~~ //
// Sidebar Header //
// ~~~~~~~~~~~~~~ //
.sidebar__header {
2016-08-29 17:58:59 +00:00
background-color: @bg-brand;
color: @font-brand-bg;
2016-06-19 07:37:50 +00:00
width: 100%;
height: 100%;
2016-05-01 19:56:30 +00:00
2016-06-19 07:21:43 +00:00
&:hover {
2016-08-29 17:58:59 +00:00
background-color: lighten(@bg-brand, 1);
2016-06-19 07:21:43 +00:00
}
h1 {
margin: 0;
}
}
// ~~~~~~~~~~~~~~~ //
// Sidebar Toolbar //
// ~~~~~~~~~~~~~~~ //
.sidebar__filter {
// Nothing yet
width: 100%;
display: grid;
2016-08-29 17:58:59 +00:00
font-size: @font-size-sm;
2016-09-20 20:53:34 +00:00
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
.btn {
padding: 0 (@padding-md - @padding-xs);
2016-08-29 17:58:59 +00:00
margin-right: @padding-xxs;
border-radius: @radius-md;
margin-left: @padding-xxs;
margin-bottom: @padding-xxs;
2016-08-29 17:58:59 +00:00
color: @hl;
&:hover,
&:focus {
2016-08-29 17:58:59 +00:00
color: @font-dark-bg;
}
}
.form-control {
padding: 0 @padding-sm 0 0;
margin: 0 0 @padding-sm @padding-sm;
input {
2016-08-29 17:58:59 +00:00
padding: @padding-xs;
background: transparent;
}
}
}
.sidebar__menu {
2016-09-16 02:57:57 +00:00
box-sizing: border-box;
width: 100%;
display: grid;
grid-template-columns: 55% 45%;
justify-items: center;
2016-08-29 17:58:59 +00:00
font-size: @font-size-sm;
color: @hl;
padding: 0 @padding-sm;
& > * {
width: 100%;
2016-08-29 17:58:59 +00:00
margin-top: @padding-sm;
}
& > *:first-child {
2016-08-29 17:58:59 +00:00
margin-right: @padding-xxs;
}
& > *:last-child {
2016-08-29 17:58:59 +00:00
margin-left: @padding-xxs;
}
2016-06-19 07:21:43 +00:00
.sidebar__menu__thing {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
2016-06-19 00:27:21 +00:00
& > *:first-child {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
2016-06-19 00:27:21 +00:00
}
i.fa {
// Bump the drop down caret down a bit
position: relative;
top: 1px;
}
2016-05-01 19:56:30 +00:00
}
.btn {
width: 100%;
border-radius: 900px;
2016-08-29 17:58:59 +00:00
height: @line-height-xxs;
padding-left: @padding-xxs;
padding-right: @padding-xxs;
&:hover,
&:focus {
2016-08-29 17:58:59 +00:00
color: @font-dark-bg;
}
}
}
&.sidebar--skinny .sidebar__filter {
grid-template-columns: 100%;
& > *:first-child {
2016-08-29 17:58:59 +00:00
margin-right: @padding-xs;
}
& > *:last-child {
display: none;
}
}
&.sidebar--skinny .sidebar__menu {
grid-template-columns: 100%;
& > *:last-child {
display: none;
2016-05-01 19:56:30 +00:00
}
.btn {
2016-08-29 17:58:59 +00:00
padding-left: @padding-xs;
padding-right: @padding-xs;
2016-05-01 19:56:30 +00:00
}
}
// ~~~~~~~~~~~~ //
// Sidebar List //
// ~~~~~~~~~~~~ //
.sidebar__list-root {
// Add some space above so it's not so squished
2016-08-29 17:58:59 +00:00
border-top: 1px solid @hl-sm;
padding-top: @padding-xs;
padding-bottom: @padding-md;
box-shadow: inset 0 2rem 3rem -2rem rgba(0, 0, 0, 0.1);
2016-05-01 19:56:30 +00:00
overflow-y: auto;
&::-webkit-scrollbar {
display: none;
}
&:hover::-webkit-scrollbar {
display: block;
}
}
2016-11-26 00:37:59 +00:00
.sidebar__list--collapsed > * {
display: none;
}
2016-05-01 19:56:30 +00:00
// ~~~~~~~~~~~ //
// Sidebar Row //
// ~~~~~~~~~~~ //
.sidebar__row {
position: relative;
&.sidebar__row--dragging {
// Set opacity on children so we can still see the separator
& > * {
opacity: 0.2;
}
}
&.sidebar__row--dragging-below::after,
&.sidebar__row--dragging-above::before {
position: absolute;
2016-07-20 23:16:28 +00:00
height: 0;
2016-07-21 16:33:35 +00:00
right: 0;
left: 0;
2016-08-29 17:58:59 +00:00
border-bottom: 2px dotted lighten(@surprise, 5);
content: " ";
2016-07-20 23:16:28 +00:00
display: block
}
2016-05-01 19:56:30 +00:00
}
// ~~~~~~~~~~~~ //
// Sidebar Item //
// ~~~~~~~~~~~~ //
.sidebar__item {
display: grid;
2016-09-20 20:53:34 +00:00
grid-template-columns: minmax(0, 1fr) auto;
2016-08-29 17:58:59 +00:00
grid-template-rows: @line-height-xs;
color: @hl-xxl;
2016-05-01 19:56:30 +00:00
& > * {
height: 100%;
}
&.sidebar__item--big {
2016-08-29 17:58:59 +00:00
grid-template-rows: @line-height-sm;
2016-05-01 19:56:30 +00:00
}
2016-07-20 23:16:28 +00:00
&.sidebar__item--active > button {
2016-08-29 17:58:59 +00:00
color: @font-dark-bg;
2016-05-01 19:56:30 +00:00
.tag {
opacity: 1;
}
.editable {
2016-08-29 17:58:59 +00:00
line-height: @line-height-xs;
}
2016-05-01 19:56:30 +00:00
}
2016-07-20 23:16:28 +00:00
&.sidebar__item--active > .sidebar__actions,
& > button:focus {
2016-08-29 17:58:59 +00:00
background-color: @hl-xxs;
2016-05-01 19:56:30 +00:00
}
2016-07-20 23:16:28 +00:00
&:hover > .sidebar__actions,
&:hover > button {
2016-08-29 17:58:59 +00:00
background-color: @hl-xxxs;
2016-07-20 23:16:28 +00:00
}
2016-05-01 19:56:30 +00:00
.tag {
2016-07-26 20:06:25 +00:00
opacity: 0.6;
2016-05-01 19:56:30 +00:00
padding-left: 0;
text-align: left;
2016-07-08 06:02:40 +00:00
width: 2.8em;
2016-07-26 20:06:25 +00:00
text-shadow: 0 0 0.1em rgba(0, 0, 0, 0.9);
2016-05-01 19:56:30 +00:00
}
}
2016-07-08 06:02:40 +00:00
.sidebar__item__icon {
2016-08-29 17:58:59 +00:00
padding-right: @padding-sm;
2016-07-08 06:02:40 +00:00
}
2016-05-01 19:56:30 +00:00
// ~~~~~~~~~~~~~~~~~ //
// Sidebar Clickable //
// ~~~~~~~~~~~~~~~~~ //
.sidebar__clickable {
2016-07-08 06:02:40 +00:00
display: grid;
2016-09-20 20:53:34 +00:00
grid-template-columns: auto minmax(0, 1fr);
2016-07-08 06:02:40 +00:00
align-items: center;
2016-09-20 20:53:34 +00:00
& > *:last-child {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
2016-05-01 19:56:30 +00:00
}
// Padding for nested folders
2016-05-01 19:56:30 +00:00
.sidebar__list .sidebar__clickable {
2016-08-29 17:58:59 +00:00
padding-left: @padding-md;
2016-05-01 19:56:30 +00:00
}
.sidebar__list .sidebar__list .sidebar__clickable {
2016-08-29 17:58:59 +00:00
padding-left: @padding-md * 2;
2016-05-01 19:56:30 +00:00
}
.sidebar__list .sidebar__list .sidebar__list .sidebar__clickable {
2016-08-29 17:58:59 +00:00
padding-left: @padding-md * 3;
}
.sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__clickable {
2016-08-29 17:58:59 +00:00
padding-left: @padding-md * 4;
}
.sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__clickable {
2016-08-29 17:58:59 +00:00
padding-left: @padding-md * 5;
}
.sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__clickable {
2016-08-29 17:58:59 +00:00
padding-left: @padding-md * 6;
}
.sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__clickable {
2016-08-29 17:58:59 +00:00
padding-left: @padding-md * 7;
}
2016-05-01 19:56:30 +00:00
// ~~~~~~~~~~~~~~~ //
// Sidebar Actions //
// ~~~~~~~~~~~~~~~ //
.sidebar__actions {
& > * {
height: 100%;
}
& > button,
& > .dropdown > button {
display: none;
2016-08-29 17:58:59 +00:00
color: @hl;
2016-05-01 19:56:30 +00:00
height: 100%;
2016-08-29 17:58:59 +00:00
padding: 0 @padding-sm;
2016-05-01 19:56:30 +00:00
}
& > button:hover,
& > .dropdown:hover > button {
2016-08-29 17:58:59 +00:00
color: @font-dark-bg;
2016-05-01 19:56:30 +00:00
}
}
.sidebar__item:hover .sidebar__actions > button,
.sidebar__item:hover .sidebar__actions > .dropdown > button {
display: initial;
}
Sync Proof of Concept (#33) * Maybe working POC * Change to use remote url * Other URL too * Some logic * Got the push part working * Made some updates * Fix * Update * Add status code check * Stuff * Implemented new sync api * A bit more robust * Debounce changes * Change timeout * Some fixes * Remove .less * Better error handling * Fix base url * Support for created vs updated docs * Try silent * Silence removal too * Small fix after merge * Fix test * Stuff * Implement key generation algorithm * Tidy * stuff * A bunch of stuff for the new API * Integrated the session stuff * Stuff * Just started on encryption * Lots of updates to encryption * Finished createResourceGroup function * Full encryption/decryption working (I think) * Encrypt localstorage with sessionID * Some more * Some extra checks * Now uses separate DB. Still needs to be simplified a LOT * Fix deletion bug * Fixed unicode bug with encryption * Simplified and working * A bunch of polish * Some stuff * Removed some workspace meta properties * Migrated a few more meta properties * Small changes * Fix body scrolling and url cursor jumping * Removed duplication of webpack port * Remove workspaces reduces * Some small fixes * Added sync modal and opt-in setting * Good start to sync flow * Refactored modal footer css * Update sync status * Sync logger * A bit better logging * Fixed a bunch of sync-related bugs * Fixed signup form button * Gravatar component * Split sync modal into tabs * Tidying * Some more error handling * start sending 'user agent * Login/signup error handling * Use real UUIDs * Fixed tests * Remove unused function * Some extra checks * Moved cloud sync setting to about page * Some small changes * Some things
2016-10-21 17:20:36 +00:00
// ~~~~~~~~~~~~~~ //
// Sidebar Footer //
// ~~~~~~~~~~~~~~ //
.sidebar__footer {
2016-11-11 23:06:24 +00:00
height: @line-height-xs;
border-top: 1px solid @hl-md;
}
2016-11-12 08:38:55 +00:00
.sidebar__footer > button,
2016-11-11 23:06:24 +00:00
.sidebar__footer .dropdown > button {
font-size: @font-size-sm;
padding: @padding-xs @padding-md;
height: 100%;
margin: 0;
Sync Proof of Concept (#33) * Maybe working POC * Change to use remote url * Other URL too * Some logic * Got the push part working * Made some updates * Fix * Update * Add status code check * Stuff * Implemented new sync api * A bit more robust * Debounce changes * Change timeout * Some fixes * Remove .less * Better error handling * Fix base url * Support for created vs updated docs * Try silent * Silence removal too * Small fix after merge * Fix test * Stuff * Implement key generation algorithm * Tidy * stuff * A bunch of stuff for the new API * Integrated the session stuff * Stuff * Just started on encryption * Lots of updates to encryption * Finished createResourceGroup function * Full encryption/decryption working (I think) * Encrypt localstorage with sessionID * Some more * Some extra checks * Now uses separate DB. Still needs to be simplified a LOT * Fix deletion bug * Fixed unicode bug with encryption * Simplified and working * A bunch of polish * Some stuff * Removed some workspace meta properties * Migrated a few more meta properties * Small changes * Fix body scrolling and url cursor jumping * Removed duplication of webpack port * Remove workspaces reduces * Some small fixes * Added sync modal and opt-in setting * Good start to sync flow * Refactored modal footer css * Update sync status * Sync logger * A bit better logging * Fixed a bunch of sync-related bugs * Fixed signup form button * Gravatar component * Split sync modal into tabs * Tidying * Some more error handling * start sending 'user agent * Login/signup error handling * Use real UUIDs * Fixed tests * Remove unused function * Some extra checks * Moved cloud sync setting to about page * Some small changes * Some things
2016-10-21 17:20:36 +00:00
color: @hl;
width: 100%;
box-sizing: border-box;
Sync Proof of Concept (#33) * Maybe working POC * Change to use remote url * Other URL too * Some logic * Got the push part working * Made some updates * Fix * Update * Add status code check * Stuff * Implemented new sync api * A bit more robust * Debounce changes * Change timeout * Some fixes * Remove .less * Better error handling * Fix base url * Support for created vs updated docs * Try silent * Silence removal too * Small fix after merge * Fix test * Stuff * Implement key generation algorithm * Tidy * stuff * A bunch of stuff for the new API * Integrated the session stuff * Stuff * Just started on encryption * Lots of updates to encryption * Finished createResourceGroup function * Full encryption/decryption working (I think) * Encrypt localstorage with sessionID * Some more * Some extra checks * Now uses separate DB. Still needs to be simplified a LOT * Fix deletion bug * Fixed unicode bug with encryption * Simplified and working * A bunch of polish * Some stuff * Removed some workspace meta properties * Migrated a few more meta properties * Small changes * Fix body scrolling and url cursor jumping * Removed duplication of webpack port * Remove workspaces reduces * Some small fixes * Added sync modal and opt-in setting * Good start to sync flow * Refactored modal footer css * Update sync status * Sync logger * A bit better logging * Fixed a bunch of sync-related bugs * Fixed signup form button * Gravatar component * Split sync modal into tabs * Tidying * Some more error handling * start sending 'user agent * Login/signup error handling * Use real UUIDs * Fixed tests * Remove unused function * Some extra checks * Moved cloud sync setting to about page * Some small changes * Some things
2016-10-21 17:20:36 +00:00
}
2016-05-01 19:56:30 +00:00
}