|
1 | | -// Sidebar left. |
| 1 | +// Sidebar left: wider default + resizable. |
2 | 2 | .td-sidebar { |
3 | 3 | padding-bottom: 20px; |
4 | 4 | padding-top: 1rem; |
5 | 5 | background-color: $td-sidebar-bg-color; |
6 | 6 |
|
7 | | - .td-sidebar-version { |
8 | | - padding-top: 0.5rem; |
9 | | - padding-bottom: 0.5rem; |
10 | | - border-bottom: 1px solid #ddd; |
| 7 | + @media (min-width: 768px) { |
| 8 | + min-width: 200px; |
| 9 | + width: var(--td-sidebar-width, 300px); |
| 10 | + max-width: 50vw; |
| 11 | + flex: 0 0 var(--td-sidebar-width, 300px) !important; |
| 12 | + position: relative; |
11 | 13 |
|
12 | | - .td-version-menu { |
13 | | - .nav-link { |
14 | | - color: $black; |
15 | | - padding: 0.25rem 0; |
16 | | - font-size: 1rem; |
17 | | - font-weight: 600; |
18 | | - } |
| 14 | + // Override Bootstrap column max-width constraints. |
| 15 | + &.col-md-3, |
| 16 | + &.col-xl-2 { |
| 17 | + max-width: none; |
| 18 | + } |
| 19 | + } |
| 20 | + |
| 21 | + // Drag handle for resizing. |
| 22 | + .td-sidebar-resize-handle { |
| 23 | + position: absolute; |
| 24 | + top: 0; |
| 25 | + right: -3px; |
| 26 | + width: 6px; |
| 27 | + height: 100%; |
| 28 | + cursor: col-resize; |
| 29 | + z-index: 100; |
| 30 | + background: transparent; |
| 31 | + transition: background 0.15s; |
| 32 | + |
| 33 | + &:hover, |
| 34 | + &.dragging { |
| 35 | + background: rgba($primary, 0.3); |
19 | 36 | } |
20 | 37 | } |
21 | 38 | .td-sidebar__inner { |
|
24 | 41 | } |
25 | 42 | } |
26 | 43 |
|
| 44 | + // Version selector: more prominent with top padding. |
| 45 | + .td-version-menu { |
| 46 | + padding-top: 0.75rem; |
| 47 | + padding-bottom: 0.5rem; |
| 48 | + padding-left: 1rem; |
| 49 | + |
| 50 | + .td-version-menu__title { |
| 51 | + font-weight: 700; |
| 52 | + font-size: 1.1rem; |
| 53 | + color: $black; |
| 54 | + padding: 0; |
| 55 | + } |
| 56 | + } |
| 57 | + |
27 | 58 | // Navigation in Left-sidebar. |
28 | 59 | .td-sidebar-nav { |
29 | 60 | @media (min-width: 768px) { |
30 | 61 | @supports ((position: -webkit-sticky) or (position: sticky)) { |
31 | | - // shadow overflow. |
32 | | - background: linear-gradient(#f4f4f4 33%, rgba(255, 255, 255, 0)), |
33 | | - linear-gradient(rgba(255, 255, 255, 0), #f4f4f4 66%) 0 100%, |
34 | | - radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), |
35 | | - radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 0 100%; |
36 | | - background-color: #f4f4f4; |
37 | | - background-repeat: no-repeat; |
38 | | - background-attachment: local, local, scroll, scroll; |
39 | | - background-size: 100% 57px, 100% 57px, 100% 19px, 100% 19px; |
40 | 62 | max-height: calc(100vh - 12.5rem); |
| 63 | + overflow-y: auto; |
41 | 64 | } |
42 | 65 | } |
43 | 66 | @media (min-width: 1024px) { |
44 | 67 | @supports ((position: -webkit-sticky) or (position: sticky)) { |
45 | 68 | max-height: calc(100vh - 14rem); |
46 | 69 | } |
47 | 70 | } |
48 | | - |
49 | | - > .td-sidebar-nav__section { |
50 | | - padding-left: 1.5rem; |
51 | | - |
52 | | - ul { |
53 | | - padding-left: 0.5rem !important; |
54 | | - } |
55 | | - } |
56 | | - .td-sidebar-nav__section-title { |
57 | | - margin-bottom: 5px; |
58 | | - > ul { |
59 | | - margin-top: 5px; |
60 | | - |
61 | | - .td-sidebar-nav__section-title.with-child { |
62 | | - > a { |
63 | | - position: relative; |
64 | | - display: flex; |
65 | | - justify-content: space-between; |
66 | | - padding-right: 20px; |
67 | | - &::after { |
68 | | - display: inline-flex; |
69 | | - content: '\f078'; |
70 | | - font-family: 'Font Awesome 6 Free'; |
71 | | - font-weight: 900; |
72 | | - } |
73 | | - } |
74 | | - &.active-path { |
75 | | - > a { |
76 | | - &::after { |
77 | | - transform: rotate(180deg); |
78 | | - } |
79 | | - } |
80 | | - } |
81 | | - ul.foldable { |
82 | | - margin-left: 10px; |
83 | | - } |
84 | | - } |
85 | | - } |
86 | | - // Same name but this is a child of the same. |
87 | | - .td-sidebar-nav__section-title { |
88 | | - margin-right: 15px; |
89 | | - @media (min-width: 768px) { |
90 | | - margin-right: 0; |
91 | | - } |
92 | | - } |
93 | | - .td-sidebar-link { |
94 | | - // Style. |
95 | | - font-weight: 700; |
96 | | - font-size: 16px; |
97 | | - line-height: 150%; |
98 | | - letter-spacing: 0.02em; |
99 | | - color: $black; |
100 | | - // Spacing. |
101 | | - display: flex; |
102 | | - padding-top: 8px; |
103 | | - padding-bottom: 8px; |
104 | | - border-radius: 5px; |
105 | | - border-left: 4px solid transparent; |
106 | | - filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 0)); |
107 | | - span { |
108 | | - padding-left: 10px; |
109 | | - padding-right: 20px; |
110 | | - } |
111 | | - &:hover { |
112 | | - color: $link-color; |
113 | | - } |
114 | | - &.active { |
115 | | - background-color: #eee; |
116 | | - filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 0.05)); |
117 | | - } |
118 | | - @media (min-width: 768px) { |
119 | | - &.active { |
120 | | - background-color: #f8f8f8; |
121 | | - } |
122 | | - } |
123 | | - |
124 | | - } |
125 | | - } |
126 | 71 | } |
127 | 72 | } |
0 commit comments