X-Git-Url: https://git.cworth.org/git?p=turbot-web;a=blobdiff_plain;f=html_generator.py;h=0fef3d421c3f1b9158a7e97932f07b43342b24a6;hp=28891022c91ded2be0def4cc151f4d54cf028bda;hb=HEAD;hpb=582fc9dbdaac3053c448af43eb8b7f71b1903d9b diff --git a/html_generator.py b/html_generator.py index 2889102..f187032 100644 --- a/html_generator.py +++ b/html_generator.py @@ -32,7 +32,9 @@ def hunt_file(hunt, name): def internal_link(hunt, name): """Returns a path for a link on this site.""" - return "{}/{}".format(hunt['channel_id'], name) + + # Just generate a relative link, (which is just the name itself) + return "{}".format(name) def filename_from_name(name): """Returns a string derived from name, but with all spaces and slashes @@ -143,6 +145,7 @@ def overview(hunt, puzzles, rounds): '\n', ' \n', ' \n', + ' \n', '\n', ' \n', ' \n' '\n', - '
\n' - ' Hunt Overview' - ' All Puzzles\n' - ' Unsolved\n' - ' Solved\n' - '
\n' + '
\n', + ' Hunt Overview', + ' All Puzzles\n', + ' Unsolved\n', + ' Solved\n', + ' Turbot Docs\n' + '
\n', '\n',] columns = ['
\n'] expanding = [] @@ -236,6 +240,7 @@ def round_overview(hunt, rnd, puzzles): ' \n', ' Mystery Hunt 2022\n', ' \n', + ' \n', ' \n', ' \n'.format(status), '

{}

\n'.format(rnd), @@ -320,6 +325,7 @@ def puzzle_overview(hunt, puzzle): '\n', ' \n', ' \n', + ' \n', ' \n', ' {}\n'.format(name+meta), '

{}

'.format(link(internal_link(hunt, 'index') + ".html", 'Hunt Overview')), @@ -369,13 +375,15 @@ def puzzle_lists(hunt, puzzles, filt): ' \n', ' Mystery Hunt 2022\n', ' \n', + ' \n', ' \n', - '
\n' - ' Hunt Overview' - ' All Puzzles\n' - ' Unsolved\n' - ' Solved\n' - '
\n' + '
\n', + ' Hunt Overview', + ' All Puzzles\n', + ' Unsolved\n', + ' Solved\n', + ' Turbot Docs\n' + '
\n', ' \n', '

{}

\n'.format('{} Puzzles').format(filt), '

{}

\n'.format(link(internal_link(hunt, 'index') + ".html", 'Hunt Overview')),