Merge branch 'sidebar' into live
* sidebar: fix problems with ini handling in svg dispatch added profile link to usertools in sidebar finally align the menu items correctly some more list adjustments for sidebar add level1 class to fake inpage lists adjusted language some style adjustments for the sidebar complete refactor of the sidebar behaviour javascript RES-754 style the fake icon use jQuery slector to define the elements directly embed SVGs for better styling very simple styling of the new sidebar behaviour. New sidebar JavaScript logic allow style.ini replacements in SVG dispatcher SVG Dispatch: allow for referencing material design icons add caching and fix <g> wrapping fixed content type header fixed auth check feat: add background-colors to SVG-dispatcher first go at a dispatcher to dynamically recolor SVGs
This commit is contained in:
commit
248d08817b
20 changed files with 729 additions and 897 deletions
19
css/area_main-sidebar-content.less
Normal file
19
css/area_main-sidebar-content.less
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* This file provides the design styles the non-navigational elements in the sidebar
|
||||
*/
|
||||
#dokuwiki__aside {
|
||||
|
||||
// do not indent the first level of lists
|
||||
// and use less indention in deeper levels
|
||||
ul, ol {
|
||||
padding-left: 0;
|
||||
|
||||
ul, ol {
|
||||
padding-left: @margin-small;
|
||||
|
||||
li {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
152
css/area_main-sidebar-nav.less
Executable file
152
css/area_main-sidebar-nav.less
Executable file
|
@ -0,0 +1,152 @@
|
|||
/**
|
||||
* This file provides the design styles the navigational elements in the sidebar
|
||||
*
|
||||
* @author Jana Deutschlaender <deutschlaender@cosmocode.de>
|
||||
* @author Andreas Gohr <gohr@cosmocode.de>
|
||||
*/
|
||||
#dokuwiki__aside {
|
||||
@icon-size: @font-size-big;
|
||||
@menu-margin: @icon-size + @margin-small*2; // FIXME this is still wrong
|
||||
|
||||
margin-left: @menu-margin; // moves *all* sidebar content to the right
|
||||
|
||||
// the toggle element
|
||||
h6 {
|
||||
cursor: pointer;
|
||||
font-weight: normal;
|
||||
margin-left: (@menu-margin * -1); // moves the toggles back to the left
|
||||
color: @color-nav;
|
||||
border: 1px solid transparent;
|
||||
border-radius: @fix_border-radius;
|
||||
transition: @transition color, @transition background-color, @transition border-color;
|
||||
|
||||
height: @icon-size + @margin-small;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
span.lbl {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
span.ico {
|
||||
width: @menu-margin;
|
||||
height: @icon-size;
|
||||
flex-grow: 0;
|
||||
border-right: 1px solid @color-border;
|
||||
text-align: center;
|
||||
margin-right: @margin-small;
|
||||
color: @color-nav;
|
||||
|
||||
// simple fake icon
|
||||
strong {
|
||||
display: inline-block;
|
||||
font-size: @icon-size * 0.5;
|
||||
width: @icon-size * 0.9;
|
||||
height: @icon-size * 0.9;
|
||||
line-height: @icon-size * 0.9;
|
||||
margin: @icon-size * 0.05;
|
||||
vertical-align: baseline;
|
||||
text-align: center;
|
||||
color: @color-nav;
|
||||
border: 2px solid @color-nav;
|
||||
border-top-right-radius: 50%;
|
||||
border-bottom-left-radius: 50%;
|
||||
|
||||
}
|
||||
|
||||
// real icon
|
||||
svg {
|
||||
width: @icon-size;
|
||||
height: @icon-size;
|
||||
path {
|
||||
fill: @color-nav;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
background-color: @button_color;
|
||||
border-color: @button_background;
|
||||
color: @button_background;
|
||||
text-decoration: none;
|
||||
|
||||
span.ico strong {
|
||||
color: @button_background;
|
||||
border-color: @button_background;
|
||||
}
|
||||
|
||||
span.ico svg path {
|
||||
fill: @button_background;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the panel (hidden by default)
|
||||
div.nav-panel {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME check if the stuff below is still relevant
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* min-width: 1440px */
|
||||
|
||||
@media @screen_min-xlg {
|
||||
#dokuwiki__aside.main-sidebar {
|
||||
.nav-main {
|
||||
.li {
|
||||
font-size: @font-size-default;
|
||||
padding: .1em 0;
|
||||
|
||||
* {
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
> ul > li > .li {
|
||||
font-size: @font-size-default;
|
||||
|
||||
* {
|
||||
font-size: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* max-width: 1199px */
|
||||
|
||||
@media @screen_max-xlg {
|
||||
#dokuwiki__aside.main-sidebar {
|
||||
.nav-main {
|
||||
.li {
|
||||
font-size: @font-size-default;
|
||||
padding: .15em 0 .15em .25rem;
|
||||
|
||||
* {
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
> ul > li > .li {
|
||||
font-size: @font-size-default;
|
||||
|
||||
> * {
|
||||
font-size: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,288 +0,0 @@
|
|||
/**
|
||||
* This file provides the design styles for the sidebar (navmain).
|
||||
*
|
||||
* @author Jana Deutschlaender <deutschlaender@cosmocode.de>
|
||||
*/
|
||||
|
||||
|
||||
#dokuwiki__aside.main-sidebar {
|
||||
counter-reset: nav-counter;
|
||||
|
||||
|
||||
/* + + + + + nav main + + + + + */
|
||||
.nav-main {
|
||||
> ul {
|
||||
@icon-size: @margin-default;
|
||||
|
||||
margin: 0 0 @margin-default;
|
||||
padding: 0;
|
||||
|
||||
ul {
|
||||
margin-left: (@icon-size + .5);
|
||||
}
|
||||
|
||||
li {
|
||||
list-style-type: none;
|
||||
color: @color-nav;
|
||||
|
||||
&:first-of-type {
|
||||
padding-top: .3em;
|
||||
}
|
||||
}
|
||||
|
||||
.li {
|
||||
a {
|
||||
display: list-item;
|
||||
list-style-type: square;
|
||||
color: @color-nav;
|
||||
font-weight: normal;
|
||||
padding-top: .1em;
|
||||
padding-bottom: .1em;
|
||||
transition: @transition color;
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
color: @button_background;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* + + + first level + + + */
|
||||
> li {
|
||||
counter-increment: nav-counter;
|
||||
position: relative;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0 0 .3em;
|
||||
|
||||
&:not(:last-of-type)::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-color: @color-border;
|
||||
}
|
||||
|
||||
> .li {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-top: -1px;
|
||||
padding: .5em 0 .5em (@margin-big + 1.1);
|
||||
|
||||
&[class="li"] {
|
||||
border-bottom: solid 1px @color-border;
|
||||
}
|
||||
|
||||
&::before {
|
||||
.display-flex();
|
||||
.flex-direction();
|
||||
.justify-content();
|
||||
|
||||
content: counter(nav-counter);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: @margin-big;
|
||||
overflow: hidden;
|
||||
color: @color-nav;
|
||||
text-align: center;
|
||||
margin-top: auto;
|
||||
margin-bottom: auto;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 15%;
|
||||
bottom: 15%;
|
||||
width: 1px;
|
||||
left: (@margin-big + .5);
|
||||
background-color: @color-border;
|
||||
}
|
||||
|
||||
&.opened,
|
||||
&.closed {
|
||||
padding: 0;
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a {
|
||||
position: relative;
|
||||
display: block;
|
||||
border: 1px solid transparent;
|
||||
border-radius: @fix_border-radius;
|
||||
margin-bottom: -.3rem;
|
||||
padding: .7em 0 .7em (@margin-big + 1);
|
||||
transition: @transition color, @transition background-color, @transition border-color;
|
||||
|
||||
&::before {
|
||||
.display-flex();
|
||||
.flex-direction();
|
||||
.justify-content();
|
||||
|
||||
content: counter(nav-counter);
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
bottom: 1px;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: @margin-big;
|
||||
overflow: hidden;
|
||||
color: @color-nav;
|
||||
text-align: center;
|
||||
margin-top: auto;
|
||||
margin-bottom: auto;
|
||||
transition: @transition color, @transition background-color;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 15%;
|
||||
bottom: 15%;
|
||||
width: 1px;
|
||||
left: @margin-big;
|
||||
background-color: @color-border;
|
||||
transition: @transition background-color;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
background-color: @button_color;
|
||||
border-color: @button_background;
|
||||
color: @button_background;
|
||||
text-decoration: none;
|
||||
|
||||
&::before {
|
||||
color: @button_background;
|
||||
}
|
||||
|
||||
&::after {
|
||||
background-color: @button_background;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.opened {
|
||||
a {
|
||||
background-color: @button_background;
|
||||
color: @button_color;
|
||||
|
||||
&::before {
|
||||
background-color: @color-site-bg;
|
||||
border-radius: @fix_border-radius 0 0 @fix_border-radius;
|
||||
}
|
||||
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
background-color: @button_color;
|
||||
border-color: @button_background;
|
||||
color: @button_background;
|
||||
text-decoration: none;
|
||||
|
||||
&::before {
|
||||
background-color: @button_color;
|
||||
color: @button_background;
|
||||
}
|
||||
|
||||
&::after {
|
||||
display: block;
|
||||
background-color: @button_background;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+ ul {
|
||||
margin-top: .5em;
|
||||
margin-bottom: .25em;
|
||||
}
|
||||
}
|
||||
|
||||
+ ul {
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&.closed + ul {
|
||||
height: 0;
|
||||
li a{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* min-width: 1440px */
|
||||
|
||||
@media @screen_min-xlg {
|
||||
#dokuwiki__aside.main-sidebar {
|
||||
.nav-main {
|
||||
.li {
|
||||
font-size: @font-size-default;
|
||||
padding: .1em 0;
|
||||
|
||||
* {
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
> ul > li > .li {
|
||||
font-size: @font-size-default;
|
||||
|
||||
* {
|
||||
font-size: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* max-width: 1199px */
|
||||
|
||||
@media @screen_max-xlg {
|
||||
#dokuwiki__aside.main-sidebar {
|
||||
.nav-main {
|
||||
.li {
|
||||
font-size: @font-size-default;
|
||||
padding: .15em 0 .15em .25rem;
|
||||
|
||||
* {
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
> ul > li > .li {
|
||||
font-size: @font-size-default;
|
||||
|
||||
> * {
|
||||
font-size: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,342 +0,0 @@
|
|||
/**
|
||||
* This file provides the design styles for the sitetools (nav).
|
||||
*
|
||||
* @author Jana Deutschlaender <deutschlaender@cosmocode.de>
|
||||
*/
|
||||
|
||||
|
||||
.side-tools.main-sidebar {
|
||||
@icon-size: @margin-default;
|
||||
|
||||
counter-increment: bar-counter;
|
||||
|
||||
ul,
|
||||
.trace {
|
||||
padding-left: (@margin-big + .5);
|
||||
}
|
||||
|
||||
ul {
|
||||
border-bottom: 1px solid @color-border;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style-type: none;
|
||||
|
||||
a {
|
||||
display: list-item;
|
||||
list-style-type: square;
|
||||
color: @color-nav;
|
||||
padding-top: .1em;
|
||||
padding-bottom: .1em;
|
||||
transition: @transition color;
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
color: @button_background;
|
||||
}
|
||||
}
|
||||
|
||||
&:first-of-type {
|
||||
padding-top: .3em;
|
||||
}
|
||||
}
|
||||
|
||||
> nav {
|
||||
> ul {
|
||||
margin: 0;
|
||||
padding: 0 0 0 (@margin-big + .5);
|
||||
|
||||
li {
|
||||
list-style-type: none;
|
||||
color: @color-nav;
|
||||
|
||||
&:first-of-type {
|
||||
padding-top: .3em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* + + + + + headlines for linklists + + + + + */
|
||||
h6 {
|
||||
position: relative;
|
||||
width: auto;
|
||||
height: auto;
|
||||
color: @color-nav;
|
||||
font-weight: normal;
|
||||
padding: .7em 0 .7em (@margin-big + 1.1);
|
||||
|
||||
&[class="sr-only"] {
|
||||
border-bottom: solid 1px @color-border;
|
||||
}
|
||||
|
||||
* {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
|
||||
/* + + + icon + + + */
|
||||
&::before {
|
||||
.display-flex();
|
||||
.flex-direction();
|
||||
.justify-content();
|
||||
|
||||
content: counter(bar-counter, lower-alpha);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: @margin-big;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
margin-top: auto;
|
||||
margin-bottom: auto;
|
||||
}
|
||||
|
||||
|
||||
/* + + + line bottom + + + */
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 15%;
|
||||
bottom: 15%;
|
||||
width: 1px;
|
||||
left: (@margin-big + .6);
|
||||
background-color: @color-border;
|
||||
transition: @transition background-color;
|
||||
}
|
||||
|
||||
+ ul,
|
||||
+ div {
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
/* + + + toggle + + + */
|
||||
&.opened,
|
||||
&.closed {
|
||||
padding: 0;
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a {
|
||||
position: relative;
|
||||
display: block;
|
||||
border: 1px solid transparent;
|
||||
border-radius: @fix_border-radius;
|
||||
padding: .6em 0 .6em (@margin-big + 1);
|
||||
transition: @transition color, @transition background-color, @transition border-color;
|
||||
|
||||
&::before {
|
||||
.display-flex();
|
||||
.flex-direction();
|
||||
.justify-content();
|
||||
|
||||
content: counter(bar-counter, lower-alpha);
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
bottom: 1px;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: @margin-big;
|
||||
overflow: hidden;
|
||||
color: @color-nav;
|
||||
text-align: center;
|
||||
margin-top: auto;
|
||||
margin-bottom: auto;
|
||||
transition: @transition color;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 15%;
|
||||
bottom: 15%;
|
||||
width: 1px;
|
||||
left: @margin-big;
|
||||
background-color: @color-border;
|
||||
transition: @transition background-color;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
background-color: @button_color;
|
||||
border-color: @button_background;
|
||||
color: @button_background;
|
||||
text-decoration: none;
|
||||
|
||||
&::before {
|
||||
color: @button_background;
|
||||
}
|
||||
|
||||
&::after {
|
||||
background-color: @button_background;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.opened {
|
||||
a {
|
||||
background-color: @button_background;
|
||||
color: @button_color;
|
||||
|
||||
&::before {
|
||||
background-color: @color-site-bg;
|
||||
border-radius: @fix_border-radius 0 0 @fix_border-radius;
|
||||
}
|
||||
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
background-color: @button_color;
|
||||
border-color: @button_background;
|
||||
color: @button_background;
|
||||
text-decoration: none;
|
||||
|
||||
&::before {
|
||||
background-color: @button_color;
|
||||
color: @button_background;
|
||||
}
|
||||
|
||||
&::after {
|
||||
display: block;
|
||||
background-color: @button_background;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+ ul,
|
||||
+ div {
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
+ ul {
|
||||
margin-top: .5em;
|
||||
padding-bottom: .4rem;
|
||||
}
|
||||
}
|
||||
|
||||
&.closed {
|
||||
+ ul,
|
||||
+ div {
|
||||
height: 0;
|
||||
a{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* + + + + + f.i. trace + + + + + */
|
||||
p {
|
||||
max-height: 6rem;
|
||||
overflow-y: auto;
|
||||
background-color: @color-content-bg;
|
||||
border: 1px solid @button_background;
|
||||
border-radius: @fix_border-radius;
|
||||
font-size: @font-size-small;
|
||||
margin-top: .1rem;
|
||||
padding: .3rem .6em;
|
||||
|
||||
* {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.bchead {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.bcsep {
|
||||
float: left;
|
||||
clear: both;
|
||||
display: block;
|
||||
width: 3%;
|
||||
vertical-align: top;
|
||||
color: @color-link;
|
||||
padding-top: .3em;
|
||||
}
|
||||
|
||||
.breadcrumbs {
|
||||
border: 0 none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
bdi {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 94%;
|
||||
line-height: 125%;
|
||||
padding: .1rem 0;
|
||||
margin-left: 2%;
|
||||
}
|
||||
|
||||
a {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* min-width: 1440px */
|
||||
|
||||
@media @screen_min-xlg {
|
||||
.side-tools.main-sidebar {
|
||||
h6 {
|
||||
font-size: @font-size-default;
|
||||
|
||||
* {
|
||||
font-size: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
font-size: @font-size-small;
|
||||
padding: .1em 0 .1em .1rem;
|
||||
|
||||
> * {
|
||||
font-size: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* max-width: 1439px */
|
||||
|
||||
@media @screen_max-xlg {
|
||||
.side-tools.main-sidebar {
|
||||
h6 {
|
||||
font-size: @font-size-default;
|
||||
}
|
||||
|
||||
li {
|
||||
font-size: @font-size-small;
|
||||
padding: .15em 0 .15em .23rem;
|
||||
|
||||
> * {
|
||||
font-size: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: @font-size-small;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue