From 158ee107623dc68acd97ea90bc8b438ee07043c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 19 Mar 2019 15:58:03 +0100 Subject: [PATCH] Added ToC --- web/script.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/web/script.js b/web/script.js index 820384e..ed1c839 100644 --- a/web/script.js +++ b/web/script.js @@ -12,7 +12,7 @@ function parseMd() { aDiv.after(nodes); insertLinks() d3.selectAll("code").each(function() { hljs.highlightBlock(this); }); - // addToc() + addToc() }); } @@ -29,4 +29,16 @@ function addToc() { headerMain.before(nodes) } -var TOC = '

Contents#

' \ No newline at end of file +var TOC = '
' + +'

Contents#

' + +'
ToC = {' +
+'    \'1. Collections\': [List, Dict, Set, Range, Enumerate, Namedtuple, Iterator, Generator],' +
+'    \'2. Types\':       [Type, String, Regex, Format, Numbers, Combinatorics, Datetimeᴺᴱᵂ],' +
+'    \'3. Syntax\':      [Args, Splat, Inline, Closure, Decorator, Class, Enum, Exceptions],' +
+'    \'4. System\':      [Print, Input, Command_Line_Arguments, Open, Pathᴺᴱᵂ, Command_Execution],' +
+'    \'5. Data\':        [CSV, JSON, Pickle, SQLite, Bytes, Struct, Array, MemoryView, Deque],' +
+'    \'6. Advanced\':    [Threading, Introspection, Metaprograming, Operator, Eval, Coroutine],' +
+'    \'7. Libraries\':   [Progress_Bar, Plot, Table, Curses, Loggingᴺᴱᵂ, Scraping, Web, Profile,' +
+'                       NumPy, Image, Audio, Basic_Script_Template]' +
+'}' +
+'
' \ No newline at end of file