File tree 2 files changed +36
-2
lines changed
2 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 24
24
{%- block body -%}
25
25
< div class ="container package-page-container small-bottom-pad ">
26
26
< div class ="pure-g ">
27
- < div id ="side-menu " class ="pure-u-1 {% if file_content %}pure-u-sm-7-24 pure-u-md-5-24{% endif %} ">
27
+ < div id ="side-menu " class ="pure-u-1 {% if file_content %}pure-u-sm-7-24 pure-u-md-5-24 source-view {% endif %} ">
28
28
< div class ="pure-menu package-menu ">
29
29
< ul class ="pure-menu-list ">
30
30
{# If we are displaying a file, we also add a button to hide the file sidebar #}
Original file line number Diff line number Diff line change @@ -433,6 +433,8 @@ div.package-sheet-container {
433
433
}
434
434
}
435
435
436
+ $sidebar-side-padding : 10px ;
437
+
436
438
div .package-page-container {
437
439
padding-bottom : 50px ;
438
440
@@ -441,7 +443,7 @@ div.package-page-container {
441
443
}
442
444
443
445
div .package-menu {
444
- padding : 0 10 px ;
446
+ padding : 0 $sidebar-side-padding ;
445
447
446
448
li .pure-menu-heading {
447
449
font-size : 1.3em ;
@@ -816,6 +818,32 @@ ul.pure-menu-list {
816
818
}
817
819
}
818
820
821
+ #side-menu .source-view {
822
+ position : relative ;
823
+
824
+ .package-menu {
825
+ position : -webkit-sticky ;
826
+ position : sticky ;
827
+ top : $top-navbar-height ;
828
+ overflow : auto ;
829
+ max-height : calc (100vh - #{$top-navbar-height } );
830
+ height : calc (100% - #{$top-navbar-height } );
831
+
832
+ .pure-menu-list {
833
+ position : absolute ;
834
+ top : 0 ;
835
+ max-height : 100vh ;
836
+ height : 100% ;
837
+ width : calc (100% - #{$sidebar-side-padding } * 2 );
838
+ padding-top : 5px ;
839
+
840
+ .pure-menu-item {
841
+ height : initial ;
842
+ }
843
+ }
844
+ }
845
+ }
846
+
819
847
#side-menu .collapsed {
820
848
max-width : 46px ;
821
849
@@ -838,6 +866,12 @@ ul.pure-menu-list {
838
866
#source-code {
839
867
pre {
840
868
margin-top : 0 ;
869
+ margin-bottom : 0 ;
870
+ height : 100% ;
871
+
872
+ code {
873
+ height : 100% ;
874
+ }
841
875
}
842
876
843
877
& .expanded {
You can’t perform that action at this time.
0 commit comments