-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from mpharrigan/master
Revamp msmb_theme to use sphinx's inheritance mechanism
- Loading branch information
Showing
32 changed files
with
1,783 additions
and
12,789 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ versioneer.pyc | |
dist | ||
build | ||
__pycache__ | ||
*.pyc | ||
*.pyc | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "notebook"] | ||
path = notebook | ||
url = https://github.com/jupyter/notebook.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
include *.txt | ||
include LICENSE | ||
recursive-include msmb_theme *.conf | ||
recursive-include msmb_theme *.css | ||
recursive-include msmb_theme *.eot | ||
recursive-include msmb_theme *.html | ||
recursive-include msmb_theme *.js | ||
recursive-include msmb_theme *.svg | ||
recursive-include msmb_theme *.ttf | ||
recursive-include msmb_theme *.woff | ||
include setup.cfg | ||
include versioneer.py | ||
include msmb_theme/_version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
`msmb_theme` | ||
============ | ||
|
||
This applies slight modifications to `sphinx_rtd_theme`. It needs the | ||
aforementioned theme to be installed. | ||
|
||
### Modifications | ||
|
||
- Styling tweaks in `msmb.css` | ||
- Styling for Jupyter notebooks | ||
|
||
### Jupyter CSS | ||
|
||
Jupyter css is committed to this repository. It is slightly modified from | ||
the upstream stylesheet. You can regenerate `jupyer.min.css`: | ||
|
||
- Ensure the `notebook/` submodule is initialized. | ||
- Apply `wrap-notebook-css.patch` to it. | ||
- Run `compile_jupyter_less.py` to turn the patched `less` files into | ||
`css`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import subprocess | ||
import os | ||
|
||
os.chdir("notebook") | ||
|
||
# Check for clean submodule | ||
unclean = "Please clean up your `notebook/` submodule!" | ||
gitout = subprocess.check_output(['git', 'clean', '-ndx']) | ||
if gitout == b'Would remove notebook/static/components/\n': | ||
pass | ||
elif gitout == b'': | ||
subprocess.check_call([ | ||
'npm', 'install', '-g', 'bower', 'less', 'less-plugin-clean-css' | ||
]) | ||
subprocess.check_call(['bower', 'install']) | ||
else: | ||
print(gitout) | ||
raise RuntimeError(unclean) | ||
|
||
print("Calling lessc") | ||
subprocess.check_call([ | ||
'lessc', | ||
'--clean-css', | ||
'--include-path="./notebook/static"', | ||
'notebook/static/style/style.less', | ||
'../msmb_theme/static/css/jupyter.min.css' | ||
]) |
Binary file not shown.
Oops, something went wrong.