Browse Source

Removed dark theme from readme menu

pull/82/merge
Jure Šorn 3 years ago
parent
commit
8a9d5c3aa4
2 changed files with 8 additions and 6 deletions
  1. 2
      README.md
  2. 12
      parse.js

2
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), [Check out FAQ](https://github.com/gto76/python-cheatsheet/wiki/Frequently-Asked-Questions) or [Switch to dark theme](index.html?theme=dark2).
<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>
![Monty Python](web/image_888.jpeg)

12
parse.js

@ -409,6 +409,8 @@ const DIAGRAM_18_B =
"┗━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\n";
const MENU = '<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>.\n';
const DARK_THEME_SCRIPT =
'<script>\n' +
' // Changes the image and link to theme if URL ends with "index.html?dark=true". \n' +
@ -459,6 +461,7 @@ function initDom(html) {
}
function modifyPage() {
changeMenu();
addDarkThemeScript();
removeOrigToc();
addToc();
@ -470,11 +473,11 @@ function modifyPage() {
removePlotImages();
}
function addDarkThemeScript() {
function changeMenu() {
$('sup').first().html(MENU)
}
// const script = $.parseHTML(DARK_THEME_SCRIPT);
// $('banner').second().after(script);
// console.log(script)
function addDarkThemeScript() {
$('#main').before(DARK_THEME_SCRIPT);
}
@ -618,7 +621,6 @@ function removePlotImages() {
$('img[alt="Covid Cases"]').remove();
}
function updateDate(template) {
const date = new Date();
const date_str = date.toLocaleString('en-us', {month: 'long', day: 'numeric', year: 'numeric'});

Loading…
Cancel
Save