From b534b621756264bf8f28bcd82251bcf29e5346ea Mon Sep 17 00:00:00 2001 From: Chris Holdgraf Date: Fri, 10 Aug 2018 22:47:22 -0700 Subject: [PATCH 1/2] removing extra copybutton files --- docs/_static/custom.css | 22 ---------------------- docs/_static/custom.js | 25 ------------------------- docs/conf.py | 6 ------ 3 files changed, 53 deletions(-) delete mode 100644 docs/_static/custom.css delete mode 100644 docs/_static/custom.js diff --git a/docs/_static/custom.css b/docs/_static/custom.css deleted file mode 100644 index 39e93a9..0000000 --- a/docs/_static/custom.css +++ /dev/null @@ -1,22 +0,0 @@ -button.copybtn { - webkit-transition: opacity .3s ease-in-out; - -o-transition: opacity .3s ease-in-out; - transition: opacity .3s ease-in-out; - opacity: 0; - padding: 2px 6px; - position: absolute; - right: 4px; - top: 4px; -} - -div.highlight:hover .copybtn, div.highlight .copybtn:focus { - opacity: .3; -} - -div.highlight .copybtn:hover { - opacity: 1; -} - -div.highlight { - position: relative; -} diff --git a/docs/_static/custom.js b/docs/_static/custom.js deleted file mode 100644 index 31ce145..0000000 --- a/docs/_static/custom.js +++ /dev/null @@ -1,25 +0,0 @@ -// Set up copy/paste for code blocks -function addCopyButtonToCode(){ - // get all elements - var allCodeBlocksElements = $( "div.highlight pre" ); - - allCodeBlocksElements.each(function(ii) { - // add different id for each code block - - // target - var currentId = "codeblock" + (ii + 1); - $(this).attr('id', currentId); - - //trigger - var clipButton = ''; - $(this).after(clipButton); - }); - - new Clipboard('.btn'); -} - -$(document).ready(function () { - // Highlight current page in sidebar - console.log('hi'); - addCopyButtonToCode(); -}); diff --git a/docs/conf.py b/docs/conf.py index 327e27e..429ab04 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,12 +10,6 @@ version = '' # The full version, including alpha/beta/rc tags release = 'v0.1' -# Add custom CSS/Javascript -def setup(app): - app.add_javascript("custom.js") - app.add_stylesheet("custom.css") - app.add_javascript("https://cdn.jsdelivr.net/npm/clipboard@1/dist/clipboard.min.js") - # Enable MathJax for Math extensions = ['sphinx.ext.mathjax', 'sphinx_copybutton.sphinx_copybutton'] From ed3c280905464573fdbf21872fff74630db46057 Mon Sep 17 00:00:00 2001 From: Chris Holdgraf Date: Fri, 10 Aug 2018 22:55:42 -0700 Subject: [PATCH 2/2] adding docs envt.yml --- docs/doc-requirements.txt | 1 - docs/environment.yml | 9 +++++++++ readthedocs.yml | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) delete mode 100644 docs/doc-requirements.txt create mode 100644 docs/environment.yml create mode 100644 readthedocs.yml diff --git a/docs/doc-requirements.txt b/docs/doc-requirements.txt deleted file mode 100644 index 2b3f75c..0000000 --- a/docs/doc-requirements.txt +++ /dev/null @@ -1 +0,0 @@ -sphinx_copybutton diff --git a/docs/environment.yml b/docs/environment.yml new file mode 100644 index 0000000..d737594 --- /dev/null +++ b/docs/environment.yml @@ -0,0 +1,9 @@ +name: tljh +channels: + - conda-forge +dependencies: +- python=3.6 +- traitlets>=4.1 +- sphinx>=1.4, !=1.5.4 +- pip: + - sphinx_copybutton diff --git a/readthedocs.yml b/readthedocs.yml new file mode 100644 index 0000000..e1243da --- /dev/null +++ b/readthedocs.yml @@ -0,0 +1,6 @@ +name: the-littlest-jupyterhub +type: sphinx +conda: + file: docs/environment.yml +python: + version: 3