X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/6adc642d2f19a998dea9bcc7b9d3f07f0c50cd6a..refs/pull/4103/head:/resources/sass/_components.scss diff --git a/resources/sass/_components.scss b/resources/sass/_components.scss index 9fdd5a611..825501364 100644 --- a/resources/sass/_components.scss +++ b/resources/sass/_components.scss @@ -1,6 +1,6 @@ // System wide notifications -[notification] { +.notification { position: fixed; top: 0; right: 0; @@ -607,37 +607,38 @@ body.flexbox-support #entity-selector-wrap .popup-body .form-group { } -.tab-container .nav-tabs { +.tab-container [role="tablist"] { + display: flex; + align-items: end; + justify-items: start; text-align: start; border-bottom: 1px solid #DDD; @include lightDark(border-color, #ddd, #444); margin-bottom: $-m; - .tab-item { - padding: $-s; - @include lightDark(color, #666, #999); - &.selected { - border-bottom-width: 3px; - } - } } -.nav-tabs { - text-align: center; - a, .tab-item { - padding: $-m; - display: inline-block; - @include lightDark(color, #666, #999); - cursor: pointer; - border-right: 1px solid rgba(0, 0, 0, 0.1); - border-bottom: 2px solid transparent; - &.selected { - border-bottom: 2px solid var(--color-primary); - } - &:last-child { - border-right: 0; - } +.tab-container [role="tablist"] button[role="tab"], +.image-manager [role="tablist"] button[role="tab"] { + display: inline-block; + padding: $-s; + @include lightDark(color, rgba(0, 0, 0, .5), rgba(255, 255, 255, .5)); + cursor: pointer; + border-bottom: 2px solid transparent; + margin-bottom: -1px; + &[aria-selected="true"] { + color: var(--color-link) !important; + border-bottom-color: var(--color-link) !important; + } + &:hover, &:focus { + @include lightDark(color, rgba(0, 0, 0, .8), rgba(255, 255, 255, .8)); + @include lightDark(border-bottom-color, rgba(0, 0, 0, .2), rgba(255, 255, 255, .2)); } } +.tab-container [role="tablist"].controls-card { + margin-bottom: 0; + border-bottom: 0; + padding: 0 $-xs; +} .image-picker .none { display: none; @@ -798,37 +799,6 @@ body.flexbox-support #entity-selector-wrap .popup-body .form-group { max-width: 500px; } -.content-permissions { - box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); -} -.content-permissions-row { - border: 1.5px solid; - @include lightDark(border-color, #E2E2E2, #444); - border-bottom-width: 0; - label { - padding-bottom: 0; - } - &:hover { - @include lightDark(background-color, #F2F2F2, #333); - } -} -.content-permissions-row:first-child { - border-radius: 4px 4px 0 0; -} -.content-permissions-row:last-child { - border-radius: 0 0 4px 4px; - border-bottom-width: 1.5px; -} -.content-permissions-row:first-child:last-child { - border-radius: 4px; -} -.content-permissions-row-toggle-all { - visibility: hidden; -} -.content-permissions-row:hover .content-permissions-row-toggle-all { - visibility: visible; -} - .template-item { cursor: pointer; position: relative; @@ -843,14 +813,16 @@ body.flexbox-support #entity-selector-wrap .popup-body .form-group { height: 100%; display: flex; flex-direction: column; - border-inline-start: 1px solid #DDD; + border-inline-start: 1px solid; + @include lightDark(border-color, #ddd, #000); } .template-item-actions button { cursor: pointer; flex: 1; - background: #FFF; + @include lightDark(background-color, #FFF, #222); border: 0; - border-top: 1px solid #DDD; + border-top: 1px solid; + @include lightDark(border-color, #DDD, #000); } .template-item-actions button svg { margin: 0; @@ -969,4 +941,198 @@ body.flexbox-support #entity-selector-wrap .popup-body .form-group { .dropdown-search-dropdown .dropdown-search-list { max-height: 240px; } +} + +.item-list { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); +} +.item-list-row { + border: 1.5px solid; + @include lightDark(border-color, #E2E2E2, #444); + border-bottom-width: 0; + label { + padding-bottom: 0; + } + &:hover { + @include lightDark(background-color, #F6F6F6, #333); + } +} +.item-list-row:first-child { + border-radius: 4px 4px 0 0; +} +.item-list-row:last-child { + border-radius: 0 0 4px 4px; + border-bottom-width: 1.5px; +} +.item-list-row:first-child:last-child { + border-radius: 4px; +} +.item-list-row-toggle-all { + visibility: hidden; +} +.item-list-row:hover .item-list-row-toggle-all { + visibility: visible; +} + +.status-indicator-active, .status-indicator-inactive { + width: 8px; + height: 8px; + border-radius: 50%; + display: inline-block; +} +.status-indicator-active { + background-color: $positive; +} +.status-indicator-inactive { + background-color: $negative; +} + +.shortcut-container { + background-color: rgba(0, 0, 0, 0.25); + pointer-events: none; + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 99; +} +.shortcut-linkage { + position: fixed; + box-shadow: 0 0 4px 0 #FFF; + border-radius: 3px; +} +.shortcut-hint { + position: fixed; + padding: $-xxs $-xxs; + font-size: .85rem; + font-weight: 700; + line-height: 1; + background-color: #eee; + border-radius: 3px; + border: 1px solid #b4b4b4; + box-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 2px 0 0 rgba(255, 255, 255, .7) inset; + color: #333; +} + +// Back to top link +$btt-size: 40px; +.back-to-top { + background-color: var(--color-primary); + position: fixed; + bottom: $-m; + right: $-l; + padding: 5px 7px; + cursor: pointer; + color: #FFF; + fill: #FFF; + svg { + width: math.div($btt-size, 1.5); + height: math.div($btt-size, 1.5); + margin-inline-end: 4px; + } + width: $btt-size; + height: $btt-size; + border-radius: $btt-size; + transition: all ease-in-out 180ms; + opacity: 0; + z-index: 999; + overflow: hidden; + &:hover { + width: $btt-size*3.4; + opacity: 1 !important; + } + .inner { + width: $btt-size*3.4; + } + span { + position: relative; + vertical-align: top; + line-height: 2; + } +} + +// Sortable scroll boxes +.scroll-box { + list-style: none; + padding: 0; + margin: 0; + max-height: 280px; + overflow-y: scroll; + border: 1px solid; + @include lightDark(border-color, #DDD, #000); + border-radius: 3px; + min-height: 20px; + @include lightDark(background-color, #EEE, #000); +} +.scroll-box-item { + border-bottom: 1px solid; + border-top: 1px solid; + @include lightDark(border-color, #DDD, #000); + margin-top: -1px; + @include lightDark(background-color, #FFF, #222); + display: flex; + align-items: flex-start; + padding: 1px; + &:last-child { + border-bottom: 0; + } + &:hover { + cursor: pointer; + @include lightDark(background-color, #f8f8f8, #333); + } + .handle { + color: #AAA; + cursor: grab; + } + button { + opacity: .6; + } + .handle svg { + margin: 0; + } + > * { + padding: $-xs $-m; + } + .handle + * { + padding-left: 0; + } + &:hover .handle { + @include lightDark(color, #444, #FFF); + } + &:hover button { + opacity: 1; + } + a:hover { + text-decoration: none; + } +} + +input.scroll-box-search, .scroll-box-header-item { + font-size: 0.8rem; + border: 1px solid; + @include lightDark(border-color, #DDD, #000); + @include lightDark(background-color, #FFF, #222); + margin-bottom: -1px; + border-radius: 3px 3px 0 0; + width: 100%; + max-width: 100%; + height: auto; + line-height: 1.4; + color: #666; +} + +.scroll-box-search + .scroll-box, +.scroll-box-header-item + .scroll-box { + border-radius: 0 0 3px 3px; +} + +.scroll-box[refs="shelf-sort@shelf-book-list"] [data-action="add"] { + display: none; +} +.scroll-box[refs="shelf-sort@all-book-list"] [data-action="remove"], +.scroll-box[refs="shelf-sort@all-book-list"] [data-action="move_up"], +.scroll-box[refs="shelf-sort@all-book-list"] [data-action="move_down"], +{ + display: none; } \ No newline at end of file