mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Merge pull request #126 from choldgraf/copybutton_remove_css
removing extra copybutton files
This commit is contained in:
22
docs/_static/custom.css
vendored
22
docs/_static/custom.css
vendored
@@ -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;
|
|
||||||
}
|
|
||||||
25
docs/_static/custom.js
vendored
25
docs/_static/custom.js
vendored
@@ -1,25 +0,0 @@
|
|||||||
// Set up copy/paste for code blocks
|
|
||||||
function addCopyButtonToCode(){
|
|
||||||
// get all <code> 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 = '<button class="btn copybtn" data-clipboard-target="#' + currentId + '"><img src="https://clipboardjs.com/assets/images/clippy.svg" width="13" alt="Copy to clipboard"></button>';
|
|
||||||
$(this).after(clipButton);
|
|
||||||
});
|
|
||||||
|
|
||||||
new Clipboard('.btn');
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
// Highlight current page in sidebar
|
|
||||||
console.log('hi');
|
|
||||||
addCopyButtonToCode();
|
|
||||||
});
|
|
||||||
@@ -10,12 +10,6 @@ version = ''
|
|||||||
# The full version, including alpha/beta/rc tags
|
# The full version, including alpha/beta/rc tags
|
||||||
release = 'v0.1'
|
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
|
# Enable MathJax for Math
|
||||||
extensions = ['sphinx.ext.mathjax',
|
extensions = ['sphinx.ext.mathjax',
|
||||||
'sphinx.ext.intersphinx',
|
'sphinx.ext.intersphinx',
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
sphinx_copybutton
|
|
||||||
9
docs/environment.yml
Normal file
9
docs/environment.yml
Normal file
@@ -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
|
||||||
6
readthedocs.yml
Normal file
6
readthedocs.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
name: the-littlest-jupyterhub
|
||||||
|
type: sphinx
|
||||||
|
conda:
|
||||||
|
file: docs/environment.yml
|
||||||
|
python:
|
||||||
|
version: 3
|
||||||
Reference in New Issue
Block a user