4040}
4141
4242body .container-wrapper {
43- position : absolute;
44- width : 100% ;
45- display : flex;
46- }
47-
48- body # content {
43+ background-color : # FFF ;
44+ color : # 1D1F22 ;
45+ max-width : 1024px ;
46+ margin-top : 10px ;
47+ margin-left : auto;
48+ margin-right : auto;
49+ border-radius : 15px ;
4950 position : relative;
50-
51- line-height : 1.6 ; /* Inspired by Github's wiki style */
52- background-color : white;
53- padding-left : 15px ;
5451}
5552
5653.title {
@@ -101,6 +98,24 @@ a:hover code {
10198 max-width : 914px ;
10299}
103100
101+ .content {
102+ z-index : 1 ;
103+ position : relative;
104+ background-color : # FFF ;
105+ max-width : 914px ;
106+ line-height : 1.6 ; /* Inspired by Github's wiki style */
107+ padding-left : 15px ;
108+ }
109+
110+ .content-with-sidebar {
111+ z-index : 1 ;
112+ position : relative;
113+ background-color : # FFF ;
114+ max-width : 914px ;
115+ line-height : 1.6 ; /* Inspired by Github's wiki style */
116+ padding-left : 30px ;
117+ }
118+
104119.dropdown-menu {
105120 /* Remove the default 2px top margin which causes a small
106121 gap between the hover trigger area and the popup menu */
@@ -171,24 +186,104 @@ a.anchorjs-link:hover { text-decoration: none; }
171186 * The left navigation bar.
172187 */
173188.left-menu-wrapper {
174- position : absolute;
175- height : 100% ;
176-
177- width : 256px ;
178- margin-top : -20px ;
179- padding-top : 20px ;
189+ margin-left : 0px ;
190+ margin-right : 0px ;
180191 background-color : # F0F8FC ;
192+ border-top-width : 0px ;
193+ border-left-width : 0px ;
194+ border-bottom-width : 0px ;
195+ margin-top : 0px ;
196+ width : 210px ;
197+ float : left;
198+ position : absolute;
181199}
182200
183201.left-menu {
184- position : fixed;
185- max-width : 350px ;
186-
187- padding-right : 10px ;
188- width : 256px ;
202+ padding : 0px ;
203+ width : 199px ;
189204}
190205
191206.left-menu h3 {
192207 margin-left : 10px ;
193208 line-height : 30px ;
209+ }
210+
211+ /**
212+ * The collapsing button for the navigation bar.
213+ */
214+ .nav-trigger {
215+ position : fixed;
216+ clip : rect (0 , 0 , 0 , 0 );
217+ }
218+
219+ .nav-trigger + label : after {
220+ content : '»' ;
221+ }
222+
223+ label {
224+ z-index : 10 ;
225+ }
226+
227+ label [for = "nav-trigger" ] {
228+ position : fixed;
229+ margin-left : 0px ;
230+ padding-top : 100px ;
231+ padding-left : 5px ;
232+ width : 10px ;
233+ height : 80% ;
234+ cursor : pointer;
235+ background-size : contain;
236+ background-color : # D4F0FF ;
237+ }
238+
239+ label [for = "nav-trigger" ]: hover {
240+ background-color : # BEE9FF ;
241+ }
242+
243+ .nav-trigger : checked + label {
244+ margin-left : 200px ;
245+ }
246+
247+ .nav-trigger : checked + label : after {
248+ content : '«' ;
249+ }
250+
251+ .nav-trigger : checked ~ div .content-with-sidebar {
252+ margin-left : 200px ;
253+ }
254+
255+ .nav-trigger + label , div .content-with-sidebar {
256+ transition : left 0.4s ;
257+ }
258+
259+ /**
260+ * Rules to collapse the menu automatically when the screen becomes too thin.
261+ */
262+
263+ @media all and (max-width : 780px ) {
264+
265+ div .content-with-sidebar {
266+ margin-left : 200px ;
267+ }
268+ .nav-trigger + label : after {
269+ content : '«' ;
270+ }
271+ label [for = "nav-trigger" ] {
272+ margin-left : 200px ;
273+ }
274+
275+ .nav-trigger : checked + label {
276+ margin-left : 0px ;
277+ }
278+ .nav-trigger : checked + label : after {
279+ content : '»' ;
280+ }
281+ .nav-trigger : checked ~ div .content-with-sidebar {
282+ margin-left : 0px ;
283+ }
284+
285+ div .container-index {
286+ margin-left : -215px ;
287+ }
288+
194289}
0 commit comments