File tree Expand file tree Collapse file tree 13 files changed +142
-68
lines changed Expand file tree Collapse file tree 13 files changed +142
-68
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ We prefer Kdocs only for documenting data types or type classes. Only use tutori
11
11
12
12
### 1. Add a menu entry to your docs
13
13
14
- Go to ` modules/docs/arrow-docs/docs/_data/menu .yml ` and add a menu entry in the proper section, as in:
14
+ Go to ` modules/docs/arrow-docs/docs/_data/sidebar .yml ` and add a menu entry in the proper section, as in:
15
15
16
16
```
17
17
- title: Applicative
Original file line number Diff line number Diff line change 1
1
nav :
2
2
- title : Documentation
3
3
url : /docs
4
+ icon : " fa-book"
4
5
5
6
- title : Blog
6
7
url : /blog
8
+ icon : " fa-rss"
7
9
8
10
- title : Github
9
11
url : https://github.com/arrow-kt/arrow
12
+ icon : " fa-github"
10
13
11
14
- title : License
12
15
url : https://github.com/arrow-kt/arrow#license
16
+ icon : " fa-creative-commons"
13
17
14
18
tab :
15
19
- title : All
Original file line number Diff line number Diff line change 1
1
< div id ="doc-wrapper ">
2
2
< div class ="doc-header ">
3
+ < button type ="button " id ="main-toggle " class ="sidebar-toggle ">
4
+ < i class ="fa fa-lg fa-bars menu-icon "> </ i >
5
+ </ button >
3
6
< div class ="search-wrapper ">
4
7
< input id ="docsearch " class ="search " placeholder ="Search documentation... " type ="search ">
5
8
</ div >
Original file line number Diff line number Diff line change 7
7
< script >
8
8
hljs . initHighlighting ( ) ;
9
9
</ script >
10
- <!-- Touch gesture support -->
11
- < script src ="{{ '/js/hammer.min.js' | relative_url }} "> </ script >
12
10
<!-- Docsearch -->
13
11
< script type ="text/javascript " src ="{{ '/js/docsearch.min.js' | relative_url }} "> </ script >
14
12
<!-- Custom scripts for this template -->
Original file line number Diff line number Diff line change 5
5
< ul class ="navigation-menu ">
6
6
{% for item in site.data.menu.nav %}
7
7
< li class ="navigation-menu-item {% if item.url == category.url %}active {% endif %} ">
8
- < a href ="{{ item.url }} " alt ="{{ item.title }} "> {{ item.title }}</ a >
8
+ < a href ="{{ item.url }} " title ="{{ item.title }} " alt ="{{ item.title }} ">
9
+ {% if item.icon != "" %}
10
+ < i class ="nav-item-icon fa fa-lg {{ item.icon }} " aria-hidden ="true "> </ i >
11
+ < span class ="nav-item-text "> {{ item.title }}</ span >
12
+ {% else %}
13
+ < span > {{ item.title }}</ span >
14
+ {% endif %}
15
+ </ a >
9
16
</ li >
10
17
{% endfor %}
11
18
</ ul >
Original file line number Diff line number Diff line change 4
4
< img src ="/img/arrow-brand-sidebar.svg " alt ="">
5
5
< span > Λrrow</ span >
6
6
</ a >
7
- < a href =" javascript:void(0) " id ="main-toggle " class ="sidebar-toggle ">
8
- < i class ="fa fa-bars "> </ i >
9
- </ a >
7
+ < button type =" button " id ="main-toggle " class ="sidebar-toggle ">
8
+ < span class ="close "> </ span >
9
+ </ button >
10
10
</ div >
11
11
12
12
< ul class ="sidebar-nav ">
Original file line number Diff line number Diff line change @@ -19,6 +19,15 @@ p, ul {
19
19
font-size : 0.8rem !important ;
20
20
@include border-radius (3px );
21
21
z-index : 0 ;
22
+
23
+ .CodeMirror-lines {
24
+ margin : 0 ;
25
+ padding : 12px 0 10px ;
26
+ }
27
+
28
+ .CodeMirror-line {
29
+ line-height : 1.5 ;
30
+ }
22
31
}
23
32
24
33
.hljs {
Original file line number Diff line number Diff line change 6
6
@include justify-content (space-between );
7
7
@include align-items (center );
8
8
height : ($base-point-grid * 11 );
9
- padding : 0 ($base-point-grid * 4 );
9
+ padding : 0 ($base-point-grid * 4 ) 0 ( $base-point-grid * 1 ) ;
10
10
background : $white ;
11
11
12
12
.search-wrapper {
Original file line number Diff line number Diff line change 16
16
font-weight : $font-medium ;
17
17
text-transform : uppercase ;
18
18
letter-spacing : 4px ;
19
- @include bp (medium ) {
20
- font-size : 0.875 rem ;
19
+ @include bp (small ) {
20
+ letter-spacing : 2 px ;
21
21
}
22
22
}
23
23
.navigation-menu {
26
26
text-transform : uppercase ;
27
27
font-size : 0.875rem ;
28
28
29
- margin-right : ($base-point-grid * 4 );
30
-
31
29
@include bp (medium ) {
32
- & :last-child {
33
- margin-right : ($base-point-grid * 2 );
34
- }
35
-
36
30
text-transform : none ;
37
31
}
38
32
39
33
& .active {
40
34
border-bottom : 2px solid $brand-quaternary ;
41
35
}
36
+
37
+ & + .navigation-menu-item {
38
+ margin-left : ($base-point-grid * 4 );
39
+ @include bp (small ) {
40
+ margin-left : ($base-point-grid * 3.2 );
41
+ }
42
+ }
42
43
}
43
44
}
44
45
50
51
}
51
52
}
52
53
54
+ .nav-item-text {
55
+ @include bp (small ) {
56
+ display : none ;
57
+ }
58
+ }
59
+
60
+ .nav-item-icon {
61
+ display : none ;
62
+
63
+ @include bp (small ) {
64
+ display : inline-block ;
65
+ }
66
+ }
67
+
53
68
& .navigation-scroll {
54
69
background : darken ($brand-primary , 4% );
55
70
padding : ($base-point-grid * 2 ) ($base-point-grid * 4 );
56
71
}
57
- }
72
+ }
Original file line number Diff line number Diff line change 6
6
padding : 0 ($base-point-grid * 3 );
7
7
background : rgba ($brand-tertiary , 0.4 );
8
8
@include flexbox ;
9
- @include justify-content (flex-start );
9
+ @include justify-content (space-between );
10
10
@include align-items (center );
11
11
font-family : $brand-font-family ;
12
12
font-size : 1.063rem ;
13
13
font-weight : $font-medium ;
14
14
text-transform : uppercase ;
15
15
letter-spacing : 4px ;
16
16
color : $white ;
17
-
18
17
img {
19
18
margin-right : ($base-point-grid * 2 );
20
19
}
33
32
display : flex ;
34
33
}
35
34
}
35
+
36
+ .close {
37
+ height : 28px ;
38
+ position : absolute ;
39
+ left : 0 ;
40
+ top : 0 ;
41
+ width : 28px ;
42
+
43
+ & :before , & :after {
44
+ background-color : #fff ;
45
+ content : ' ' ;
46
+ height : 100% ;
47
+ left : 82% ;
48
+ position : absolute ;
49
+ top : 34% ;
50
+ width : 2px ;
51
+ }
52
+
53
+ & :before {
54
+ transform : rotate (45deg );
55
+ }
56
+
57
+ & :after {
58
+ transform : rotate (-45deg );
59
+ }
60
+ }
61
+
62
+
63
+
64
+
36
65
}
Original file line number Diff line number Diff line change 3
3
// -----------------------------------------------
4
4
5
5
#wrapper {
6
- padding-left : 50px ;
7
- transition : all 0.5s ease ;
6
+ padding-left : 250px ;
7
+ transition : padding 0.4s ease-in-out ;
8
+ & .toggled {
9
+ padding-left : 0 ;
10
+ }
8
11
}
9
12
10
13
#sidebar-wrapper {
11
- z-index : 1 ;
12
- position : fixed ;
13
- left : -200px ;
14
- width : 250px ;
14
+ background : $brand-primary ;
15
+ left : 0 ;
15
16
height : 100% ;
16
17
overflow-y : auto ;
17
- background : $brand-primary ;
18
- transition : all 0.5s ease ;
18
+ position : fixed ;
19
+ transition : left 0.4s ease-in-out ;
20
+ width : 250px ;
21
+ z-index : 11 ;
22
+
23
+ .sidebar-toggle {
24
+ display : none ;
25
+ }
19
26
}
20
27
21
28
#wrapper .toggled {
22
29
#sidebar-wrapper {
23
30
left : -250px ;
24
- margin-left : 250px ;
25
31
}
26
32
}
27
33
28
- #doc-wrapper {
29
- width : 100% ;
30
- }
34
+ .sidebar-toggle {
35
+ background : none ;
36
+ border : none ;
37
+ color : $brand-tertiary ;
38
+ display : inline-block ;
39
+ padding : 24px ;
40
+ position : relative ;
41
+ text-align : center ;
42
+ text-decoration : none ;
43
+ transition : color 0.3s ease , transform 0.3s ease ;
31
44
45
+ .menu-icon {
46
+ position : absolute ;
47
+ top : 37% ;
48
+ left : 25% ;
49
+ }
32
50
33
- @media (min-width :768px ) {
34
- #wrapper {
35
- padding-left : 250px ;
51
+ & :hover {
52
+ color : $brand-primary ;
53
+ cursor : pointer ;
54
+ transform : scaleX (1.5 );
36
55
}
56
+ }
37
57
38
- #wrapper .toggled {
39
- padding-left : 50px ;
58
+ @include bp (medium ) {
59
+ #wrapper {
60
+ padding-left : 0 ;
61
+ transition : all 0.4s ease-in-out ;
40
62
}
41
63
42
64
#sidebar-wrapper {
43
- left : 250 px ;
44
- margin-left : -250 px ;
65
+ left : -100 % ;
66
+ width : 100 % ;
45
67
}
46
68
47
- #wrapper .toggled #sidebar-wrapper {
48
- left : -200px ;
49
- margin-left : 0 ;
50
- }
69
+ #wrapper .toggled {
70
+ #sidebar-wrapper {
71
+ left : 0 ;
51
72
73
+ .sidebar-toggle {
74
+ display : block ;
75
+ opacity : 0.7 ;
76
+ transition : opacity 0.3s ease , transform 0.3s ease ;
52
77
53
- #wrapper .toggled #doc-wrapper {
54
- position : relative ;
55
- margin-right : 50px ;
78
+ & :hover {
79
+ opacity : 1 ;
80
+ transform : rotate (-180deg );
81
+ }
82
+ }
83
+ }
56
84
}
57
85
}
86
+
87
+ #doc-wrapper {
88
+ width : 100% ;
89
+ }
Original file line number Diff line number Diff line change 38
38
$ ( "#video-panel" ) . slideToggle ( "toggled" ) ;
39
39
} ) ;
40
40
41
- // Touch interactions on the sidebar
42
- var sidebarWrapperEl = document . getElementById ( 'sidebar-wrapper' ) ;
43
- // create a simple instance, by default it only adds horizontal recognizers
44
- if ( sidebarWrapperEl ) {
45
- var sidebarWrapperTouch = new Hammer ( sidebarWrapperEl ) ;
46
- // Listen to touch events, showing on swiperight, hiding on swipeleft
47
- sidebarWrapperTouch . on ( "swiperight" , function ( ev ) {
48
- ev . preventDefault ( )
49
- $ ( "#wrapper" ) . addClass ( "toggled" ) ;
50
- } ) ;
51
- sidebarWrapperTouch . on ( "swipeleft" , function ( ev ) {
52
- ev . preventDefault ( )
53
- $ ( "#wrapper" ) . removeClass ( "toggled" ) ;
54
- } ) ;
55
- }
56
-
57
41
/**
58
42
* This function generates the “unrolling” of the secction by adding
59
43
* some classes to the element and applying a jQuery slide action
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments