A new Riff-radio.org site with a static approach.

archive_navigation_helper.tmpl.py 3.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # -*- coding:utf-8 -*-
  2. from mako import runtime, filters, cache
  3. UNDEFINED = runtime.UNDEFINED
  4. STOP_RENDERING = runtime.STOP_RENDERING
  5. __M_dict_builtin = dict
  6. __M_locals_builtin = locals
  7. _magic_number = 10
  8. _modified_time = 1676236796.3241377
  9. _enable_loop = True
  10. _template_filename = '/home/thomas/.local/lib/python3.9/site-packages/nikola/data/themes/base/templates/archive_navigation_helper.tmpl'
  11. _template_uri = 'archive_navigation_helper.tmpl'
  12. _source_encoding = 'utf-8'
  13. _exports = ['archive_navigation']
  14. def render_body(context,**pageargs):
  15. __M_caller = context.caller_stack._push_frame()
  16. try:
  17. __M_locals = __M_dict_builtin(pageargs=pageargs)
  18. __M_writer = context.writer()
  19. __M_writer('\n')
  20. __M_writer('\n')
  21. return ''
  22. finally:
  23. context.caller_stack._pop_frame()
  24. def render_archive_navigation(context):
  25. __M_caller = context.caller_stack._push_frame()
  26. try:
  27. pagekind = context.get('pagekind', UNDEFINED)
  28. previous_archive = context.get('previous_archive', UNDEFINED)
  29. up_archive = context.get('up_archive', UNDEFINED)
  30. messages = context.get('messages', UNDEFINED)
  31. has_archive_navigation = context.get('has_archive_navigation', UNDEFINED)
  32. next_archive = context.get('next_archive', UNDEFINED)
  33. __M_writer = context.writer()
  34. __M_writer('\n')
  35. if 'archive_page' in pagekind:
  36. if has_archive_navigation:
  37. __M_writer(' <nav class="archivenav">\n <ul class="pager">\n')
  38. if previous_archive:
  39. __M_writer(' <li class="previous"><a href="')
  40. __M_writer(str(previous_archive))
  41. __M_writer('" rel="prev">')
  42. __M_writer(str(messages("Previous")))
  43. __M_writer('</a></li>\n')
  44. else:
  45. __M_writer(' <li class="previous disabled"><a href="#" rel="prev">')
  46. __M_writer(str(messages("Previous")))
  47. __M_writer('</a></li>\n')
  48. if up_archive:
  49. __M_writer(' <li class="up"><a href="')
  50. __M_writer(str(up_archive))
  51. __M_writer('" rel="up">')
  52. __M_writer(str(messages("Up")))
  53. __M_writer('</a></li>\n')
  54. else:
  55. __M_writer(' <li class="up disabled"><a href="#" rel="up">')
  56. __M_writer(str(messages("Up")))
  57. __M_writer('</a></li>\n')
  58. if next_archive:
  59. __M_writer(' <li class="next"><a href="')
  60. __M_writer(str(next_archive))
  61. __M_writer('" rel="next">')
  62. __M_writer(str(messages("Next")))
  63. __M_writer('</a></li>\n')
  64. else:
  65. __M_writer(' <li class="next disabled"><a href="#" rel="next">')
  66. __M_writer(str(messages("Next")))
  67. __M_writer('</a></li>\n')
  68. __M_writer(' </ul>\n </nav>\n')
  69. return ''
  70. finally:
  71. context.caller_stack._pop_frame()
  72. """
  73. __M_BEGIN_METADATA
  74. {"filename": "/home/thomas/.local/lib/python3.9/site-packages/nikola/data/themes/base/templates/archive_navigation_helper.tmpl", "uri": "archive_navigation_helper.tmpl", "source_encoding": "utf-8", "line_map": {"16": 0, "21": 2, "22": 27, "28": 3, "38": 3, "39": 4, "40": 5, "41": 6, "42": 8, "43": 9, "44": 9, "45": 9, "46": 9, "47": 9, "48": 10, "49": 11, "50": 11, "51": 11, "52": 13, "53": 14, "54": 14, "55": 14, "56": 14, "57": 14, "58": 15, "59": 16, "60": 16, "61": 16, "62": 18, "63": 19, "64": 19, "65": 19, "66": 19, "67": 19, "68": 20, "69": 21, "70": 21, "71": 21, "72": 23, "78": 72}}
  75. __M_END_METADATA
  76. """