1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-10-30 15:42:41 +01:00
BookStack/resources/assets/sass/_lists.scss

458 lines
7.5 KiB
SCSS
Raw Normal View History

.book-contents .entity-list-item {
.icon {
margin-top: $-xs;
}
p {
margin-bottom: 0;
}
.inner-page {
padding-top: 0;
padding-bottom: 0;
}
.inset-list {
display: none;
}
}
.sidebar-page-nav {
2019-02-16 16:39:11 +01:00
$nav-indent: $-m;
list-style: none;
margin: $-s 0 $-m 2px;
2019-02-16 16:39:11 +01:00
position: relative;
&:after {
content: '';
display: block;
position: absolute;
left: 0;
background-color: rgba(0, 0, 0, 0.2);
width: 2px;
top: 5px;
bottom: 5px;
z-index: 0;
}
li {
margin-bottom: 4px;
font-size: 0.95em;
2019-02-16 16:39:11 +01:00
position: relative;
}
.h1 {
2019-02-16 16:39:11 +01:00
padding-left: $nav-indent;
}
.h2 {
2019-02-16 16:39:11 +01:00
padding-left: $nav-indent;
}
.h3 {
2019-02-16 16:39:11 +01:00
padding-left: $nav-indent * 2;
}
.h4 {
2019-02-16 16:39:11 +01:00
padding-left: $nav-indent * 2.5;
}
.h5 {
2019-02-16 16:39:11 +01:00
padding-left: $nav-indent*3;
}
.h6 {
2019-02-16 16:39:11 +01:00
padding-left: $nav-indent*3.5;
}
.current-heading {
font-weight: bold;
}
2019-02-16 16:39:11 +01:00
li:not(.current-heading) .sidebar-page-nav-bullet {
background-color: #BBB !important;
}
.sidebar-page-nav-bullet {
width: 6px;
height: 6px;
position: absolute;
left: -2px;
top: 30%;
border-radius: 50%;
box-shadow: 0 0 0 6px #F2F2F2;
z-index: 1;
}
}
// Sidebar list
.book-tree .book.entity-list-item {
font-size: 0.6rem;
h4 {
font-size: 1rem;
margin: 0;
}
}
.book-tree .sidebar-page-list {
list-style: none;
margin: $-xs 0 0;
padding-left: 0;
padding-right: 0;
position: relative;
ul {
list-style: none;
padding-left: 1rem;
padding-right: 0;
}
.entity-icon {
font-size: 12px;
z-index: 2;
background-color: #FFF;
}
.entity-list-item-name {
font-size: 1em;
margin: 0;
}
.entity-list-item {
font-size: 0.8rem;
}
.entity-list-item.selected {
background-color: #F2F2F2;
}
.chapter-child-menu {
font-size: 12px;
padding-left: 2rem;
margin-top: -.2rem;
2018-02-17 14:30:52 +01:00
}
[chapter-toggle] {
padding-left: 1.5rem;
padding-bottom: .2rem;
}
2019-01-31 21:37:12 +01:00
.icon {
z-index: 2;
}
&:after, .sub-menu:after {
content: '';
display: block;
position: absolute;
left: 1.6rem;
top: 1rem;
bottom: 1rem;
border-left: 2px solid #DDD;
opacity: 0.6;
2019-01-31 21:37:12 +01:00
z-index: 0;
}
}
.chapter-child-menu {
ul.sub-menu {
display: none;
padding-left: 0;
position: relative;
}
[chapter-toggle].open + .sub-menu {
display: block;
}
}
// Sortable Lists
.sortable-page-list, .sortable-page-list ul {
list-style: none;
2015-09-06 15:35:53 +02:00
background-color: #FFF;
}
.sort-box {
margin-bottom: $-m;
padding: 0 $-l 0 $-l;
border-left: 4px solid $color-book;
}
.sortable-page-list {
margin-left: 0;
2015-09-06 15:35:53 +02:00
> ul {
margin-left: 0;
}
ul {
margin-bottom: 0;
margin-top: 0;
box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.1);
}
li {
border: 1px solid #DDD;
padding: $-xs $-s;
margin-top: -1px;
min-height: 38px;
&.text-chapter {
border-left: 2px solid $color-chapter;
}
&.text-page {
border-left: 2px solid $color-page;
}
}
li:first-child {
margin-top: $-xs;
}
}
.sortable-page-list li.placeholder {
position: relative;
}
.sortable-page-list li.placeholder:before {
position: absolute;
}
.activity-list-item {
padding: $-s 0;
display: grid;
grid-template-columns: min-content 1fr;
grid-column-gap: $-m;
color: #888;
2018-02-17 14:30:52 +01:00
fill: #888;
font-size: 0.9em;
2015-11-09 20:46:04 +01:00
}
.card .activity-list-item {
padding: $-s $-m;
}
2015-11-09 20:46:04 +01:00
.user-list-item {
display: inline-grid;
padding: $-s;
grid-template-columns: min-content 1fr;
grid-column-gap: $-m;
font-size: 0.9em;
align-items: center;
> div:first-child {
line-height: 0;
}
}
2015-11-09 20:46:04 +01:00
ul.pagination {
display: inline-block;
list-style: none;
margin: $-m 0;
padding-left: 1px;
2015-11-09 20:46:04 +01:00
li {
float: left;
}
li:first-child {
a, span {
border-radius: 3px 0 0 3px;
}
}
li:last-child {
a, span {
border-radius: 0 3px 3px 0;
}
}
a, span {
display: block;
padding: $-xxs $-s;
border: 1px solid #CCC;
margin-left: -1px;
user-select: none;
&.disabled {
cursor: not-allowed;
}
}
li.active span {
2018-07-29 16:44:10 +02:00
color: #FFF;
2015-11-09 20:46:04 +01:00
}
}
.compact ul.pagination {
margin: 0;
}
.entity-list, .icon-list {
margin: 0 (-$-m);
h4 {
margin: 0;
}
hr {
margin: 0;
}
.text-small.text-muted {
color: #AAA;
font-size: 0.75em;
margin-top: $-xs;
}
.text-muted p.text-muted {
margin-top: 0;
}
.page.draft .text-page {
color: $color-page-draft;
2018-02-17 14:30:52 +01:00
fill: $color-page-draft;
}
> .dropdown-container {
display: block;
}
}
.entity-list-item, .icon-list-item {
padding: $-s $-m;
display: flex;
align-items: center;
background-color: transparent;
border: 0;
cursor: pointer;
width: 100%;
position: relative;
h4 a {
color: #666;
}
> span:first-child {
margin-right: $-m;
flex-basis: 1.88em;
flex: none;
}
> span:last-child {
flex: 1;
text-align: left;
}
&:hover {
text-decoration: none;
background-color: #DDD;
border-radius: 4px;
}
}
.card .entity-list-item:hover {
background-color: #F2F2F2;
2017-08-20 14:57:25 +02:00
}
.card .entity-list-item .entity-list-item:hover {
background-color: #EEEEEE;
}
2017-08-20 14:57:25 +02:00
.entity-list-item-image {
align-self: stretch;
width: 140px;
background-size: cover;
background-position: 50% 50%;
border-radius: 3px;
position: relative;
margin-right: $-l;
@include smaller-than($m) {
width: 80px;
}
}
.entity-list.compact {
font-size: 0.6 * $fs-m;
h4, a {
line-height: 1.2;
}
.entity-item-snippet {
display: none;
}
.entity-list-item p {
font-size: $fs-m * 0.8;
padding-top: $-xs;
}
p {
margin: 0;
}
> p.empty-text {
display: block;
font-size: $fs-m;
}
hr {
margin: 0;
}
@include smaller-than($m) {
h4 {
font-size: 1.666em;
}
}
}
.dropdown-container {
display: inline-block;
vertical-align: top;
position: relative;
}
.dropdown-container ul {
display: none;
position: absolute;
z-index: 999;
top: 0;
list-style: none;
right: 0;
margin: $-m 0;
background-color: #FFFFFF;
box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1);
border-radius: 1px;
border: 1px solid #EEE;
min-width: 180px;
padding: $-xs 0;
color: #555;
2018-02-17 14:30:52 +01:00
fill: #555;
text-align: left !important;
&.wide {
min-width: 220px;
}
.text-muted {
color: #999;
2018-02-17 14:30:52 +01:00
fill: #999;
}
li.padded {
padding: $-xs $-m;
line-height: 1.2;
}
li.active a {
font-weight: 600;
}
a, button {
display: block;
padding: $-xs $-m;
color: #555;
2018-02-17 14:30:52 +01:00
fill: #555;
white-space: nowrap;
&:hover {
text-decoration: none;
background-color: #EEE;
}
svg {
margin-right: $-s;
display: inline-block;
width: 16px;
}
}
button {
width: 100%;
text-align: left;
}
li.border-bottom {
border-bottom: 1px solid #DDD;
}
}
// Books grid view
.featured-image-container {
position: relative;
overflow: hidden;
a {
display: block;
}
img {
display: block;
width: 100%;
max-width: 100%;
height: auto;
transition: all .5s ease-in-out;
}
2018-12-09 15:04:28 +01:00
}
.grid-card:hover .featured-image-container img {
transform: scale(1.15);
opacity: .5;
}
.action-link-list {
//padding: $-s 0;
}
.action-link {
background: transparent;
border: none;
color: currentColor;
padding: $-m 0;
}
.active-link-list {
a {
display: inline-block;
padding: $-s;
}
a:not(.active) {
color: #444;
fill: #444;
}
a:hover {
background-color: rgba(0, 0, 0, 0.05);
border-radius: 3px;
text-decoration: none;
}
}