72 lines
2.9 KiB
Python
72 lines
2.9 KiB
Python
# -*- coding:utf-8 -*-
|
|
from mako import runtime, filters, cache
|
|
UNDEFINED = runtime.UNDEFINED
|
|
__M_dict_builtin = dict
|
|
__M_locals_builtin = locals
|
|
_magic_number = 10
|
|
_modified_time = 1434078007.350104
|
|
_enable_loop = True
|
|
_template_filename = '/usr/lib/python3.4/site-packages/nikola/data/themes/base/templates/index_helper.tmpl'
|
|
_template_uri = 'index_helper.tmpl'
|
|
_source_encoding = 'utf-8'
|
|
_exports = ['html_pager', 'mathjax_script']
|
|
|
|
|
|
def render_body(context,**pageargs):
|
|
__M_caller = context.caller_stack._push_frame()
|
|
try:
|
|
__M_locals = __M_dict_builtin(pageargs=pageargs)
|
|
__M_writer = context.writer()
|
|
__M_writer('\n\n')
|
|
__M_writer('\n')
|
|
return ''
|
|
finally:
|
|
context.caller_stack._pop_frame()
|
|
|
|
|
|
def render_html_pager(context):
|
|
__M_caller = context.caller_stack._push_frame()
|
|
try:
|
|
prevlink = context.get('prevlink', UNDEFINED)
|
|
messages = context.get('messages', UNDEFINED)
|
|
nextlink = context.get('nextlink', UNDEFINED)
|
|
__M_writer = context.writer()
|
|
__M_writer('\n')
|
|
if prevlink or nextlink:
|
|
__M_writer(' <nav class="postindexpager">\n <ul class="pager">\n')
|
|
if prevlink:
|
|
__M_writer(' <li class="previous">\n <a href="')
|
|
__M_writer(str(prevlink))
|
|
__M_writer('" rel="prev">')
|
|
__M_writer(str(messages("Newer posts")))
|
|
__M_writer('</a>\n </li>\n')
|
|
if nextlink:
|
|
__M_writer(' <li class="next">\n <a href="')
|
|
__M_writer(str(nextlink))
|
|
__M_writer('" rel="next">')
|
|
__M_writer(str(messages("Older posts")))
|
|
__M_writer('</a>\n </li>\n')
|
|
__M_writer(' </ul>\n </nav>\n')
|
|
return ''
|
|
finally:
|
|
context.caller_stack._pop_frame()
|
|
|
|
|
|
def render_mathjax_script(context,posts):
|
|
__M_caller = context.caller_stack._push_frame()
|
|
try:
|
|
any = context.get('any', UNDEFINED)
|
|
__M_writer = context.writer()
|
|
__M_writer('\n')
|
|
if any(post.is_mathjax for post in posts):
|
|
__M_writer(' <script type="text/x-mathjax-config">\n MathJax.Hub.Config({tex2jax: {inlineMath: [[\'$latex \',\'$\'], [\'\\\\(\',\'\\\\)\']]}});</script>\n <script src="/assets/js/mathjax.js"></script>\n')
|
|
return ''
|
|
finally:
|
|
context.caller_stack._pop_frame()
|
|
|
|
|
|
"""
|
|
__M_BEGIN_METADATA
|
|
{"source_encoding": "utf-8", "line_map": {"68": 62, "15": 0, "20": 19, "21": 27, "27": 2, "34": 2, "35": 3, "36": 4, "37": 6, "38": 7, "39": 8, "40": 8, "41": 8, "42": 8, "43": 11, "44": 12, "45": 13, "46": 13, "47": 13, "48": 13, "49": 16, "55": 21, "60": 21, "61": 22, "62": 23}, "filename": "/usr/lib/python3.4/site-packages/nikola/data/themes/base/templates/index_helper.tmpl", "uri": "index_helper.tmpl"}
|
|
__M_END_METADATA
|
|
"""
|