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

index_helper.tmpl.py 3.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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.405856
  9. _enable_loop = True
  10. _template_filename = '/home/thomas/.local/lib/python3.9/site-packages/nikola/data/themes/base/templates/index_helper.tmpl'
  11. _template_uri = 'index_helper.tmpl'
  12. _source_encoding = 'utf-8'
  13. _exports = ['html_pager', 'mathjax_script']
  14. def _mako_get_namespace(context, name):
  15. try:
  16. return context.namespaces[(__name__, name)]
  17. except KeyError:
  18. _mako_generate_namespaces(context)
  19. return context.namespaces[(__name__, name)]
  20. def _mako_generate_namespaces(context):
  21. ns = runtime.TemplateNamespace('math', context._clean_inheritance_tokens(), templateuri='math_helper.tmpl', callables=None, calling_uri=_template_uri)
  22. context.namespaces[(__name__, 'math')] = ns
  23. def render_body(context,**pageargs):
  24. __M_caller = context.caller_stack._push_frame()
  25. try:
  26. __M_locals = __M_dict_builtin(pageargs=pageargs)
  27. __M_writer = context.writer()
  28. __M_writer('\n')
  29. __M_writer('\n\n')
  30. __M_writer('\n')
  31. return ''
  32. finally:
  33. context.caller_stack._pop_frame()
  34. def render_html_pager(context):
  35. __M_caller = context.caller_stack._push_frame()
  36. try:
  37. messages = context.get('messages', UNDEFINED)
  38. prevlink = context.get('prevlink', UNDEFINED)
  39. nextlink = context.get('nextlink', UNDEFINED)
  40. __M_writer = context.writer()
  41. __M_writer('\n')
  42. if prevlink or nextlink:
  43. __M_writer(' <nav class="postindexpager">\n <ul class="pager">\n')
  44. if prevlink:
  45. __M_writer(' <li class="previous">\n <a href="')
  46. __M_writer(str(prevlink))
  47. __M_writer('" rel="prev">')
  48. __M_writer(str(messages("Newer posts")))
  49. __M_writer('</a>\n </li>\n')
  50. if nextlink:
  51. __M_writer(' <li class="next">\n <a href="')
  52. __M_writer(str(nextlink))
  53. __M_writer('" rel="next">')
  54. __M_writer(str(messages("Older posts")))
  55. __M_writer('</a>\n </li>\n')
  56. __M_writer(' </ul>\n </nav>\n')
  57. return ''
  58. finally:
  59. context.caller_stack._pop_frame()
  60. def render_mathjax_script(context,posts):
  61. __M_caller = context.caller_stack._push_frame()
  62. try:
  63. math = _mako_get_namespace(context, 'math')
  64. __M_writer = context.writer()
  65. __M_writer('\n ')
  66. __M_writer(str(math.math_scripts_ifposts(posts)))
  67. __M_writer('\n')
  68. return ''
  69. finally:
  70. context.caller_stack._pop_frame()
  71. """
  72. __M_BEGIN_METADATA
  73. {"filename": "/home/thomas/.local/lib/python3.9/site-packages/nikola/data/themes/base/templates/index_helper.tmpl", "uri": "index_helper.tmpl", "source_encoding": "utf-8", "line_map": {"23": 2, "26": 0, "31": 2, "32": 20, "33": 25, "39": 3, "46": 3, "47": 4, "48": 5, "49": 7, "50": 8, "51": 9, "52": 9, "53": 9, "54": 9, "55": 12, "56": 13, "57": 14, "58": 14, "59": 14, "60": 14, "61": 17, "67": 23, "72": 23, "73": 24, "74": 24, "80": 74}}
  74. __M_END_METADATA
  75. """