Skip to content

Commit 348d14e

Browse files
updated the docs
1 parent e3ef005 commit 348d14e

51 files changed

Lines changed: 2361 additions & 522 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 18d71002f74cbf75215a61be137c9016
3+
config: 8da73c772557d030403c379919717bf6
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/.github/ISSUE_TEMPLATE/bug_report.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,19 @@
3737
<script src="../../_static/jquery.js"></script>
3838
<script src="../../_static/underscore.js"></script>
3939
<script src="../../_static/doctools.js"></script>
40-
<script src="../../_static/togglebutton.js"></script>
4140
<script src="../../_static/clipboard.min.js"></script>
4241
<script src="../../_static/copybutton.js"></script>
42+
<script>let toggleHintShow = 'Click to show';</script>
43+
<script>let toggleHintHide = 'Click to hide';</script>
44+
<script>let toggleOpenOnPrint = 'true';</script>
45+
<script src="../../_static/togglebutton.js"></script>
4346
<script>var togglebuttonSelector = '.toggle, .admonition.dropdown, .tag_hide_input div.cell_input, .tag_hide-input div.cell_input, .tag_hide_output div.cell_output, .tag_hide-output div.cell_output, .tag_hide_cell.cell, .tag_hide-cell.cell';</script>
4447
<script src="../../_static/sphinx-book-theme.d59cb220de22ca1c485ebbdc042f0030.js"></script>
45-
<script async="async" src="https://unpkg.com/thebe@0.5.1/lib/index.js"></script>
46-
<script>
47-
const thebe_selector = ".thebe"
48-
const thebe_selector_input = "pre"
49-
const thebe_selector_output = ".output"
50-
</script>
48+
<script>const THEBE_JS_URL = "https://unpkg.com/thebe@0.8.2/lib/index.js"
49+
const thebe_selector = ".thebe,.cell"
50+
const thebe_selector_input = "pre"
51+
const thebe_selector_output = ".output, .cell_output"
52+
</script>
5153
<script async="async" src="../../_static/sphinx-thebe.js"></script>
5254
<link rel="canonical" href="https://prodigiouspython.github.io/ProdigiousPython/.github/ISSUE_TEMPLATE/bug_report.html" />
5355
<link rel="index" title="Index" href="../../genindex.html" />

docs/.github/ISSUE_TEMPLATE/feature_request.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,19 @@
3737
<script src="../../_static/jquery.js"></script>
3838
<script src="../../_static/underscore.js"></script>
3939
<script src="../../_static/doctools.js"></script>
40-
<script src="../../_static/togglebutton.js"></script>
4140
<script src="../../_static/clipboard.min.js"></script>
4241
<script src="../../_static/copybutton.js"></script>
42+
<script>let toggleHintShow = 'Click to show';</script>
43+
<script>let toggleHintHide = 'Click to hide';</script>
44+
<script>let toggleOpenOnPrint = 'true';</script>
45+
<script src="../../_static/togglebutton.js"></script>
4346
<script>var togglebuttonSelector = '.toggle, .admonition.dropdown, .tag_hide_input div.cell_input, .tag_hide-input div.cell_input, .tag_hide_output div.cell_output, .tag_hide-output div.cell_output, .tag_hide_cell.cell, .tag_hide-cell.cell';</script>
4447
<script src="../../_static/sphinx-book-theme.d59cb220de22ca1c485ebbdc042f0030.js"></script>
45-
<script async="async" src="https://unpkg.com/thebe@0.5.1/lib/index.js"></script>
46-
<script>
47-
const thebe_selector = ".thebe"
48-
const thebe_selector_input = "pre"
49-
const thebe_selector_output = ".output"
50-
</script>
48+
<script>const THEBE_JS_URL = "https://unpkg.com/thebe@0.8.2/lib/index.js"
49+
const thebe_selector = ".thebe,.cell"
50+
const thebe_selector_input = "pre"
51+
const thebe_selector_output = ".output, .cell_output"
52+
</script>
5153
<script async="async" src="../../_static/sphinx-thebe.js"></script>
5254
<link rel="canonical" href="https://prodigiouspython.github.io/ProdigiousPython/.github/ISSUE_TEMPLATE/feature_request.html" />
5355
<link rel="index" title="Index" href="../../genindex.html" />

docs/CODE_OF_CONDUCT.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,19 @@
3737
<script src="_static/jquery.js"></script>
3838
<script src="_static/underscore.js"></script>
3939
<script src="_static/doctools.js"></script>
40-
<script src="_static/togglebutton.js"></script>
4140
<script src="_static/clipboard.min.js"></script>
4241
<script src="_static/copybutton.js"></script>
42+
<script>let toggleHintShow = 'Click to show';</script>
43+
<script>let toggleHintHide = 'Click to hide';</script>
44+
<script>let toggleOpenOnPrint = 'true';</script>
45+
<script src="_static/togglebutton.js"></script>
4346
<script>var togglebuttonSelector = '.toggle, .admonition.dropdown, .tag_hide_input div.cell_input, .tag_hide-input div.cell_input, .tag_hide_output div.cell_output, .tag_hide-output div.cell_output, .tag_hide_cell.cell, .tag_hide-cell.cell';</script>
4447
<script src="_static/sphinx-book-theme.d59cb220de22ca1c485ebbdc042f0030.js"></script>
45-
<script async="async" src="https://unpkg.com/thebe@0.5.1/lib/index.js"></script>
46-
<script>
47-
const thebe_selector = ".thebe"
48-
const thebe_selector_input = "pre"
49-
const thebe_selector_output = ".output"
50-
</script>
48+
<script>const THEBE_JS_URL = "https://unpkg.com/thebe@0.8.2/lib/index.js"
49+
const thebe_selector = ".thebe,.cell"
50+
const thebe_selector_input = "pre"
51+
const thebe_selector_output = ".output, .cell_output"
52+
</script>
5153
<script async="async" src="_static/sphinx-thebe.js"></script>
5254
<link rel="canonical" href="https://prodigiouspython.github.io/ProdigiousPython/CODE_OF_CONDUCT.html" />
5355
<link rel="index" title="Index" href="genindex.html" />

docs/README.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,19 @@
3737
<script src="_static/jquery.js"></script>
3838
<script src="_static/underscore.js"></script>
3939
<script src="_static/doctools.js"></script>
40-
<script src="_static/togglebutton.js"></script>
4140
<script src="_static/clipboard.min.js"></script>
4241
<script src="_static/copybutton.js"></script>
42+
<script>let toggleHintShow = 'Click to show';</script>
43+
<script>let toggleHintHide = 'Click to hide';</script>
44+
<script>let toggleOpenOnPrint = 'true';</script>
45+
<script src="_static/togglebutton.js"></script>
4346
<script>var togglebuttonSelector = '.toggle, .admonition.dropdown, .tag_hide_input div.cell_input, .tag_hide-input div.cell_input, .tag_hide_output div.cell_output, .tag_hide-output div.cell_output, .tag_hide_cell.cell, .tag_hide-cell.cell';</script>
4447
<script src="_static/sphinx-book-theme.d59cb220de22ca1c485ebbdc042f0030.js"></script>
45-
<script async="async" src="https://unpkg.com/thebe@0.5.1/lib/index.js"></script>
46-
<script>
47-
const thebe_selector = ".thebe"
48-
const thebe_selector_input = "pre"
49-
const thebe_selector_output = ".output"
50-
</script>
48+
<script>const THEBE_JS_URL = "https://unpkg.com/thebe@0.8.2/lib/index.js"
49+
const thebe_selector = ".thebe,.cell"
50+
const thebe_selector_input = "pre"
51+
const thebe_selector_output = ".output, .cell_output"
52+
</script>
5153
<script async="async" src="_static/sphinx-thebe.js"></script>
5254
<link rel="canonical" href="https://prodigiouspython.github.io/ProdigiousPython/README.html" />
5355
<link rel="index" title="Index" href="genindex.html" />

docs/_sources/prodigiouspython/Chapter_5/1_Mathematical_Operators.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -658,9 +658,9 @@
658658
"metadata": {},
659659
"outputs": [],
660660
"source": [
661-
"print(integer_a ** integer_b)\n",
662-
"print(float_a ** float_b)\n",
663-
"print(complex_a ** complex_b)"
661+
"print(integer_a**integer_b)\n",
662+
"print(float_a**float_b)\n",
663+
"print(complex_a**complex_b)"
664664
]
665665
},
666666
{

docs/_static/copy-button.svg

Lines changed: 3 additions & 3 deletions
Loading

docs/_static/copybutton.css

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ button.copybtn {
33
position: absolute;
44
display: flex;
55
top: .3em;
6-
right: .5em;
6+
right: .3em;
77
width: 1.7em;
88
height: 1.7em;
99
opacity: 0;
@@ -13,17 +13,22 @@ button.copybtn {
1313
border: none;
1414
outline: none;
1515
border-radius: 0.4em;
16-
border: #e1e1e1 1px solid;
17-
background-color: rgb(245, 245, 245);
16+
/* The colors that GitHub uses */
17+
border: #1b1f2426 1px solid;
18+
background-color: #f6f8fa;
19+
color: #57606a;
1820
}
1921

2022
button.copybtn.success {
2123
border-color: #22863a;
24+
color: #22863a;
2225
}
2326

24-
button.copybtn img {
25-
width: 100%;
26-
padding: .2em;
27+
button.copybtn svg {
28+
stroke: currentColor;
29+
width: 1.5em;
30+
height: 1.5em;
31+
padding: 0.1em;
2732
}
2833

2934
div.highlight {
@@ -79,3 +84,10 @@ div.highlight {
7984
transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
8085
transition-delay: .5s;
8186
}
87+
88+
/* By default the copy button shouldn't show up when printing a page */
89+
@media print {
90+
button.copybtn {
91+
display: none;
92+
}
93+
}

docs/_static/copybutton.js

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ const messages = {
3535
'copy_to_clipboard': '复制到剪贴板',
3636
'copy_success': '复制成功!',
3737
'copy_failure': '复制失败',
38+
},
39+
'it' : {
40+
'copy': 'Copiare',
41+
'copy_to_clipboard': 'Copiato negli appunti',
42+
'copy_success': 'Copiato!',
43+
'copy_failure': 'Errore durante la copia',
3844
}
3945
}
4046

@@ -49,7 +55,25 @@ if (doc_url_root == '#') {
4955
doc_url_root = '';
5056
}
5157

52-
const path_static = `${doc_url_root}_static/`;
58+
/**
59+
* SVG files for our copy buttons
60+
*/
61+
let iconCheck = `<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-check" width="44" height="44" viewBox="0 0 24 24" stroke-width="2" stroke="#22863a" fill="none" stroke-linecap="round" stroke-linejoin="round">
62+
<title>${messages[locale]['copy_success']}</title>
63+
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
64+
<path d="M5 12l5 5l10 -10" />
65+
</svg>`
66+
67+
// If the user specified their own SVG use that, otherwise use the default
68+
let iconCopy = ``;
69+
if (!iconCopy) {
70+
iconCopy = `<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
71+
<title>${messages[locale]['copy_to_clipboard']}</title>
72+
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
73+
<rect x="8" y="8" width="12" height="12" rx="2" />
74+
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2" />
75+
</svg>`
76+
}
5377

5478
/**
5579
* Set up copy/paste for code blocks
@@ -88,9 +112,8 @@ const temporarilyChangeTooltip = (el, oldText, newText) => {
88112

89113
// Changes the copy button icon for two seconds, then changes it back
90114
const temporarilyChangeIcon = (el) => {
91-
img = el.querySelector("img");
92-
img.setAttribute('src', `${path_static}check-solid.svg`)
93-
setTimeout(() => img.setAttribute('src', `${path_static}copy-button.svg`), 2000)
115+
el.innerHTML = iconCheck;
116+
setTimeout(() => {el.innerHTML = iconCopy}, 2000)
94117
}
95118

96119
const addCopyButtonToCodeCells = () => {
@@ -109,7 +132,7 @@ const addCopyButtonToCodeCells = () => {
109132

110133
const clipboardButton = id =>
111134
`<button class="copybtn o-tooltip--left" data-tooltip="${messages[locale]['copy']}" data-clipboard-target="#${id}">
112-
<img src="${path_static}copy-button.svg" alt="${messages[locale]['copy_to_clipboard']}">
135+
${iconCopy}
113136
</button>`
114137
codeCell.insertAdjacentHTML('afterend', clipboardButton(id))
115138
})

0 commit comments

Comments
 (0)