8000 Removed dark theme from readme menu · fluencydoc/python-cheatsheet@8a9d5c3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8a9d5c3

Browse files
committed
Removed dark theme from readme menu
1 parent c34208a commit 8a9d5c3

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Comprehensive Python Cheatsheet
22
===============================
3-
<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).
3+
<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).
44
</sup>
55

66
![Monty Python](web/image_888.jpeg)

parse.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ const DIAGRAM_18_B =
409409
"┗━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\n";
410410

411411

412+
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';
413+
412414
const DARK_THEME_SCRIPT =
413415
'<script>\n' +
414416
' // Changes the image and link to theme if URL ends with "index.html?dark=true". \n' +
@@ -459,6 +461,7 @@ function initDom(html) {
459461
}
460462

461463
function modifyPage() {
464+
changeMenu();
462465
addDarkThemeScript();
463466
removeOrigToc();
464467
addToc();
@@ -470,11 +473,11 @@ function modifyPage() {
470473
removePlotImages();
471474
}
472475

473-
function addDarkThemeScript() {
476+
function changeMenu() {
477+
$('sup').first().html(MENU)
478+
}
474479

475-
// const script = $.parseHTML(DARK_THEME_SCRIPT);
476-
// $('banner').second().after(script);
477-
// console.log(script)
480+
function addDarkThemeScript() {
478481
$('#main').before(DARK_THEME_SCRIPT);
479482
}
480483

@@ -618,7 +621,6 @@ function removePlotImages() {
618621
$('img[alt="Covid Cases"]').remove();
619622
}
620623

621-
622624
function updateDate(template) {
623625
const date = new Date();
624626
const date_str = date.toLocaleString('en-us', {month: 'long', day: 'numeric', year: 'numeric'});

0 commit comments

Comments
 (0)
0