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

comments_helper.tmpl.py 3.1KB

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.1161768
  9. _enable_loop = True
  10. _template_filename = '/home/thomas/.local/lib/python3.9/site-packages/nikola/data/themes/base/templates/comments_helper.tmpl'
  11. _template_uri = 'comments_helper.tmpl'
  12. _source_encoding = 'utf-8'
  13. _exports = ['comment_form', 'comment_link', 'comment_link_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('comments_helper_impl', context._clean_inheritance_tokens(), templateuri='comments_helper_' + (context['comment_system']) + '.tmpl', callables=None, calling_uri=_template_uri)
  22. context.namespaces[(__name__, 'comments_helper_impl')] = 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\n')
  31. __M_writer('\n\n')
  32. __M_writer('\n')
  33. return ''
  34. finally:
  35. context.caller_stack._pop_frame()
  36. def render_comment_form(context,url,title,identifier):
  37. __M_caller = context.caller_stack._push_frame()
  38. try:
  39. comments_helper_impl = _mako_get_namespace(context, 'comments_helper_impl')
  40. __M_writer = context.writer()
  41. __M_writer('\n ')
  42. __M_writer(str(comments_helper_impl.comment_form(url, title, identifier)))
  43. __M_writer('\n')
  44. return ''
  45. finally:
  46. context.caller_stack._pop_frame()
  47. def render_comment_link(context,link,identifier):
  48. __M_caller = context.caller_stack._push_frame()
  49. try:
  50. comments_helper_impl = _mako_get_namespace(context, 'comments_helper_impl')
  51. __M_writer = context.writer()
  52. __M_writer('\n ')
  53. __M_writer(str(comments_helper_impl.comment_link(link, identifier)))
  54. __M_writer('\n')
  55. return ''
  56. finally:
  57. context.caller_stack._pop_frame()
  58. def render_comment_link_script(context):
  59. __M_caller = context.caller_stack._push_frame()
  60. try:
  61. comments_helper_impl = _mako_get_namespace(context, 'comments_helper_impl')
  62. __M_writer = context.writer()
  63. __M_writer('\n ')
  64. __M_writer(str(comments_helper_impl.comment_link_script()))
  65. __M_writer('\n')
  66. return ''
  67. finally:
  68. context.caller_stack._pop_frame()
  69. """
  70. __M_BEGIN_METADATA
  71. {"filename": "/home/thomas/.local/lib/python3.9/site-packages/nikola/data/themes/base/templates/comments_helper.tmpl", "uri": "comments_helper.tmpl", "source_encoding": "utf-8", "line_map": {"23": 3, "26": 0, "31": 2, "32": 3, "33": 7, "34": 11, "35": 15, "41": 5, "46": 5, "47": 6, "48": 6, "54": 9, "59": 9, "60": 10, "61": 10, "67": 13, "72": 13, "73": 14, "74": 14, "80": 74}}
  72. __M_END_METADATA
  73. """