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

ui_helper.tmpl.py 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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.2577004
  9. _enable_loop = True
  10. _template_filename = 'themes/bootstrap3/templates/ui_helper.tmpl'
  11. _template_uri = 'ui_helper.tmpl'
  12. _source_encoding = 'utf-8'
  13. _exports = ['breadcrumbs']
  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. return ''
  21. finally:
  22. context.caller_stack._pop_frame()
  23. def render_breadcrumbs(context,crumbs):
  24. __M_caller = context.caller_stack._push_frame()
  25. try:
  26. index_file = context.get('index_file', UNDEFINED)
  27. __M_writer = context.writer()
  28. __M_writer('\n')
  29. if crumbs:
  30. __M_writer('<nav class="breadcrumbs">\n<ul class="breadcrumb">\n')
  31. for link, text in crumbs:
  32. if text != index_file:
  33. if link == '#':
  34. __M_writer(' <li>')
  35. __M_writer(str(text.rsplit('.html', 1)[0]))
  36. __M_writer('</li>\n')
  37. else:
  38. __M_writer(' <li><a href="')
  39. __M_writer(str(link))
  40. __M_writer('">')
  41. __M_writer(str(text))
  42. __M_writer('</a></li>\n')
  43. __M_writer('</ul>\n</nav>\n')
  44. return ''
  45. finally:
  46. context.caller_stack._pop_frame()
  47. """
  48. __M_BEGIN_METADATA
  49. {"filename": "themes/bootstrap3/templates/ui_helper.tmpl", "uri": "ui_helper.tmpl", "source_encoding": "utf-8", "line_map": {"16": 0, "21": 18, "27": 2, "32": 2, "33": 3, "34": 4, "35": 6, "36": 7, "37": 8, "38": 9, "39": 9, "40": 9, "41": 10, "42": 11, "43": 11, "44": 11, "45": 11, "46": 11, "47": 15, "53": 47}}
  50. __M_END_METADATA
  51. """