Browse Source

Added dark styles to webpage

pull/82/merge
Jure Šorn 2 years ago
parent
commit
5e7a0f35e5
13 changed files with 1696 additions and 407 deletions
  1. 14
      README.md
  2. 253
      index.html
  3. 32
      parse.js
  4. 1
      pdf/remove_links.py
  5. 1
      web/default_dark.min.css
  6. 1
      web/default_dark1.min.css
  7. 1
      web/default_dark2.min.css
  8. BIN
      web/image_orig_blue6.png
  9. 196
      web/style.css
  10. 464
      web/style_dark.css
  11. 465
      web/style_dark1.css
  12. 461
      web/style_dark2.css
  13. 214
      web/template.html

14
README.md

@ -1,6 +1,6 @@
Comprehensive Python Cheatsheet
===============================
<sup>[Download text file](https://raw.githubusercontent.com/gto76/python-cheatsheet/main/README.md), [Buy PDF](https://transactions.sendowl.com/products/78175486/4422834F/view), [Fork me on GitHub](https://github.com/gto76/python-cheatsheet) or [Check out FAQ](https://github.com/gto76/python-cheatsheet/wiki/Frequently-Asked-Questions).
<sup>[Download text file](https://raw.githubusercontent.com/gto76/python-cheatsheet/main/README.md), [Buy PDF](https://transactions.sendowl.com/products/78175486/4422834F/view), [Fork me on GitHub](https://github.com/gto76/python-cheatsheet), [Check out FAQ](https://github.com/gto76/python-cheatsheet/wiki/Frequently-Asked-Questions) or [Switch to dark theme](index.html?theme=dark2).
</sup>
![Monty Python](web/image_888.jpeg)
@ -1045,7 +1045,7 @@ class <class_name>:
<attr_name_2>: <type> = <default_value>
<attr_name_3>: list/dict/set = field(default_factory=list/dict/set)
```
* **Objects can be made sortable with `'order=True'` and immutable with `'frozen=True'`.**
* **Objects can be made [sortable](#sortable) with `'order=True'` and immutable with `'frozen=True'`.**
* **For object to be hashable, all attributes must be hashable and frozen must be True.**
* **Function field() is needed because `'<attr_name>: list = []'` would make a list that is shared among all instances. Its 'default_factory' argument can be any [callable](#callable).**
* **For attributes of arbitrary type use `'typing.Any'`.**
@ -3475,15 +3475,15 @@ import <cython_script>
* **Script needs to be saved with a `'pyx'` extension.**
```python
cdef <type> <var_name> = <el>
cdef <type>[n_elements] <var_name> = [<el_1>, <el_2>, ...]
cdef <type/void> <func_name>(<type> <arg_name_1>, ...):
cdef <ctype> <var_name> = <el>
cdef <ctype>[n_elements] <var_name> = [<el_1>, <el_2>, ...]
cdef <ctype/void> <func_name>(<ctype> <arg_name_1>, ...):
```
```python
cdef class <class_name>:
cdef public <type> <attr_name>
def __init__(self, <type> <arg_name>):
cdef public <ctype> <attr_name>
def __init__(self, <ctype> <arg_name>):
self.<attr_name> = <arg_name>
```

253
index.html

@ -7,8 +7,26 @@
<title>Comprehensive Python Cheatsheet</title>
<meta name="description" content="Exhaustive, simple, beautiful and concise. A truly Pythonic cheat sheet about Python programming language.">
<link rel="icon" href="web/favicon.png">
<link rel="stylesheet" href="web/default.min.css">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css">
<link rel="stylesheet" href="web/style.css">
<script>
// Checks if URL ends with "index.html?dark=true"
if (window.location.search.search(/[?&]theme=dark2/) !== -1) {
document.write("<link rel=\"stylesheet\" href=\"web/default_dark2.min.css\">");
document.write("<link rel=\"stylesheet\" href=\"web/style_dark2.css\">");
}
else if (window.location.search.search(/[?&]theme=dark1/) !== -1) {
document.write("<link rel=\"stylesheet\" href=\"web/default_dark1.min.css\">");
document.write("<link rel=\"stylesheet\" href=\"web/style_dark1.css\">");
}
else if (window.location.search.search(/[?&]theme=dark/) !== -1) {
document.write("<link rel=\"stylesheet\" href=\"web/default_dark.min.css\">");
document.write("<link rel=\"stylesheet\" href=\"web/style_dark.css\">");
}
</script>
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Comprehensive Python Cheatsheet">
@ -30,209 +48,34 @@
<meta name="viewport" id="viewport-meta">
</head>
<style>
@import url(web/style.css);
@font-face {font-family: "Menlo Regular";
src: url("web\\OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.woff2") format("woff2"), /* chrome、firefox */
url("web\\OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.woff") format("woff");
}
.join,
.link,
.node rect {
fill: none;
stroke: #636363;
stroke-width: 1.5px;
}
.link {
stroke: #969696;
}
.node rect {
fill: white;
}
.link path,
.node rect,
.node text,
.join {
-webkit-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-moz-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-ms-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-o-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
}
.node .element rect {
fill: #bdbdbd;
stroke: none;
}
.node .null rect {
fill: none;
stroke: none;
}
.node .null text {
fill: #636363;
}
.node .selection rect {
stroke: #e6550d;
}
.node .data rect {
stroke: #3182bd;
}
.node .datum rect {
fill: #d9d9d9;
stroke: none;
}
.node .code text {
font-family: monospace;
}
.node .key rect {
fill: #a1d99b;
stroke: none;
}
.link .to-key,
.join {
stroke: #a1d99b;
}
.join {
stroke-dasharray: 2,2;
}
.link .to-null {
stroke-dasharray: .5,3.5;
stroke-linecap: round;
}
.link .from-data {
stroke: #3182bd;
}
.play circle {
fill: #fff;
stroke: #000;
stroke-width: 3px;
}
.play:hover path {
fill: #f00;
}
.play.mousedown circle {
fill: #f00;
}
.play.mousedown path {
fill: #fff;
}
.play rect {
fill: none;
pointer-events: all;
cursor: pointer;
}
code span {
-webkit-transition: background 250ms linear;
-moz-transition: background 250ms linear;
-ms-transition: background 250ms linear;
-o-transition: background 250ms linear;
transition: background 250ms linear;
}
pre.prettyprint, code.prettyprint {
background-color: #222;
border-radius: 8px;
font-size: 15px;
}
pre.prettyprint {
width: 90%;
margin: 0.5em;
padding: 1em;
white-space: pre-wrap;
}
#return-to-top {
position: fixed;
bottom: 20px;
right: 20px;
background: rgb(0, 0, 0);
background: rgba(0, 0, 0, 0.2);
width: 50px;
height: 50px;
display: block;
text-decoration: none;
-webkit-border-radius: 35px;
-moz-border-radius: 35px;
border-radius: 35px;
display: none;
-webkit-transition: all 0.3s linear;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
#return-to-top i {
color: #fff;
margin: 0;
position: relative;
left: 16px;
top: 13px;
font-size: 19px;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
#return-to-top:hover {
background: rgba(0, 0, 0, 0.35);
}
#return-to-top:hover i {
color: #f0f0f0;
}
@media print {
.pagebreak {
page-break-before: always;
}
div {
page-break-inside: avoid;
}
pre {
page-break-inside: avoid;
}
}
.modebar{
display: none !important;
}
</style>
<body>
<header>
<aside>November 29, 2021</aside>
<aside>December 16, 2021</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</header>
<a href="javascript:" id="return-to-top"><i class="icon-chevron-up"></i></a>
<div><h1 id="comprehensivepythoncheatsheet">Comprehensive Python Cheatsheet</h1><p class="banner"><sup><a href="https://raw.githubusercontent.com/gto76/python-cheatsheet/main/README.md">Download text file</a>, <a href="https://transactions.sendowl.com/products/78175486/4422834F/view">Buy PDF</a>, <a href="https://github.com/gto76/python-cheatsheet">Fork me on GitHub</a> or <a href="https://github.com/gto76/python-cheatsheet/wiki/Frequently-Asked-Questions">Check out FAQ</a>.
</sup></p><p class="banner"><img src="web/image_888.jpeg" alt="Monty Python"></p><br><div><h2 id="toc"><a href="#toc" name="toc">#</a>Contents</h2><pre><code class="hljs bash" style="line-height: 1.3em;"><strong>ToC</strong> = {
<div><h1 id="comprehensivepythoncheatsheet">Comprehensive Python Cheatsheet</h1><p class="banner"><sup><a href="https://raw.githubusercontent.com/gto76/python-cheatsheet/main/README.md">Download text file</a>, <a href="https://transactions.sendowl.com/products/78175486/4422834F/view">Buy PDF</a>, <a href="https://github.com/gto76/python-cheatsheet">Fork me on GitHub</a>, <a href="https://github.com/gto76/python-cheatsheet/wiki/Frequently-Asked-Questions">Check out FAQ</a> or <a href="index.html?theme=dark2">Switch to dark theme</a>.
</sup></p><p class="banner"><img src="web/image_888.jpeg" alt="Monty Python"></p><script>
// Changes the image and link to theme if URL ends with "index.html?dark=true".
if (window.location.search.search(/[?&]theme=dark/) !== -1) {
var link_to_theme = document.createElement("a")
link_to_theme.href = "index.html"
link_to_theme.text = "Switch to light theme"
document.getElementsByClassName("banner")[0].firstChild.children[4].replaceWith(link_to_theme)
var img_dark = document.createElement("img");
img_dark.src = "web/image_orig_blue6.png";
img_dark.alt = "Monthy Python";
if (window.location.search.search(/[?&]theme=dark2/) !== -1) {
img_dark.style = "width: 910px;";
} else {
img_dark.style = "width: 960px;";
}
document.getElementsByClassName("banner")[1].firstChild.replaceWith(img_dark);
}
</script><br><div><h2 id="toc"><a href="#toc" name="toc">#</a>Contents</h2><pre><code class="hljs bash" style="line-height: 1.3em;"><strong>ToC</strong> = {
<strong><span class="hljs-string"><span class="hljs-string">'1. Collections'</span></span></strong>: [<a href="#list">List</a>, <a href="#dictionary">Dictionary</a>, <a href="#set">Set</a>, <a href="#tuple">Tuple</a>, <a href="#range">Range</a>, <a href="#enumerate">Enumerate</a>, <a href="#iterator">Iterator</a>, <a href="#generator">Generator</a>],
<strong><span class="hljs-string"><span class="hljs-string">'2. Types'</span></span></strong>: [<a href="#type">Type</a>, <a href="#string">String</a>, <a href="#regex">Regular_Exp</a>, <a href="#format">Format</a>, <a href="#numbers">Numbers</a>, <a href="#combinatorics">Combinatorics</a>, <a href="#datetime">Datetime</a>],
<strong><span class="hljs-string"><span class="hljs-string">'3. Syntax'</span></span></strong>: [<a href="#arguments">Args</a>, <a href="#inline">Inline</a>, <a href="#imports">Imports</a>, <a href="#decorator">Decorator</a>, <a href="#class">Class</a>, <a href="#ducktypes">Duck_Type</a>, <a href="#enum">Enum</a>, <a href="#exceptions">Exception</a>],
@ -1039,7 +882,7 @@ Z = dataclasses.make_dataclass(<span class="hljs-string">'Z'</span>, [<span clas
<ul>
<li><strong>Objects can be made sortable with <code class="python hljs"><span class="hljs-string">'order=True'</span></code> and immutable with <code class="python hljs"><span class="hljs-string">'frozen=True'</span></code>.</strong></li>
<li><strong>Objects can be made <a href="#sortable">sortable</a> with <code class="python hljs"><span class="hljs-string">'order=True'</span></code> and immutable with <code class="python hljs"><span class="hljs-string">'frozen=True'</span></code>.</strong></li>
<li><strong>For object to be hashable, all attributes must be hashable and frozen must be True.</strong></li>
<li><strong>Function field() is needed because <code class="python hljs"><span class="hljs-string">'&lt;attr_name&gt;: list = []'</span></code> would make a list that is shared among all instances. Its 'default_factory' argument can be any <a href="#callable">callable</a>.</strong></li>
<li><strong>For attributes of arbitrary type use <code class="python hljs"><span class="hljs-string">'typing.Any'</span></code>.</strong></li>
@ -2970,15 +2813,15 @@ print(<span class="hljs-string">f'Hello <span class="hljs-subst">{values[<span c
<div><h4 id="definitions">Definitions:</h4><ul>
<li><strong>All <code class="python hljs"><span class="hljs-string">'cdef'</span></code> definitions are optional, but they contribute to the speed-up.</strong></li>
<li><strong>Script needs to be saved with a <code class="python hljs"><span class="hljs-string">'pyx'</span></code> extension.</strong></li>
</ul><pre><code class="python language-python hljs">cdef &lt;type&gt; &lt;var_name&gt; = &lt;el&gt;
cdef &lt;type&gt;[n_elements] &lt;var_name&gt; = [&lt;el_1&gt;, &lt;el_2&gt;, ...]
cdef &lt;type/void&gt; &lt;func_name&gt;(&lt;type&gt; &lt;arg_name_1&gt;, ...):
</ul><pre><code class="python language-python hljs">cdef &lt;ctype&gt; &lt;var_name&gt; = &lt;el&gt;
cdef &lt;ctype&gt;[n_elements] &lt;var_name&gt; = [&lt;el_1&gt;, &lt;el_2&gt;, ...]
cdef &lt;ctype/void&gt; &lt;func_name&gt;(&lt;ctype&gt; &lt;arg_name_1&gt;, ...):
</code></pre></div>
<pre><code class="python language-python hljs">cdef <span class="hljs-class"><span class="hljs-keyword">class</span> &lt;<span class="hljs-title">class_name</span>&gt;:</span>
cdef public &lt;type&gt; &lt;attr_name&gt;
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span><span class="hljs-params">(self, &lt;type&gt; &lt;arg_name&gt;)</span>:</span>
cdef public &lt;ctype&gt; &lt;attr_name&gt;
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span><span class="hljs-params">(self, &lt;ctype&gt; &lt;arg_name&gt;)</span>:</span>
self.&lt;attr_name&gt; = &lt;arg_name&gt;
</code></pre>
<pre><code class="python language-python hljs">cdef enum &lt;enum_name&gt;: &lt;member_name_1&gt;, &lt;member_name_2&gt;, ...
@ -3029,7 +2872,7 @@ $ pyinstaller script.py --add-data '&lt;path&gt;:.' <span class="hljs-comment">
<footer>
<aside>November 29, 2021</aside>
<aside>December 16, 2021</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</footer>

32
parse.js

@ -409,6 +409,29 @@ const DIAGRAM_18_B =
"┗━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\n";
const DARK_THEME_SCRIPT =
'<script>\n' +
' // Changes the image and link to theme if URL ends with "index.html?dark=true". \n' +
' if (window.location.search.search(/[?&]theme=dark/) !== -1) {\n' +
'\n' +
' var link_to_theme = document.createElement("a")\n' +
' link_to_theme.href = "index.html"\n' +
' link_to_theme.text = "Switch to light theme"\n' +
' document.getElementsByClassName("banner")[0].firstChild.children[4].replaceWith(link_to_theme)\n' +
'\n' +
' var img_dark = document.createElement("img");\n' +
' img_dark.src = "web/image_orig_blue6.png";\n' +
' img_dark.alt = "Monthy Python";\n' +
' if (window.location.search.search(/[?&]theme=dark2/) !== -1) {\n' +
' img_dark.style = "width: 910px;";\n' +
' } else {\n' +
' img_dark.style = "width: 960px;";\n' +
' }\n' +
' document.getElementsByClassName("banner")[1].firstChild.replaceWith(img_dark);\n' +
' }\n' +
'</script>';
function main() {
const html = getMd();
initDom(html);
@ -436,6 +459,7 @@ function initDom(html) {
}
function modifyPage() {
addDarkThemeScript();
removeOrigToc();
addToc();
insertLinks();
@ -446,6 +470,14 @@ function modifyPage() {
removePlotImages();
}
function addDarkThemeScript() {
// const script = $.parseHTML(DARK_THEME_SCRIPT);
// $('banner').second().after(script);
// console.log(script)
$('#main').before(DARK_THEME_SCRIPT);
}
function removeOrigToc() {
const headerContents = $('#contents');
const contentsList = headerContents.next();

1
pdf/remove_links.py

@ -11,6 +11,7 @@ MATCHES = {
'<strong>Module <a href="#operator">operator</a> provides functions itemgetter() and mul() that offer the same functionality as <a href="#lambda">lambda</a> expressions above.</strong>': '<strong>Module \'operator\' (p. 31) provides functions itemgetter() and mul() that offer the same functionality as lambda expressions (p. 11) above.</strong>',
'<strong>Adding <code class="python hljs"><span class="hljs-string">\'!r\'</span></code> before the colon converts object to string by calling its <a href="#class">repr()</a> method.</strong>': '<strong>Adding <code class="python hljs"><span class="hljs-string">\'!r\'</span></code> before the colon converts object to string by calling its repr() method (p. 14).</strong>',
'<strong>It can be any <a href="#callable">callable</a>, but is usually implemented as a function that returns a <a href="#closure">closure</a>.</strong>': '<strong>It can be any callable (p. 17), but is usually implemented as a function that returns a closure (p. 12).</strong>',
'<strong>Objects can be made <a href="#sortable">sortable</a> with <code class="python hljs"><span class="hljs-string">\'order=True\'</span></code> and immutable with <code class="python hljs"><span class="hljs-string">\'frozen=True\'</span></code>.</strong>': '<strong>Objects can be made sortable with <code class="python hljs"><span class="hljs-string">\'order=True\'</span></code> and immutable with <code class="python hljs"><span class="hljs-string">\'frozen=True\'</span></code>.</strong>',
'<strong>Function field() is needed because <code class="python hljs"><span class="hljs-string">\'&lt;attr_name&gt;: list = []\'</span></code> would make a list that is shared among all instances. Its \'default_factory\' argument can be any <a href="#callable">callable</a>.</strong>': '<strong>Function field() is needed because <code class="python hljs"><span class="hljs-string">\'&lt;attr_name&gt;: list = []\'</span></code> would make a list that is shared among all instances. Its \'default_factory\' argument can be any callable (p. 17).</strong>',
'<strong>Sequence iterators returned by the <a href="#iterator">iter()</a> function, such as list_iterator and set_iterator.</strong>': '<strong>Sequence iterators returned by the iter() function, such as list_iterator and set_iterator (p.&nbsp;3).</strong>',
'<strong>Objects returned by the <a href="#itertools">itertools</a> module, such as count, repeat and cycle.</strong>': '<strong>Objects returned by the itertools module, such as count, repeat and cycle (p. 3).</strong>',

1
web/default_dark.min.css

@ -0,0 +1 @@
.hljs{overflow-x:auto}.hljs,.hljs-subst{}.hljs-comment{color:#797979}.hljs-keyword,.hljs-attribute,.hljs-selector-tag,.hljs-meta-keyword,.hljs-doctag,.hljs-name{font-weight:bold;color:#40b0dbb8}.hljs-type,.hljs-string,.hljs-number,.hljs-selector-id,.hljs-selector-class,.hljs-quote,.hljs-template-tag,.hljs-deletion{color:hsl(340deg 82% 43%)}.hljs-title,.hljs-section{color:hsl(340deg 82% 37%);font-weight:bold}.hljs-regexp,.hljs-symbol,.hljs-variable,.hljs-template-variable,.hljs-link,.hljs-selector-attr,.hljs-selector-pseudo{color:#BC6060}.hljs-literal{color:#78A960}.hljs-meta{color:#1f7199}.hljs-meta-string{color:#4d99bf}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}

1
web/default_dark1.min.css

@ -0,0 +1 @@
.hljs{overflow-x:auto}.hljs,.hljs-subst{}.hljs-comment{color:hsl(0deg 0% 49% / 77%)}.hljs-keyword,.hljs-attribute,.hljs-selector-tag,.hljs-meta-keyword,.hljs-doctag,.hljs-name{font-weight:bold;color:hsl(197deg 68% 64% / 72%)}.hljs-type,.hljs-string,.hljs-number,.hljs-selector-id,.hljs-selector-class,.hljs-quote,.hljs-template-tag,.hljs-deletion{color:hsl(0deg 67% 57% / 88%)}.hljs-title,.hljs-section{color:hsl(188deg 100% 54% / 59%);font-weight:bold}.hljs-regexp,.hljs-symbol,.hljs-variable,.hljs-template-variable,.hljs-link,.hljs-selector-attr,.hljs-selector-pseudo{color:#BC6060}.hljs-literal{color:#78A960}.hljs-meta{color:hsl(200deg 66% 47%)}.hljs-meta-string{color:#4d99bf}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}

1
web/default_dark2.min.css

@ -0,0 +1 @@
.hljs{overflow-x:auto}.hljs,.hljs-subst{}.hljs-comment{color:#797979}.hljs-keyword,.hljs-attribute,.hljs-selector-tag,.hljs-meta-keyword,.hljs-doctag,.hljs-name{font-weight:bold;color:hsl(187deg 85% 28%)}.hljs-type,.hljs-string,.hljs-number,.hljs-selector-id,.hljs-selector-class,.hljs-quote,.hljs-template-tag,.hljs-deletion{color:hsl(340deg 82% 43%)}.hljs-title,.hljs-section{color:hsl(340deg 82% 37%);font-weight:bold}.hljs-regexp,.hljs-symbol,.hljs-variable,.hljs-template-variable,.hljs-link,.hljs-selector-attr,.hljs-selector-pseudo{color:#BC6060}.hljs-literal{color:#78A960}.hljs-meta{color:hsl(189deg 83% 22%)}.hljs-meta-string{color:#4d99bf}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}

BIN
web/image_orig_blue6.png

Before After
Width: 1280  |  Height: 297  |  Size: 267 KiB

196
web/style.css

@ -261,3 +261,199 @@ ul {
min-width: calc(100vw - 2em);
}
}
/*@import url(web/style.css);*/
@font-face {font-family: "Menlo Regular";
src: url("OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.woff2") format("woff2"), /* chrome、firefox */
url("OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.woff") format("woff");
}
.join,
.link,
.node rect {
fill: none;
stroke: #636363;
stroke-width: 1.5px;
}
.link {
stroke: #969696;
}
.node rect {
fill: white;
}
.link path,
.node rect,
.node text,
.join {
-webkit-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-moz-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-ms-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-o-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
}
.node .element rect {
fill: #bdbdbd;
stroke: none;
}
.node .null rect {
fill: none;
stroke: none;
}
.node .null text {
fill: #636363;
}
.node .selection rect {
stroke: #e6550d;
}
.node .data rect {
stroke: #3182bd;
}
.node .datum rect {
fill: #d9d9d9;
stroke: none;
}
.node .code text {
font-family: monospace;
}
.node .key rect {
fill: #a1d99b;
stroke: none;
}
.link .to-key,
.join {
stroke: #a1d99b;
}
.join {
stroke-dasharray: 2,2;
}
.link .to-null {
stroke-dasharray: .5,3.5;
stroke-linecap: round;
}
.link .from-data {
stroke: #3182bd;
}
.play circle {
fill: #fff;
stroke: #000;
stroke-width: 3px;
}
.play:hover path {
fill: #f00;
}
.play.mousedown circle {
fill: #f00;
}
.play.mousedown path {
fill: #fff;
}
.play rect {
fill: none;
pointer-events: all;
cursor: pointer;
}
code span {
-webkit-transition: background 250ms linear;
-moz-transition: background 250ms linear;
-ms-transition: background 250ms linear;
-o-transition: background 250ms linear;
transition: background 250ms linear;
}
pre.prettyprint, code.prettyprint {
background-color: #222;
border-radius: 8px;
font-size: 15px;
}
pre.prettyprint {
width: 90%;
margin: 0.5em;
padding: 1em;
white-space: pre-wrap;
}
#return-to-top {
position: fixed;
bottom: 20px;
right: 20px;
background: rgb(0, 0, 0);
background: rgba(0, 0, 0, 0.2);
width: 50px;
height: 50px;
display: block;
text-decoration: none;
-webkit-border-radius: 35px;
-moz-border-radius: 35px;
border-radius: 35px;
display: none;
-webkit-transition: all 0.3s linear;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
#return-to-top i {
color: #fff;
margin: 0;
position: relative;
left: 16px;
top: 13px;
font-size: 19px;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
#return-to-top:hover {
background: rgba(0, 0, 0, 0.35);
}
#return-to-top:hover i {
color: #f0f0f0;
}
@media print {
.pagebreak {
page-break-before: always;
}
div {
page-break-inside: avoid;
}
pre {
page-break-inside: avoid;
}
}
.modebar{
display: none !important;
}

464
web/style_dark.css

@ -0,0 +1,464 @@
/* Copyright 2013 Michael Bostock. All rights reserved. Do not copy. */
@import url(https://fonts.googleapis.com/css?family=PT+Serif|PT+Serif:b|PT+Serif:i|PT+Sans|PT+Sans:b);
.ocks-org body {
background: hsl(206deg 47% 9%);
color: hsl(0deg 0% 72%);
font-family: "PT Serif", serif;
margin: 1em auto 4em auto;
position: relative;
width: 960px;
padding: 1rem;
}
.ocks-org header,
.ocks-org footer,
.ocks-org aside,
.ocks-org h1,
.ocks-org h2,
.ocks-org h3,
.ocks-org h4 {
font-family: "PT Sans", sans-serif;
}
.ocks-org h1,
.ocks-org h2,
.ocks-org h3,
.ocks-org h4 {
color: hsl(0deg 1% 71%);
}
.ocks-org header,
.ocks-org footer {
color: #636363;
}
h1 {
font-size: 67px;
font-weight: 300;
letter-spacing: -2px;
margin: 0.3em 0 0.1em 0;
}
h2 {
margin-top: 2em;
}
h1,
h2 {
text-rendering: optimizeLegibility;
}
h2 a[name],
h2 a[id] {
color: hsl(0deg 0% 63% / 49%);
padding-right: 0.3em;
}
header,
footer {
font-size: small;
}
.ocks-org header aside,
.ocks-org footer aside {
float: left;
margin-right: 0.5em;
}
.ocks-org header aside:after,
.ocks-org footer aside:after {
padding-left: 0.5em;
content: "/";
}
footer {
margin-top: 6em;
}
h1 ~ aside {
font-size: small;
right: 0;
position: absolute;
width: 180px;
}
.attribution {
font-size: small;
margin-bottom: 2em;
}
body > p,
li > p,
div > p {
line-height: 1.5em;
}
body > p,
div > p {
width: 720px;
}
body > blockquote {
width: 640px;
}
blockquote q {
display: block;
font-style: oblique;
}
ul {
padding: 0;
}
li {
width: 690px;
margin-left: 30px;
}
a {
color: steelblue;
}
a:not(:hover) {
text-decoration: none;
}
pre,
code,
textarea {
font-family: "Menlo", "Menlo Regular", monospace;
}
code {
line-height: 1em;
}
textarea {
font-size: 100%;
}
pre {
border-left: solid 2px hsl(206deg 34% 14%);
padding-left: 18px;
margin: 1em 0 1em 0;
background: hsl(206deg 34% 14%);
border-radius: 6px;
padding-top: 16px;
padding-bottom: 16px;
}
.html .value,
.javascript .string,
.javascript .regexp {
color: #756bb1;
}
.html .tag,
.css .tag,
.javascript .keyword {
color: #3182bd;
}
.comment {
color: #636363;
}
.html .doctype,
.javascript .number {
color: #31a354;
}
.html .attribute,
.css .attribute,
.javascript .class,
.javascript .special {
color: #e6550d;
}
svg {
font: 10px sans-serif;
}
.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
sup,
sub {
line-height: 0;
}
q:before {
content: "“";
}
q:after {
content: "”";
}
blockquote q {
line-height: 1.5em;
display: inline;
}
blockquote q:before,
blockquote q:after {
content: "";
}
h3,
h4,
p,
ul {
padding-left: 1.2rem;
}
.banner {
padding: 0;
}
#toc {
margin-top: 0;
}
@media only screen and (max-device-width: 1023px) {
.ocks-org body {
font-size: 72%;
padding: 0.5rem;
}
body > p,
div > p {
width: 90vw !important;
}
li {
width: 82vw;
}
h3,
h4,
p,
ul {
padding-left: .7rem;
width: 90vw;
}
h1 {
font-size: 2rem;
}
pre {
padding-left: 0.5rem;
}
.banner,
h1,
img {
max-width: calc(100vw - 2em);
min-width: calc(100vw - 2em);
}
}
/*@import url(web/style.css);*/
@font-face {font-family: "Menlo Regular";
src: url("OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.woff2") format("woff2"), /* chrome、firefox */
url("OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.woff") format("woff");
}
.join,
.link,
.node rect {
fill: none;
stroke: #636363;
stroke-width: 1.5px;
}
.link {
stroke: #969696;
}
.node rect {
fill: white;
}
.link path,
.node rect,
.node text,
.join {
-webkit-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-moz-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-ms-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-o-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
}
.node .element rect {
fill: #bdbdbd;
stroke: none;
}
.node .null rect {
fill: none;
stroke: none;
}
.node .null text {
fill: #636363;
}
.node .selection rect {
stroke: #e6550d;
}
.node .data rect {
stroke: #3182bd;
}
.node .datum rect {
fill: #d9d9d9;
stroke: none;
}
.node .code text {
font-family: monospace;
color: hsl(0deg 0% 74%)
}
.node .key rect {
fill: #a1d99b;
stroke: none;
}
.link .to-key,
.join {
stroke: #a1d99b;
}
.join {
stroke-dasharray: 2,2;
}
.link .to-null {
stroke-dasharray: .5,3.5;
stroke-linecap: round;
}
.link .from-data {
stroke: #3182bd;
}
.play circle {
fill: #fff;
stroke: #000;
stroke-width: 3px;
}
.play:hover path {
fill: #f00;
}
.play.mousedown circle {
fill: #f00;
}
.play.mousedown path {
fill: #fff;
}
.play rect {
fill: none;
pointer-events: all;
cursor: pointer;
}
code span {
-webkit-transition: background 250ms linear;
-moz-transition: background 250ms linear;
-ms-transition: background 250ms linear;
-o-transition: background 250ms linear;
transition: background 250ms linear;
}
pre.prettyprint, code.prettyprint {
background-color: #222;
border-radius: 8px;
font-size: 15px;
}
pre.prettyprint {
width: 90%;
margin: 0.5em;
padding: 1em;
white-space: pre-wrap;
}
#return-to-top {
position: fixed;
bottom: 20px;
right: 20px;
background: rgb(0, 0, 0);
background: rgba(0, 0, 0, 0.2);
width: 50px;
height: 50px;
display: block;
text-decoration: none;
-webkit-border-radius: 35px;
-moz-border-radius: 35px;
border-radius: 35px;
display: none;
-webkit-transition: all 0.3s linear;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
#return-to-top i {
color: #fff;
margin: 0;
position: relative;
left: 16px;
top: 13px;
font-size: 19px;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
#return-to-top:hover {
background: rgba(0, 0, 0, 0.35);
}
#return-to-top:hover i {
color: #f0f0f0;
}
@media print {
.pagebreak {
page-break-before: always;
}
div {
page-break-inside: avoid;
}
pre {
page-break-inside: avoid;
}
}
.modebar{
display: none !important;
}

465
web/style_dark1.css

@ -0,0 +1,465 @@
/* Copyright 2013 Michael Bostock. All rights reserved. Do not copy. */
@import url(https://fonts.googleapis.com/css?family=PT+Serif|PT+Serif:b|PT+Serif:i|PT+Sans|PT+Sans:b);
.ocks-org body {
background: hsl(206deg 47% 9%);
color: hsl(0deg 0% 72%);
font-family: "PT Serif", serif;
margin: 1em auto 4em auto;
position: relative;
width: 960px;
padding: 1rem;
}
.ocks-org header,
.ocks-org footer,
.ocks-org aside,
.ocks-org h1,
.ocks-org h2,
.ocks-org h3,
.ocks-org h4 {
font-family: "PT Sans", sans-serif;
}
.ocks-org h1,
.ocks-org h2,
.ocks-org h3,
.ocks-org h4 {
color: hsl(0deg 1% 77%);
}
.ocks-org header,
.ocks-org footer {
color: #636363;
}
h1 {
font-size: 67px;
font-weight: 300;
letter-spacing: -2px;
margin: 0.3em 0 0.1em 0;
}
h2 {
margin-top: 2em;
}
h1,
h2 {
text-rendering: optimizeLegibility;
}
h2 a[name],
h2 a[id] {
color: hsl(0deg 0% 75% / 49%);
padding-right: 0.3em;
}
header,
footer {
font-size: small;
}
.ocks-org header aside,
.ocks-org footer aside {
float: left;
margin-right: 0.5em;
}
.ocks-org header aside:after,
.ocks-org footer aside:after {
padding-left: 0.5em;
content: "/";
}
footer {
margin-top: 6em;
}
h1 ~ aside {
font-size: small;
right: 0;
position: absolute;
width: 180px;
}
.attribution {
font-size: small;
margin-bottom: 2em;
}
body > p,
li > p,
div > p {
line-height: 1.5em;
}
body > p,
div > p {
width: 720px;
}
body > blockquote {
width: 640px;
}
blockquote q {
display: block;
font-style: oblique;
}
ul {
padding: 0;
}
li {
width: 690px;
margin-left: 30px;
}
a {
color: steelblue;
}
a:not(:hover) {
text-decoration: none;
}
pre,
code,
textarea {
font-family: "Menlo", "Menlo Regular", monospace;
}
code {
line-height: 1em;
color: hsl(0deg 0% 96% / 65%);
}
textarea {
font-size: 100%;
}
pre {
border-left: solid 2px hsl(206deg 34% 14%);
padding-left: 18px;
margin: 1em 0 1em 0;
background: hsl(206deg 34% 14%);
border-radius: 6px;
padding-top: 16px;
padding-bottom: 16px;
}
.html .value,
.javascript .string,
.javascript .regexp {
color: #756bb1;
}
.html .tag,
.css .tag,
.javascript .keyword {
color: #3182bd;
}
.comment {
color: #636363;
}
.html .doctype,
.javascript .number {
color: #31a354;
}
.html .attribute,
.css .attribute,
.javascript .class,
.javascript .special {
color: #e6550d;
}
svg {
font: 10px sans-serif;
}
.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
sup,
sub {
line-height: 0;
}
q:before {
content: "“";
}
q:after {
content: "”";
}
blockquote q {
line-height: 1.5em;
display: inline;
}
blockquote q:before,
blockquote q:after {
content: "";
}
h3,
h4,
p,
ul {
padding-left: 1.2rem;
}
.banner {
padding: 0;
}
#toc {
margin-top: 0;
}
@media only screen and (max-device-width: 1023px) {
.ocks-org body {
font-size: 72%;
padding: 0.5rem;
}
body > p,
div > p {
width: 90vw !important;
}
li {
width: 82vw;
}
h3,
h4,
p,
ul {
padding-left: .7rem;
width: 90vw;
}
h1 {
font-size: 2rem;
}
pre {
padding-left: 0.5rem;
}
.banner,
h1,
img {
max-width: calc(100vw - 2em);
min-width: calc(100vw - 2em);
}
}
/*@import url(web/style.css);*/
@font-face {font-family: "Menlo Regular";
src: url("OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.woff2") format("woff2"), /* chrome、firefox */
url("OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.woff") format("woff");
}
.join,
.link,
.node rect {
fill: none;
stroke: #636363;
stroke-width: 1.5px;
}
.link {
stroke: #969696;
}
.node rect {
fill: white;
}
.link path,
.node rect,
.node text,
.join {
-webkit-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-moz-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-ms-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-o-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
}
.node .element rect {
fill: #bdbdbd;
stroke: none;
}
.node .null rect {
fill: none;
stroke: none;
}
.node .null text {
fill: #636363;
}
.node .selection rect {
stroke: #e6550d;
}
.node .data rect {
stroke: #3182bd;
}
.node .datum rect {
fill: #d9d9d9;
stroke: none;
}
.node .code text {
font-family: monospace;
color: hsl(0deg 0% 74%)
}
.node .key rect {
fill: #a1d99b;
stroke: none;
}
.link .to-key,
.join {
stroke: #a1d99b;
}
.join {
stroke-dasharray: 2,2;
}
.link .to-null {
stroke-dasharray: .5,3.5;
stroke-linecap: round;
}
.link .from-data {
stroke: #3182bd;
}
.play circle {
fill: #fff;
stroke: #000;
stroke-width: 3px;
}
.play:hover path {
fill: #f00;
}
.play.mousedown circle {
fill: #f00;
}
.play.mousedown path {
fill: #fff;
}
.play rect {
fill: none;
pointer-events: all;
cursor: pointer;
}
code span {
-webkit-transition: background 250ms linear;
-moz-transition: background 250ms linear;
-ms-transition: background 250ms linear;
-o-transition: background 250ms linear;
transition: background 250ms linear;
}
pre.prettyprint, code.prettyprint {
background-color: #222;
border-radius: 8px;
font-size: 15px;
}
pre.prettyprint {
width: 90%;
margin: 0.5em;
padding: 1em;
white-space: pre-wrap;
}
#return-to-top {
position: fixed;
bottom: 20px;
right: 20px;
background: rgb(0, 0, 0);
background: rgba(0, 0, 0, 0.2);
width: 50px;
height: 50px;
display: block;
text-decoration: none;
-webkit-border-radius: 35px;
-moz-border-radius: 35px;
border-radius: 35px;
display: none;
-webkit-transition: all 0.3s linear;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
#return-to-top i {
color: #fff;
margin: 0;
position: relative;
left: 16px;
top: 13px;
font-size: 19px;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
#return-to-top:hover {
background: rgba(0, 0, 0, 0.35);
}
#return-to-top:hover i {
color: #f0f0f0;
}
@media print {
.pagebreak {
page-break-before: always;
}
div {
page-break-inside: avoid;
}
pre {
page-break-inside: avoid;
}
}
.modebar{
display: none !important;
}

461
web/style_dark2.css

@ -0,0 +1,461 @@
/* Copyright 2013 Michael Bostock. All rights reserved. Do not copy. */
@import url(https://fonts.googleapis.com/css?family=PT+Serif|PT+Serif:b|PT+Serif:i|PT+Sans|PT+Sans:b);
.ocks-org body {
background: hsl(206deg 47% 9%);
color: hsl(0deg 0% 72%);
font-family: "PT Serif", serif;
margin: 1em auto 4em auto;
position: relative;
width: 960px;
padding: 1rem;
}
.ocks-org header,
.ocks-org footer,
.ocks-org aside,
.ocks-org h1,
.ocks-org h2,
.ocks-org h3,
.ocks-org h4 {
font-family: "PT Sans", sans-serif;
}
.ocks-org h1,
.ocks-org h2,
.ocks-org h3,
.ocks-org h4 {
color: hsl(0deg 1% 71%);
}
.ocks-org header,
.ocks-org footer {
color: #999999;
}
h1 {
font-size: 64px;
font-weight: 300;
letter-spacing: -2px;
margin: 0.3em 0 0.1em 0;
}
h2 {
margin-top: 2em;
}
h1,
h2 {
text-rendering: optimizeLegibility;
}
h2 a[name],
h2 a[id] {
color: #5f5c5c;
padding-right: 0.3em;
}
header,
footer {
font-size: small;
}
.ocks-org header aside,
.ocks-org footer aside {
float: left;
margin-right: 0.5em;
}
.ocks-org header aside:after,
.ocks-org footer aside:after {
padding-left: 0.5em;
content: "/";
}
footer {
margin-top: 6em;
}
h1 ~ aside {
font-size: small;
right: 0;
position: absolute;
width: 180px;
}
.attribution {
font-size: small;
margin-bottom: 2em;
}
body > p,
li > p,
div > p {
line-height: 1.5em;
}
body > p,
div > p {
width: 720px;
}
body > blockquote {
width: 640px;
}
blockquote q {
display: block;
font-style: oblique;
}
ul {
padding: 0;
}
li {
width: 690px;
margin-left: 30px;
}
a {
color: hsl(187deg 100% 33%);
}
a:not(:hover) {
text-decoration: none;
}
pre,
code,
textarea {
font-family: "Menlo", "Menlo Regular", monospace;
}
code {
line-height: 1em;
color: hsl(0deg 0% 74%);
}
textarea {
font-size: 100%;
}
pre {
border-left: solid 2px #424242;
padding-left: 18px;
margin: 2em 0 2em 0;
}
.html .value,
.javascript .string,
.javascript .regexp {
color: #756bb1;
}
.html .tag,
.css .tag,
.javascript .keyword {
color: #3182bd;
}
.comment {
color: #636363;
}
.html .doctype,
.javascript .number {
color: #31a354;
}
.html .attribute,
.css .attribute,
.javascript .class,
.javascript .special {
color: #e6550d;
}
svg {
font: 10px sans-serif;
}
.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
sup,
sub {
line-height: 0;
}
q:before {
content: "“";
}
q:after {
content: "”";
}
blockquote q {
line-height: 1.5em;
display: inline;
}
blockquote q:before,
blockquote q:after {
content: "";
}
h3,
h4,
p,
ul {
padding-left: 1.2rem;
}
.banner {
padding: 0;
}
#toc {
margin-top: 0;
}
@media only screen and (max-device-width: 1023px) {
.ocks-org body {
font-size: 72%;
padding: 0.5rem;
}
body > p,
div > p {
width: 90vw !important;
}
li {
width: 82vw;
}
h3,
h4,
p,
ul {
padding-left: .7rem;
width: 90vw;
}
h1 {
font-size: 2rem;
}
pre {
padding-left: 0.5rem;
}
.banner,
h1,
img {
max-width: calc(100vw - 2em);
min-width: calc(100vw - 2em);
}
}
/*@import url(web/style.css);*/
@font-face {font-family: "Menlo Regular";
src: url("OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.woff2") format("woff2"), /* chrome、firefox */
url("OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.woff") format("woff");
}
.join,
.link,
.node rect {
fill: none;
stroke: #636363;
stroke-width: 1.5px;
}
.link {
stroke: #969696;
}
.node rect {
fill: white;
}
.link path,
.node rect,
.node text,
.join {
-webkit-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-moz-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-ms-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-o-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
}
.node .element rect {
fill: #bdbdbd;
stroke: none;
}
.node .null rect {
fill: none;
stroke: none;
}
.node .null text {
fill: #636363;
}
.node .selection rect {
stroke: #e6550d;
}
.node .data rect {
stroke: #3182bd;
}
.node .datum rect {
fill: #d9d9d9;
stroke: none;
}
.node .code text {
font-family: monospace;
color: hsl(0deg 0% 74%)
}
.node .key rect {
fill: #a1d99b;
stroke: none;
}
.link .to-key,
.join {
stroke: #a1d99b;
}
.join {
stroke-dasharray: 2,2;
}
.link .to-null {
stroke-dasharray: .5,3.5;
stroke-linecap: round;
}
.link .from-data {
stroke: #3182bd;
}
.play circle {
fill: #fff;
stroke: #000;
stroke-width: 3px;
}
.play:hover path {
fill: #f00;
}
.play.mousedown circle {
fill: #f00;
}
.play.mousedown path {
fill: #fff;
}
.play rect {
fill: none;
pointer-events: all;
cursor: pointer;
}
code span {
-webkit-transition: background 250ms linear;
-moz-transition: background 250ms linear;
-ms-transition: background 250ms linear;
-o-transition: background 250ms linear;
transition: background 250ms linear;
}
pre.prettyprint, code.prettyprint {
background-color: #222;
border-radius: 8px;
font-size: 15px;
}
pre.prettyprint {
width: 90%;
margin: 0.5em;
padding: 1em;
white-space: pre-wrap;
}
#return-to-top {
position: fixed;
bottom: 20px;
right: 20px;
background: rgb(0, 0, 0);
background: rgba(0, 0, 0, 0.2);
width: 50px;
height: 50px;
display: block;
text-decoration: none;
-webkit-border-radius: 35px;
-moz-border-radius: 35px;
border-radius: 35px;
display: none;
-webkit-transition: all 0.3s linear;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
#return-to-top i {
color: #fff;
margin: 0;
position: relative;
left: 16px;
top: 13px;
font-size: 19px;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
#return-to-top:hover {
background: rgba(0, 0, 0, 0.35);
}
#return-to-top:hover i {
color: #f0f0f0;
}
@media print {
.pagebreak {
page-break-before: always;
}
div {
page-break-inside: avoid;
}
pre {
page-break-inside: avoid;
}
}
.modebar{
display: none !important;
}

214
web/template.html

@ -7,8 +7,26 @@
<title>Comprehensive Python Cheatsheet</title>
<meta name="description" content="Exhaustive, simple, beautiful and concise. A truly Pythonic cheat sheet about Python programming language.">
<link rel="icon" href="web/favicon.png">
<link rel="stylesheet" href="web/default.min.css">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css">
<link rel="stylesheet" href="web/style.css">
<script>
// Checks if URL ends with "index.html?dark=true"
if (window.location.search.search(/[?&]theme=dark2/) !== -1) {
document.write("<link rel=\"stylesheet\" href=\"web/default_dark2.min.css\">");
document.write("<link rel=\"stylesheet\" href=\"web/style_dark2.css\">");
}
else if (window.location.search.search(/[?&]theme=dark1/) !== -1) {
document.write("<link rel=\"stylesheet\" href=\"web/default_dark1.min.css\">");
document.write("<link rel=\"stylesheet\" href=\"web/style_dark1.css\">");
}
else if (window.location.search.search(/[?&]theme=dark/) !== -1) {
document.write("<link rel=\"stylesheet\" href=\"web/default_dark.min.css\">");
document.write("<link rel=\"stylesheet\" href=\"web/style_dark.css\">");
}
</script>
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Comprehensive Python Cheatsheet">
@ -30,200 +48,6 @@
<meta name="viewport" id="viewport-meta">
</head>
<style>
@import url(web/style.css);
@font-face {font-family: "Menlo Regular";
src: url("web\\OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.woff2") format("woff2"), /* chrome、firefox */
url("web\\OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.woff") format("woff");
}
.join,
.link,
.node rect {
fill: none;
stroke: #636363;
stroke-width: 1.5px;
}
.link {
stroke: #969696;
}
.node rect {
fill: white;
}
.link path,
.node rect,
.node text,
.join {
-webkit-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-moz-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-ms-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
-o-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
}
.node .element rect {
fill: #bdbdbd;
stroke: none;
}
.node .null rect {
fill: none;
stroke: none;
}
.node .null text {
fill: #636363;
}
.node .selection rect {
stroke: #e6550d;
}
.node .data rect {
stroke: #3182bd;
}
.node .datum rect {
fill: #d9d9d9;
stroke: none;
}
.node .code text {
font-family: monospace;
}
.node .key rect {
fill: #a1d99b;
stroke: none;
}
.link .to-key,
.join {
stroke: #a1d99b;
}
.join {
stroke-dasharray: 2,2;
}
.link .to-null {
stroke-dasharray: .5,3.5;
stroke-linecap: round;
}
.link .from-data {
stroke: #3182bd;
}
.play circle {
fill: #fff;
stroke: #000;
stroke-width: 3px;
}
.play:hover path {
fill: #f00;
}
.play.mousedown circle {
fill: #f00;
}
.play.mousedown path {
fill: #fff;
}
.play rect {
fill: none;
pointer-events: all;
cursor: pointer;
}
code span {
-webkit-transition: background 250ms linear;
-moz-transition: background 250ms linear;
-ms-transition: background 250ms linear;
-o-transition: background 250ms linear;
transition: background 250ms linear;
}
pre.prettyprint, code.prettyprint {
background-color: #222;
border-radius: 8px;
font-size: 15px;
}
pre.prettyprint {
width: 90%;
margin: 0.5em;
padding: 1em;
white-space: pre-wrap;
}
#return-to-top {
position: fixed;
bottom: 20px;
right: 20px;
background: rgb(0, 0, 0);
background: rgba(0, 0, 0, 0.2);
width: 50px;
height: 50px;
display: block;
text-decoration: none;
-webkit-border-radius: 35px;
-moz-border-radius: 35px;
border-radius: 35px;
display: none;
-webkit-transition: all 0.3s linear;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
#return-to-top i {
color: #fff;
margin: 0;
position: relative;
left: 16px;
top: 13px;
font-size: 19px;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
#return-to-top:hover {
background: rgba(0, 0, 0, 0.35);
}
#return-to-top:hover i {
color: #f0f0f0;
}
@media print {
.pagebreak {
page-break-before: always;
}
div {
page-break-inside: avoid;
}
pre {
page-break-inside: avoid;
}
}
.modebar{
display: none !important;
}
</style>
<body>
<header>
<aside>May 20, 2021</aside>

Loading…
Cancel
Save