this.chapters = chapters;
this.style = 'classic';
this.cascade = this.fluidbook.settings.chaptersCascade;
+ this.indent = !this.cascade && this.fluidbook.settings.chaptersIndent;
this.cascadeEventsInited = false;
if (this.fluidbook.settings.mobileChaptersStyle) {
this.style = this.fluidbook.settings.mobileChaptersStyle;
// Columns setup
var nbItems = 0;
- var columns = Math.max(1,parseInt(this.fluidbook.settings.chaptersColumns));
+ var columns = Math.max(1, parseInt(this.fluidbook.settings.chaptersColumns));
$.each(this.chapters, function (k, v) {
if (v.label === '--' || v.label === '++') {
}
var $this = this;
- this.html[sub] = '<ul class="chapters">';
+ var classes = ['chapters'];
+ if (this.indent) {
+ classes.push('indent');
+ }
+ this.html[sub] = '<ul class="' + classes.join(' ') + '">';
$.each(base, function (k, v) {
if (!forgetCut) {
forgetCut = v.label.indexOf('++') === 0;
href = this.cascade ? 'href="#"' : "nohref";
}
if (this.style == 'classic') {
- res += '<li data-level="' + level + '" data-page="' + p + '"><a ' + href + ' class="level clickonly ' + level + '">';
+ res += '<li data-level="' + level + '" data-page="' + p + '"><a ' + href + ' class="level' + level + ' clickonly">';
} else if (this.style == 'ina') {
- res += '<li style="background-color:#' + color + ';" data-level="' + level + '" data-page="' + p + '"><a ' + href + ' class="nodark level clickonly ' + level + '">';
+ res += '<li style="background-color:#' + color + ';" data-level="' + level + '" data-page="' + p + '"><a ' + href + ' class="nodark level' + level + ' clickonly">';
}
res += '<span>' + chapter.label + '</span>';
if (href != 'nohref') {
width: unit((100/@menu-chapters-columns-count), %);
}
+ &.indent {
+ a {
+ &.level-1 {
+ font-family: @font;
+ font-weight: 700;
+ text-align: left;
+
+ .right {
+ display: none;
+ }
+ }
+
+ &.level0 {
+ font-family: @font;
+ font-weight: 400;
+
+ .right .puce {
+ margin: unit(2*@scale, px) 0 0 0;
+ }
+
+ }
+
+ &.level1 {
+ padding-left: unit(50*@scale, px);
+
+ .right {
+ top: unit(6*@scale, px);
+ }
+
+ .rtl & {
+ padding-left: 0;
+ padding-right: unit(50*@scale, px);
+ }
+
+ }
+
+ &.level2 {
+ padding-left: unit(80*@scale, px);
+
+ .rtl & {
+ padding-left: 0;
+ padding-right: unit(80*@scale, px);
+ }
+
+ .right {
+ top: unit(6*@scale, px);
+ }
+
+ .right .puce {
+ margin: unit(-2*@scale, px) 0 0 0;
+ }
+ }
+
+ .level3 {
+ padding-left: unit(110*@scale, px);
+
+ .right {
+ top: unit(6*@scale, px);
+ }
+
+ .rtl & {
+ padding-left: 0;
+ padding-right: unit(110*@scale, px);
+ }
+ }
+ }
+ }
+
+
&.onecolumn {
.column {
width: 100%;
text-align: right;
}
- &.level-1 {
- font-family: @font;
- font-weight: 700;
- text-align: left;
-
- .right {
- display: none;
- }
- }
-
- &.level0 {
- font-family: @font;
- font-weight: 400;
-
- .right .puce {
- margin: unit(2*@scale, px) 0 0 0;
- }
-
- }
-
- &.level1 {
- padding-left: unit(50*@scale, px);
-
- .right {
- top: unit(6*@scale, px);
- }
-
- .rtl & {
- padding-left: 0;
- padding-right: unit(50*@scale, px);
- }
-
- }
-
- &.level2 {
- padding-left: unit(80*@scale, px);
-
- .rtl & {
- padding-left: 0;
- padding-right: unit(80*@scale, px);
- }
-
- .right {
- top: unit(6*@scale, px);
- }
-
- .right .puce {
- margin: unit(-2*@scale, px) 0 0 0;
- }
- }
-
- .level3 {
- padding-left: unit(110*@scale, px);
-
- .right {
- top: unit(6*@scale, px);
- }
-
- .rtl & {
- padding-left: 0;
- padding-right: unit(110*@scale, px);
- }
- }
> nav {
display: none;