You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

394 lines
9.5 KiB

  1. /**
  2. * This file provides the design styles the navigational elements in the sidebar
  3. */
  4. #dokuwiki__aside {
  5. @icon-size: @font-size-big;
  6. @menu-margin: @icon-size + @margin-small * 2;
  7. @media @screen_md-lg {
  8. margin-left: -1.25rem;
  9. }
  10. @media @screen_max-md {
  11. display: none;
  12. }
  13. ul {
  14. padding-left: 0;
  15. }
  16. nav {
  17. &.nav-main {
  18. margin-bottom: @nav-margin;
  19. }
  20. > p {
  21. color: @ini_nav_menu_color;
  22. &.noissue {
  23. color: @ini_text_webframe;
  24. * {
  25. color: inherit;
  26. }
  27. }
  28. }
  29. ul,
  30. div.nav {
  31. margin-bottom: 0;
  32. }
  33. li {
  34. color: @ini_nav_menu_color;
  35. > div {
  36. color: @ini_text_webframe;
  37. }
  38. &.toggler {
  39. list-style: none;
  40. margin-left: 0;
  41. }
  42. }
  43. li:not([class]),
  44. .li {
  45. padding: .15em 0;
  46. /* + + + + + active + + + + + */
  47. span.curid {
  48. font-weight: bold;
  49. }
  50. }
  51. }
  52. a {
  53. &:link,
  54. &:visited {
  55. opacity: .9;
  56. color: @ini_nav_menu_color;
  57. }
  58. * {
  59. color: inherit;
  60. }
  61. }
  62. /* + + + the wrapper around the toggle to reserve space + + + */
  63. div.nav {
  64. min-height: @icon-size + @margin-small;
  65. border: 1px solid transparent;
  66. // the toggle element
  67. a {
  68. cursor: pointer;
  69. display: table;
  70. width: 100%;
  71. min-height: @icon-size + @margin-small;
  72. opacity: 1;
  73. border: 1px solid transparent;
  74. border-radius: @fix_border-radius;
  75. color: @ini_nav_menu_color;
  76. font-size: @font-size-head6;
  77. font-weight: normal;
  78. margin: -1px 0 @very-small-spacing;
  79. padding-bottom: .4rem;
  80. padding-top: .4rem;
  81. transition: @transition color, @transition background-color, @transition border-color;
  82. span {
  83. display: inline-block;
  84. vertical-align: middle;
  85. color: inherit;
  86. }
  87. &:hover,
  88. &:focus,
  89. &:active {
  90. position: relative; // always show label, even with collapsed sidebar
  91. width: 100%;
  92. background-color: @ini_nav_menu_hover_bg;
  93. border-color: @ini_nav_menu_hover_color;
  94. color: @ini_nav_menu_hover_color;
  95. text-decoration: none;
  96. span.ico {
  97. &:after {
  98. background-color: @ini_nav_menu_hover_color;
  99. }
  100. strong {
  101. border-color: inherit;
  102. }
  103. svg {
  104. path {
  105. fill: @ini_nav_menu_hover_color;
  106. }
  107. }
  108. }
  109. }
  110. /* + + + submenu entry is active + + + */
  111. &.is-active {
  112. font-weight: bold;
  113. }
  114. /* + + + toggle: open + + + */
  115. &.is-open {
  116. background-color: @ini_nav_menu_hover_color;
  117. border-color: @ini_nav_menu_hover_color;
  118. color: @ini_nav_menu_hover_bg;
  119. span.ico {
  120. &:after {
  121. background-color: @ini_nav_menu_hover_bg;
  122. }
  123. strong {
  124. border-color: @ini_nav_menu_hover_bg;
  125. }
  126. svg {
  127. path {
  128. fill: @ini_nav_menu_hover_bg;
  129. }
  130. }
  131. }
  132. &:hover,
  133. &:focus,
  134. &:active {
  135. background-color: @ini_nav_menu_hover_bg;
  136. border-color: @ini_nav_menu_hover_color;
  137. color: @ini_nav_menu_hover_color;
  138. span.ico {
  139. &:after {
  140. background-color: @ini_nav_menu_hover_color;
  141. }
  142. strong {
  143. border-color: inherit;
  144. }
  145. svg {
  146. path {
  147. fill: @ini_nav_menu_hover_color;
  148. }
  149. }
  150. }
  151. }
  152. }
  153. }
  154. span.ico {
  155. position: relative;
  156. display: table-cell;
  157. width: (@menu-margin - .1);
  158. min-width: (@menu-margin - .1);
  159. height: @icon-size;
  160. text-align: center;
  161. vertical-align: middle;
  162. color: inherit;
  163. &::after {
  164. @border-height: 1.5rem;
  165. content: '';
  166. position: absolute;
  167. right: 0;
  168. top: 50%;
  169. bottom: auto;
  170. height: @border-height;
  171. width: 1px;
  172. background-color: @ini_nav_menu_color;
  173. margin-top: -(@border-height / 2);
  174. // wordbreak too late in IE 10
  175. @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  176. top: 0;
  177. bottom: .5rem;
  178. height: 100%;
  179. margin: 0;
  180. }
  181. }
  182. // simple fake icon
  183. strong {
  184. display: inline-block;
  185. width: @icon-size * 0.98;
  186. height: @icon-size * 0.98;
  187. border: 2px solid fade(@ini_nav_menu_color, 80%);
  188. border-top-right-radius: 50%;
  189. border-bottom-left-radius: 50%;
  190. color: inherit;
  191. font-size: @icon-size * 0.5;
  192. line-height: @icon-size * 0.9;
  193. vertical-align: baseline;
  194. text-align: center;
  195. margin: @icon-size * 0.05;
  196. padding: 0 .05em .05em;
  197. }
  198. // real icon
  199. svg {
  200. width: @icon-size;
  201. height: @icon-size;
  202. path {
  203. fill: @ini_nav_menu_color;
  204. transition: @transition all;
  205. }
  206. }
  207. }
  208. span.lbl {
  209. display: table-cell;
  210. font-size: inherit;
  211. padding-left: .5rem;
  212. }
  213. }
  214. /* + + + + + the panel (hidden by default) + + + + + */
  215. div.nav-panel {
  216. display: none;
  217. margin-top: .5rem;
  218. margin-left: @margin-small;
  219. ul {
  220. margin-bottom: 1rem;
  221. ul {
  222. margin-bottom: 0;
  223. margin-left: 16px;
  224. }
  225. }
  226. ul.toollist li {
  227. margin-left: 0;
  228. }
  229. }
  230. }
  231. /* + + + + + + + + + + + + + + + + + + + + + + + + + + */
  232. /* min-width: 1440px */
  233. @media @screen_min-xlg {
  234. #dokuwiki__aside {
  235. nav {
  236. li:not([class]),
  237. .li {
  238. font-size: @font-size-head6;
  239. * {
  240. font-size: inherit;
  241. font-weight: inherit;
  242. }
  243. a {
  244. font-size: (@font-size-head6 - .05);
  245. }
  246. }
  247. }
  248. }
  249. }
  250. /* + + + + + + + + + + + + + + + + + + + + + + + + + + */
  251. /* max-width: 1440px */
  252. @media @screen_max-xlg {
  253. #dokuwiki__aside {
  254. div.nav {
  255. a {
  256. margin-left: 1px;
  257. }
  258. }
  259. }
  260. }
  261. /* + + + + + + + + + + + + + + + + + + + + + + + + + + */
  262. /* max-width: 1023px */
  263. @media @screen_max-md {
  264. #dokuwiki__aside {
  265. div.nav {
  266. a {
  267. margin-left: 0;
  268. }
  269. }
  270. }
  271. body.show-mobile-sidebar {
  272. #dokuwiki__aside {
  273. display: block !important;
  274. position: absolute;
  275. left: 1.25rem; // left margin of content container
  276. box-shadow: @box-shadow-right-bottom;
  277. min-width: 45%;
  278. max-width: 90%;
  279. height: auto;
  280. background: @ini_background_site;
  281. > nav {
  282. position: relative;
  283. &:first-child {
  284. margin-top: 1.2rem;
  285. }
  286. a {
  287. font-size: @font-size-small;
  288. }
  289. }
  290. a.nav {
  291. border-radius: 0;
  292. border-right-width: 0;
  293. border-left-width: 0;
  294. }
  295. div.nav-panel,
  296. a.nav {
  297. margin-top: 0;
  298. padding-right: .8em;
  299. }
  300. }
  301. }
  302. }
  303. /* + + + + + + + + + + + + + + + + + + + + + + + + + + */
  304. /* max-width: 768px */
  305. @media @screen_max-xs {
  306. body.show-mobile-sidebar {
  307. .page-wrapper > .tools {
  308. top: 2.5rem;
  309. }
  310. #dokuwiki__aside {
  311. left: 1.25rem;
  312. right: 1.25rem;
  313. width: auto;
  314. max-width: 100%;
  315. margin-top: -1rem;
  316. }
  317. }
  318. }
  319. /* + + + + + + + + + + + + + + + + + + + + + + + + + + */
  320. /* max-width: 480px */
  321. @media @screen_max-xxs {
  322. body.show-mobile-sidebar {
  323. #dokuwiki__aside {
  324. left: 4px;
  325. right: 4px;
  326. > nav {
  327. a {
  328. font-size: @font-size-default;
  329. }
  330. }
  331. }
  332. }
  333. }