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

367 lines
7.2 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;
grid-template-rows: @height-nav @line-height-sm 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
2017-01-23 22:41:31 +00:00
background-color: var(--color-bg);
color: var(--color-font);
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%;
&.sidebar--collapsed > * > * {
display: none;
}
&.sidebar--hidden {
// It proved difficult to keep the invisible children from overflowing when
// hidden, so we're just going to bump it way to the left to be sure.
left: -9999px;
}
&:focus {
outline: none;
}
2016-05-01 19:56:30 +00:00
// ~~~~~~~~~~~~~~ //
// Sidebar Header //
// ~~~~~~~~~~~~~~ //
.sidebar__header {
border-top: 1px solid @hl-md;
border-bottom: 1px solid @hl-md;
box-sizing: border-box;
2017-01-23 22:41:31 +00:00
background-color: var(--color-bg);
color: var(--color-font);
2016-06-19 07:37:50 +00:00
width: 100%;
height: 100%;
2016-05-01 19:56:30 +00:00
h1 {
margin: 0;
}
2017-01-23 22:41:31 +00:00
h1, h1 * {
font-size: @font-size-xl;
}
}
// ~~~~~~~~~~~~~~~ //
// Sidebar Toolbar //
// ~~~~~~~~~~~~~~~ //
.sidebar__filter {
// Nothing yet
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;
box-sizing: border-box;
padding: 0 0 0 @padding-sm;
.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-xs;
height: @line-height-xxs;
}
.form-control input {
padding: @padding-xs;
margin-top: 0;
height: auto;
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%;
margin-top: @padding-xs;
}
& > *: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
& > .sidebar__menu__thing__text {
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;
2017-01-23 22:41:31 +00:00
color: var(--color-font);
&:hover,
&:focus {
opacity: 1;
}
}
}
&.sidebar--skinny .sidebar__filter {
grid-template-columns: 100%;
padding-right: @padding-sm;
& > *: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
2017-01-24 00:48:28 +00:00
border-top: 1px solid @hl-sm;
2016-08-29 17:58:59 +00:00
padding-top: @padding-xs;
padding-bottom: @padding-md;
box-shadow: inset 0 2rem 2rem -2rem rgba(0, 0, 0, 0.03);
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.3;
}
}
&.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;
2017-01-23 22:41:31 +00:00
border-bottom: 2px dotted var(--color-surprise);
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;
2016-05-01 19:56:30 +00:00
2017-01-23 22:41:31 +00:00
& > button {
color: @hl;
}
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
}
2017-01-23 22:41:31 +00:00
&.sidebar__item--active > button {
color: var(--color-font);
2017-01-24 22:18:11 +00:00
2017-01-23 22:41:31 +00:00
.tag {
opacity: 1;
}
}
2016-05-01 19:56:30 +00:00
2017-01-23 22:41:31 +00:00
// Active sidebar request
&.sidebar__item--request > button {
border-left: @padding-xs solid transparent;
2016-05-01 19:56:30 +00:00
}
2017-01-23 22:41:31 +00:00
&.sidebar__item--active.sidebar__item--request > button,
&.sidebar__item--active.sidebar__item--request > .sidebar__actions,
2017-01-23 22:41:31 +00:00
&:hover > button,
2017-01-24 02:52:48 +00:00
& > button:focus,
&:hover .sidebar__actions {
transition: background-color 130ms ease-out;
2017-01-23 22:41:31 +00:00
background-color: @hl-xs;
}
2016-05-01 19:56:30 +00:00
.tag {
padding-left: 0;
text-align: left;
width: 3em;
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;
height: 100%;
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 {
2017-01-23 22:41:31 +00:00
color: var(--color-font);
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;
width: 100%;
2016-11-11 23:06:24 +00:00
}
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;
box-sizing: border-box;
2016-12-30 23:06:27 +00:00
overflow: hidden;
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
}