diff options
Diffstat (limited to 'cgi/template.py')
-rw-r--r-- | cgi/template.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cgi/template.py b/cgi/template.py index ca47db8..6d0c085 100644 --- a/cgi/template.py +++ b/cgi/template.py @@ -46,12 +46,13 @@ def renderTemplate(template, template_values={}, mobile=False, noindex=False): # if board: if template in ["board.html", "threadlist.html", "catalog.html", "kako.html", "paint.html"] or template[0:3] == "txt": # TODO HACK - if board['dir'] == 'world' and not mobile and template == 'txt_board.html': - template = template[:-4] + 'en.html' - elif board['dir'] == '2d' and template == 'board.html' and not mobile: - template = template[:-4] + 'jp.html' - elif board['dir'] == '0' and template == 'board.html' and not mobile: - template = template[:-4] + '0.html' + if not mobile: + if board['dir'] == 'world' and template == 'txt_board.html': + template = template[:-4] + 'en.html' + elif board['dir'] == '2d' and template == 'board.html': + template = template[:-4] + 'jp.html' + elif board['dir'] == '0' and template == 'board.html': + template = template[:-4] + '0.html' try: banners = Settings.banners[board['dir']] |