Skip to content

Commit

Permalink
Merge pull request #122 from mrliptontea/issue-121/support-redmine_wi…
Browse files Browse the repository at this point in the history
…ki_page_tree-plugin

Add support for redmine_wiki_page_tree plugin
  • Loading branch information
Grzegorz Rajchman authored Jun 12, 2019
2 parents df3e0fb + a1d1883 commit b14206a
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 5 deletions.
110 changes: 106 additions & 4 deletions src/sass/components/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@

@if $sidebar-position == "right" {
margin-left: 3px;
} @else {
margin-right: 0;
}

li {
Expand All @@ -184,10 +186,6 @@
margin-left: $sidebar-padding-horizontal / 2 + 3px;
}
}

@if $sidebar-position == "left" {
margin-right: 0;
}
}
}
}
Expand All @@ -203,6 +201,110 @@
margin-left: 0;
}
}

// For plugin https://github.com/ledsun/redmine_wiki_page_tree
div.page-tree {
margin: 0;
padding: 0;

.page-tree__title {
margin-left: 0;
}

.page-tree__list {
.page-tree__list {
margin-left: $sidebar-padding-horizontal + 3px;
border-left: 2px solid $gray-400;

@if $sidebar-position == "right" {
margin-left: 3px;
} @else {
margin-right: 0;
}

.page-tree__list {
margin-left: $sidebar-padding-horizontal / 2 + 3px;
}

summary {
padding-left: $sidebar-padding-horizontal + 8px;

@if $sidebar-position == "right" {
margin-left: 0;
}

&::before {
left: 6px;
}
}
}

li {
> a:not(.icon-only) {
padding-right: $sidebar-padding-horizontal / 2;
padding-left: $sidebar-padding-horizontal / 2;

@if $sidebar-position == "right" {
margin-left: 0;
}

&:hover {
text-decoration: underline;
}
}
}
}

details {
summary {
display: block;
position: relative;
padding: 0 $sidebar-padding-horizontal;
padding-left: $sidebar-padding-horizontal * 1.5 + 8px;

@if $sidebar-position == "left" {
border-radius: $border-radius-large 0 0 $border-radius-large;
} @else {
margin-left: -($sidebar-padding-horizontal);
border-radius: 0 $border-radius-large $border-radius-large 0;
}

&::-webkit-details-marker {
display: none;
}

&::before {
content: "";
position: absolute;
top: ($sidebar-padding-vertical + 1px) + ($line-height-computed - 16px) / 2;
left: $sidebar-padding-horizontal / 2 + 6px;
width: 16px;
height: 16px;
background-image: inline-svg("chevron-right.svg", (path: (fill: $btn-default-icon-color)));
background-repeat: no-repeat;
}

&:hover {
background-color: $sidebar-link-hover-bg;
}

a {
display: inline-block;
padding-top: ($sidebar-padding-vertical + 1px);
padding-bottom: ($sidebar-padding-vertical + 1px);

&:hover {
color: $sidebar-link-hover-text;
text-decoration: underline;
}
}
}

&[open] > summary::before {
transform: rotate(90deg);
}
}
}
}

#footer {
Expand Down
2 changes: 1 addition & 1 deletion stylesheets/application.css

Large diffs are not rendered by default.

0 comments on commit b14206a

Please sign in to comment.