File tree 3 files changed +44
-6
lines changed
3 files changed +44
-6
lines changed Original file line number Diff line number Diff line change @@ -11,22 +11,24 @@ be built locally.
11
11
12
12
### Initial Setup
13
13
14
- ```
14
+ ``` shell
15
15
$ virtualenv venv --python=python3.6
16
16
$ source venv/bin/activate
17
17
$ pip install -r requirements.txt
18
18
```
19
19
20
20
### Building
21
21
22
- ```
22
+ ``` shell
23
23
$ source venv/bin/activate
24
24
$ make html
25
25
```
26
26
27
- The HTML views are now present in ` build/html ` .
27
+ The HTML views are now present in ` build/html ` .
28
28
29
29
## License
30
30
31
- All text and code in this repository is licensed under [ CC-BY-NC-SA 4.0] ( https://creativecommons.org/licenses/by-nc-sa/4.0/ ) .
31
+ All text and code in this repository is licensed under [ CC-BY-NC-SA 4.0] [ ] .
32
32
All project logos are property of the respective project.
33
+
34
+ [ CC-BY-NC-SA 4.0 ] : https://creativecommons.org/licenses/by-nc-sa/4.0/
Original file line number Diff line number Diff line change
1
+ var app = {
2
+
3
+ check_logo_height : function ( ) {
4
+ var logo = $ ( 'div[itemprop="articleBody"] > .sidebar' )
5
+ var hr = $ ( 'div[itemprop="articleBody"] > .section > hr' )
6
+ var logo_end = 0
7
+ var hr_position = 0
8
+ if ( logo . length ) {
9
+ logo_end = logo . offset ( ) . top + logo . outerHeight ( ) ;
10
+ }
11
+ if ( hr . length ) {
12
+ hr_position = hr . offset ( ) . top ;
13
+ }
14
+ // console.log('[logo] ' + logo_end + " → " + hr_position);
15
+ if ( logo_end > hr_position ) {
16
+ var margin_top = parseInt ( hr . css ( 'margin-top' ) , 10 )
17
+ var margin_bottom = parseInt ( hr . css ( 'margin-bottom' ) , 10 )
18
+ var offset = Math . ceil ( ( logo_end - hr_position ) / 2 )
19
+ hr . css ( 'margin-top' , ( margin_top + offset ) + 'px' ) ;
20
+ hr . css ( 'margin-bottom' , ( margin_bottom + offset ) + 'px' ) ;
21
+ console . log ( '[logo] pushed first break down by ' + ( offset * 2 ) ) ;
22
+ }
23
+ } ,
24
+
25
+ init : function ( ) {
26
+ console . log ( 'UberLab launched…' ) ;
27
+ app . check_logo_height ( ) ;
28
+ }
29
+
30
+ }
31
+
32
+ app . init ( )
Original file line number Diff line number Diff line change 92
92
html_context = {
93
93
'css_files' : ['_static/css/custom.css' ],
94
94
'display_github' : True ,
95
- 'github_user' : 'Uberspace' ,
96
- 'github_repo' : 'lab' ,
95
+ 'github_user' : 'Uberspace' ,
96
+ 'github_repo' : 'lab' ,
97
97
'github_version' : 'master' ,
98
98
'conf_py_path' : '/source/'
99
99
}
129
129
130
130
# Output file base name for HTML help builder.
131
131
htmlhelp_basename = 'Uberspace7labdoc'
132
+
133
+
134
+ def setup (app ):
135
+ app .add_javascript ('js/custom.js' )
You can’t perform that action at this time.
0 commit comments