Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
spatialthoughts committed Jan 9, 2025
1 parent a2b1554 commit 0c5536c
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 58 deletions.
60 changes: 32 additions & 28 deletions docs/pyqgis-masterclass.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

<title>PyQGIS Masterclass - Customizing QGIS with Python (Full Course)</title>

<script src="site_libs/header-attrs-2.10/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.21/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/flatly.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
Expand Down Expand Up @@ -53,6 +53,7 @@
</style>



<style type="text/css">
code {
white-space: pre;
Expand All @@ -74,7 +75,7 @@
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
Expand Down Expand Up @@ -134,13 +135,20 @@
for (var i = 0; i < sheets.length; i++) {
if (sheets[i].ownerNode.dataset["origin"] !== "pandoc") continue;
try { var rules = sheets[i].cssRules; } catch (e) { continue; }
for (var j = 0; j < rules.length; j++) {
var j = 0;
while (j < rules.length) {
var rule = rules[j];
// check if there is a div.sourceCode rule
if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") continue;
if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") {
j++;
continue;
}
var style = rule.style.cssText;
// check if color or background-color is set
if (rule.style.color === '' && rule.style.backgroundColor === '') continue;
if (rule.style.color === '' && rule.style.backgroundColor === '') {
j++;
continue;
}
// replace div.sourceCode by a pre.sourceCode rule
sheets[i].deleteRule(j);
sheets[i].insertRule('pre.sourceCode{' + style + '}', j);
Expand Down Expand Up @@ -176,6 +184,9 @@
summary {
display: list-item;
}
details > summary > p:only-child {
display: inline;
}
pre code {
padding: 0;
}
Expand Down Expand Up @@ -232,11 +243,15 @@
href = "index.html";
var menuAnchor = $('a[href="' + href + '"]');

// mark it active
menuAnchor.tab('show');

// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// mark the anchor link active (and if it's in a dropdown, also mark that active)
var dropdown = menuAnchor.closest('li.dropdown');
if (window.bootstrap) { // Bootstrap 4+
menuAnchor.addClass('active');
dropdown.find('> .dropdown-toggle').addClass('active');
} else { // Bootstrap 3
menuAnchor.parent().addClass('active');
dropdown.addClass('active');
}

// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
Expand Down Expand Up @@ -265,25 +280,18 @@
border-radius: 4px;
}

.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
.tabset-dropdown > .nav-tabs > li.active:before, .tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "\e259";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "&#xe258;";
border: none;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
content: "\e258";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
border: none;
}

.tabset-dropdown > .nav-tabs > li.active {
Expand Down Expand Up @@ -327,7 +335,7 @@
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-bs-toggle="collapse" data-target="#navbar" data-bs-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
Expand Down Expand Up @@ -664,11 +672,7 @@ <h2>Get a Text Editor</h2>
<ul>
<li>Windows: <a
href="https://notepad-plus-plus.org/downloads/">Notepad++</a> is a good
free editor for windows. Download and install the Notepad++ editor. Tip:
Before writing Python code in Notepad+++, make sure to go to Settings →
Preferences → Language and enable <code>Replace by space</code>. Python
is very sensitive about whitespace and this setting will ensure tabs and
spaces are treated properly.</li>
free editor for windows.</li>
<li>Mac: <a href="https://macromates.com/">TextMate</a> is an
open-source editor for Mac that is currently available for free.</li>
</ul>
Expand Down
60 changes: 32 additions & 28 deletions docs/python-foundation.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

<title>Python Foundation for Spatial Analysis (Full Course)</title>

<script src="site_libs/header-attrs-2.10/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.21/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/flatly.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
Expand Down Expand Up @@ -53,6 +53,7 @@
</style>



<style type="text/css">
code {
white-space: pre;
Expand All @@ -74,7 +75,7 @@
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
Expand Down Expand Up @@ -134,13 +135,20 @@
for (var i = 0; i < sheets.length; i++) {
if (sheets[i].ownerNode.dataset["origin"] !== "pandoc") continue;
try { var rules = sheets[i].cssRules; } catch (e) { continue; }
for (var j = 0; j < rules.length; j++) {
var j = 0;
while (j < rules.length) {
var rule = rules[j];
// check if there is a div.sourceCode rule
if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") continue;
if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") {
j++;
continue;
}
var style = rule.style.cssText;
// check if color or background-color is set
if (rule.style.color === '' && rule.style.backgroundColor === '') continue;
if (rule.style.color === '' && rule.style.backgroundColor === '') {
j++;
continue;
}
// replace div.sourceCode by a pre.sourceCode rule
sheets[i].deleteRule(j);
sheets[i].insertRule('pre.sourceCode{' + style + '}', j);
Expand Down Expand Up @@ -176,6 +184,9 @@
summary {
display: list-item;
}
details > summary > p:only-child {
display: inline;
}
pre code {
padding: 0;
}
Expand Down Expand Up @@ -232,11 +243,15 @@
href = "index.html";
var menuAnchor = $('a[href="' + href + '"]');

// mark it active
menuAnchor.tab('show');

// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// mark the anchor link active (and if it's in a dropdown, also mark that active)
var dropdown = menuAnchor.closest('li.dropdown');
if (window.bootstrap) { // Bootstrap 4+
menuAnchor.addClass('active');
dropdown.find('> .dropdown-toggle').addClass('active');
} else { // Bootstrap 3
menuAnchor.parent().addClass('active');
dropdown.addClass('active');
}

// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
Expand Down Expand Up @@ -265,25 +280,18 @@
border-radius: 4px;
}

.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
.tabset-dropdown > .nav-tabs > li.active:before, .tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "\e259";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "&#xe258;";
border: none;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
content: "\e258";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
border: none;
}

.tabset-dropdown > .nav-tabs > li.active {
Expand Down Expand Up @@ -327,7 +335,7 @@
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-bs-toggle="collapse" data-target="#navbar" data-bs-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
Expand Down Expand Up @@ -3202,11 +3210,7 @@ <h2>Get a Text Editor</h2>
<ul>
<li>Windows: <a
href="https://notepad-plus-plus.org/downloads/">Notepad++</a> is a good
free editor for windows. Download and install the Notepad++ editor. Tip:
Before writing Python code in Notepad+++, make sure to go to Settings →
Preferences → Language and enable <code>Replace by space</code>. Python
is very sensitive about whitespace and this setting will ensure tabs and
spaces are treated properly.</li>
free editor for windows. Download and install the Notepad++ editor.</li>
<li>Mac: <a href="https://macromates.com/">TextMate</a> is an
open-source editor for Mac that is currently available for free.</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion pyqgis-masterclass.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Any kind of software development requires a good text editor. If you already hav

Below are my recommendations editors that are simple to use for beginners.

- Windows: [Notepad++](https://notepad-plus-plus.org/downloads/) is a good free editor for windows. Download and install the Notepad++ editor. Tip: Before writing Python code in Notepad+++, make sure to go to Settings &rarr; Preferences &rarr; Language and enable `Replace by space`. Python is very sensitive about whitespace and this setting will ensure tabs and spaces are treated properly.
- Windows: [Notepad++](https://notepad-plus-plus.org/downloads/) is a good free editor for windows.
- Mac: [TextMate](https://macromates.com/) is an open-source editor for Mac that is currently available for free.


Expand Down
2 changes: 1 addition & 1 deletion python-foundation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ Any kind of software development requires a good text editor. If you already hav

Below are my recommendations editors that are simple to use for beginners.

- Windows: [Notepad++](https://notepad-plus-plus.org/downloads/) is a good free editor for windows. Download and install the Notepad++ editor. Tip: Before writing Python code in Notepad+++, make sure to go to Settings &rarr; Preferences &rarr; Language and enable `Replace by space`. Python is very sensitive about whitespace and this setting will ensure tabs and spaces are treated properly.
- Windows: [Notepad++](https://notepad-plus-plus.org/downloads/) is a good free editor for windows. Download and install the Notepad++ editor.
- Mac: [TextMate](https://macromates.com/) is an open-source editor for Mac that is currently available for free.

## Writing a Script
Expand Down

0 comments on commit 0c5536c

Please sign in to comment.