Skip to content

Commit a278313

Browse files
committed
Web cleanup
1 parent c818496 commit a278313

File tree

2 files changed

+2
-42
lines changed

2 files changed

+2
-42
lines changed

index.html

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<!DOCTYPE html>
32
<html class="ocks-org do-not-copy">
43

@@ -149,7 +148,7 @@
149148
<a href="../" rel="author">Jure Šorn</a>
150149
</header>
151150

152-
<div id=bla></div>
151+
<div id=main_container></div>
153152

154153
<footer>
155154
<aside>March 14, 2018</aside>
@@ -159,11 +158,5 @@
159158
<br>
160159
<br>
161160
<br>
162-
163-
<!-- <script src="web/showdown.min.js"></script>
164-
<link rel="stylesheet" href="web/default.min.css">
165-
<script src="web/highlight.min.js"></script>
166-
<script src="web/script.js"></script> -->
167-
<!-- <script async="" src="highlight.min.js"></script> -->
168161
</body>
169162
</html>

web/script.js

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,57 +2,24 @@ $(document).ready(function() {
22
parseMd()
33
});
44

5-
// parseMd()
6-
75
function parseMd() {
86
var GITHUB = 'https://raw.githubusercontent.com/gto76/python-cheatsheet/master/README.md'
97
var RAWGIT = "https://rawgit.com/gto76/python-cheatsheet/master/README.md"
108
jQuery.get(GITHUB, function(text) {
119
var converter = new showdown.Converter()
12-
// text = '#hello, markdown!'
13-
// var converter = new showdown.Converter({extensions: ['prettify']})
1410
html = converter.makeHtml(text)
15-
aDiv = $('#bla')
11+
aDiv = $('#main_container')
1612
nodes = $.parseHTML(html)
1713
aDiv.after(nodes);
18-
// PR.prettyPrint()
1914
insertLinks()
20-
// $("code").removeClass("xml")
21-
// $.getScript("https://bost.ocks.org/mike/highlight.min.js")
22-
// hljs.configure({
23-
// languages: ['python']
24-
// })
25-
// hljs.initHighlighting();
26-
27-
// d3.selectAll("code:not([class])").classed("javascript", 1);
28-
29-
// d3.selectAll("code").classed("javascript", 1);
30-
3115
d3.selectAll("code").each(function() { hljs.highlightBlock(this); });
3216

3317
});
3418
}
3519

36-
// function parseMd() {
37-
// var GITHUB = 'https://raw.githubusercontent.com/gto76/python-cheatsheet/master/README.md'
38-
// var RAWGIT = "https://rawgit.com/gto76/python-cheatsheet/master/README.md"
39-
// jQuery.get(GITHUB, function(text) {
40-
// var converter = new showdown.Converter({extensions: ['prettify']})
41-
// // text = '#hello, markdown!'
42-
// html = converter.makeHtml(text)
43-
// aDiv = $('#bla')
44-
// nodes = $.parseHTML(html)
45-
// aDiv.after(nodes);
46-
// PR.prettyPrint()
47-
// insertLinks()
48-
// });
49-
// }
50-
5120
function insertLinks() {
5221
$('h2').each(function() {
53-
// title = $(this).text()
5422
aId = $(this).attr('id')
55-
// titleNoSpace = title.replace(" ", "-");
5623
$(this).append('<a href="#'+aId+'" name="'+aId+'">#</a>')
5724
})
5825
}

0 commit comments

Comments
 (0)