mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Reviewed and refactored next/previous navigation button implementation
- Updated styling to include item name. - Extracted used text to translations. - Updated the design to better suit the surrounding blocks. - Removed newly added model/repo methods. - Moved core logic out of controller and instead into a "NextPreviousContentLocator" helper with re-uses the output from the book-tree generation. - Also added the system to chapters. For #2511
This commit is contained in:
@ -190,7 +190,7 @@
|
||||
padding: $-m $-xxl;
|
||||
margin-inline-start: auto;
|
||||
margin-inline-end: auto;
|
||||
margin-bottom: $-xl;
|
||||
margin-bottom: $-l;
|
||||
overflow: initial;
|
||||
min-height: 60vh;
|
||||
&.auto-height {
|
||||
@ -216,6 +216,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
.outline-hover {
|
||||
border: 1px solid transparent !important;
|
||||
&:hover {
|
||||
border: 1px solid rgba(0, 0, 0, 0.1) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.fade-in-when-active {
|
||||
opacity: 0.6;
|
||||
transition: opacity ease-in-out 120ms;
|
||||
&:hover, &:focus-within {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tags
|
||||
*/
|
||||
|
@ -62,9 +62,6 @@
|
||||
}
|
||||
|
||||
@include smaller-than($m) {
|
||||
.grid.third.prev-next:not(.no-break) {
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
}
|
||||
.grid.third:not(.no-break) {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
@ -84,24 +81,12 @@
|
||||
.grid.right-focus.reverse-collapse > *:nth-child(1) {
|
||||
order: 1;
|
||||
}
|
||||
.grid.third:not(.no-break) .text-m-left {
|
||||
margin-left: 20%;
|
||||
}
|
||||
.grid.third:not(.no-break) .text-m-right {
|
||||
margin-left: 45%;
|
||||
}
|
||||
}
|
||||
|
||||
@include smaller-than($s) {
|
||||
.grid.third:not(.no-break) {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.grid.third:not(.no-break) .text-m-left {
|
||||
margin-left: 18%;
|
||||
}
|
||||
.grid.third:not(.no-break) .text-m-right {
|
||||
margin-left: 20%;
|
||||
}
|
||||
}
|
||||
|
||||
@include smaller-than($xs) {
|
||||
@ -227,6 +212,13 @@ body.flexbox {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Border radiuses
|
||||
*/
|
||||
.rounded {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inline content columns
|
||||
*/
|
||||
@ -381,8 +373,4 @@ body.flexbox {
|
||||
margin-inline-start: 0;
|
||||
margin-inline-end: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.prev-next-btn {
|
||||
height: 50px;
|
||||
}
|
||||
}
|
@ -441,12 +441,8 @@ ul.pagination {
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 4px;
|
||||
}
|
||||
&.outline-hover {
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
&.outline-hover:hover {
|
||||
background-color: transparent;
|
||||
border-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
&:focus {
|
||||
@include lightDark(background-color, #eee, #222);
|
||||
|
@ -112,10 +112,11 @@ a {
|
||||
}
|
||||
}
|
||||
|
||||
a.disabled {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
opacity: 0.6;
|
||||
a.no-link-style {
|
||||
color: inherit;
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.blended-links a {
|
||||
@ -141,6 +142,9 @@ hr {
|
||||
&.faded {
|
||||
background-image: linear-gradient(to right, #FFF, #e3e0e0 20%, #e3e0e0 80%, #FFF);
|
||||
}
|
||||
&.darker {
|
||||
@include lightDark(background, #DDD, #666);
|
||||
}
|
||||
&.margin-top, &.even {
|
||||
margin-top: $-l;
|
||||
}
|
||||
|
Reference in New Issue
Block a user